forge-autopilot
Skill2 starsChanged 5 months agoMITView on GitHub
Drive the Forge pipeline hands-off — run stages back-to-back, checking each
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ShipToday/forge-plugin-cursortheir own version, first seen Nov 6, 2026
- tusharpandey13/forgetheir own version, first seen Jun 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- tusharpandey13/forge★ 1same name
- ShipToday/forge-plugin-cursor★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- forge-opencode/CLAUDE.mdCLAUDE.md
- forge-adoptSkill
- forge-arch-proSkill
- forge-archSkill
- forge-autopilot-stopSkill
- forge-build-proSkill
- forge-buildSkill
- forge-deploySkill
- forge-doctorSkill
- dreamer-runSkill
- forge-evalSkill
- forge-feedbackSkill
- flowSkill
- forge-force-advanceSkill
- graduateSkill
- health-checkSkill
- forge-initSkill
- forge-monitorSkill
- forge-orchestrateSkill
- forge-plan-proSkill
- forge-planSkill
- preflightSkill
- forge-product-proSkill
- forge-productSkill
- forge-releaseSkill
- forge-resolveSkill
- forge-resumeSkill
- forge-retroSkill
- forge-reviewSkill
- forge-rulesSkill
- forge-set-profileSkill
- skill-creatorSkill
- forge-spec-proSkill
- forge-specSkill
- forge-sprint-proSkill
- forge-sprintSkill
- forge-srs-proSkill
- forge-srsSkill
- forge-statusSkill
- forge-trace-matrixSkill
- forge-uninstallSkill
- forge-validateSkill
- watchSkill
- watch-stopSkill
- forge-whySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
If it reports already_running, tell the user and stop unless they confirm.
- Very specific: line 136
After each heal, re-run check-gate.py (step d) and increment attempts_used.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
forge-autopilot — bounded autonomous pipeline execution
Autopilot walks the pipeline for the user: for each planned stage it runs that stage's
agent, checks the stage gate, and advances only on a pass — stopping at the first
blocker instead of forcing past it. It generalizes /forge:force-advance (one gated
advance) and /forge:build --milestone (a within-stage batch) to a cross-stage loop.
The plan is computed deterministically by scripts/autopilot.py; this skill executes it
in-session (a script can't drive the Agent tool — ADR-006).
When to Use
/forge:autopilot(optionallyto stage N,the next K stages, oruntil a gate).- The user wants several stages run without issuing each
/forge:*command by hand. /forge:autopilot --unattendedfor a fully hands-free run (no checkpoints; see below).
When NOT to Use
- A single stage → just run that stage's command (e.g.
/forge:build). - The user wants to override a known blocker → that's
/forge:force-advance, not autopilot.
Safety rails (always)
- Bounded self-heal, then stop-on-gate. On a blocking gate failure, autopilot makes a
bounded number of fix attempts via
/forge:resolve(autopilot.max_heal_attempts, default 1;0restores classic stop-on-gate), re-checking the gate after each. When heal is exhausted (or disabled) and blockers remain it STOPS and surfaces them. It never force-advances unless.forge/config.yaml→autopilot.allow_force: trueand the user supplied a reason. - Bounded. It runs only the planned stages (target +
autopilot.max_stages/stop_beforecaps); it never loops unbounded. - Interruptible.
/forge:autopilot-stophalts it before the next stage. - Background mode (
--mode background) is cost-capped + capability-gated and a clean no-op when background agents are unavailable orFORGE_NO_BACKGROUND=1. - Context-aware (v0.3.6, opt-in). Set
autopilot.context_window_size(tokens; Forge cannot auto-detect the model window) to enable context-pressure handling; the run then checkpoints and rotates/resumes once context crossesautopilot.context_threshold_percent(default 80). Off entirely whencontext_window_sizeis unset — identical to prior behavior. See step 2.i andreferences/autopilot-context.md.
Unattended mode (--unattended, REQ-AUTO-004/005)
/forge:autopilot --unattended runs with no per-stage checkpoints (it ignores
checkpoint: every) for a hands-free run. It stays inside the full safety envelope —
the per-dispatch max_budget_usd, the _cost_cap ledger, max_heal_attempts,
max_stages/stop_before, the FORGE_NO_BACKGROUND kill switch, and the
/forge:autopilot-stop flag. Hitting any bound STOPS cleanly, leaving a resumable
run-log (/forge:autopilot --resume).
For interactive stages (SRS/spec/plan CLARIFY/CONFIRM), an unattended run does not silently guess:
- It first loads pre-supplied answers —
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py answers --cwd .reads.forge/autopilot-answers.{json,yaml}(keyed by stage) — and uses the matching answer. - Absent an answer, it adopts a reasonable default and records it as an explicit
assumption in the run-log:
autopilot.py record --cwd . --stage {stage} --status assumption --note "{what was assumed and why}". Assumptions never mark a stage complete, so they surface in the final summary for the user to review.
Steps
- Start + plan. Mark the session active (idempotent — warns if one is already
running, so two autopilots don't run at once):
If it reportspython3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py start --cwd .already_running, tell the user and stop unless they confirm. Then get the ordered plan:
Each plan item ispython3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py --cwd . --json \ [--to N | --stages K | --until-gate] [--mode in-session|background] [--resume] \ [--unattended]{stage, skill, label}. If the plan is empty, tell the user there's nothing to run (already at target, or no pipeline) and stop. - Loop over the plan items in order. For each
{stage, skill, label}: a. If.forge/autopilot-session.jsonhasstop_requested: true, STOP (see/forge:autopilot-stop). b. Narrate:[Forge] autopilot: stage {stage} — {label}. c. Run the stage. In--mode in-session(default), follow the stage's command{skill}(e.g./forge:build) so the stage's agent does the work; interactive stages (SRS/spec/plan) may pause for CLARIFY/CONFIRM — that is expected (autopilot is hands-off, not unattended). In--mode background, dispatch it headlessly and reuse the returned session across stages for cost:
Apython3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py dispatch --cwd . \ --stage {stage} --skill {skill} --label "{label}" \ [--session {prev_session_id}] [--dispatch-count {n}] \ [--last-input-tokens {prev_input_tokens}]status: unavailableresult means background agents are off — fall back to in-session or stop. Carry the returnedsession_idinto the next dispatch, and pass--dispatch-count(dispatches so far on this session) so a long run rotates to a fresh session perautopilot.session_max_dispatches, bounding context growth. The result also carriesinput_tokens(the dispatch's context size) — carry it into the next dispatch as--last-input-tokensso the run rotates on context pressure (checkpoint → fresh session → continue) once it crossesautopilot.context_threshold_percentofautopilot.context_window_size(v0.3.6, opt-in — off untilcontext_window_sizeis set). Per-stage model routing (autopilot.models) and the per-dispatch$ceiling (autopilot.max_budget_usd) are applied automatically from.forge/config.yaml. d. Check the gate:
Parse the JSONpython3 ${CLAUDE_PLUGIN_ROOT}/scripts/check-gate.py --stage {stage} --cwd . \ --plugin-dir ${CLAUDE_PLUGIN_ROOT}details[]. If anyseverity: blockeris notpassed, self-heal before giving up (see step e); only STOP when heal is exhausted or disabled. e. Self-heal a blocked gate (REQ-AUTO-001/002). Trackattempts_usedper stage, starting at 0. While the gate has blockers andautopilot.pyshould_healallows another attempt — i.e.attempts_used < autopilot.max_heal_attempts(default 1;0= classic stop-on-gate) — run one bounded fix through the Stage-11 resolver, then re-check the gate:- In
--mode in-session(default): run/forge:resolveagainst this stage's blockers (pass the failingdetails[]so the resolver knows what to fix). - In
--mode background: dispatch it headlessly (cost/budget/capability gated, session reused):python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py heal --cwd . \ --stage {stage} --skill /forge:resolve --label "{label}" \ --blockers "{failing criteria}" [--session {sid}] [--dispatch-count {n}]
check-gate.py(step d) and incrementattempts_used. On a now-clean gate → advance (step f). Whenshould_healreturns false (cap reached ormax_heal_attempts: 0) and blockers remain → STOP: surface the remaining blockers and tell the user to fix and re-run/forge:autopilot --resume, or override with/forge:force-advance --reason "…". Autopilot never force-advances on its own (onlyallow_force: true+ a reason does). f. Self-verify (optional; only whenautopilot.verify: true— REQ-AUTO-003). After the gate is clean, run an independent, fresh-context verifier that checks the artifact against the stage's intent beyond the mechanical gate:- In
--mode in-session(default): spawn a verifier subagent via theTasktool (fresh context — do not hand it this loop's history) asking for apass/failverdict with reasons on whether {skill}'s artifact genuinely satisfies stage {stage}'s intent. - In
--mode background: dispatch a schema-constrained verdict headlessly:python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py verify --cwd . \ --stage {stage} --skill {skill} --label "{label}"
failverdict is treated exactly like a gate blocker: route back into the self-heal loop (step e), and STOP if heal is exhausted. A broken, empty, orunavailableverifier does not block (it's an extra check on an already-passing gate) — log it and advance. g. Advance on a clean gate:
h. Checkpoint policy (python3 ${CLAUDE_PLUGIN_ROOT}/scripts/state-manager.py advance --cwd . python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py record --cwd . --stage {stage} --status doneautopilot.checkpoint):gate(default) — continue unless a gate blocks;every— pause for the user's OK between stages;never— run straight through. i. Context checkpoint → compact → continue (v0.3.6, REQ-CTX). A long hands-off run crosses a context boundary; Forge checkpoints so it resumes cleanly. On each advance the loop refreshes a durable checkpoint (.forge/autopilot-checkpoint.json); you can also write it explicitly before a heavy dispatch:python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py checkpoint --cwd . \ [--dispatch-count {n}] [--last-input-tokens {t}] [--session {sid}]- Background: once a dispatch's
input_tokenscrosses the configured threshold, the nextdispatchrotates to a fresh session automatically (checkpoint first) — the run compacts and continues without losing its place. - In-session: you cannot measure or trigger Claude Code's native compaction, but
Forge's PreCompact hook writes the checkpoint just before it and
SessionStart(
compact) re-injects "resume at stage N — do not redo completed stages" right after. Keep walking the plan;--resume+ the run-log guarantee no stage repeats across the compaction boundary.
- In
- Finish. Mark the session idle (also clears any stop flag), then summarize:
Report stages completed, where it stopped (gate blocker or stop request), and the next step (python3 ${CLAUDE_PLUGIN_ROOT}/scripts/autopilot.py finish --cwd ./forge:autopilot --resumeto continue after a fix).
Notes
- Honor any
alwaysproject rules surfaced in context while running each stage. --resumeskips stages already recordeddonein.forge/autopilot-runs.jsonl, so a run that stopped at a blocker continues cleanly after the fix.- Autopilot mutates pipeline state only through
state-manager.py advance(the sanctioned path) and writes its run-log only under.forge/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

