Skip to content

CtriXin/fight-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fight-agent

Adversarial review engine for Claude Code.

CLI-agnostic atomic review: pass / contested / reject / blocked.

What it does

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

Install

# 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-agent

Prerequisites

  • jq (JSON processor)
  • git (for diff generation)
  • At least one reviewer CLI: codex or claude

Quick Start

# 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

Verdict Format

{
  "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"
}

Adapter System

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 0

Notes:

  • --project-root decides where .ai/cache/preflight/adapters.json and review artifacts are written.
  • --ttl-seconds 0 disables 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>.available
  • adapters.<name>.invoke
  • recommended_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

Used by

  • moebius — Möbius loop orchestrator (plan → exec → fight → finalize)

License

MIT


fight-agentthe end is a new beginning.

About

Adversarial review engine for Claude Code. CLI-agnostic atomic review: pass / contested / reject / blocked.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages