From marten-superpower
Use as Phase 6 of marten-workflow, after executing-plans is green and before finishing-a-development-branch. Runs codex:adversarial-review plus parallel code-reviewer and security-review subagents to triangulate blockers. Triggers on "review this branch", "ready to merge", "before merging", "is this done".
How this skill is triggered — by the user, by Claude, or both
Slash command
/marten-superpower:review-phaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<SUBAGENT-STOP>
This is Phase 6 of marten-workflow. Its job: catch what the implementer
missed, before the work merges.
The implementer is the worst reviewer of their own code — confirmation bias is
near-total. Martin's global rules already mandate codex:adversarial-review at
milestones, and "≥2 reviewers per area to triangulate". This skill chains that
together with code-reviewer and security-review for full coverage.
main or in the bare repo.--base main (or the actual parent ref) to codex:adversarial-review.php artisan test, npm run build, or whatever the project's green-state check is, passes BEFORE
running review. A failing test suite = back to Phase 5.KNOWN_ISSUES.md.Before starting, confirm:
verification-before-completion skill applied)If any of those are false, fix first.
git status
git diff --stat main...HEAD
git log --oneline main...HEAD
Note the parent ref (usually main). Confirm the diff size — if it's huge
(>500 lines), split into focus areas before dispatching reviewers.
For diffs larger than ~200 LOC or touching multiple concerns, split into 2–3 non-overlapping focus areas. Examples:
Each focus area gets one reviewer. Disjoint slices = no wasted attention.
Single tool message, multiple Agent calls:
3a. codex:adversarial-review (always, per global rule)
node ${CLAUDE_PLUGIN_ROOT_FOR_CODEX}/scripts/codex-companion.mjs \
adversarial-review --background --base main \
"<focus area 1 prompt>"
For 2 focus areas, run two adversarial-review invocations in parallel. Each prompt explicitly tells codex to ignore the other slice.
3b. code-reviewer subagent (always)
Dispatch via Agent tool, subagent_type: code-reviewer. Brief:
"Review the diff between
mainandHEADin this worktree. Focus on: . Ignore: <other reviewer's slice>. Report severity-tagged findings only — no praise, no scope creep. Run any tests you need."
3c. security-review skill (when diff touches: auth, validation, file I/O, network, secrets, SQL, deserialization, file uploads, command exec)
Invoke via Skill tool with name security-review. This is a built-in skill,
not a subagent.
3d. cto-agent (optional, for design judgment on >2-file refactors or new architectural patterns)
Dispatch via Agent tool, subagent_type: cto-agent. Brief:
"Review architectural decisions in this diff. Are the abstractions earning their keep? Is anything over-engineered or premature? Report only design-level concerns."
When all reviewers return, classify each finding:
| Class | Action |
|---|---|
| Blocker, in-scope | Fix in this branch before merge |
| Blocker, out-of-scope | Log to KNOWN_ISSUES.md, file follow-up issue |
| Improvement, in-scope | Fix if cheap, otherwise defer + log |
| Improvement, out-of-scope | Log only |
| Disagreement between reviewers | Surface to user, let them decide |
| False positive | Note in summary, no action |
Use TDD where possible — failing test first, then fix. Keep commits small and focused.
Dispatch another round of codex:adversarial-review (and others as needed)
until no blockers remain. Do not skip this step — fixes can introduce new
issues.
Append to KNOWN_ISSUES.md (create if missing) at worktree root:
# Known Issues
## <Date> — Review of <feature/branch name>
### Out-of-scope blockers
- <issue>: <one-line description>. Tracked: <link / "no ticket yet">.
### Out-of-scope improvements
- <issue>: <one-line description>.
### Reviewer disagreements (resolved by user)
- <topic>: <reviewer A said X, B said Y, resolution>.
Tell the user:
"Review phase complete. reviewers ran. In-scope blockers: <count, all fixed>. Out-of-scope: <count, logged in KNOWN_ISSUES.md>. Ready for Phase 7 (finishing-a-development-branch)."
superpowers:receiving-code-review rigornode ${CLAUDE_PLUGIN_ROOT_FOR_CODEX}/scripts/codex-companion.mjs adversarial-review must be allow-listed in the project's
.claude/settings.local.json. One-time per repo.<repo-parent>/.worktrees/<repo-name>-<topic>.claude/settings.local.json permissions are needed in the worktree,
copy from the main checkout (it's not in git).npx claudepluginhub adeanima/marten-superpowerCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.