feat(review): add PR reviewer swarm agents#1851
Conversation
Seven read-only subagents coordinated by an orchestration skill for structured, evidence-grounded production-readiness PR reviews. Agents: facts-historian, branch-hygiene, risk-architect, test-ci-verifier, security-boundary, docs-dod, synthesis-critic. All use Read/Grep/Glob/Bash only — no edit tools. Skill invoked as /gitnexus-pr-swarm-review <PR>.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 10075 tests passed 5 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
|
Claude finished @magyargergo's task in 8m 24s —— View job Production-Readiness Review: PR #1851 —
|
| Claim | Verified directly |
|---|---|
| New swarm files are tracked by git | git ls-files confirms all 8 new files ✅ |
.gitignore negation patterns work |
Content-level * not directory-level — pattern change is necessary and correct ✅ |
installSkills doesn't overwrite swarm |
ai-context.ts:299-375 confirmed write path is only gitnexus/<named-skills> ✅ |
| No bidi/hidden Unicode | grep -P '[^\x00-\x7F]' found only em dashes in prose ✅ |
| Merge commit only touches Kotlin extractor | git show --stat 186ed18 confirmed — unrelated to swarm ✅ |
Existing /gitnexus-pr-review is different scope |
Read SKILL.md — MCP-tool-based, different verdict format, no conflicts ✅ |
| No mutating tools declared | All 7 agents have only Read/Grep/Glob/Bash — no Edit/Write/NotebookEdit ✅ |
Open questions that remain only if unavoidable
- Does Claude Code accept
model: sonnetas a shorthand alias, or is it silently ignored? This requires restarting Claude Code with this branch and checking the model actually used by an agent invocation. Until tested, treat as requiring the fix in Finding 1. - Did CI run on the merge commit HEAD (
186ed18) or only on4067f8b? The merge commit only touches Kotlin.tsfiles with existing tests, so CI should pass regardless — but the head SHA cannot be confirmed against the CI run without authenticated API access.
Final verdict
not production-ready
Three issues block merge. First, model: sonnet (all 7 agents, line 9) is not a valid Claude Code model ID — it should be claude-sonnet-4-6, and its current form risks either silent model downgrade or future load failure. Second, the PR's own test plan explicitly marks agent discovery and end-to-end invocation as unchecked — per DoD.md §3 ("No false-done"), a PR cannot claim Done until the validation baseline has been run, and neither manual validation item is complete. Third, the Bash read-only policy exists only as prose intent without explicit prohibited-command lists in any of the 7 agents, which leaves the read-only claim undefended against adversarial PR content during review.
With these three fixes — model: claude-sonnet-4-6 in all agents, explicit Bash prohibition lists, and confirmed agent discovery + end-to-end invocation on a test PR — the PR would be production-ready with minor follow-ups (the synthesis-critic enforcement gap and maxTurns casing uncertainty are non-blocking).
The .gitignore design, file tracking, Unicode hygiene, overwrite-safety analysis, branch structure, and context-engineering architecture are all sound and would not require further changes.
· Branch
- Pin explicit model IDs in all 7 reviewer-swarm agents per CLAUDE.md (no unversioned aliases). Set the two mechanical agents (test-ci-verifier, branch-hygiene-reviewer) to claude-haiku-4-5-20251001 per @Cenrax's "this could be haiku"; the five analytical agents use claude-sonnet-4-6. - Add an explicit read-only Bash policy (permitted/prohibited command lists) to every agent's Rules section, so the read-only guarantee is defended against injected/adversarial PR content rather than prose-only. - Add a hard synthesis-critic gate to the swarm skill: do not post the final review until the critic's "Required corrections before posting" section is empty (was advisory only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restructure the reviewer swarm around a single CLI-neutral source of truth so it
runs from any AI CLI, not just Claude Code.
- pr-swarm-review/: canonical orchestration.md (Swarm + Solo execution modes with
an identical output contract) and personas/0N-*.md (the 7 review personas,
relocated verbatim from the Claude agents, each tagged with a model tier and the
read-only Bash policy). Single source of truth — edit here, not in the wrappers.
- Thin per-CLI adapters that read the canonical spec at runtime (no duplication):
- Claude Code: coordinator skill (Swarm mode) + the 7 agents are now thin
wrappers that read their persona file (frontmatter/model preserved; mechanical
lanes Haiku, analytical lanes Sonnet).
- Gemini CLI: .gemini/commands/gitnexus-pr-swarm-review.toml
- GitHub Copilot: .github/prompts/gitnexus-pr-swarm-review.prompt.md
- Cursor: .cursor/commands/gitnexus-pr-swarm-review.md
- AGENTS.md: canonical "PR Swarm Review" section -> orchestration.md, the universal
entrypoint honored by Codex, Cursor, Gemini, Copilot, and any AGENTS.md-aware
agent (Codex user-level prompt install noted in the README).
Graceful degradation: only Claude Code has parallel subagents (Swarm mode); every
other CLI runs the 7 lanes sequentially in one agent (Solo mode) with the same
output contract. prettier --check clean (root config).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Adds a coordinated, read-only Claude Code reviewer swarm for GitNexus pull requests. Seven specialized subagents — each focused on a single review domain — are orchestrated by a new
/gitnexus-pr-swarm-reviewskill that produces structured, evidence-grounded production-readiness reviews.The swarm coexists with the existing single-agent
/gitnexus-pr-reviewskill as a deeper alternative.What's included
7 project-level subagents (
.claude/agents/):gitnexus-pr-facts-historiangitnexus-branch-hygiene-reviewergitnexus-risk-architectgitnexus-test-ci-verifiergitnexus-security-boundary-reviewergitnexus-docs-dod-reviewergitnexus-synthesis-critic1 orchestration skill (
.claude/skills/gitnexus-pr-swarm-review/SKILL.md):/gitnexus-pr-swarm-review <PR number or URL>1 documentation file (
.claude/README-gitnexus-reviewer-swarm.md)Design decisions
.gitignorechangesChanged
.claude/agents/and.claude/skills/from directory-level ignores to content-level ignores (*instead of/) so negation patterns can un-ignore specific files. Added negation patterns forgitnexus-*.mdagents and thegitnexus-pr-swarm-review/skill.Test plan
---delimiters,name,description,tools,model,maxTurns).claude/skills/gitnexus/skills are not affected by.gitignorechanges/gitnexus-pr-swarm-reviewon a test PR to validate end-to-end flow🤖 Generated with Claude Code