@ikunin/sprintpilot 2.2.31 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +228 -415
- package/_Sprintpilot/Sprintpilot.md +76 -8
- package/_Sprintpilot/bin/autopilot.js +734 -68
- package/_Sprintpilot/lib/orchestrator/action-ledger.js +208 -0
- package/_Sprintpilot/lib/orchestrator/adapt.js +93 -15
- package/_Sprintpilot/lib/orchestrator/profile-rules.js +7 -16
- package/_Sprintpilot/lib/orchestrator/sprint-plan.js +488 -0
- package/_Sprintpilot/lib/orchestrator/state-store.js +9 -5
- package/_Sprintpilot/lib/orchestrator/user-command-applier.js +78 -0
- package/_Sprintpilot/lib/orchestrator/user-commands.js +114 -0
- package/_Sprintpilot/lib/orchestrator/verify.js +10 -17
- package/_Sprintpilot/manifest.yaml +4 -3
- package/_Sprintpilot/modules/autopilot/profiles/_base.yaml +18 -4
- package/_Sprintpilot/modules/git/config.yaml +15 -9
- package/_Sprintpilot/modules/ma/config.yaml +29 -27
- package/_Sprintpilot/scripts/dispatch-layer.js +12 -15
- package/_Sprintpilot/scripts/infer-dependencies.js +706 -254
- package/_Sprintpilot/scripts/log-timing.js +6 -10
- package/_Sprintpilot/scripts/merge-shards.js +21 -23
- package/_Sprintpilot/scripts/post-green-gates.js +3 -1
- package/_Sprintpilot/scripts/resolve-dag.js +452 -280
- package/_Sprintpilot/scripts/sprint-plan.js +1068 -0
- package/_Sprintpilot/scripts/state-shard.js +13 -5
- package/_Sprintpilot/scripts/summarize-timings.js +2 -3
- package/_Sprintpilot/skills/sprint-autopilot-on/SKILL.md +30 -2
- package/_Sprintpilot/skills/sprint-autopilot-on/workflow.orchestrator.md +36 -10
- package/_Sprintpilot/skills/sprintpilot-codebase-map/agents/architecture-mapper.md +10 -8
- package/_Sprintpilot/skills/sprintpilot-codebase-map/agents/concerns-hunter.md +11 -9
- package/_Sprintpilot/skills/sprintpilot-codebase-map/agents/integration-mapper.md +11 -9
- package/_Sprintpilot/skills/sprintpilot-codebase-map/agents/quality-assessor.md +10 -8
- package/_Sprintpilot/skills/sprintpilot-codebase-map/agents/stack-analyzer.md +11 -9
- package/_Sprintpilot/skills/sprintpilot-codebase-map/workflow.md +1 -1
- package/_Sprintpilot/skills/sprintpilot-dependency-graph/SKILL.md +63 -0
- package/_Sprintpilot/skills/sprintpilot-dependency-graph/workflow.md +227 -0
- package/_Sprintpilot/skills/sprintpilot-plan-sprint/SKILL.md +67 -0
- package/_Sprintpilot/skills/sprintpilot-plan-sprint/workflow.md +435 -0
- package/_Sprintpilot/skills/sprintpilot-sprint-progress/SKILL.md +53 -0
- package/_Sprintpilot/skills/sprintpilot-sprint-progress/workflow.md +169 -0
- package/lib/commands/install.js +186 -12
- package/package.json +1 -1
- package/_Sprintpilot/skills/sprintpilot-code-review/SKILL.md +0 -6
- package/_Sprintpilot/skills/sprintpilot-code-review/agents/acceptance-auditor.md +0 -51
- package/_Sprintpilot/skills/sprintpilot-code-review/agents/blind-hunter.md +0 -39
- package/_Sprintpilot/skills/sprintpilot-code-review/agents/edge-case-hunter.md +0 -46
- package/_Sprintpilot/skills/sprintpilot-code-review/workflow.md +0 -111
- package/_Sprintpilot/skills/sprintpilot-party-mode/SKILL.md +0 -6
- package/_Sprintpilot/skills/sprintpilot-party-mode/workflow.md +0 -138
package/README.md
CHANGED
|
@@ -5,18 +5,23 @@
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://github.com/bmad-code-org/BMAD-METHOD)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
|
-
[](#
|
|
9
|
-
[](https://github.com/ikunin/sprintpilot/stargazers)
|
|
8
|
+
[](#compatibility)
|
|
10
9
|
|
|
11
|
-
Sprintpilot drives [BMad Method](https://github.com/bmad-code-org/BMAD-METHOD) v6 sprints to completion autonomously. One command turns your sprint plan into reviewed, tested, PR-ready code — story by story, with full git workflow
|
|
10
|
+
Sprintpilot drives [BMad Method](https://github.com/bmad-code-org/BMAD-METHOD) v6 sprints to completion autonomously. One slash command turns your sprint plan into reviewed, tested, PR-ready code — story by story, with full git workflow.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
> **Independent project.** Sprintpilot is not affiliated with or endorsed by BMad Code, LLC. See [TRADEMARK.md](TRADEMARK.md).
|
|
13
|
+
> Migrating from `bmad-autopilot-addon` v1? See [MIGRATION.md](MIGRATION.md).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## What it does
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Per story, in one autonomous loop:
|
|
18
|
+
|
|
19
|
+
- Creates an isolated worktree + branch, runs `bmad-dev-story` TDD-style (RED then GREEN), lints changed files only.
|
|
20
|
+
- Stages explicitly (never `git add -A`), commits with a conventional message, runs **three parallel reviewers** on the diff.
|
|
21
|
+
- Auto-applies every PATCH finding as a separate commit, pushes, opens a PR (or merges directly, or lands as you go — your choice).
|
|
22
|
+
- Moves to the next story. At end-of-epic, writes a retrospective and lists PRs ready to merge.
|
|
23
|
+
|
|
24
|
+
The orchestrator (`_Sprintpilot/bin/autopilot.js`) is a deterministic Node state machine. It decides what runs next and enforces BMad's 7-step cycle. The LLM owns in-skill execution and small-judgment decisions. BMad skills are invoked verbatim — Sprintpilot never invents workflows of its own.
|
|
20
25
|
|
|
21
26
|
## Quick Start
|
|
22
27
|
|
|
@@ -27,11 +32,13 @@ npx bmad-method install --modules bmm,tea
|
|
|
27
32
|
# 2. Install Sprintpilot (interactive — pick tool + complexity profile)
|
|
28
33
|
npx @ikunin/sprintpilot@latest
|
|
29
34
|
|
|
30
|
-
# 3. In your IDE
|
|
35
|
+
# 3. In your IDE chat:
|
|
31
36
|
/sprint-autopilot-on
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
**
|
|
39
|
+
**What you'll see next.** The orchestrator emits one BMad skill at a time and the LLM executes it. First skill is `bmad-create-story` for the next pending story in `sprint-status.yaml`. You'll watch RED→GREEN tests, a 3-reviewer review pass, patch commits, and a push or PR. The autopilot drives until `session_story_limit` stories are done (default 3), then halts cleanly. Re-run `/sprint-autopilot-on` to continue.
|
|
40
|
+
|
|
41
|
+
**Start at a specific story or epic:**
|
|
35
42
|
|
|
36
43
|
```
|
|
37
44
|
/sprint-autopilot-on epic 4
|
|
@@ -40,526 +47,332 @@ npx @ikunin/sprintpilot@latest
|
|
|
40
47
|
/sprint-autopilot-on voice identity matcher
|
|
41
48
|
```
|
|
42
49
|
|
|
43
|
-
The skill resolves the natural-language directive against
|
|
50
|
+
The skill resolves the natural-language directive against `sprint-status.yaml` and queues the matching stories. Ambiguous matches surface a candidate list — never picks arbitrarily.
|
|
44
51
|
|
|
45
|
-
Non-interactive install
|
|
52
|
+
**Non-interactive install:**
|
|
46
53
|
|
|
47
54
|
```bash
|
|
48
55
|
npx @ikunin/sprintpilot@latest install --tools claude-code --profile medium --yes
|
|
49
56
|
```
|
|
50
57
|
|
|
51
|
-
Runs on Windows, macOS, and Linux
|
|
52
|
-
|
|
53
|
-
## What It Does, Story by Story
|
|
54
|
-
|
|
55
|
-
When you run `/sprint-autopilot-on`, the autopilot drives your entire sprint to completion:
|
|
58
|
+
Runs on Windows, macOS, and Linux.
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
2. **Creates an isolated worktree** — each story gets its own branch via `git worktree add`, keeping `main` clean
|
|
59
|
-
3. **Implements the story** — invokes `bmad-dev-story`, which writes code and tests following TDD (RED then GREEN)
|
|
60
|
-
4. **Lints the code** — auto-detects your language and runs the right linter on changed files only (not the whole repo)
|
|
61
|
-
5. **Stages explicitly** — never `git add -A`. Only changed files, with secrets / size / binary pre-commit checks.
|
|
62
|
-
6. **Commits with conventional messages** — `feat(epic): story title (story-key)`, placeholders resolved from your sprint artifacts
|
|
63
|
-
7. **Runs parallel code review** — three reviewers in parallel (see [Multi-Agent Intelligence](#multi-agent-intelligence))
|
|
64
|
-
8. **Applies every patch finding** — auto-accepts review fixes, commits each one separately for clean history
|
|
65
|
-
9. **Pushes and creates a PR** (configurable) — auto-detects GitHub / GitLab / Bitbucket / Gitea. With `create_pr: false`, merges directly to `main`.
|
|
66
|
-
10. **Moves to the next story** — exits the worktree, commits artifacts to `main`, picks up the next story
|
|
67
|
-
11. **Runs retrospective** per epic — when all stories in an epic are done, lists all PR URLs ready for merge
|
|
60
|
+
## Choose your workflow
|
|
68
61
|
|
|
69
|
-
|
|
62
|
+
One config decision shapes how code reaches `main`. Pick once at install (or edit `_Sprintpilot/modules/git/config.yaml` later):
|
|
70
63
|
|
|
71
|
-
|
|
64
|
+
| Mode | When to use | One PR per | Code reaches `main` |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| **Stacked PRs** *(default)* | Team workflow where every story needs review before it lands | story | After human PR approval & merge |
|
|
67
|
+
| **Land-as-you-go** | Solo / fast-iteration sprint, no end-of-sprint merge marathon | story | Right after each story (CI / review gated) |
|
|
68
|
+
| **Direct merge** | Prototype, tutorial, internal tool without CI | — *(no PR opened)* | Right after each story's push |
|
|
69
|
+
| **Reuse your branch** | Feature-branch workflow where you already have the branch | sprint | After human PR approval & merge |
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
- **BMad bookkeeping enforced** — `verify.js` checks more than artifact existence: acceptance-criteria bullets exist, `[ ]` task boxes are flipped to `[x]`, `commit_sha` + `branch` are reported, and `git_steps_completed: true` only after every step in the orchestrator's inlined git plan (including `git push`) exits 0. Skipping any of these produces a `verify_rejected` ledger entry and the orchestrator re-emits the same action.
|
|
75
|
-
- **Decision audit channel** — small judgment calls (architecture, test-strategy, dependency, review-triage, scope, workaround) attach as `decisions[]` on any signal. The orchestrator stamps id + timestamp + story and appends to `decision-log.yaml` — no separate skill round-trip required.
|
|
76
|
-
- **LLM-as-peer protocol** — when the orchestrator emits an action the LLM disagrees with, it can return a `propose_alternative` signal carrying a full alternative Action + reason; the orchestrator decides whether to route. When `verify.js` rejects a `success` signal the LLM knows is correct (e.g., a test file was renamed per a logged decision), the LLM can return `verify_override` with `evidence.expected_paths` + `decision_log_ref` and verification re-runs with augmented expectations. The state machine owns sequencing; the LLM owns judgment.
|
|
77
|
-
- **Auto-inferred story DAG** — after `bmad-sprint-planning`, the autopilot infers inter-story dependencies once and writes `_Sprintpilot/sprints/dependencies.yaml`. Parallel dispatch works out of the box; no hand-authored deps file required. Hand-authored sidecars are detected and respected silently.
|
|
78
|
-
- **Menu navigation** — BMad skills present menus and confirmations. The autopilot auto-selects "Continue" / "Create Mode" and derives answers from your PRD and architecture docs.
|
|
79
|
-
- **Session management** — checkpoints state every N stories, halts with a markdown handoff report, and resumes exactly where it left off in the next session — with fingerprint-based divergence detection if anything moved in between. See [Sessions and the Handoff Report](#sessions-and-the-handoff-report).
|
|
80
|
-
- **Crash recovery** — on boot, the autopilot detects orphaned worktrees from a crashed previous run, pushes any committed-but-unpushed work, and cleans up stale state. No lost commits, no manual cleanup.
|
|
71
|
+
All modes use isolated worktrees (`.worktrees/<story-key>/`) so `main` never has half-finished story code. ASCII diagrams of each mode are in [Git workflow](#git-workflow-detailed) below.
|
|
81
72
|
|
|
82
|
-
|
|
73
|
+
## Choose your profile
|
|
83
74
|
|
|
84
|
-
The
|
|
75
|
+
The right amount of process for a 2-story bugfix is different from a 30-story rebuild. One knob picks the balance:
|
|
85
76
|
|
|
86
|
-
|
|
87
|
-
2. A **new external dependency** is needed that isn't in the project
|
|
88
|
-
3. **3 consecutive test failures** with no forward progress
|
|
89
|
-
4. A **security vulnerability** requiring architectural decisions beyond the story scope
|
|
90
|
-
5. **Conflicting acceptance criteria** that can't be resolved from project docs
|
|
91
|
-
|
|
92
|
-
Everything else — it decides, documents the decision in one sentence, and moves on.
|
|
93
|
-
|
|
94
|
-
## The Git Workflow
|
|
95
|
-
|
|
96
|
-
Controlled by knobs in `_Sprintpilot/modules/git/config.yaml`. The orchestrator inlines every git op as an argv sequence (`git add`, `git commit`, `git push`, …) into the emitted action — the LLM executes the steps verbatim, never improvises. Concurrent git operations (parallel pushes, submodule updates, ref locks) are serialized and retry with jittered backoff — safe under parallel dispatch.
|
|
97
|
-
|
|
98
|
-
### Pick a mode
|
|
99
|
-
|
|
100
|
-
| Mode | Knobs | One PR per | Code reaches `main` | Best for |
|
|
77
|
+
| Profile | Per-story flow | Branching | Parallel | Use it for |
|
|
101
78
|
|---|---|---|---|---|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
107
|
-
All modes use isolated worktrees (`.worktrees/<story-key>/`) so `main` never has half-finished story code. The autopilot tracks git metadata in its own `git-status.yaml` — it never modifies BMad Method's `sprint-status.yaml`. After each story's push, the orchestrator syncs `_bmad-output/` planning and bookkeeping artifacts onto the base branch, so `git log <base>` is the canonical sprint audit trail regardless of merge strategy.
|
|
108
|
-
|
|
109
|
-
### Stacked PRs (default)
|
|
110
|
-
|
|
111
|
-
Stories are pushed and PRs are created. No auto-merge. Each story branches from the previous story's branch and targets it. Reviewers see each story's diff in isolation while the next story is already in progress. When a PR is merged on the platform, subsequent PRs automatically retarget.
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
main ─────────────────────────────────────────────────────────
|
|
115
|
-
│ (artifacts only)
|
|
116
|
-
├── story/1-1 ──→ push + PR #42 (→ main)
|
|
117
|
-
│ │
|
|
118
|
-
│ └── story/1-2 ──→ push + PR #43 (→ story/1-1)
|
|
119
|
-
│ │
|
|
120
|
-
│ └── story/1-3 ──→ push + PR #44 (→ story/1-2)
|
|
121
|
-
│
|
|
122
|
-
Epic 1 complete → retrospective
|
|
123
|
-
→ "Ready to merge: PR #42, #43, #44"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Trade-off: zero waiting for review during the sprint, but you end up with a stack to merge afterward.
|
|
127
|
-
|
|
128
|
-
### Land-as-you-go
|
|
129
|
-
|
|
130
|
-
After every `STORY_DONE`, the orchestrator runs a new `STORY_LAND` state to merge that story's PR immediately instead of letting the stack grow. Each subsequent story branches from the already-merged base, so there is no stack to unwind at sprint-end.
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
main ── story/1-1 ──→ PR #42 ──→ ✓ CI / review ──→ merge ──→
|
|
134
|
-
│ ╲
|
|
135
|
-
├── story/1-2 ──→ PR #43 ──→ ✓ CI / review ──→ merge ──→ ╲
|
|
136
|
-
│ ╲
|
|
137
|
-
└── story/1-3 ──→ PR #44 ──→ ✓ CI / review ──→ merge ──→ done
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
| Knob | Default | What it does |
|
|
141
|
-
|---|---|---|
|
|
142
|
-
| `land_when` | `ci_pass` | `no_wait` = merge synchronously, no CI wait. `ci_pass` = wait for `gh pr checks` (or platform equivalent) to report all checks green. `ci_and_review` = also wait for an `approved` PR review. |
|
|
143
|
-
| `land_wait_minutes` | `30` | Max wait for CI / review before the orchestrator halts and prompts you. |
|
|
144
|
-
|
|
145
|
-
**Rebase recovery.** If `main` moves while the story is in flight, the orchestrator runs `git rebase origin/<base>` and re-pushes. On rebase conflicts it halts with a `user_prompt`; resume reads `state.land_pending` and retries the land step after you resolve.
|
|
146
|
-
|
|
147
|
-
Trade-off: cleaner history and no end-of-sprint merge marathon, but each story blocks on CI before the next one starts — slower wall-clock if your CI is slow or you set `ci_and_review`.
|
|
148
|
-
|
|
149
|
-
### Direct merge (no PR)
|
|
150
|
-
|
|
151
|
-
Stories are merged straight into the base branch after push — no PR opened, no human review gate.
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
main ── story/1-1 ──→ merge ── story/1-2 ──→ merge ── story/1-3 ──→ merge
|
|
155
|
-
```
|
|
79
|
+
| `nano` | `bmad-quick-dev` (one-shot) | one PR per epic | n/a | Tiny patch sprints, hot-fix runs |
|
|
80
|
+
| `small` | Full 7-step BMad cycle | one PR per story | off | Single-developer projects, ≤ 10 stories |
|
|
81
|
+
| `medium` *(default)* | Full 7-step BMad cycle | one PR per story | off | Most sprints — balanced |
|
|
82
|
+
| `large` | Full 7-step BMad cycle | one PR per story | **on** (Claude Code) | Multi-epic sprints, 20+ stories |
|
|
83
|
+
| `legacy` | Pinned legacy behavior | one PR per story | off | Existing installs that want zero change |
|
|
156
84
|
|
|
157
|
-
|
|
85
|
+
Pick at install: `--profile <name>`. Missing profile defaults to `medium`.
|
|
158
86
|
|
|
159
|
-
|
|
87
|
+
**Nano safety net:** if `bmad-quick-dev` tests fail or its review classifies a finding as `high` severity, the autopilot escalates that session to the full 7-step cycle (session-scoped, never written back to config).
|
|
160
88
|
|
|
161
|
-
|
|
89
|
+
## Running a session
|
|
162
90
|
|
|
163
|
-
|
|
164
|
-
main ─────────────────────────────────────────────────
|
|
165
|
-
│
|
|
166
|
-
└── feature/payments-rewrite (your branch, you created it)
|
|
167
|
-
├── feat(1): story 1-1 ─→ commit
|
|
168
|
-
├── feat(1): story 1-2 ─→ commit
|
|
169
|
-
├── feat(2): story 2-1 ─→ commit
|
|
170
|
-
└── … ─→ push + PR (→ main, at sprint-end)
|
|
171
|
-
```
|
|
91
|
+
The autopilot scans the host chat for your interjections every turn — you can steer it without learning a command vocabulary:
|
|
172
92
|
|
|
173
|
-
|
|
93
|
+
- *"skip this story, the spec is wrong"* → `skip_story`
|
|
94
|
+
- *"close out epic 4 with retro, the remaining stories are deferred"* → `trigger_retrospective`
|
|
95
|
+
- *"pause"* → `pause` (halts cleanly; resume with `/sprint-autopilot-on`)
|
|
96
|
+
- *"continue, the diff is fine"* → `force_continue` (accept a `verify_rejected` or `resume_divergence`)
|
|
174
97
|
|
|
175
|
-
|
|
98
|
+
The LLM maps your phrasing to the right command + arguments and emits a `user_input` signal. Full command vocabulary in [docs/USAGE.md](docs/USAGE.md#user-commands).
|
|
176
99
|
|
|
177
|
-
|
|
100
|
+
### When it halts
|
|
178
101
|
|
|
179
|
-
|
|
180
|
-
- Epic granularity (nano profile): `<branch_prefix>epic-<epic-id>` → `story/epic-1`
|
|
181
|
-
- Reuse mode: no autopilot branches; your existing branch is used as-is.
|
|
102
|
+
The autopilot drives until one of these conditions is true:
|
|
182
103
|
|
|
183
|
-
|
|
104
|
+
1. **`session_story_limit` reached** (default 3, nano 5) — checkpoints state, prints the handoff report, releases the lock. Re-run `/sprint-autopilot-on` to continue.
|
|
105
|
+
2. **Sprint complete** — runs end-of-sprint cleanup, prints the final report. Done.
|
|
106
|
+
3. **One of the 5 true blockers** — `creative_user_input_required`, `new_external_dependency`, `security_architectural_decision`, `contradictory_acceptance_criteria`, or 3 consecutive test failures with no forward progress. Halts with a `user_prompt`. Answer it and resume.
|
|
107
|
+
4. **Retry budget exhausted on a single phase** — halts with the underlying issue surfaced. Inspect, fix, resume.
|
|
108
|
+
5. **You explicitly pause** — `/pause` or any natural-language pause instruction.
|
|
184
109
|
|
|
185
|
-
|
|
110
|
+
Everything else — the autopilot decides, logs the decision in one sentence to `decision-log.yaml`, and moves on.
|
|
186
111
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
| Check | What it does |
|
|
190
|
-
|---|---|
|
|
191
|
-
| **Explicit staging** | Files are staged by name (`git add -- file1 file2`) — never `git add -A`, `git add .`, or `git add -u`. The set of staged files is cross-referenced against the story's `## File List`; unexpected or missing files are warned. |
|
|
192
|
-
| **Secrets scan** | Greps staged content for `API_KEY`, `SECRET`, `TOKEN`, `PASSWORD`, `aws_access`, `private_key`. WARN severity by default — surfaced in the log but does not block the commit. Allowlist patterns live in `.secrets-allowlist`. |
|
|
193
|
-
| **File size** | Rejects files larger than `staging.max_file_size_mb` (default `1`). |
|
|
194
|
-
| **Binary detection** | Warns on binary files detected via `file --mime-encoding`. |
|
|
195
|
-
| **Gitignore check** | Verifies `.gitignore` covers `.autopilot.lock` and `.claude/.sprintpilot-backups/`. |
|
|
196
|
-
|
|
197
|
-
For each story, every commit (the main story commit + each code-review patch commit) runs the full check chain.
|
|
198
|
-
|
|
199
|
-
See [`modules/git/branching-and-pr-strategy.md`](_Sprintpilot/modules/git/branching-and-pr-strategy.md) for the full decision matrix.
|
|
112
|
+
## Configuration
|
|
200
113
|
|
|
201
|
-
|
|
114
|
+
### By use case
|
|
202
115
|
|
|
203
|
-
|
|
116
|
+
Most projects only ever change a handful of settings. Pick the change you want, edit the listed key:
|
|
204
117
|
|
|
205
|
-
|
|
118
|
+
**I want each story to land on `main` as soon as it's reviewed**
|
|
119
|
+
→ `git.merge_strategy: land_as_you_go` (file: `_Sprintpilot/modules/git/config.yaml`)
|
|
120
|
+
→ Optional: `git.land_when: ci_pass | ci_and_review | no_wait`
|
|
206
121
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
| `session_story_limit` reached *(default 3, nano: 5)* | Orchestrator writes state + ledger, prints the report, releases the lock | Run `/sprint-autopilot-on` again — picks up at the next story |
|
|
210
|
-
| `sprint_finalize_pending` *(last story done)* | Orchestrator stops **before** cleanup — keeps that for a fresh context | Run `/sprint-autopilot-on` once more; finalize runs deterministically |
|
|
211
|
-
| Sprint complete | State + ledger files deleted; final report printed | Nothing to resume — the sprint is done |
|
|
212
|
-
| One of the 5 [true blockers](#when-it-stops-and-only-when) | Orchestrator halts with `user_prompt` | Answer the prompt, then `/sprint-autopilot-on` |
|
|
213
|
-
| Verify-reject budget exhausted | Orchestrator halts with the verifier's issues | Inspect, fix the underlying problem, then resume |
|
|
122
|
+
**I want every story reviewed before it lands**
|
|
123
|
+
→ Keep the default `git.merge_strategy: stacked`
|
|
214
124
|
|
|
215
|
-
|
|
125
|
+
**I'm working on my own feature branch and want one PR at sprint-end**
|
|
126
|
+
→ `git.reuse_user_branch: true`
|
|
216
127
|
|
|
217
|
-
|
|
128
|
+
**I don't want PRs — merge directly to base**
|
|
129
|
+
→ `git.push.create_pr: false`
|
|
218
130
|
|
|
219
|
-
|
|
131
|
+
**I want lint failures to halt the sprint until fixed**
|
|
132
|
+
→ `git.lint.enabled: true` + `git.lint.blocking: true` (file: `_Sprintpilot/modules/git/config.yaml`)
|
|
133
|
+
→ Lint runs `scripts/post-green-gates.js` after `dev_green` verify passes.
|
|
220
134
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
```
|
|
135
|
+
**My sprint is a hotfix or 1-2 small changes**
|
|
136
|
+
→ `complexity_profile: nano` (file: `_Sprintpilot/modules/autopilot/config.yaml`)
|
|
224
137
|
|
|
225
|
-
|
|
138
|
+
**My sprint is 20+ stories**
|
|
139
|
+
→ `complexity_profile: large` — enables parallel story dispatch on Claude Code
|
|
226
140
|
|
|
227
|
-
|
|
228
|
-
|
|
141
|
+
**I want the autopilot to run more (or fewer) stories before checkpointing**
|
|
142
|
+
→ `autopilot.session_story_limit: <N>` — `0` is unlimited
|
|
229
143
|
|
|
230
|
-
**
|
|
231
|
-
|
|
232
|
-
**Sprint complete:** false
|
|
233
|
-
**Last updated:** 2026-05-15T10:42:18.041Z
|
|
144
|
+
**I want to inspect worktrees after epic merge instead of auto-cleaning**
|
|
145
|
+
→ `git.worktree.cleanup_on_merge: false`
|
|
234
146
|
|
|
235
|
-
|
|
236
|
-
- action_emitted: 47
|
|
237
|
-
- signal_recorded: 47
|
|
238
|
-
- decisions_appended: 12
|
|
239
|
-
- halt: 1
|
|
147
|
+
### Reference table
|
|
240
148
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
149
|
+
| Setting | File | Default | What it controls |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| `complexity_profile` | `autopilot/config.yaml` | `medium` | Per-story flow + which optimization layers are enabled |
|
|
152
|
+
| `autopilot.session_story_limit` | `autopilot/config.yaml` | `3` (nano: `5`) | Stories per session before checkpoint. `0` = unlimited |
|
|
153
|
+
| `autopilot.retrospective_mode` | `autopilot/config.yaml` | `auto` | `auto` / `stop` / `skip` |
|
|
154
|
+
| `git.merge_strategy` | `git/config.yaml` | `stacked` | `stacked` / `land_as_you_go` |
|
|
155
|
+
| `git.push.create_pr` | `git/config.yaml` | `true` | `false` = direct merge to base |
|
|
156
|
+
| `git.reuse_user_branch` | `git/config.yaml` | `false` | Commit every story onto the current user branch |
|
|
157
|
+
| `git.land_when` | `git/config.yaml` | `ci_pass` | Land-as-you-go gating: `no_wait` / `ci_pass` / `ci_and_review` |
|
|
158
|
+
| `git.land_wait_minutes` | `git/config.yaml` | `30` | Max wait for CI / review before halting |
|
|
159
|
+
| `git.branch_prefix` | `git/config.yaml` | `story/` | Prefix for autopilot-created branches |
|
|
160
|
+
| `git.lint.enabled` | `git/config.yaml` | `false` | Run post-GREEN lint pipeline |
|
|
161
|
+
| `git.lint.blocking` | `git/config.yaml` | `false` | Lint failures reject verify (LLM fix-loops) |
|
|
162
|
+
| `git.lint.output_limit` | `git/config.yaml` | `100` | Lines of lint output injected back as context |
|
|
163
|
+
| `git.lint.linters.<lang>` | `git/config.yaml` | (auto-detect) | Per-language preference; `[]` disables; `javascript` + `typescript` merge into `js-ts` |
|
|
164
|
+
| `git.lock.stale_timeout_minutes` | `git/config.yaml` | `30` | `.autopilot.lock` older than this is auto-taken-over; `0` disables |
|
|
165
|
+
| `git.worktree.health_check_on_boot` | `git/config.yaml` | `true` | Halt on orphan worktrees at session start |
|
|
166
|
+
| `git.worktree.cleanup_on_merge` | `git/config.yaml` | `true` | Remove `.worktrees/<key>/` after epic merge |
|
|
167
|
+
| `ma.enabled` | `ma/config.yaml` | `true` | Enable parallel agent skills |
|
|
246
168
|
|
|
247
|
-
|
|
248
|
-
- [2026-05-15T10:38Z] story=1-3-add-auth phase=dev-story:RED ids=d-117,d-118
|
|
249
|
-
- [2026-05-15T10:40Z] story=1-3-add-auth phase=code-review ids=d-119
|
|
250
|
-
- …
|
|
169
|
+
**Profile-level overrides** — `parallel_stories`, `state_sharding`, `phase_timings`, `cache_shared_reads`, `conditional_boot_work` live in `_Sprintpilot/modules/autopilot/profiles/<profile>.yaml`. Their effective value depends on the active `complexity_profile`.
|
|
251
170
|
|
|
252
|
-
|
|
253
|
-
- [2026-05-15T10:42:18Z] phase=PATCH_RETEST reason=session_story_limit
|
|
171
|
+
Full reference: [docs/CONFIGURATION.md](docs/CONFIGURATION.md).
|
|
254
172
|
|
|
255
|
-
##
|
|
173
|
+
## Sessions
|
|
256
174
|
|
|
257
|
-
|
|
258
|
-
```
|
|
175
|
+
A long sprint doesn't fit in one LLM context. The autopilot checkpoints every N stories, prints a handoff report, and resumes exactly where it left off in a fresh session.
|
|
259
176
|
|
|
260
|
-
|
|
177
|
+
**Resume divergence detection.** On the next `autopilot start`, the orchestrator fingerprints `_bmad-output/`, `sprint-status.yaml`, and branch HEADs against the fingerprint stamped at the last halt. Two escape paths proceed without manual surgery:
|
|
261
178
|
|
|
262
|
-
- **
|
|
263
|
-
-
|
|
264
|
-
- **Last 10 actions** — the most recent `invoke_skill` / `run_script` / `git_op` actions with their phase. The trail of what just ran.
|
|
265
|
-
- **Recent decisions** — small judgment calls the LLM attached as `decisions[]` (architecture / test-strategy / dependency / review-triage / scope / workaround). The audit trail of the LLM's work.
|
|
266
|
-
- **Recent halts** — the last 3 reasons the autopilot stopped. Empty on a healthy session.
|
|
267
|
-
- **Next action** — explicit hint of what running `/sprint-autopilot-on` (or `autopilot next`) will do next, including the `sprint_finalize_pending` special case.
|
|
179
|
+
- **External-completion auto-acknowledge** — when the persisted `current_story` is `done` in sprint-status (you merged it manually, hot-fix, UI action), the stale identity is cleared and the next pending story is picked.
|
|
180
|
+
- **`--accept-divergence` flag** — catch-all for divergence the auto-path doesn't cover.
|
|
268
181
|
|
|
269
|
-
|
|
182
|
+
**Crash recovery.** On every boot, the autopilot health-checks `.worktrees/`. Orphan worktrees from crashed sessions are detected and surfaced. Stale `.autopilot.lock` files (older than `stale_timeout_minutes`) are auto-taken-over.
|
|
270
183
|
|
|
271
|
-
|
|
184
|
+
**Fresh-context finalize.** When the last story hits `STORY_DONE`, the state machine transitions to `sprint_finalize_pending` instead of running cleanup in the same session. The next `/sprint-autopilot-on` reads the marker, runs deterministic cleanup with a clean context. One short extra session (~60–100 turns) for reliable end-of-sprint hygiene.
|
|
272
185
|
|
|
273
|
-
|
|
274
|
-
{
|
|
275
|
-
"type": "user_prompt",
|
|
276
|
-
"prompt": "Resume divergence detected. Differences: branch story/1-2 HEAD moved (a1b2c3 → d4e5f6). Choose: force_continue | override_decision",
|
|
277
|
-
"kind": "resume_divergence",
|
|
278
|
-
"differences": { ... }
|
|
279
|
-
}
|
|
280
|
-
```
|
|
186
|
+
Full handoff report format + ledger semantics: [docs/USAGE.md](docs/USAGE.md#handoff-report).
|
|
281
187
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
### Steering the autopilot mid-session
|
|
285
|
-
|
|
286
|
-
The autopilot isn't fire-and-forget. The orchestrator scans the host chat for user interjections every turn; if you say something while it's running, the LLM records it as a `user_input` signal and the state machine reacts on the next transition. Available commands (validated server-side by `user-commands.js` — malformed input is rejected with a clear message, never silently dropped):
|
|
188
|
+
## Skills
|
|
287
189
|
|
|
288
190
|
| Command | What it does |
|
|
289
191
|
|---|---|
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
292
|
-
| `
|
|
293
|
-
| `
|
|
294
|
-
| `
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
### Crash recovery and orphaned worktrees
|
|
299
|
-
|
|
300
|
-
If a session crashes — process killed, machine rebooted, hook failed mid-commit — the next `/sprint-autopilot-on` runs a health check on `.worktrees/` *before* any new state-machine work. Each worktree is classified and handled deterministically:
|
|
301
|
-
|
|
302
|
-
| Classification | Condition | What happens |
|
|
303
|
-
|---|---|---|
|
|
304
|
-
| `COMMITTED` | Branch has commits beyond `base_branch` | Worktree is reactivated; committed-but-unpushed work is pushed + PR'd |
|
|
305
|
-
| `CLEAN_DONE` | Story marked `done` in sprint-status, worktree clean | Worktree removed |
|
|
306
|
-
| `STALE` | No commits beyond base; story not done | Work was lost; worktree removed |
|
|
307
|
-
| `DIRTY` | Uncommitted changes | You're prompted: stash, commit, or discard |
|
|
308
|
-
| `ORPHAN` | Worktree directory exists but branch was deleted | Worktree removed |
|
|
309
|
-
|
|
310
|
-
Stale locks (`.autopilot.lock` older than 30 minutes) are also auto-removed at this stage, so a crashed session never blocks the next one indefinitely.
|
|
311
|
-
|
|
312
|
-
### Fresh-context finalize
|
|
313
|
-
|
|
314
|
-
When the last story of the sprint hits `STORY_DONE`, the state machine transitions to `sprint_finalize_pending` — a terminal halt state — instead of running cleanup in the same session that just finished the last story. The next `/sprint-autopilot-on` reads the pending marker, jumps straight to the finalize state, and runs deterministic cleanup (mark-done-stories task checkboxes, worktree removal, artifact commits, retrospective, final report) with a clean context window.
|
|
315
|
-
|
|
316
|
-
This trades one short extra session (~60–100 turns, usually under $2) for reliable end-of-sprint hygiene. Without it, the tail of a long session regularly drops cleanup actions because the context is already full of story implementation work.
|
|
317
|
-
|
|
318
|
-
## Adaptive Process Scaling
|
|
319
|
-
|
|
320
|
-
The right amount of process for a 2-story bug-fix sprint is different from a 30-story green-field rebuild — running the heavy flow on a small change costs more LLM turns, more context rot, more time. One knob picks the right balance:
|
|
321
|
-
|
|
322
|
-
| Profile | Per-story flow | Branching | Worktrees | Parallel stories | Use it for |
|
|
323
|
-
|---------|---------------|-----------|-----------|------------------|-----------|
|
|
324
|
-
| `nano` | `bmad-quick-dev` (one-shot) | `epic` (one PR per epic) | off | n/a | Tiny patch sprints, hot-fix runs |
|
|
325
|
-
| `small` | Full 7-step BMad cycle | `story` (one PR per story) | on | off | Single-developer projects, ≤10 stories |
|
|
326
|
-
| `medium` *(default)* | Full 7-step BMad cycle | `story` | on | off | Default — balanced for most sprints |
|
|
327
|
-
| `large` | Full 7-step BMad cycle | `story` | on | **on** (Claude Code) | Multi-epic sprints, 20+ stories |
|
|
328
|
-
| `legacy` | Pinned to v1.0.5 behavior byte-for-byte | `story` | on | off | Existing installs that want zero behavior change |
|
|
329
|
-
|
|
330
|
-
Pick the profile at install time — `--profile <nano|small|medium|large|legacy>` non-interactively. Missing profile defaults to `medium` with no behavior change vs. v1.0.5.
|
|
331
|
-
|
|
332
|
-
**Nano safety net** — if `bmad-quick-dev` tests fail or its review classifies a finding as `high` severity, the autopilot escalates the session to the full 7-step cycle (session-scoped — never written back to config). Fast track for routine work, full rigor when something needs it.
|
|
333
|
-
|
|
334
|
-
### v2 optimization layers
|
|
335
|
-
|
|
336
|
-
Each can be disabled independently per profile in `_Sprintpilot/modules/autopilot/profiles/<profile>.yaml`:
|
|
337
|
-
|
|
338
|
-
- **Auto-inferred story DAG** — see above.
|
|
339
|
-
- **Phase timing instrumentation** — emits `duration` records per skill phase. `summarize-timings.js` reports hotspots over 5% of total runtime, so you can see where a sprint actually spends its time.
|
|
340
|
-
- **State sharding** — non-critical writes accumulate in `.pending/` shards, flushed atomically at story boundaries / session checkpoints / sprint complete. Crash-recovery keys still write straight through. This is what makes parallel dispatch safe under contention.
|
|
341
|
-
- **Conditional boot work** — on clean repos (main worktree only, no in-progress stories), skips the slow health-check / branch-reconciliation block, saving 8–30s per session. Disabled on `large` and `legacy` profiles, which always run full reconciliation.
|
|
342
|
-
- **Cached reads** — TTL + source-mtime aware file cache for hot reads; any writer's mtime advance auto-invalidates without explicit calls.
|
|
343
|
-
- **Parallel story dispatch** — when the host supports it, layer-aware dispatch runs N stories concurrently in their own worktrees, then merges their state shards. Claude Code today; Gemini CLI experimentally. See [Parallel Story Dispatch](#parallel-story-dispatch).
|
|
344
|
-
|
|
345
|
-
## Parallel Story Dispatch
|
|
346
|
-
|
|
347
|
-
When the active profile allows parallelism (`large` by default; opt-in on `medium`), the host supports concurrent subagents (Claude Code today; Gemini CLI experimentally), and the inferred DAG has ≥ 2 independent stories in the next layer, the orchestrator runs them concurrently instead of one after another:
|
|
348
|
-
|
|
349
|
-
1. **Resolve the next layer** — `resolve-dag.js layers --epic <id>` returns the next batch of stories with no unfinished prerequisites.
|
|
350
|
-
2. **Pre-create worktrees** — `dispatch-layer.js` creates one worktree per story and writes `.layer-plan.json` so each sub-agent knows its scope.
|
|
351
|
-
3. **Spawn N sub-agents in a single message** — each runs the full per-story flow (`bmad-create-story` → `bmad-dev-story` RED/GREEN → `bmad-code-review` → patches → commit/push/PR) inside its assigned worktree.
|
|
352
|
-
4. **Merge shards on return** — per-story state lives in `.autopilot-state/<story>.yaml` and `.decision-log/<story>.yaml` shards. `merge-shards.js --archive` collapses them into the project YAMLs atomically; the merged shards are archived under `.archive/layer-<id>/` for debugging.
|
|
353
|
-
5. **Loop to the next layer** — `parallel_batch` is a resolver in the state machine, not a one-shot. The orchestrator loops back to step 1 until the DAG is exhausted.
|
|
192
|
+
| `/sprint-autopilot-on` | Engage autonomous sprint execution |
|
|
193
|
+
| `/sprint-autopilot-off` | Disengage and show status |
|
|
194
|
+
| `/sprintpilot-update` | Check for updates and install the latest version |
|
|
195
|
+
| `/sprintpilot-codebase-map` | 5-stream brownfield codebase analysis |
|
|
196
|
+
| `/sprintpilot-assess` | Tech debt, dependency audit, migration assessment |
|
|
197
|
+
| `/sprintpilot-reverse-architect` | Extract architecture document from existing code |
|
|
198
|
+
| `/sprintpilot-migrate` | 12-step legacy migration planning |
|
|
199
|
+
| `/sprintpilot-research` | Parallel web research fan-out |
|
|
354
200
|
|
|
355
|
-
|
|
201
|
+
Multi-agent skill internals: [docs/USAGE.md](docs/USAGE.md#multi-agent-skills).
|
|
356
202
|
|
|
357
|
-
|
|
203
|
+
## Compatibility
|
|
358
204
|
|
|
359
|
-
|
|
205
|
+
**Tools.** Sprintpilot uses the universal `SKILL.md` format — same skills work everywhere:
|
|
360
206
|
|
|
361
|
-
|
|
207
|
+
| Tool | Directory | Tool | Directory |
|
|
208
|
+
|---|---|---|---|
|
|
209
|
+
| Claude Code | `.claude/skills/` | Roo Code | `.roo/skills/` |
|
|
210
|
+
| Cursor | `.cursor/skills/` | Trae | `.trae/skills/` |
|
|
211
|
+
| Windsurf | `.windsurf/skills/` | Kiro | `.kiro/skills/` |
|
|
212
|
+
| Gemini CLI | `.gemini/skills/` | GitHub Copilot | `.github/copilot/skills/` |
|
|
213
|
+
| Cline | `.cline/skills/` | | |
|
|
362
214
|
|
|
363
|
-
|
|
364
|
-
overrides:
|
|
365
|
-
- epic: 2
|
|
366
|
-
force_independent: ["2-1", "2-2"] # detection was over-cautious
|
|
367
|
-
force_sequential: ["2-3", "2-4"] # detection missed a known conflict
|
|
368
|
-
```
|
|
215
|
+
Non-interactive: `--tools <tool1>,<tool2>` (or `all`). Valid values: `claude-code`, `cursor`, `windsurf`, `gemini-cli`, `cline`, `roo`, `trae`, `kiro`, `github-copilot`.
|
|
369
216
|
|
|
370
|
-
|
|
217
|
+
**Git platforms.**
|
|
371
218
|
|
|
372
|
-
|
|
219
|
+
| Platform | CLI | Auto-detect | API fallback |
|
|
220
|
+
|---|---|---|---|
|
|
221
|
+
| GitHub | `gh` | `github.com` | No |
|
|
222
|
+
| GitLab | `glab` | `gitlab.*` | No |
|
|
223
|
+
| Bitbucket | `bb` | `bitbucket.org` | Yes (`BITBUCKET_TOKEN`) |
|
|
224
|
+
| Gitea | `tea` | Explicit config | Yes (`GITEA_TOKEN` + `base_url`) |
|
|
373
225
|
|
|
374
|
-
|
|
375
|
-
|---|---|
|
|
376
|
-
| One parallel story's tests fail | That story is isolated; siblings in the layer continue; downstream stories that depend on the failed one are blocked; reported at layer boundary |
|
|
377
|
-
| Merge conflict at layer boundary | Retry once after rebase; on second failure, abort that story and force sequential for the rest of the epic |
|
|
378
|
-
| `max_consecutive_conflicts` reached *(default 2)* | Parallelism auto-disables for the rest of the session, logged to `decision-log.yaml` |
|
|
379
|
-
| Worktree disk / permission failure | `parallel_batch` resolver downgrades to sequential per-profile |
|
|
226
|
+
No CLI installed? Falls back to **git_only mode** (direct merge, no PRs).
|
|
380
227
|
|
|
381
|
-
|
|
228
|
+
**Linters** (auto-detected on changed files only). First found per language wins.
|
|
382
229
|
|
|
383
|
-
|
|
230
|
+
| Language | Linters | Language | Linters |
|
|
231
|
+
|---|---|---|---|
|
|
232
|
+
| Python | ruff, flake8, pylint | Java | checkstyle, pmd |
|
|
233
|
+
| JavaScript / TS | eslint, biome | C / C++ | cppcheck, clang-tidy |
|
|
234
|
+
| Rust | cargo clippy | C# | dotnet format |
|
|
235
|
+
| Go | golangci-lint | Swift | swiftlint |
|
|
236
|
+
| Ruby | rubocop | PL/SQL | sqlfluff |
|
|
237
|
+
| Kotlin | ktlint, detekt | PHP | phpstan, phpcs |
|
|
384
238
|
|
|
385
|
-
|
|
239
|
+
Multi-language monorepos lint all languages in one pass. Override priority via `git.lint.linters.<lang>: [list]`. See [docs/EXTENDING.md](docs/EXTENDING.md) to add more.
|
|
386
240
|
|
|
387
|
-
|
|
241
|
+
## Troubleshooting
|
|
388
242
|
|
|
389
|
-
|
|
390
|
-
|-------|------------|--------|
|
|
391
|
-
| **Blind Hunter** | Pure adversarial — finds bugs from code alone | Diff only, no project context |
|
|
392
|
-
| **Edge Case Hunter** | Boundary conditions, race conditions, missing validation | Full codebase access |
|
|
393
|
-
| **Acceptance Auditor** | Verifies every acceptance criterion is met | Diff + story spec |
|
|
243
|
+
**`resume_divergence` halts on every start.** Sprint-status or the working tree moved between sessions. If the persisted `current_story` is now `done`, the autopilot auto-acknowledges and proceeds — no action needed. For other divergences, pass `--accept-divergence`, or finish the externally-merged story first so sprint-status reflects reality.
|
|
394
244
|
|
|
395
|
-
|
|
245
|
+
**`verify_rejected` on `dev_red`: "no test_files reported".** The verifier auto-detects test files from `git diff` + untracked files by language convention — if it still can't find any, the work didn't produce a test-shaped file. Check the actual changes; re-run `bmad-dev-story` if needed.
|
|
396
246
|
|
|
397
|
-
|
|
247
|
+
**`verify_rejected` on `dev_red`: "test file missing: \<path\>".** The LLM reported a path that doesn't exist. Relative paths resolve against `projectRoot` — verify the file is where the LLM said.
|
|
398
248
|
|
|
399
|
-
|
|
249
|
+
**`verify_rejected` on `story_done`: "git_steps_completed must be true".** The flag is the canonical signal but the verifier also probes `git cat-file -e <commit>` + `git ls-remote --heads origin <branch>`. If both pass, the signal is accepted. If the probe fails, `git push` likely didn't complete — re-run the push step manually.
|
|
400
250
|
|
|
401
|
-
|
|
251
|
+
**Epic won't close out with retrospective.** `remaining_stories_in_epic > 0`. Either mark the deferred stories as `skipped` / `deferred` / `cancelled` / `wont_do` in sprint-status (all are accepted as terminal), or emit `trigger_retrospective` to force-route to RETROSPECTIVE.
|
|
402
252
|
|
|
403
|
-
|
|
404
|
-
- Stack Analyzer (languages, frameworks, versions)
|
|
405
|
-
- Architecture Mapper (modules, patterns, data flow)
|
|
406
|
-
- Quality Assessor (tests, CI/CD, conventions)
|
|
407
|
-
- Concerns Hunter (TODOs, deprecated APIs, security issues, dead code)
|
|
408
|
-
- Integration Mapper (external APIs, databases, env vars)
|
|
253
|
+
**`.autopilot.lock` held but no session is running.** The previous session crashed before releasing. Wait `git.lock.stale_timeout_minutes` (default 30) and the next `autopilot start` will auto-take-over. To skip the wait, `rm .autopilot.lock`.
|
|
409
254
|
|
|
410
|
-
|
|
255
|
+
**LLM keeps inventing pause justifications ("context budget", "natural checkpoint").** The autopilot's `workflow.orchestrator.md` contract forbids LLM-initiated pause. If you're seeing this pattern in your ledger, the LLM isn't reading the contract — `/sprintpilot-update` may help, or check `_Sprintpilot/skills/sprint-autopilot-on/SKILL.md` is current.
|
|
411
256
|
|
|
412
|
-
|
|
413
|
-
|------|---------|
|
|
414
|
-
| `stack-analysis.md` | Languages, frameworks, versions, runtime requirements, package health |
|
|
415
|
-
| `architecture-analysis.md` | Project structure, architectural pattern, module boundaries, data flow |
|
|
416
|
-
| `quality-analysis.md` | Test coverage, CI/CD pipeline, code conventions, complexity metrics |
|
|
417
|
-
| `concerns-analysis.md` | TODOs/FIXMEs, security issues, dead code, deprecated patterns, error handling gaps |
|
|
418
|
-
| `integrations-analysis.md` | External APIs, databases, message queues, cloud services, env vars |
|
|
257
|
+
More scenarios: [docs/USAGE.md](docs/USAGE.md#troubleshooting).
|
|
419
258
|
|
|
420
|
-
|
|
259
|
+
## How it works
|
|
421
260
|
|
|
422
|
-
|
|
423
|
-
- Dependency Auditor (CVEs, outdated packages, upgrade paths)
|
|
424
|
-
- Debt Classifier (prioritized tech debt with effort estimates)
|
|
425
|
-
- Migration Analyzer (framework upgrade paths and phased roadmap)
|
|
261
|
+
The orchestrator emits one typed Action at a time (`invoke_skill`, `run_script`, `git_op`, `parallel_batch`, `user_prompt`, `halt`) and consumes typed Signals from the LLM (`success`, `failure`, `blocked`, `propose_alternative`, `user_input`, `verify_override`). State writes go through a single chokepoint with critical-key carve-outs for crash recovery; non-critical writes coalesce at story boundaries.
|
|
426
262
|
|
|
427
|
-
|
|
263
|
+
`verify.js` enforces BMad bookkeeping after every `success` signal: acceptance-criteria bullets exist, `[ ]` task boxes are flipped to `[x]`, `commit_sha` + `branch` are reported and verified, review findings are recorded. Auto-recovery paths handle common signal-format omissions (test_files / tests_run / git_steps_completed) by probing the underlying world rather than punishing the LLM for missing echo fields.
|
|
428
264
|
|
|
429
|
-
|
|
430
|
-
- Component Mapper (module boundaries, dependency graph)
|
|
431
|
-
- Data Flow Tracer (request lifecycle, state management)
|
|
432
|
-
- Pattern Extractor (design patterns, conventions, error handling)
|
|
265
|
+
Full architecture: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). State-machine diagram, action / signal vocabulary, verify contracts, and the LLM-as-peer protocol.
|
|
433
266
|
|
|
434
|
-
|
|
267
|
+
## Git workflow (detailed)
|
|
435
268
|
|
|
436
|
-
|
|
269
|
+
The 4 modes from [Choose your workflow](#choose-your-workflow) with their full branch graphs.
|
|
437
270
|
|
|
438
|
-
|
|
271
|
+
### Stacked PRs (default)
|
|
439
272
|
|
|
440
|
-
|
|
441
|
-
2. Auto-recommend migration strategy (strangler fig / big bang / branch-by-abstraction / parallel run)
|
|
442
|
-
3. **Parallel**: Stack Mapper + Dependency Analyzer produce compatibility matrix
|
|
443
|
-
4. Design coexistence layer (old + new code running together)
|
|
444
|
-
5. Build phased roadmap ordered by dependency graph
|
|
445
|
-
6. Generate per-component migration cards with effort/risk
|
|
446
|
-
7. Plan data migration (schema changes, dual-write, backfill)
|
|
447
|
-
8. Design API compatibility (versioning, deprecation timeline)
|
|
448
|
-
9. **Parallel**: Test Parity Analyzer maps old tests to new equivalents
|
|
449
|
-
10. **Parallel**: Risk Assessor produces per-phase risk matrix with rollback triggers
|
|
450
|
-
11. Generate BMad Method-compatible epics for sprint planning
|
|
451
|
-
12. Finalize migration plan, epics, and tracking artifacts
|
|
273
|
+
Each story branches from the previous story's branch and targets it. Reviewers see each story's diff in isolation while the next story is already in progress. When a PR merges on the platform, subsequent PRs auto-retarget.
|
|
452
274
|
|
|
453
|
-
|
|
275
|
+
```
|
|
276
|
+
main ─────────────────────────────────────────────────────────
|
|
277
|
+
│ (artifacts only)
|
|
278
|
+
├── story/1-1 ──→ push + PR #42 (→ main)
|
|
279
|
+
│ │
|
|
280
|
+
│ └── story/1-2 ──→ push + PR #43 (→ story/1-1)
|
|
281
|
+
│ │
|
|
282
|
+
│ └── story/1-3 ──→ push + PR #44 (→ story/1-2)
|
|
283
|
+
│
|
|
284
|
+
Epic 1 complete → retrospective
|
|
285
|
+
→ "Ready to merge: PR #42, #43, #44"
|
|
286
|
+
```
|
|
454
287
|
|
|
455
|
-
|
|
456
|
-
|------|----------|---------|
|
|
457
|
-
| `migration-plan.md` | `{planning_artifacts}/` | Strategy, compatibility matrix, coexistence design, phased roadmap, component cards, data/API migration, risk matrix |
|
|
458
|
-
| `migration-epics.md` | `{planning_artifacts}/` | Epics with stories, acceptance criteria, effort estimates (BMad Method-compatible) |
|
|
459
|
-
| `migration-tracking.yaml` | `{implementation_artifacts}/` | Phase-by-phase progress tracking for sprint execution |
|
|
288
|
+
Trade-off: zero waiting for review during the sprint, but you end up with a stack to merge afterward.
|
|
460
289
|
|
|
461
|
-
###
|
|
290
|
+
### Land-as-you-go
|
|
462
291
|
|
|
463
|
-
|
|
292
|
+
After every `STORY_DONE`, the orchestrator runs a `STORY_LAND` state to merge that story's PR immediately. Each subsequent story branches from the already-merged base, so there's no stack to unwind.
|
|
464
293
|
|
|
465
|
-
|
|
294
|
+
```
|
|
295
|
+
main ── story/1-1 ──→ PR #42 ──→ ✓ CI / review ──→ merge ──→
|
|
296
|
+
│ ╲
|
|
297
|
+
├── story/1-2 ──→ PR #43 ──→ ✓ CI / review ──→ merge ──→ ╲
|
|
298
|
+
│ ╲
|
|
299
|
+
└── story/1-3 ──→ PR #44 ──→ ✓ CI / review ──→ merge ──→ done
|
|
300
|
+
```
|
|
466
301
|
|
|
467
|
-
|
|
302
|
+
Knobs: `git.land_when` (`no_wait` / `ci_pass` / `ci_and_review`), `git.land_wait_minutes` (default 30). Rebase recovery is automatic; conflicts halt with a `user_prompt`.
|
|
468
303
|
|
|
469
|
-
|
|
470
|
-
|-------|--------------|
|
|
471
|
-
| `/sprint-autopilot-on` | Engage autonomous sprint execution |
|
|
472
|
-
| `/sprint-autopilot-off` | Disengage and show status |
|
|
473
|
-
| `/sprintpilot-update` | Check for updates and install the latest version |
|
|
474
|
-
| `/sprintpilot-code-review` | Parallel 3-layer adversarial code review |
|
|
475
|
-
| `/sprintpilot-codebase-map` | 5-stream brownfield codebase analysis |
|
|
476
|
-
| `/sprintpilot-assess` | Tech debt, dependency audit, migration assessment |
|
|
477
|
-
| `/sprintpilot-reverse-architect` | Extract architecture document from existing code |
|
|
478
|
-
| `/sprintpilot-migrate` | 12-step legacy migration planning |
|
|
479
|
-
| `/sprintpilot-research` | Parallel web research fan-out |
|
|
480
|
-
| `/sprintpilot-party-mode` | Multi-persona BMad agent discussions |
|
|
304
|
+
Trade-off: cleaner history, no end-of-sprint merge marathon — but each story blocks on CI before the next starts.
|
|
481
305
|
|
|
482
|
-
|
|
306
|
+
### Direct merge (no PR)
|
|
483
307
|
|
|
484
|
-
|
|
308
|
+
Stories merge straight into the base after push — no PR, no human review gate. Use only for prototypes / tutorials / dev branches.
|
|
485
309
|
|
|
486
|
-
|
|
310
|
+
```
|
|
311
|
+
main ── story/1-1 ──→ merge ── story/1-2 ──→ merge ── story/1-3 ──→ merge
|
|
312
|
+
```
|
|
487
313
|
|
|
488
|
-
|
|
489
|
-
|------|-----------|------|-----------|
|
|
490
|
-
| Claude Code | `.claude/skills/` | Roo Code | `.roo/skills/` |
|
|
491
|
-
| Cursor | `.cursor/skills/` | Trae | `.trae/skills/` |
|
|
492
|
-
| Windsurf | `.windsurf/skills/` | Kiro | `.kiro/skills/` |
|
|
493
|
-
| Gemini CLI | `.gemini/skills/` | GitHub Copilot | `.github/copilot/skills/` |
|
|
494
|
-
| Cline | `.cline/skills/` | | |
|
|
314
|
+
### Reuse your branch
|
|
495
315
|
|
|
496
|
-
|
|
316
|
+
You create the branch; the autopilot detects it on boot and commits every story directly onto it. No `story/*` branches. One PR opens against `base_branch` at sprint-end.
|
|
497
317
|
|
|
498
|
-
```
|
|
499
|
-
|
|
318
|
+
```
|
|
319
|
+
main ─────────────────────────────────────────────────
|
|
320
|
+
│
|
|
321
|
+
└── feature/payments-rewrite (your branch, you created it)
|
|
322
|
+
├── feat(1): story 1-1 ─→ commit
|
|
323
|
+
├── feat(1): story 1-2 ─→ commit
|
|
324
|
+
└── … ─→ push + PR (→ main, at sprint-end)
|
|
500
325
|
```
|
|
501
326
|
|
|
502
|
-
|
|
327
|
+
### Branch naming
|
|
503
328
|
|
|
504
|
-
|
|
329
|
+
- Story granularity (default): `<branch_prefix><story-key>` → `story/1-3-add-auth`
|
|
330
|
+
- Epic granularity (nano): `<branch_prefix>epic-<epic-id>` → `story/epic-1`
|
|
331
|
+
- Reuse mode: no autopilot branches; your branch is used as-is
|
|
505
332
|
|
|
506
|
-
|
|
507
|
-
|----------|-----|-------------|--------------|
|
|
508
|
-
| GitHub | `gh` | `github.com` | No |
|
|
509
|
-
| GitLab | `glab` | `gitlab.*` | No |
|
|
510
|
-
| Bitbucket | `bb` | `bitbucket.org` | Yes (`BITBUCKET_TOKEN`) |
|
|
511
|
-
| Gitea | `tea` | Explicit config | Yes (`GITEA_TOKEN` + `base_url`) |
|
|
333
|
+
### Pre-commit safety
|
|
512
334
|
|
|
513
|
-
|
|
335
|
+
Before every commit, deterministic Node scripts run against staged files:
|
|
336
|
+
|
|
337
|
+
| Check | What it does |
|
|
338
|
+
|---|---|
|
|
339
|
+
| Explicit staging | `git add -- file1 file2` — never `-A`/`-u`/`.`. Cross-referenced against the story's `## File List`. |
|
|
340
|
+
| Secrets scan | Greps for `API_KEY`, `SECRET`, `TOKEN`, `PASSWORD`, `aws_access`, `private_key`. WARN severity; allowlist via `.secrets-allowlist`. |
|
|
341
|
+
| File size | Rejects files over `staging.max_file_size_mb` (default 1). |
|
|
342
|
+
| Binary detection | Warns on binary files. |
|
|
343
|
+
| Gitignore check | Verifies `.gitignore` covers `.autopilot.lock` and `.claude/.sprintpilot-backups/`. |
|
|
514
344
|
|
|
515
|
-
|
|
345
|
+
Decision matrix and additional knobs: [`modules/git/branching-and-pr-strategy.md`](_Sprintpilot/modules/git/branching-and-pr-strategy.md).
|
|
516
346
|
|
|
517
|
-
|
|
518
|
-
|----------|---------|----------|---------|
|
|
519
|
-
| Python | ruff, flake8, pylint | Java | checkstyle, pmd |
|
|
520
|
-
| JavaScript/TS | eslint, biome | C/C++ | cppcheck, clang-tidy |
|
|
521
|
-
| Rust | cargo clippy | C# | dotnet format |
|
|
522
|
-
| Go | golangci-lint | Swift | swiftlint |
|
|
523
|
-
| Ruby | rubocop | PL/SQL | sqlfluff |
|
|
524
|
-
| Kotlin | ktlint, detekt | PHP | phpstan, phpcs |
|
|
347
|
+
## Multi-Agent Intelligence
|
|
525
348
|
|
|
526
|
-
|
|
349
|
+
Beyond the autopilot, multi-agent skills launch parallel subagents for tasks that benefit from diverse perspectives.
|
|
527
350
|
|
|
528
|
-
|
|
351
|
+
**`/sprintpilot-codebase-map`** — 5 parallel agents scan an existing codebase: stack, architecture, quality, concerns, integrations. Output under `_bmad-output/codebase-analysis/`. Inspired by [GSD's map-codebase](https://github.com/gsd-build/get-shit-done) — see [NOTICES.md](NOTICES.md).
|
|
529
352
|
|
|
530
|
-
|
|
353
|
+
**`/sprintpilot-assess`** — Dependency auditor (CVEs), debt classifier (prioritized), migration analyzer. Output: prioritized findings with severity / confidence / effort.
|
|
531
354
|
|
|
532
|
-
|
|
355
|
+
**`/sprintpilot-reverse-architect`** — Component mapper + data flow tracer + pattern extractor. Output: BMad Method-compatible `architecture.md` that feeds `bmad-create-epics-and-stories`.
|
|
533
356
|
|
|
534
|
-
|
|
535
|
-
|---------|------|---------|------------------|
|
|
536
|
-
| `complexity_profile` | `autopilot/config.yaml` | `medium` | One of `nano`/`small`/`medium`/`large`/`legacy` — picks the per-story flow + which v2 layers are enabled |
|
|
537
|
-
| `autopilot.implementation_flow` | `autopilot/config.yaml` | `full` (nano: `quick`) | `full` runs the 7-step BMad cycle; `quick` routes every story through `bmad-quick-dev` and boots fresh sessions directly at `NANO_QUICK_DEV` |
|
|
538
|
-
| `git.push.create_pr` | `git/config.yaml` | `true` | `true` = push + PR (no auto-merge), `false` = direct merge to base branch |
|
|
539
|
-
| `git.merge_strategy` | `git/config.yaml` | `stacked` | `stacked` keeps every story branch open until sprint-end; `land_as_you_go` merges each PR right after `STORY_DONE` (gated by `land_when` / `land_wait_minutes`) |
|
|
540
|
-
| `git.reuse_user_branch` | `git/config.yaml` | `false` | When `true`, autopilot commits every story onto the user's current branch instead of creating per-story / per-epic branches; one PR opens at sprint-end |
|
|
541
|
-
| `git.branch_prefix` | `git/config.yaml` | `story/` | Prefix for autopilot-created branches (e.g., `story/1-3-add-auth`, `story/epic-1`) |
|
|
542
|
-
| `git.lint.blocking` | `git/config.yaml` | `false` | `true` = lint errors halt the autopilot |
|
|
543
|
-
| `autopilot.session_story_limit` | `autopilot/config.yaml` | `3` (nano: `5`) | Stories per session before checkpoint. `0` = unlimited |
|
|
544
|
-
| `multi_agent.enabled` | `ma/config.yaml` | `true` | Enable parallel agent skills |
|
|
357
|
+
**`/sprintpilot-migrate`** — 12-step migration planner with 4 subagent fan-outs. Strategy, compatibility matrix, phased roadmap, per-component cards, data + API migration, risk matrix.
|
|
545
358
|
|
|
546
|
-
|
|
359
|
+
**`/sprintpilot-research`** — Fan out research across multiple topics in parallel; synthesized into a unified report.
|
|
547
360
|
|
|
548
|
-
|
|
361
|
+
Skill internals + output schemas: [docs/USAGE.md](docs/USAGE.md#multi-agent-skills).
|
|
549
362
|
|
|
550
363
|
## Requirements
|
|
551
364
|
|
|
552
365
|
- [BMad Method](https://github.com/bmad-code-org/BMAD-METHOD) v6.2.0+
|
|
553
|
-
- A supported AI code agent (see [
|
|
366
|
+
- A supported AI code agent (see [Compatibility](#compatibility))
|
|
554
367
|
- Git repository with at least one commit
|
|
555
|
-
- Platform CLI for PR creation (optional —
|
|
368
|
+
- Platform CLI for PR creation (optional — falls back to git_only mode)
|
|
556
369
|
|
|
557
370
|
## Documentation
|
|
558
371
|
|
|
559
372
|
- [Installation Guide](docs/INSTALLATION.md)
|
|
560
|
-
- [Usage Guide](docs/USAGE.md)
|
|
561
|
-
- [Architecture](docs/ARCHITECTURE.md)
|
|
562
|
-
- [Configuration Reference](docs/CONFIGURATION.md)
|
|
373
|
+
- [Usage Guide](docs/USAGE.md) — handoff report, user commands, multi-agent skill internals, troubleshooting
|
|
374
|
+
- [Architecture](docs/ARCHITECTURE.md) — state machine, action / signal vocabulary, verify contracts
|
|
375
|
+
- [Configuration Reference](docs/CONFIGURATION.md) — every setting, default, profile override
|
|
563
376
|
- [Extending (Platforms & Languages)](docs/EXTENDING.md)
|
|
564
377
|
- [Contributing](docs/CONTRIBUTING.md)
|
|
565
378
|
- [Changelog](CHANGELOG.md)
|