feat(.cursor/agents): adversarial code-review orchestrator#179
Merged
tonyketcham merged 1 commit intomainfrom May 8, 2026
Merged
feat(.cursor/agents): adversarial code-review orchestrator#179tonyketcham merged 1 commit intomainfrom
tonyketcham merged 1 commit intomainfrom
Conversation
…rompt Adds a system prompt that drives an adversarial code-review DAG over a Flatbread change diff via @flatbread/proof. The orchestrator picks up to five reviewer perspectives dynamically based on the diff's changed paths (catalog of 11, with mandatory-include rules for correctness and test coverage), runs them as a single rank of parallel subagents, and merges findings through a rank-2 judge that emits structured feedback bound to specific diff chunks. Reviewer prompts encode anti-pedantry guardrails (drop formatting/style/ naming nits, keep correctness, contracts, coverage, determinism, and error-UX findings) so the output stays high-signal. The judge produces a verdict (APPROVE | COMMENT | REQUEST_CHANGES | BLOCK), per-chunk feedback with severity + minimal fix, a consolidated coverage plan (positive/negative/edge), and a reviewer scoreboard so weak signal gets visible. Reuses the existing .cursor/agents/* convention (frontmatter + Output Schema For DAG Handoff) so the orchestrator can itself nest inside a parent DAG (e.g. release-gate). Co-authored-by: Tony <tonyketcham@users.noreply.github.com>
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.
Summary of changes
Adds
.cursor/agents/flatbread-code-review-orchestrator.md— a system prompt that drives an adversarial code-review DAG over a Flatbread change diff using@flatbread/proof.How it works:
origin/mainand builds a chunk index (path:start-endper hunk) so all findings are addressable to specific lines, not just files.correctness-and-contractsandtest-coverage-robustnessare mandatory whenever any non-test source changes (the user's named priorities).depends_on: []; the runner topo-sorts them into one parallel batch. Reviewers are read-only so same-rank file-write safety is satisfied.## Chunks flagged/## Coverage gapsoutputs into chunk-bound structured feedback: per-chunk severity, consensus vs. disputed flagging, a consolidated## Coverage plan(positive / negative / edge:), a verdict (APPROVE|COMMENT|REQUEST_CHANGES|BLOCK), and a reviewer scoreboard that downgrades reviewers whose findings were purely pedantic.## Output Schema For DAG Handoffconvention so the orchestrator itself can nest inside a parent DAG (e.g. a release-gate flow that reviews before publish).Catalog of perspectives (orchestrator picks ≤5):
correctness-and-contractspackages/*/src/**/*.ts(mandatory if matched)test-coverage-robustnesscodegen-and-generated-artifactspackages/codegen/**, generated TS/GraphQLcli-and-runtimepackages/flatbread/src/cli/**+ serverplugin-contractpackages/transformer-*/**,packages/source-*/**config-and-public-apipackages/config/**dx-and-examplesexamples/**, READMEsdocs-and-positioning*.md,docs/**release-disciplinescripts/publish.ts, changelogperf-and-cachingproof-runtime-internalspackages/proof/src/**Closes #
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
.cursor/agents/, not executable code. Verification ispnpm lint(prettier passes) and structural cross-checks against existing agent files (flatbread-adversarial-reviewer.md,flatbread-architecture-planner.md) plus theproofskill (.cursor/skills/proof/SKILL.md).Does this introduce any non-backwards compatible changes?
Does this include any user config changes?