Adversarial review engine for Claude Code.
CLI-agnostic atomic review: pass / contested / reject / blocked.
fight-agent takes a task pack (plan + execution + optional first review), generates a structured review packet, and delegates it to an independent AI reviewer. The reviewer produces a verdict — no human in the loop until the verdict is delivered.
plan + execution + diff
↓
fight-agent (packet generation)
↓
reviewer (codex / claude / subagent)
↓
verdict.json
# Global skill (recommended)
git clone https://github.com/CtriXin/fight-agent.git ~/.claude/skills/fight-agent
# Or per-project
git clone https://github.com/CtriXin/fight-agent.git .ai/skills/fight-agentjq(JSON processor)git(for diff generation)- At least one reviewer CLI:
codexorclaude
# Full review
fight-agent/scripts/fight.sh my-task-001 \
--plan .ai/plan/my-task-001-plan.md \
--execution .ai/cache/execution/my-task-001-execution.json
# Refresh adapter detection before review
fight-agent/scripts/preflight.sh --project-root "$(pwd)" --refresh
# Dry run (generate packet only)
fight-agent/scripts/fight.sh my-task-001 \
--plan .ai/plan/my-task-001-plan.md \
--execution .ai/cache/execution/my-task-001-execution.json \
--dry-run
# Force specific reviewer
fight-agent/scripts/fight.sh my-task-001 \
--plan plan.md --execution exec.json \
--reviewer claude
# Write cache/review files under an explicit target project
fight-agent/scripts/fight.sh my-task-001 \
--project-root /path/to/project \
--plan plan.md --execution exec.json{
"pack_id": "my-task-001",
"reviewed_at": "2025-03-11 14:30:00",
"reviewed_by": "codex",
"reviewer_model": "gpt-4.1",
"verdict": "pass",
"summary": "Implementation matches plan, all verifications passed",
"findings": [],
"blocking_reason": null,
"follow_up": "Ready to merge"
}fight-agent writes adapter status to .ai/cache/preflight/adapters.json.
The file is generated by scripts/preflight.sh and reused by fight.sh and moebius status.
Supported preflight options:
fight-agent/scripts/preflight.sh --project-root "$(pwd)"
fight-agent/scripts/preflight.sh --project-root "$(pwd)" --refresh
fight-agent/scripts/preflight.sh --project-root "$(pwd)" --ttl-seconds 0Notes:
--project-rootdecides where.ai/cache/preflight/adapters.jsonand review artifacts are written.--ttl-seconds 0disables cache reuse for that run, but still writes a fresh adapters cache file for downstream consumers.
Adapter fields are additive and backward-compatible. Existing consumers should continue reading:
adapters.<name>.availableadapters.<name>.invokerecommended_reviewer
Additional fields now include installed, version, authenticated, can_review, cross_model, and cache metadata in JSON mode.
fight-agent auto-detects available CLI tools on first run:
| Adapter | CLI | Invoke command |
|---|---|---|
| codex | codex |
codex exec --full-auto -- |
| claude | claude |
claude -p --dangerously-skip-permissions |
Priority: --reviewer flag > A2A_REVIEWER env var > auto-detected recommendation.
If the primary reviewer fails, fight-agent automatically falls back to the alternative.
Contract details: references/preflight-contract.md
- moebius — Möbius loop orchestrator (plan → exec → fight → finalize)
MIT
fight-agent — the end is a new beginning.