Keep your AI coding agents on target — mission governance for AI-native builders.
Define your mission. Bound your scope. Catch drift before it ships.
SPINE is a CLI tool that sits above your coding agents, not inside them. It uses a .spine/ directory — plain YAML and JSONL, version-controlled alongside your code — as the canonical source of truth for what you're building, what's in scope, and what's been decided.
No daemons. No cloud. No model calls.
Solo developers and small teams building with AI coding agents (Claude Code, Codex, Cursor, etc.) who want a lightweight governance layer to:
- Maintain a clear, bounded mission while agents work
- Prevent scope creep from accumulating invisibly
- Keep an auditable log of decisions and evidence
- Generate mission briefs that ground agent sessions
SPINE is strongest today with Claude Code and Codex — it generates briefing files those tools can load automatically.
SPINE solves three problems AI coding agents create:
- Drift — agents accumulate scope without you noticing until the codebase is a mess
- Black boxes — you forget what you decided and why by the next session
- No ground truth — agents work from memory, not from agreed-upon direction
SPINE is the explicit layer that keeps you and your agents aligned.
Requires Python 3.12+ and uv.
git clone https://github.com/Hashi-Ai-Dev/SPINE
cd SPINE
uv syncThat's it. All spine commands are now available via uv run spine.
SPINE governs a target repo that you point it at. You don't need to cd into the target repo.
# (From the SPINE directory)
# 1. Initialize .spine/ governance state in your project
uv run spine init --cwd /path/to/your-project
# 2. Define your mission
uv run spine mission set --cwd /path/to/your-project \
--title "My Project" \
--status active \
--scope "backend,api" \
--forbid "ui,billing"
# 3. Generate a mission brief for Claude
uv run spine brief --cwd /path/to/your-project --target claude
# 4. Run the governance health check
uv run spine doctor --cwd /path/to/your-project.spine/ is version-controlled inside your target repo alongside your code.
| Command | Description |
|---|---|
spine init |
Scaffold .spine/ governance state in a git repo |
spine mission show |
Display current mission (table or --json) |
spine mission set |
Update mission fields |
spine mission refine |
Create a mission draft (does not mutate canonical mission.yaml) |
spine mission confirm <draft_id> |
Promote a mission draft to canonical |
spine mission drafts |
List pending mission drafts |
spine opportunity score |
Score an opportunity with a weighted 6-factor rubric |
spine evidence add |
Append a typed evidence record |
spine decision add |
Append a decision record with rationale |
spine drift scan |
Detect scope drift using git-native diff (staged + committed) |
spine brief --target claude|codex |
Generate a mission brief for a specific agent |
spine review weekly |
Aggregate evidence/decisions/drift into a weekly review |
spine doctor |
Validate .spine/ state and repo contract |
spine mcp serve |
Start a local MCP server (stdio mode) |
--json output is available on mission show, doctor, and review weekly.
.spine/
├── mission.yaml ← Active mission definition
├── constraints.yaml ← Work schedule, budget, routing rules
├── opportunities.jsonl ← Scored opportunity log
├── not_now.jsonl ← Deferred ideas
├── evidence.jsonl ← Evidence log
├── decisions.jsonl ← Decision record
├── drift.jsonl ← Drift scan results
├── runs.jsonl ← Agent run log
├── reviews/ ← Generated weekly reviews
├── briefs/ ← Agent mission briefs
├── skills/ ← Agent skill definitions
└── checks/ ← Automated checks
AGENTS.md ← Guidance for AI agents in this repo
CLAUDE.md ← Claude-specific governance rules
Every SPINE command accepts --cwd to target a repo other than the current directory. This is the recommended pattern when running SPINE from its own directory to govern another project.
# All commands support --cwd
uv run spine doctor --cwd /path/to/other-repo
uv run spine mission show --cwd /path/to/other-repo
uv run spine drift scan --cwd /path/to/other-repo
uv run spine evidence add --cwd /path/to/other-repo --kind commit --description "..."
uv run spine decision add --cwd /path/to/other-repo --title "..." --why "..." --decision "..."Alternative: SPINE_ROOT env var
If you prefer not to pass --cwd on every command, set SPINE_ROOT for your shell session:
export SPINE_ROOT=/path/to/other-repo
uv run spine doctor
uv run spine mission showSPINE_ROOT is process-global — unset it when switching repos.
Targeting contract
SPINE resolves the target repository in this order (highest priority first):
--cwd <path>— if explicitly provided (overridesSPINE_ROOT)SPINE_ROOT— if set in the environment- Current working directory — fallback default
Commands that require a git repo fail fast with a clear message when the resolved path is not a git repository.
Validated against two repos before the v0.2.0-beta release:
- Self-governance: Full governance loop on SPINE's own repo — evidence logged, decisions recorded, drift scanned, weekly review and agent briefs generated. Test suite: 544 passing (25 test files, CI active on every push and PR).
- External repo (gsn-connector):
--cwdandSPINE_ROOTtargeting verified end-to-end across all commands. Drift scan correctly read the external repo's git history. No state pollution between repos.
Post-beta stability. Known limitations:
SPINE_ROOTis process-global — if set in a shell profile, all commands are affected. Use--cwdper-command to target a specific repo.- No migration tooling yet — this is the first public release.
- JSONL logs are append-only — no undo or rollback.
- Single git repo per
.spine/— cannot govern multiple repos from one state directory. spine mcp serveis a local stdio server only — no remote MCP support.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Validation failure (invalid arguments, constraint violations) |
| 2 | Context failure (missing git repo, missing .spine/, invalid paths) — used by all commands. spine init additionally accepts --allow-no-git to suppress the no-git case. |
| 3 | spine init only — target files already exist; pass --force to overwrite |
Start here:
docs/external-repo-onboarding.md— how to use SPINE on an external repo (quickstart, walkthrough, targeting, verification, FAQ)docs/SPINE_INTEGRATIONS.md— compatibility and integration guide for Claude Code, oh-my-claudecode, and Superpowersdocs/SPINE_OFFICIAL_SPEC_v0.1.md— authoritative design specdocs/SPINE_FEATURE_BACKLOG.md— current and planned featuresdocs/ROADMAP.md— public product roadmap (stable releases, Phase 3B deferred)
See docs/README.md for the full documentation index.
SPINE has exited beta. Phase 3A is complete:
- Explicit repo targeting contract +
--cwdprecedence normalization - Repo/branch context visibility + deterministic default branch resolution
- Stable exit codes +
--jsonoutput modes for CI workflows - Bootstrap polish + discipline-tax ergonomics
- Artifact ergonomics contract (machine-readable manifest, canonical naming)
- External-repo onboarding docs (
docs/external-repo-onboarding.md)
Post-beta focus: stability and bug fixes only until v0.2.0 stabilizes. Phase 3B candidates deferred. See docs/ROADMAP.md for the current milestone structure.
Not planned: web UI, auth, billing, cloud sync, remote MCP, or multi-user support.
SPINE has exited beta. The core command surface is stable and validated. Bug fixes only until v0.2.0 stabilizes.
- HASHI.AI — SPINE Agent / Repo Manager
- Hashi — Project Lead
SPINE is built and maintained by the HASHI.AI agent system.