You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENT_CONTEXT.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,11 +43,12 @@ Security workflow
43
43
- If issues are introduced, fix and rescan until no new issues are reported for changed paths.
44
44
45
45
PR review workflow (agent-assisted)
46
-
-Review sequentially (one pass, one train of thought) rather than fanning out into many parallel/competing subagents — parallel review agents on this repo have produced confusing, overlapping, hard-to-follow output.
46
+
-**MANDATORY size check before `/code-review` or any multi-agent review flow**: run `git diff --stat` first. A single file or under ~300 changed lines gets ONE sequential pass — never parallel multi-agent fanout. This has already been violated once (a ~200-line single-file diff triggered a 7-subagent fanout producing ~30 overlapping findings; the user had to interrupt it as far too much effort for the size of the change). Parallel fanout is reserved for genuinely large/multi-file/high-risk diffs, and even then default to sequential unless the user asks for more.
47
47
- Reproduce findings before reporting them: don't just read the diff, actually exercise the changed code (e.g. run the validator against a crafted input) and compare behaviour against the pre-change version to confirm a regression is real, not theoretical.
48
48
- Post findings as PR comments (a summary comment plus inline comments anchored to the relevant lines) and stop — wait for explicit go-ahead before committing any fix, even when the fix seems obvious.
49
-
- Any PR comment posted by an agent on a human's GitHub account must include a disclaimer that the text is LLM/agent-generated, since the comment otherwise appears to come directly from the account owner.
49
+
- **MANDATORY before every `gh pr comment` / `gh api .../comments` call**: the comment `body`'s FIRST LINE must be `> **⚠️ AI-generated comment, posted on behalf of @<username> — not written by them personally.**`, followed by a blank line, then the content. A trailing "🤖 Generated with Claude Code" footer at the bottom is NOT sufficient — this has already been tried and judged insufficient once (two PR #534 comments posted with only a bottom footer; the account owner had to point out the comments read as if written by them personally). Before sending, re-read the actual `body` string and confirm the disclaimer is literally line 1 — this is a mechanical check to perform every time, not a judgment call to skip when a comment feels short/routine. If a comment was already posted without it, edit it in place immediately (`gh api repos/{owner}/{repo}/issues/comments/{id} -X PATCH --input <jsonfile>` — plain `-f body=@path` silently fails on Windows/Git-Bash and posts the literal string; build the JSON with Python's `json.dump` and pass via `--input`, then verify with a follow-up GET).
50
50
- After a fix is approved and applied, re-verify with the same reproduction used to find the bug, then let the human decide about resolving/closing review threads.
51
+
-**MANDATORY relevance check before "just to be safe" test re-runs**: after applying a fix, name which files actually changed before running any test suite. A JS-only change does not need a full backend pytest re-run "for extra confidence" — this has already been violated once (an unprompted full backend suite re-run for a frontend-only fix spiralled into two colliding concurrent runs against the same dev DB, producing spurious failures, plus 20+ minutes of silently polling a stalled process before the user had to ask what was happening). Run only the narrowest subset that exercises the changed code path. Never start a second run of the same suite while one is still in flight against the same shared dev DB. If a background process runs past ~1.5x its own typical runtime with no output, check logs for evidence of real progress or surface the delay to the user — don't keep silently rescheduling wakeups.
51
52
52
53
Useful commands
53
54
- Rebuild dev stack: docker compose down; docker compose up -d --build
0 commit comments