Reusable prompt for working the code-reviews/ backlog: batches one subagent per module, TDD per finding, per-module commits, regenerates the index. Adapted to mxaccessgw toolchains and module layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.0 KiB
Prompt — resolve open code-review findings
Reusable orchestration prompt for clearing the code-reviews/ backlog. Paste it
to a fresh agent when you want the remaining findings worked through.
Resolve all open code-review findings (every severity), following the same
workflow already used to resolve the Critical dashboard finding and the
Client.Rust module (see git commits a8aafdf, 0d8a28d, 9082e50).
Setup
- Read
code-reviews/README.mdfor the open findings andREVIEW-PROCESS.mdfor the workflow. Group the open findings by module. - A module is one folder under
code-reviews/— asrc/MxGateway.*project or aclients/language client. The module→source mapping and the per-module build/test commands are inCLAUDE.md(the "Source Update Workflow" table and the per-client commands).
Dispatch — one general-purpose subagent per module, in batches of ~5 modules
Each subagent, for every open finding in its assigned module, must:
- Verify the finding's root cause against the actual source. Do NOT trust the
finding text — if it is wrong or misclassified, re-triage it (correct the
severity/description in that module's
findings.md) instead of forcing a fix. - Use real TDD: write the regression test FIRST and run it to confirm it fails,
THEN implement the root-cause fix, THEN confirm it passes. (Do not use
git stash— parallel agents would race on the shared stash stack.) - Run that module's full build and test suite with the module-appropriate
toolchain and confirm it is green:
src/MxGateway.*.NET projects —dotnet build+dotnet testfor the project; the Worker must build x86 (-p:Platform=x86).clients/dotnet—dotnet build clients/dotnet/MxGateway.Client.slnand its tests.clients/go—gofmt,go build ./...,go test ./....clients/rust—cargo fmt,cargo test --workspace,cargo clippy --workspace --all-targets -- -D warnings.clients/python—python -m pytest.clients/java—gradle test.
- A regression test for a gateway-server finding belongs in
src/MxGateway.Tests; for a worker finding, insrc/MxGateway.Worker.Tests. Adding a test there is permitted even though it is a different module's source tree. - Update only that module's
code-reviews/<Module>/findings.md: set each resolved finding's Status toResolvedwith a Resolution note describing the fix (the orchestrator appends the fixing commit SHA), and update the header "Open findings" count. - CONSTRAINTS: edit only the source and test files needed for the assigned
module's findings, plus that module's own
findings.md. Do NOT editcode-reviews/README.md. Do NOT commit. Do NOT touch another module'sfindings.md. - Report a summary: each finding — root-cause confirmation, the fix, test names, and any re-triage.
Batch so that no two subagents in the same batch write to the same test project
— e.g. do not run the Server and Contracts agents together, since both add
regression tests under src/MxGateway.Tests.
After each batch returns (orchestrator does this — keep your own context lean)
- Build and test every component the batch touched, using the
CLAUDE.mdcommands; confirm clean. For any .NET change,dotnet build src/MxGateway.sln. - Commit per module — one commit per module, message referencing the finding IDs. Record the fixing commit SHA in each finding's Resolution.
- Regenerate the index:
python code-reviews/regen-readme.py, thenpython code-reviews/regen-readme.py --checkto confirm it is consistent; stagecode-reviews/README.md. (Usepython— the barepython3alias on this box resolves to the Windows Store stub and fails.) You may stageREADME.mdwith each module's commit, or commit it once per batch after the script runs. - Push.
Continue
Continue batch by batch until all findings are Resolved or re-triaged. If a finding needs a design decision, skip it and surface it rather than guessing.