Add more ai agent context, add PR review to architect agent#6130
Open
Add more ai agent context, add PR review to architect agent#6130
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6130 +/- ##
=======================================
Coverage 70.55% 70.55%
=======================================
Files 409 409
Lines 109530 109530
Branches 18037 18037
=======================================
Hits 77278 77278
Misses 21439 21439
Partials 10813 10813 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
danlapid
reviewed
Feb 21, 2026
jasnell
commented
Feb 21, 2026
anonrig
reviewed
Feb 21, 2026
4a6a2bc to
6e6fd26
Compare
anonrig
reviewed
Feb 21, 2026
You can now ask the Architect agent to perform PR code reviews and ask it to post comments on specific lines of code in a PR. It will use the github cli to post comments on the PR. Rework the agent definition to be more concise and effective.
c267668 to
3c1621d
Compare
A distilled set of code review instructions for the AI agents to use derived from the KJ Style Guide and Tour with some additional project-specific conventions. This keeps the agents focused on the most important details without having to parse and find the entire style guide on every review.
- Root AGENTS.md: overview, structure, conventions, anti-patterns, commands
- 14 subdirectory AGENTS.md files covering api/, io/, jsg/, server/,
util/, node/, cloudflare/, pyodide/, rust/, build/, types/, and
api/{streams,node,crypto}/
- Each child avoids repeating parent content; telegraphic style
Reduce the context burden of the architect agent by splitting out some of the more specific skills. Fixup some other minor issues while we're at it.
3b18cf7 to
463db04
Compare
Just some useful general skills provided under MIT license by obra/superpowers. These are not specific to workerd but are just generally useful.
- `/explain <file|symbol>` — architectural explanation with relationships
e.g. `/explain IoContext`, `/explain ReadableStream`
- `/find-owner <path>` — identify active contributors and suggest reviewers
e.g. `/find-owner src/workerd/api/streams/`
- `/compat-flag [name]` — look up a flag or list all flags
e.g. `/compat-flag nodejs_compat`, `/compat-flag` (no arg lists all)
- `/autogate [name]` — look up a gate or list all gates
e.g. `/autogate RUST_BACKED_NODE_DNS`, `/autogate` (no arg lists all)
- `/deps <target>` — show Bazel dependency graph
e.g. `/deps //src/workerd/api:streams`
- `/changelog` — summarize current branch changes for a PR description
- `/trace <function>` — trace callers and callees across the codebase
e.g. `/trace ReadableStream::constructor`
- `/test-for <file>` — find tests with coverage assessment
e.g. `/test-for src/workerd/api/encoding.h`
- `/whats-new <N|since DATE|this week|...>` — recent commit summary
e.g. `/whats-new 10`, `/whats-new this week`
Most of these perform rather deep analysis of the codebase and are
designed to surface details that are not easily found through simple
code search. They can be used to quickly understand the impact of a change,
identify reviewers, write better commit messages and PR descriptions,
learn about unfamiliar parts of the codebase (particularly before making
changes).
- `/run test <target>` → `bazel test <target>` (runs the specified test target) - `/run sample <target>` → `bazel run <target>` (builds and runs the specified sample target)
Try it! Either just run `/trivia` or ask for a specific category liek `/trivia streams` or `/trivia build` to focus questions on a particular topic.
…areas Ideally for new contributors or anyone looking to get up to speed on a particular topic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can now ask the Architect agent to perform PR code reviews and ask it to post comments on specific lines of code in a PR. It will use the github cli to post comments on the PR.
Example: #6091 (review)