[M] Change in fuchsia/fuchsia[main]: [genai] Start .agent directory with a C++ review workflow.

0 views
Skip to first unread message

'Adam Perry (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:31:28 PM (2 days ago) Feb 3
to Owners Override
Attention needed from Owners Override

Adam Perry has uploaded the change for review

Adam Perry would like Owners Override to review this change.

Commit message

[genai] Start .agent directory with a C++ review workflow.

This has been useful for me while developing fxr/1477583 and
fxr/1483758.
Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13

Change diff

diff --git a/.agent/OWNERS b/.agent/OWNERS
new file mode 100644
index 0000000..64fd40c
--- /dev/null
+++ b/.agent/OWNERS
@@ -0,0 +1 @@
+include /.gemini/OWNERS
\ No newline at end of file
diff --git a/.agent/workflows/cpp_code_review.md b/.agent/workflows/cpp_code_review.md
new file mode 100644
index 0000000..5581085
--- /dev/null
+++ b/.agent/workflows/cpp_code_review.md
@@ -0,0 +1,90 @@
+---
+description: Review Fuchsia C++ code
+---
+
+Assume the role of a friendly and helpful expert in low-level C++ programming
+for an operating system.
+
+# Priorities
+
+You need to review the provided inputs from several angles. You are looking for:
+
+1. Ways the user may have made mistakes in their code.
+1. Ways the user could have matched the surrounding code style and conventions
+ more closely.
+1. Teaching opportunities for the user's command of C++ to improve.
+
+## 1. Looking for mistakes
+
+The most critical mistakes are those which could introduce Undefined Behavior
+(UB). Look for those first.
+
+Carefully examine the lifecycle of objects and whether references or pointers to
+them can outlive the objects themselves.
+
+Look for places where nullability is not correctly checked.
+
+Be on the lookout for concurrency mistakes. Scrutinize atomic operations very
+closely. Identify desired synchronization properties and ensure sync points are
+correctly paired with acquire & release orderings on the right sides of
+operations. Pay extra attention to relaxed or sequentially-consistent orderings,
+they can be a sign of underbaked concurrency abstractions.
+
+Once you've identified or ruled out causes of UB, look for missing error
+handling, logical invariant violations, and the like.
+
+## 2. Matching local style & conventions
+
+Your overall agent guidance already advises to match the local conventions.
+Please pay extra attention to this in your suggestions for modifications to the
+user's code.
+
+Identifying ways that local conventions could be improved or modernized is still
+great information for your review comments, as these are excellent things for
+the user to learn.
+
+## 3. Teaching opportunities
+
+If applicable, generate recommendations about idiomatic and defensive C++
+programming to help the user improve their understanding of the language.
+
+For example, if they've made a mistake with pointer lifetimes, don't just tell
+them they have a source of undefined behavior. Illustrate the sequence of
+operations and their relative timing that could lead to a use-after-free or
+similar issue, and include references to websites like cppreference.com to help
+the user understand the issue.
+
+# Process
+
+## Read relevant documentation
+
+Before you review the user's code, read relevant documentation from
+`docs/development/languages/c-cpp`. At a minimum you MUST read the following
+before reviewing:
+
+- docs/development/languages/c-cpp/cpp-style.md
+- docs/development/languages/c-cpp/naming.md
+- docs/development/languages/c-cpp/library_restrictions.md
+- docs/development/languages/c-cpp/lint.md
+- docs/development/languages/c-cpp/logging.md
+- docs/development/languages/c-cpp/thread-safe-async.md
+
+If the user provided you with code that touches the `//zircon` directory, you
+MUST also read the following before reviewing their code:
+
+- docs/development/languages/c-cpp/cxx.md
+- docs/development/languages/c-cpp/fbl_containers_guide/introduction.md
+
+## Read the provided code
+
+If the user has provided you with source references or a diff, refer to that.
+Otherwise, inform the user once you've consumed the relevant documentation and
+that you're ready for them to give you the code to review.
+
+If you're reviewing a diff, open the full files to understand more of what's
+happening with the change.
+
+## Produce a report
+
+Your review should come in the form of a markdown artifact with code references
+and links. Do not emit the review directly into the conversation.

Change information

Files:
  • A .agent/OWNERS
  • A .agent/workflows/cpp_code_review.md
Change size: M
Delta: 2 files changed, 91 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 8
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/0d1ee3e35b4c2a85e305eb47f76793737257f38a-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Adam Perry (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:31:32 PM (2 days ago) Feb 3
to Owners Override, John Wittrock, CQ Bot
Attention needed from Owners Override

Adam Perry voted and added 3 comments

Votes added by Adam Perry

Commit-Queue+1

3 comments

File .agent/workflows/cpp_code_review.md
Line 19, Patchset 6:Carefully examine the lifecycle of objects and whether references or pointers to them can outlive the objects themselves.
John Wittrock . resolved

general nit: line length? we prefer 80 chars for md files I think.

Adam Perry

Yeah AGY's UI doesn't include the normal editor widgets here, but thankfully it seems we have `mdformat` in our apt repos.

Line 35, Patchset 6:Don't assume that the user understands all of the tradeoffs of writing good C++.
John Wittrock . resolved

Should probably rephrase this as a positive - what should the agent do instead of _not_ do? Perhaps give a couple examples if there are specific things you care about.

Adam Perry

Done, also nudged it to include references to my personal favorite reference.

Line 50, Patchset 6:If the user provided you with code that touches the `/zircon` directory, you MUST also read the following before reviewing their code:
John Wittrock . resolved

two slashes? it's not the root dir, technically.

Adam Perry

This is actually something I'm a bit unsure about -- it seems like agents don't like the two-slash-prefix convention unless they're specifically talking about build targets.

I agree it would be the right convention for humans, so I'll stick with it for now, just raising for discussion down the line.

Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 8
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Wed, 04 Feb 2026 00:31:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: John Wittrock <witt...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/0d1ee3e35b4c2a85e305eb47f76793737257f38a-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Kevin Lindkvist (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:32:21 PM (2 days ago) Feb 3
to Adam Perry, Owners Override, John Wittrock, CQ Bot
Attention needed from Adam Perry and Owners Override

Kevin Lindkvist voted Owners-Override+1

Owners-Override+1
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 8
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Adam Perry <adam...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Wed, 04 Feb 2026 00:32:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/36a657025a45a8688a1baec7c41981476410dc18-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Adam Perry (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:32:37 PM (2 days ago) Feb 3
to Kevin Lindkvist, Owners Override, John Wittrock, CQ Bot
Attention needed from Owners Override

Adam Perry voted Fuchsia-Auto-Submit+1

Fuchsia-Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 8
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Wed, 04 Feb 2026 00:32:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/2f7d9d4349265641c7fbc04303e0f6a625b29cc7-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:41:14 PM (2 days ago) Feb 3
to Adam Perry, Kevin Lindkvist, Owners Override, John Wittrock

CQ Bot submitted the change with unreviewed changes

Unreviewed changes

6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: .agent/workflows/cpp_code_review.md
Insertions: 50, Deletions: 23.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
[genai] Start .agent directory with a C++ review workflow.

This has been useful for me while developing fxr/1477583 and
fxr/1483758.
Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Owners-Override: Kevin Lindkvist <lind...@google.com>
Fuchsia-Auto-Submit: Adam Perry <adam...@google.com>
Reviewed-by: John Wittrock <witt...@google.com>
Commit-Queue: Adam Perry <adam...@google.com>
Files:
  • A .agent/OWNERS
  • A .agent/workflows/cpp_code_review.md
Change size: M
Delta: 2 files changed, 91 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by John Wittrock
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 9
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/749e81da888e64663418f8c2df66ac6cfbb4ac2c-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Feb 3, 2026, 7:50:48 PM (2 days ago) Feb 3
to Adam Perry, CQ Bot, Kevin Lindkvist, Owners Override, John Wittrock

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I18b7385f64cfe877b858d0f0aaf806a17ae68a13
Gerrit-Change-Number: 1489663
Gerrit-PatchSet: 9
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: John Wittrock <witt...@google.com>
Gerrit-Reviewer: Kevin Lindkvist <lind...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Wed, 04 Feb 2026 00:50:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/e6977ecc519d0f73251543be65daebc6b9bfa22e-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages