Install
$ agentstack add skill-momentmaker-kaijutsu-autopilot ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
autopilot v2 — Intent → PR pipeline
Take a natural-language intent and run the full development pipeline to a polished PR. Two gates total: brainstorm approval (Gate 1) + PR review on GitHub (Gate 2 — the existing PR semantics). Multi-agent adversarial review replaces the single-reviewer model from v1.
> NOTE: kaijutsu-managed. Re-running jutsu install autopilot overwrites this file. The previous v1 SKILL.md (if any) is preserved at ~/.claude/skills/autopilot/.archived/SKILL.md.
Command Detection
/autopilot {intent}→ Run mode (start new pipeline)/autopilot resume→ Resume mode (continue interrupted run)/autopilot abort→ Abort mode (clean up + stop)/autopilot status→ Status mode (show current phase)
CLI equivalents: jutsu autopilot {init,status,abort,resume,run}. Use the slash command for interactive runs; the cobra group is for scripted use + CI test mode.
Phase Map
/autopilot {intent}
→ Phase 1: BRAINSTORM (interactive — anti-sycophancy via jutsu swarm dream)
→ ★ GATE 1 (configurable: skip | review) ★
→ Phase 2: SPEC
→ write spec to docs/specs/-.md
→ swarm doc-review on spec [report-only]
→ record approved-spec path in state file
→ Phase 3: PLAN
→ write plan to IMPLEMENTATION_PLAN.md
→ swarm doc-review on plan [report-only]
→ Phase 4: BUILD (stage 1..N — each followed by polish loop)
→ Phase 5: SHIP
→ final swarm pr-review (full lens)
→ reverse-drift gate (informational, tagged on PR)
→ gh pr create (or test-mode: write planned PR JSON)
→ ★ GATE 2 = PR review on GitHub ★
→ Phase 6: LEARN (state file, findings.db, MEMORY.md)
Cost Cap
Three layers (per spec Decision #3):
- Soft cap — config default $20 (overridable via
.kaijutsu/autopilot.yaml::cost.max_total_usd); at 50% of soft cap, autopilot pauses + asks user to confirm continue. - Hard ceiling —
MaxAutopilotCostUSD = $100constant incli/internal/cli/autopilot.go. Cannot be raised by editing yaml. Per-run override via--max-cost Nworks only up to ceiling. - Per-shell ceiling override — set
KAIJUTSU_AUTOPILOT_HARD_CAP_OVERRIDE=Nin your shell environment to raise the ceiling for THIS shell. Not stored in repo. Defense against malicious yaml.
Above the ceiling without env var → error. Pre-flight jutsu swarm --estimate projection runs at Gate 1 before any model dispatch.
Phases (detailed)
Phase 1: BRAINSTORM (interactive)
Interactive conversation with the user about the intent. Anti-sycophancy enabled by default: invoke jutsu swarm dream --mode full --strict --personas brainstorm-creative-claude,architecture-purist-antigravity,claim-auditor-claude against the leading direction. User sees the design ALREADY ARGUED AGAINST before approving Gate 1.
Step 1: Read project context (parallel):
CLAUDE.md(project rules + constraints)~/.claude/projects/*/memory/MEMORY.mdmatching this project.claude/decisions/*.mdwithstatus: activegit log --oneline -20- Past autopilot runs from memory (entries named
autopilot-run-*)
Step 2: Scan for related code — grep + skill-suggest:
jutsu suggest ""to see if installed skills already handle sub-problems- Grep the codebase for keywords from the intent
Step 3: Anti-sycophancy dream pass (when autopilot.yaml gates.brainstorm: review):
- Run
jutsu swarm dream --mode fullagainst the leading design - Surface load-bearing findings + anti-skill arguments to the user
Step 4: GATE 1 — present design to user with the dream findings already attached:
## Autopilot: Direction Review
**Intent:** "{original intent}"
**Leading approach:** {1-paragraph summary}
**Why this approach:** {2-3 sentences}
**Dream's adversarial findings:** {top 3 load-bearing concerns}
**Estimated cost (pre-flight):** ${X}
Approve, revise, or reject?
Wait for user response. Approve → Phase 2. Revise → re-explore. Reject → abort.
Phase 2: SPEC
Step 1: Write spec to docs/specs/-.md following the brainstorming spec format.
Step 2: Run jutsu swarm doc-review --personas architecture-purist-antigravity,paranoid-security-claude,claim-auditor-claude .
Step 3: Findings printed to stderr inline + appended to /findings.md. Findings are report-only (per spec Decision #2). Autopilot does NOT mutate the spec automatically. User can apply specific findings via re-run after editing.
Step 4: Record approved spec path in .kaijutsu/autopilot-state.md (approved_spec_path key) for the reverse-drift gate to consume.
Phase 3: PLAN
Step 1: Write IMPLEMENTATION_PLAN.md following the writing-plans skill format — bite-sized stages with exact file paths + test commands.
Step 2: Run jutsu swarm doc-review --personas perf-purist-codex,claim-auditor-claude,cross-file-antigravity .
Step 3: Findings report-only (same as spec).
Phase 4: BUILD
For each stage in the plan:
- Implement the stage — fresh subagent dispatched per task per the subagent-driven-development protocol.
- Polish loop — invoke
/polishskill against the stage's diff. Up to 4 review-fix passes per stage. If findings remain after 4, escalate to user. - Run tests — project's test command must pass before moving to next stage.
- Commit — descriptive message linking to the spec + plan.
Track cost across all stages. Pause at 50% of soft cap; abort at hard ceiling without override.
Phase 5: SHIP
Step 1: Final swarm pr-review (full lens) — jutsu swarm pr-review --diff-from-branch main --strict --personas paranoid-security-claude,architecture-purist-antigravity,perf-purist-codex,claim-auditor-claude --mode full. Apply load-bearing findings; defensible-skip the rest.
Step 2: Reverse-drift gate — jutsu swarm reverse --spec --diff origin/main...HEAD. Drift findings appended to PR description as ` block. PR labeled autopilot-drift` if drift surfaced.
Step 3: Open PR — gh pr create with synthesized body. In test mode (KAIJUTSU_AUTOPILOT_TEST_MODE=1), writes planned PR to .kaijutsu/autopilot-pr.json instead.
Phase 6: LEARN
After PR open (or abort):
- Write run summary to
~/.claude/projects//memory/autopilot-run--.md. - Findings recorded into
~/.kaijutsu/findings.db(existing v0.7 schema). Each autopilot run adds rows so per-agent confidence weights tune the next run. - Update
MEMORY.mdif a lesson is broadly applicable.
State File
Path: .kaijutsu/autopilot-state.md. YAML frontmatter, no body.
---
intent: ""
phase: brainstorm | spec | plan | build | ship | learn | done
slug:
approved_spec_path: docs/specs/-.md
plan_path: IMPLEMENTATION_PLAN.md
branch: feat/
pr:
started_at:
gate_responses: { brainstorm: approve | revise | reject }
cost_so_far_usd:
---
State file enables resume + status + abort to work after session interruption.
Findings Application Path
Per spec Decision #2: doc-review findings are report-only. Never mutate the artifact silently.
- Findings printed to stderr inline during the swarm run.
- Same findings written to
/findings.md. - User reviews findings; if changes are wanted, user edits the spec/plan directly OR re-runs autopilot after editing.
- Autopilot continues to next phase without applying findings unless severity is
blocker(perfindings.escalate_thresholdconfig) — in which case autopilot pauses + asks user how to proceed.
This preserves the reviewer/generator boundary that dream finding #4 surfaced.
Skill References
See references/:
config-schema.md— full.kaijutsu/autopilot.yamlreferencecost-model.md— soft cap + hard ceiling + env overridepersona-defaults.md— which personas run at which phase + how to override
See runbooks/:
abort-and-resume.md— state file format + resume protocoldrift-detection.md— reverse-drift gate behavior + interpretation
Hard Rules
- Two gates only. Brainstorm approval + PR review on GitHub. No mid-flight gates by default.
- Findings are report-only. Never auto-apply.
- Cost ceiling is non-negotiable. Hard ceiling lives in skill code, not yaml.
- Reverse-drift is informational, not blocking. Drift surfaces on the PR; user decides.
- Replace, don't extend. v1 autopilot at
~/.claude/skills/autopilot/.archived/SKILL.md(preserved on install).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: momentmaker
- Source: momentmaker/kaijutsu
- License: MIT
- Homepage: https://kaijutsu.dev/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.