Warp Drive

Autonomous development loop for Claude Code. Picks up approved work from GitHub Issues, breaks it into chunks, codes, tests, commits, and reports β€” with minimal human intervention.

TL;DR

# Inside Claude Code
/warp-drive 42       # work on issue #42
/warp-drive          # auto-discover next approved issue
/stop-warp-drive     # graceful stop
 
# From any terminal
warp status          # check on the loop
warp stop            # abort from outside

Table of Contents

  1. Where It Fits
  2. Installation
  3. First-Time Setup
  4. Running Warp Drive
  5. The warp CLI
  6. How It Works
  7. Stopping and Resuming
  8. Remote Mode (RDB)
  9. Error Handling
  10. Configuration
  11. What Gets Created
  12. Troubleshooting
  13. Internals Reference

Where It Fits

Vision & Strategy (docs/vision.md)    /vision β€” why, who, where
└── Capability (GitHub Issue, cap)     /capability β€” feature spec
    └── Requirement (GitHub Issue, req) /requirement β€” acceptance criteria
        └── Warp-drive chunks          automatic β€” individual commits

Warp Drive operates at the bottom of the product hierarchy. It picks up requirements (not capabilities or vision) and turns acceptance criteria into commits. Each requirement is a GitHub Issue with checkboxes; warp-drive works through them one commit at a time.


Installation

Prerequisites

These must be installed on your machine:

DependencyCheckInstall
Node.jsnode --versionnodejs.org
jqjq --versionbrew install jq
GitHub CLIgh --versionbrew install gh
Gitgit --versionbrew install git

BoB Framework

Warp Drive is part of BoB (Big ol’ Brain), the global Claude Code tooling framework at ~/.claude/. If you have BoB installed, warp-drive is already available. The key files:

~/.claude/
β”œβ”€β”€ bin/warp                              # CLI (this is new)
β”œβ”€β”€ commands/warp-drive.md                # /warp-drive slash command
β”œβ”€β”€ commands/dev-up.md                    # /dev-up slash command
β”œβ”€β”€ skills/stop-warp-drive/SKILL.md       # /stop-warp-drive skill
β”œβ”€β”€ scripts/warp-drive/state-machine.js   # State machine engine
β”œβ”€β”€ scripts/dev-lifecycle/                # Dev environment IaC scripts
β”‚   β”œβ”€β”€ dev-up.sh                         # Full lifecycle orchestrator
β”‚   β”œβ”€β”€ health-check.sh                   # Lightweight health probe
β”‚   β”œβ”€β”€ provision-users.sh                # Test user provisioning
β”‚   └── check-seed-coverage.sh            # Seed data coverage gate
β”œβ”€β”€ hooks/warp-drive-gate.sh              # Blocks commits outside committing phase
β”œβ”€β”€ hooks/warp-drive-inject.sh            # Resumes state on session start
β”œβ”€β”€ hooks/warp-drive-edit-tracker.sh      # Doom loop detection
β”œβ”€β”€ hooks/warp-drive-pre-exit.sh          # Self-verification before phase advance
β”œβ”€β”€ hooks/warp-drive-stop.sh              # Blocks exit when report is pending
β”œβ”€β”€ templates/dev.json                    # Dev manifest template
β”œβ”€β”€ templates/seed/                       # Seed data templates
└── docs/warp-drive-guide.md              # This file

Add warp to your PATH

Add this to your ~/.zshrc (or ~/.bashrc):

# BoB CLI tools
export PATH="$HOME/.claude/bin:$PATH"

Then reload: source ~/.zshrc

Verify: warp help

Hook Registration

All 5 hooks are registered in ~/.claude/settings.json automatically. If you’re setting up from scratch, the hooks need entries in:

Hook TypeFilePurpose
SessionStartwarp-drive-inject.shResume from last phase
PreToolUse (Bash)warp-drive-gate.shBlock commits outside committing phase
PreToolUse (Bash)warp-drive-pre-exit.shSelf-verification before phase advance
PostToolUse (Edit|Write)warp-drive-edit-tracker.shTrack edits, detect doom loops
PostToolUse (Edit|Write)warp-drive-docs-detector.shAuto-detect doc edits β†’ advance state
PostToolUse (Bash)warp-drive-commit-detector.shAuto-detect git commit β†’ advance state
Stopwarp-drive-stop.shBlock exit when report is pending

If hooks aren’t registered, warp-drive still works β€” you just lose the safety rails (commits could happen at the wrong time, doom loops won’t be caught, auto-detection won’t fire, etc.).


First-Time Setup

1. Initialize your project with BoB tooling

cdi -y /path/to/your/project

This creates the .claude/ directory structure in your project. If you skip this, /automation will run it for you.

2. Set automation level

Inside Claude Code, in your project directory:

/automation level 2

This writes permission rules to .claude/settings.local.json. Warp-drive requires Level 2 or 3.

LevelWho It’s ForMerge Strategy
Level 2 (Trusted Dev)Active development, you review PRsCreates PR for review
Level 3 (Autonomous)Trusted mode, minimal interventionDirect merge to master

3. Create work items

Create a requirement as a GitHub Issue:

/requirement

This creates an issue with acceptance criteria checkboxes, labeled req. When ready for warp-drive, add the approved label:

gh issue edit 42 --add-label approved

4. Create a feature branch (Level 2 only)

/start-work

Level 3 auto-creates branches. Level 2 requires you to start one first.

5. Launch

/warp-drive 42       # work on issue #42
/warp-drive          # auto-discover next approved issue

Running Warp Drive

Starting a session

From inside Claude Code, in your project directory:

/warp-drive              # finds next issue with labels: req + approved
/warp-drive 42           # works on issue #42 specifically

Warp-drive checks prerequisites (automation level, branch, test command), then enters the loop.

What you’ll see

Once running, warp-drive works through phases automatically. At Level 2/3, it only interrupts you for project decisions β€” architecture questions, ambiguous requirements, new dependencies, or scope expansion. Everything else is autonomous.

Each chunk produces:

  • Code changes implementing 1-3 acceptance criteria
  • A test run
  • A conventional commit (feat(scope): description)
  • A chunk report filed as a GitHub Issue

When it finishes

After all chunks are done, warp-drive:

  1. Runs a final test
  2. Merges (L2: creates PR / L3: direct merge to master)
  3. Asks β€œContinue to next task?”
  4. If yes β†’ discovers next approved issue
  5. If no β†’ files a session summary and exits

The warp CLI

The warp command is a terminal tool for observing and controlling warp-drive from outside Claude Code. Think of it as docker ps for the autonomous loop.

Commands

warp status          # What phase is it in? What issue? How many commits?
warp log             # Full phase transition history
warp config          # Show workflow settings for this project
warp stop            # Graceful abort (moves to aborted phase)
warp stop --hard     # Emergency reset (deletes state file)
warp help            # Help text

warp status

Shows the live state of the loop:

WARP DRIVE ACTIVE
  Project:  bodmail
  Phase:    coding
  Issue:    42
  Branch:   feature/issue-42-email-parser
  Level:    2
  Chunk:    2 / 5

  Commits:  1    Chunks: 1    Tests: 3    Reports: 1

  Started:  2026-02-18T14:30:00Z
  PID:      12345

If the Claude session has ended but the state file remains, it shows (stale).

warp stop

From outside Claude Code, warp stop transitions the state machine to the aborted phase. The next time Claude Code starts in that project, it picks up the abort and runs cleanup (WIP commit, abort report).

warp stop --hard deletes the state file immediately. No cleanup, no report. Use this when the state file is corrupted or you just want a clean slate.

warp log

Shows every phase transition with timestamps:

Phase History (bodmail)

  #  Phase                     Event               Time
  ── ──────────────────────── ─────────────────── ─────────────────────
   0  prerequisites             init                2026-02-18T14:30:00Z
   1  discovering               prerequisites_ok    2026-02-18T14:30:05Z
   2  planning                  work_selected       2026-02-18T14:30:12Z
   ...

warp config

Shows the current workflow tuning for the project β€” automation level, RDB status, and all _workflow settings with their defaults.


How It Works

The State Machine

Warp-drive is a phase-based state machine backed by a persistent JSON file at .claude/.warp-drive-state.json in your project. Hooks enforce phase ordering β€” commits are blocked outside the committing phase, session exit is blocked without a report.

Phase Flow

prerequisites β†’ discovering β†’ planning β†’ chunking
    ↓
  coding β†’ updating_docs β†’ testing β†’ committing β†’ reporting
    ↑                                                  ↓
    └──────────── next chunk ←──── chunk_complete β”€β”€β”€β”€β”€β”˜
                                        ↓ (all done)
                          requirement_complete β†’ merging
                                                   ↓
                                          awaiting_continue
                                           ↙          β†˜
                                   discovering    session_ending
                                  (next task)      (done)

  ─── Circuit-breaker checkpoint ──────────────────────────────
  any phase ──(phase_timeout |               β”Œβ”€ budget_continue β†’ coding
              retry_exceeded |               β”‚
              coding_cycles_exceeded |       β”‚  (resume work)
              total_chunks_exceeded |        β”‚
              session_timeout)──→ budget_exceeded ──
                                                   β”‚
                                                   └─ budget_abort β†’ aborted
                                                      (give up & clean up)
  ─────────────────────────────────────────────────────────────

The state machine routes any phase into budget_exceeded when an enforced budget trips (see Configuration for the trigger reasons). From budget_exceeded, a budget_continue event resumes coding; budget_abort moves to aborted. The aborted phase has its own cleanup events: abort_resolved (cleanup OK β†’ completed), abort_cleanup_failed (cleanup failed β†’ completed anyway), and restart (back to idle).

Phase Details

PhaseWhat HappensAdvances When
prerequisitesChecks automation level (2+), branch (not main), test commandAll checks pass
discoveringRuns gh issue list --label approved to find workIssue selected
planningReads issue, drafts approach if complex (>3 ACs or architecture decisions)Plan ready
chunkingSplits work into commit-sized pieces (max 3 ACs each)Chunks defined
codingImplements the current chunk’s acceptance criteriaCode complete
updating_docsChecks off completed ACs in the GitHub IssueHook auto-detects
testingRuns project test suite; retries up to 3 alternatives on failureTests pass
committingCreates conventional commit; hook auto-detectsCommit created
doc_drift_check (opt-in)Runs /doc-sync (mechanical fixes) and /doc-audit --fail-on-drift after the commit. Active when _workflow.doc_drift_gate=true.drift_clean β†’ reporting / drift_blocked β†’ coding
reportingFiles chunk report as GitHub IssueReport filed
chunk_completeChecks if more chunks remainNext chunk or done
requirement_completeFinal test, close issue via PRMerge ready
mergingL2: push + PR / L3: rebase + push masterMerged
awaiting_continueAsks: β€œContinue to next task?”User responds
session_endingFiles session summary, notifies, cleans up stateDone

Automation Levels in Practice

BehaviorLevel 2Level 3
Branch creationYou create via /start-workAuto-creates feature/issue-NN-title
Merge strategyCreates PR for reviewDirect merge to master
DecisionsAsks for architecture, scope, ambiguitySame
Continue prompt”Continue to next task?”Same
File operationsAuto-approvedAuto-approved
Destructive gitBlocked (force push, reset β€”hard)Blocked (force push, reset β€”hard)

Self-Verification

Before advancing past key phases (code_complete, tests_passed, requirement_done), a hook injects a verification prompt forcing Claude to re-read the original acceptance criteria and confirm each one is genuinely satisfied β€” not just that code exists.

Doom Loop Detection

A PostToolUse hook tracks how many times each file is edited during a phase. If any file exceeds the threshold (default: 5 edits), a warning is injected. This catches infinite edit cycles where Claude keeps tweaking the same file without making progress.


Stopping and Resuming

Stopping

From inside Claude Code:

/stop-warp-drive              # Graceful: WIP commit, abort report, cleanup
/stop-warp-drive reset        # Hard: delete state file immediately

From any terminal:

warp stop                     # Graceful abort
warp stop --hard              # Hard reset

Graceful stop does:

  1. Transitions to aborted phase
  2. Creates a WIP commit for uncommitted changes
  3. Files an abort report as a GitHub Issue
  4. Cleans up the state file

Hard reset does:

  1. Deletes the state file
  2. That’s it β€” uncommitted work stays in the working tree

Resuming

Warp-drive auto-resumes. When you start a new Claude Code session in a project that has a .warp-drive-state.json, the SessionStart hook injects the current phase context and Claude picks up where it left off.

If the state is stale (the original Claude process has ended), the session still resumes β€” it just notes the staleness.

The Stop Hook

When you try to exit Claude Code (/exit, Ctrl+D, etc.) during an active warp-drive session:

  • Report pending? Exit is blocked. File the chunk report first.
  • Other active phase? Exit is allowed with an advisory: β€œConsider running session end protocol before stopping.”

Remote Mode (RDB)

For autonomous sessions where you’re away from the terminal.

Setup

/rdb on

This enables the Remote Decision Bridge. All decisions go to Telegram instead of the terminal, and every phase transition sends a notification.

What you get on Telegram

  • Phase transition notifications: [warp-drive] coding -- chunk 2/5 for #42
  • Decision prompts when Claude needs input
  • Completion notice: [warp-drive] session ending -- 4 commits, 3 chunks

Decision Timeout

If warp-drive needs your input (terminal or Telegram) and you don’t respond within 10 minutes:

  1. It files a GitHub Issue labeled todo, assigned to you, describing the decision needed
  2. Skips the blocked item and continues to the next chunk
  3. If nothing else to do, transitions to session ending

You’ll find the TODO in your issue list when you’re back.

Going AFK

Tell Claude you’re stepping away β€” it treats that as /rdb on:

β€œI’m going to grab lunch, keep going”


Dev Environment Integration

When a project has a dev.json at its root, warp-drive automatically manages the dev environment throughout the coding loop.

What happens

PhaseActionScript
prerequisitesFull dev-up: start server, run migrations, seed data, provision usersdev-up.sh "$(pwd)" --verbose
codingSeed coverage check (advisory β€” warns if schema changed without seed data)check-seed-coverage.sh "$(pwd)"
chunk_completeFast health check before next chunkdev-up.sh "$(pwd)" --check
chunk_complete (recovery)Full dev-up if health check failsdev-up.sh "$(pwd)" --verbose

Dev health as a blocker

If the dev server goes down during coding and can’t be recovered after 2 attempts, warp-drive treats it as a blockable event and escalates per the Error Escalation protocol.

Setting up dev.json

# Copy template and customize
cp ~/.claude/templates/dev.json ./dev.json
vi dev.json

The template has sensible defaults for SvelteKit + Cloudflare Workers projects. Customize the server.command, server.port, server.health, seed, and auth sections for your stack.

Seed data in the loop

Warp-drive encourages additive seed data: when a chunk adds new database entities or lifecycle states, the check-seed-coverage.sh gate advises adding seed data in the same commit. This ensures dev is always testable with realistic data across all entity states.

Skipping dev lifecycle

Projects without dev.json skip all dev lifecycle steps β€” the integration is fully opt-in. Set _workflow.dev_health_check: false to disable even when dev.json exists.

See dev-lifecycle.md for the full IaC dev lifecycle reference.


Configuration

All settings live in .claude/settings.local.json under _workflow. Edit directly or view with warp config.

SettingDefaultPurpose
max_acs_per_commit3Max acceptance criteria per chunk
test_before_committrueRun tests before each commit
auto_mergetrueL3: auto-merge to master
max_phase_minutes30Timeout per phase before budget warning
max_coding_cycles3Max code/test retries per chunk
max_retries_per_chunk5Max total retries before escalation
max_edits_per_file5Doom loop detection threshold
pre_exit_verificationtrueSelf-check before phase advance
decision_timeout_minutes10Minutes before filing TODO issue
heartbeat_on_committrueRDB notify on each commit
reconcile_per_chunktrueAuto-correct progress counters
dev_health_checktrueRun dev-up health check between chunks
dev_seed_checktrueRun seed coverage advisory during coding
max_total_chunks20Circuit breaker: max chunks per session (hard limit)
max_session_minutes480Circuit breaker: max session duration in minutes (hard limit)
phase_timeout_enforcementwarnHow max_phase_minutes breaches are handled: warn (advisory only), block (reject the offending transition until elapsed time recovers), or abort (route through budget_exceeded and auto-abort)
doc_drift_gatefalseWhen true, the slash command fires commit_with_doc_gate after each commit, routing through the doc_drift_check phase before reporting. Mechanical drift is auto-fixed via /doc-sync; high-severity audit findings route the loop back to coding. See Doc Drift Gate.

phase_timeout_enforcement is the only budget threshold whose enforcement mode is configurable β€” retry_exceeded, coding_cycles_exceeded, total_chunks_exceeded, and session_timeout are always enforced (they always route through budget_exceeded). Set phase_timeout_enforcement to warn (the default) for ordinary use and to block or abort only when you actively want phase-level timeouts to halt the loop.

For the full budget system, circuit breaker behavior, token capture pipeline, cost estimation, and reporting tools, see Token Monitoring & Budget System.

Verification Gates

You can configure custom shell commands that must pass before phase transitions:

{
  "_workflow": {
    "verification_gates": {
      "code_complete": ["make lint"],
      "tests_passed": ["make type-check"]
    }
  }
}

If a gate command fails, the transition is blocked and Claude must fix the issue before advancing.

Doc Drift Gate

When _workflow.doc_drift_gate=true, the loop routes through a new doc_drift_check phase between committing and reporting:

committing β†’ (commit_with_doc_gate) β†’ doc_drift_check
                                         ↙               β†˜
                              drift_clean              drift_blocked
                                  ↓                         ↓
                              reporting                  coding
                            (proceed normally)     (fix high-severity drift)

Inside the gate:

  1. ~/.claude/scripts/doc-keeper/sync.js --root . --apply runs and applies every fix_kind: mechanical finding (component counts, label naming, etc.).
  2. ~/.claude/scripts/doc-keeper/audit.js --root . --fail-on-drift re-audits.
  3. If audit exits zero (no high-severity drift), the loop emits drift_clean and proceeds to reporting. Any sync edits are staged into a follow-up commit (or amended into the chunk commit, depending on policy).
  4. If audit exits non-zero, the loop emits drift_blocked and returns to coding so Claude can address the high-severity findings before retrying the chunk.

The gate is opt-in (doc_drift_gate=false by default) for backward compatibility. When it’s off, the standard committed β†’ reporting transition still runs.

The advisory hook hooks/doc-drift-warning.sh runs after every successful git commit β€” even when the gate is disabled β€” and warns when a commit touches tooling source paths (skills/, commands/, agents/, hooks/, bin/, scripts/, Makefile) without touching any *.md. That hook is non-blocking; the gate above is.

Reasoning Budget

Control Claude’s reasoning effort per phase (the β€œreasoning sandwich” pattern β€” high reasoning for planning/verification, standard for implementation):

{
  "_workflow": {
    "reasoning_budget": {
      "planning": "high",
      "coding": "standard",
      "testing": "high"
    }
  }
}

See Token Monitoring & Budget System for the full per-phase default table and how reasoning levels are applied.


What Gets Created

ArtifactWhereLabels
CommitsFeature branch (conventional commit format)β€”
Chunk reportsGitHub Issueswarp-drive
Session summaryGitHub Issuesession-summary, warp-drive
Lessons learnedGitHub Issueslesson, warp-drive
Decisions madeGitHub Issuesdecision, warp-drive
Deferred bugsGitHub Issuesbug-deferred, warp-drive
TODO (timeouts)GitHub Issuestodo, warp-drive
Abort reportsGitHub Issueswarp-drive, session-summary
PR (Level 2)GitHub PR via gh pr createβ€”

GitHub labels are created automatically on first run (warp-drive, lesson, decision, risk, bug-deferred, session-summary).


Recovery

If a session is lost (crash, worktree deletion, etc.), use the disaster recovery CLI:

# Check current state
~/.claude/scripts/lib/cdr.sh status
 
# Re-initialize tooling (clone from remote, re-run cdi)
~/.claude/scripts/lib/cdr.sh recover /path/to/project
 
# Emergency state reset (deletes warp-drive state file)
~/.claude/scripts/lib/cdr.sh reset /path/to/project

Commit hash recovery

Warp-drive records commit hashes in the state file (commit_hashes[]). If the state file survives but the worktree is lost, cherry-pick commits from the remote:

git fetch origin
git cherry-pick <hash1> <hash2> ...

Preflight check

Run the preflight checker to verify all dependencies are installed:

~/.claude/scripts/lib/preflight-check.sh

This checks: jq, node, git, gh auth, hook file existence, and core scripts.


Troubleshooting

”Automation level must be 2 or 3”

Run /automation level 2 inside Claude Code first. This sets up permissions in .claude/settings.local.json.

”Must not be on main/master”

Run /start-work to create a feature branch (Level 2), or let Level 3 auto-create one.

Warp-drive won’t start β€” β€œActive session exists”

A previous session didn’t clean up. Check if it’s stale:

warp status

If stale, reset it:

warp stop --hard

Commit blocked β€” β€œonly allowed during committing phase”

The gate hook is working correctly. Claude tried to commit outside the committing phase. This usually means a phase was skipped. Check the state:

warp log

Can’t exit Claude Code β€” β€œreport is missing”

The stop hook blocks exit when a commit was made but no chunk report was filed. Tell Claude to file the report, or if you need to force exit, kill the terminal.

Doom loop warning

Claude keeps editing the same file. The edit tracker caught it. This usually means the approach isn’t working. Claude should try an alternative strategy or escalate.

State file is corrupted

warp stop --hard

This deletes the state file. Your code changes are still in the working tree. Start a new session when ready.

warp command not found

Add ~/.claude/bin to your PATH:

echo 'export PATH="$HOME/.claude/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Internals Reference

For contributors and power users.

State File

Location: <project>/.claude/.warp-drive-state.json

This is what state-machine.js init produces (with a few rows populated after the first transitions). Keep this in sync with the state object literal at the bottom of init() in scripts/warp-drive/state-machine.js.

{
  "version": 1,
  "session": {
    "started_at": "2026-05-08T15:56:59.401Z",
    "started_at_epoch": 1778255819402,
    "pid": 51506,
    "level": 3,
    "github_user": "paulirv"
  },
  "phase": "coding",
  "requirement": "42",
  "branch": "feature/issue-42-title",
  "chunk": { "index": 1, "total": 5, "acs": [["AC-01","AC-02"],["AC-03"]] },
  "checklist": {
    "docs_updated": false,
    "tests_passed": false,
    "committed": false,
    "report_filed": false
  },
  "budgets": {
    "phase_started_at": "2026-05-08T15:57:53.487Z",
    "retry_count": 0,
    "coding_cycles": 0
  },
  "aborted": false,
  "edit_counts": { "src/file.ts": 3 },
  "doom_loop_events": [],
  "gates": {
    "code_complete": { "semantic": "diff_relevance_check" },
    "docs_updated":  { "semantic": "ac_count_check" }
  },
  "completed_chunks": [],
  "history": [
    { "phase": "prerequisites", "at": "..." },
    { "phase": "discovering", "at": "...", "from": "prerequisites", "event": "prerequisites_ok" }
  ],
  "metrics": {
    "commits": 0,
    "reports_filed": 0,
    "tests_run": 0,
    "chunks_completed": 0,
    "session_duration_minutes": 0
  },
  "token_usage": {
    "session_total": null,
    "chunk_snapshots": [],
    "current_chunk_started_at": null
  },
  "main_branch": "master",
  "session_branch": null,
  "merge_target": "master",
  "merge_strategy": "ff-only"
}

Fields appear roughly in this order in the file. Notes on the less-obvious ones:

  • session.started_at_epoch and session.github_user are populated at init; the latter comes from gh api user -q .login (empty string if gh is unauthenticated, which silently disables @mention notifications).
  • aborted: false flips to true when the engine routes through the aborted phase. Cleanup messaging keys off this flag.
  • gates is seeded with the two semantic gates (diff_relevance_check, ac_count_check) plus any verification_gates from _workflow config. The targets arrays from config land alongside semantic on the matching event keys.
  • metrics.session_duration_minutes is updated when the engine writes the state β€” useful when reporting from warp status.
  • main_branch / session_branch / merge_target / merge_strategy are populated from ~/.claude/scripts/branch-detect.sh at init and consulted during merging.
  • After budget_exceeded, budgets gains exceeded_reasons, exceeded_at, and exceeded_from_phase to record the trip.

State Machine CLI

node ~/.claude/scripts/warp-drive/state-machine.js <action> <project-root> [args]
ActionPurpose
initCreate new session: init <root> --level 2 --issue 42 --pid $PPID
statusShow current state (exit 2 if no session)
transitionMove phases: transition <root> <event> [--data '{"key":"val"}']
injectGet phase context for SessionStart hook
gateCheck if an operation is allowed: gate <root> git_commit
verifyRun verification gates: verify <root> code_complete
abortShorthand for transition <root> abort
resetDelete state file immediately

Transition Table

Every phase lists its valid events and where they lead. This matches the TRANSITIONS object in scripts/warp-drive/state-machine.js.

PhaseEventNext Phase
idlestartprerequisites
idleabortaborted
prerequisitesprerequisites_okdiscovering
prerequisitesabortaborted
discoveringwork_selectedplanning
discoveringno_worksession_ending
discoveringabortaborted
planningplan_readychunking
planningabortaborted
chunkingchunks_definedcoding
chunkingabortaborted
codingcode_completeupdating_docs
codingabortaborted
updating_docsdocs_updatedtesting
updating_docsabortaborted
testingtests_passedcommitting
testingtests_failedcoding
testingabortaborted
committingcommittedreporting
committingcommit_with_doc_gatedoc_drift_check
committingabortaborted
doc_drift_checkdrift_cleanreporting
doc_drift_checkdrift_blockedcoding
doc_drift_checkabortaborted
reportingreport_filedchunk_complete
reportingabortaborted
chunk_completenext_chunkcoding
chunk_completerequirement_donerequirement_complete
chunk_completeabortaborted
requirement_completemerge_readymerging
requirement_completeabortaborted
mergingmergedawaiting_continue
mergingmerge_failedmerging
mergingpush_failedmerging
mergingabortaborted
awaiting_continuecontinue_yesdiscovering
awaiting_continuecontinue_nosession_ending
awaiting_continueabortaborted
session_endingsession_endedcompleted
session_endingabortaborted
budget_exceededbudget_continuecoding
budget_exceededbudget_abortaborted
budget_exceededabortaborted
abortedabort_resolvedcompleted
abortedabort_cleanup_failedcompleted
abortedrestartidle

Budget-trigger reasons. When an enforced budget trips, the engine routes the current phase into budget_exceeded and records the reason on state.budgets.exceeded_reasons. The reasons are:

ReasonSourceDefault ThresholdConfig Key
phase_timeoutPhase elapsed too long30 minmax_phase_minutes (+ phase_timeout_enforcement)
retry_exceededPer-chunk retry counter exceeded5 retriesmax_retries_per_chunk
coding_cycles_exceededCode/test cycles for this chunk exceeded3 cyclesmax_coding_cycles
total_chunks_exceededChunks completed in this session exceeded hard limit20 chunksmax_total_chunks
session_timeoutTotal session duration exceeded hard limit480 minmax_session_minutes

phase_timeout is only enforced (rather than a soft warning) when phase_timeout_enforcement is block or abort β€” see Configuration. The other four are always enforced.