@ikunin/sprintpilot 2.2.30 → 2.3.0
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 +232 -413
- package/_Sprintpilot/Sprintpilot.md +76 -6
- package/_Sprintpilot/bin/autopilot.js +752 -66
- 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 +107 -0
- package/_Sprintpilot/lib/orchestrator/user-commands.js +124 -1
- package/_Sprintpilot/lib/orchestrator/verify.js +10 -17
- package/_Sprintpilot/manifest.yaml +4 -1
- 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-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 -10
- package/package.json +1 -1
|
@@ -31,9 +31,17 @@ Edit `_Sprintpilot/modules/autopilot/config.yaml`:
|
|
|
31
31
|
|
|
32
32
|
| Setting | Default | Values | Purpose |
|
|
33
33
|
|---------|---------|--------|---------|
|
|
34
|
-
| `autopilot.session_story_limit` | `3` (nano: `5`) | integer ≥ 0 | Stories fully implemented per autopilot run before checkpoint. `0` = unlimited.
|
|
34
|
+
| `autopilot.session_story_limit` | `3` (nano: `5`) | integer ≥ 0 | Stories fully implemented per autopilot run before checkpoint. `0` = unlimited. Nano is cheaper per story and fits a higher cap. |
|
|
35
35
|
| `autopilot.retrospective_mode` | `auto` | `auto` / `stop` / `skip` | How epic-end retrospectives are handled (see below). |
|
|
36
|
-
| `autopilot.auto_infer_dependencies` | `
|
|
36
|
+
| `autopilot.auto_infer_dependencies` | `false` (was `true` pre-v2.3.0) | bool | **Legacy flag — superseded by `auto_plan_on_start` in v2.3.0.** See "Sprint Planning + DAG-Aware Execution" below. |
|
|
37
|
+
| `autopilot.auto_plan_on_start` | `false` | bool | **v2.3.0.** When `true`, `autopilot start` emits `invoke_skill: sprintpilot-plan-sprint` on greenfield projects (no `sprint-plan.yaml`). Default `false`: missing plan → fall back to sprint-status order. Once a plan exists, staleness triggers auto-derive regardless of this knob. |
|
|
38
|
+
| `git.lock.stale_timeout_minutes` | `30` | integer ≥ 0 | `.autopilot.lock` older than this is auto-taken-over by the next session. `0` disables auto-takeover (locks held until released manually). |
|
|
39
|
+
| `git.worktree.health_check_on_boot` | `true` | bool | At session start, scan `.worktrees/` for orphans from crashed sessions and halt with a prune hint when any are found. |
|
|
40
|
+
| `git.worktree.cleanup_on_merge` | `true` | bool | After an epic merges, prune worktree metadata and remove `.worktrees/<key>/` directories whose branches no longer exist locally or on origin. |
|
|
41
|
+
| `git.lint.enabled` | `false` | bool | After `dev_green` verify passes, run the composed lint pipeline (`scripts/post-green-gates.js`: lint-changed + lint-test-pitfalls + ci-parity scan). |
|
|
42
|
+
| `git.lint.blocking` | `false` | bool | When true, a failing lint gate rejects verify so the LLM gets a fix-loop. When false, failures are recorded but don't gate the autopilot. |
|
|
43
|
+
| `git.lint.output_limit` | `100` | integer ≥ 0 | Max lines of lint output injected back as context. |
|
|
44
|
+
| `git.lint.linters` | (auto-detect) | map of language → ordered list | Per-language linter preference. Languages: `python` / `javascript` / `typescript` / `rust` / `go` / `ruby` / `java` / `c` / `cpp` / `csharp` / `swift` / `sql` / `kotlin` / `php`. `javascript` and `typescript` merge into a single `js-ts` bucket. An empty list disables linting for that language. |
|
|
37
45
|
|
|
38
46
|
`retrospective_mode` options:
|
|
39
47
|
- **`auto`** *(default)* — autopilot writes a deterministic retrospective artifact from `sprint-status.yaml` + `decision-log.yaml`, then continues. Single pass, no external skill call, safe under every CLI.
|
|
@@ -42,17 +50,76 @@ Edit `_Sprintpilot/modules/autopilot/config.yaml`:
|
|
|
42
50
|
|
|
43
51
|
Both settings are prompted during `sprintpilot install` (interactive mode) with existing values as defaults, so reinstalls preserve your choices.
|
|
44
52
|
|
|
45
|
-
###
|
|
53
|
+
### Sprint Planning + DAG-Aware Execution (v2.3.0)
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
`/sprintpilot-plan-sprint` builds the authoritative sprint plan at `_bmad-output/implementation-artifacts/sprint-plan.yaml`. The plan persists per-epic dependencies, cross-epic edges, per-story `plan_status`, priorities, and optional external issue-tracker links. BMad's `sprint-status.yaml` remains the source of truth for *what stories exist*; the plan is the source of truth for *what runs next, in what order, and with what dependencies*.
|
|
48
56
|
|
|
49
|
-
|
|
57
|
+
The skill follows a 14-step workflow (`_Sprintpilot/skills/sprintpilot-plan-sprint/workflow.md`):
|
|
58
|
+
|
|
59
|
+
1. Load inputs (sprint-status, epics.md, architecture.md, existing plan)
|
|
60
|
+
2. One-shot legacy migration (`_Sprintpilot/sprints/dependencies.yaml` → archived)
|
|
61
|
+
3. Staleness check
|
|
62
|
+
4. Per-epic inference loop (max 3 validation retries per epic; partial saved on 3rd failure)
|
|
63
|
+
5. Cross-epic detection (separate prompt; combined-graph cycle check)
|
|
64
|
+
6. Optional issue-tracker block setup
|
|
65
|
+
7. Optional per-entity issue_id capture (with bulk-skip + pattern options)
|
|
66
|
+
8. Finalize dependencies in plan
|
|
67
|
+
9. Build sprint-wide DAG via `resolve-dag.js graph`
|
|
68
|
+
10. Present DAG (text-mode tree + mermaid render)
|
|
69
|
+
11. Curate stories (which belong in the active plan)
|
|
70
|
+
12. Validate selection against DAG (every upstream included OR terminal)
|
|
71
|
+
13. Atomic write via `sprint-plan.js write`
|
|
72
|
+
14. Report
|
|
73
|
+
|
|
74
|
+
The skill is invoked three ways:
|
|
75
|
+
|
|
76
|
+
- **User-direct:** `/sprintpilot-plan-sprint` with no arguments.
|
|
77
|
+
- **Auto-derive:** autopilot emits `invoke_skill: sprintpilot-plan-sprint` when a plan is missing/stale (gated by `auto_plan_on_start` config + opt-in for greenfield).
|
|
78
|
+
- **Replan:** user issues `user_input { kind: 'replan_sprint' }` mid-flight; autopilot halts and emits the skill on next start.
|
|
79
|
+
|
|
80
|
+
**Mid-flight commands** translate natural-language directives into structured `user_input` signals:
|
|
81
|
+
|
|
82
|
+
- `reorder_queue { order: [...] }` — DAG-validated reordering; violations surface with suggestions.
|
|
83
|
+
- `add_to_sprint { story_keys, position?, issue_ids? }` — adds entries to the plan.
|
|
84
|
+
- `remove_from_sprint { story_keys, mark_status? }` — marks `plan_status: skipped` (default) or `'deferred'`.
|
|
85
|
+
- `replan_sprint { reason? }` — halts + re-invokes the planning skill.
|
|
86
|
+
|
|
87
|
+
**`autopilot progress`** CLI provides a one-shot snapshot (or `--json` for machine-readable output) showing plan progress bar, current story + step, and recent step events. When `plan.issue_tracker` is configured, `[<issue_id>]` brackets enrich the current-story line + each recent event, and an `Issue tracking: N/M stories linked to <provider>` coverage line surfaces in the summary.
|
|
88
|
+
|
|
89
|
+
**`/sprintpilot-sprint-progress`** is the LLM-layered diagnostic on top of the same data — produces a 1-block health report (HEALTHY / STALLED / NEEDS-INPUT / EXHAUSTED / NO-PLAN) with exactly one recommended next action. Read-only; suggests user commands rather than executing them. Pass a story key as argument (`/sprintpilot-sprint-progress 1-3-add-auth`) to drill into a single story's plan entry.
|
|
90
|
+
|
|
91
|
+
**Plan exhaustion** (every story in `plan_status` terminal) archives the plan to `.archive/sprint-plan-<plan_id>.yaml` and emits a `user_prompt` halt — the user chooses re-plan vs. fall back to sprint-status order.
|
|
92
|
+
|
|
93
|
+
**Pre-v2.3.0 migration:** the pre-existing `_Sprintpilot/sprints/dependencies.yaml` (from the legacy `auto_infer_dependencies` flow) auto-migrates on the first v2.3.0 `autopilot start`. Stories + overrides import into the new plan; the legacy `epics: {independent: ...}` block is dropped with a warning (parallel-execution config moves to v2.4.0 mechanisms).
|
|
94
|
+
|
|
95
|
+
Default behavior for greenfield projects (`auto_plan_on_start: false`) is unchanged from v2.2.x: `autopilot start` executes stories in sprint-status order without invoking any LLM-driven planning.
|
|
96
|
+
|
|
97
|
+
See `docs/USAGE.md#sprint-planning--dag-aware-execution-v230` for the full user-facing walkthrough and `docs/ARCHITECTURE.md#sprint-planning--dag-aware-execution-v230` for the implementation architecture.
|
|
98
|
+
|
|
99
|
+
### Parallel Story Dispatch (DAG infrastructure)
|
|
100
|
+
|
|
101
|
+
The DAG built by sprint planning also underwrites `dispatch-layer.js` infrastructure (`planBatch`, `resolve-dag.js`, `merge-shards.js`, `agent-adapter.js`). `ma.parallel_stories: true` enables the building blocks, but the state machine still emits stories one at a time today; intra-epic parallel emission lands in a future minor release. The autopilot logs a clear notice at session start when the flag is set so the behavior is unambiguous.
|
|
50
102
|
|
|
51
103
|
### Mandatory fresh-context finalize
|
|
52
104
|
|
|
53
105
|
Independent of `session_story_limit`, the autopilot forces an extra session at end-of-sprint. When step 2 detects all stories are done, it writes `current_bmad_step = sprint-finalize-pending` to the state file and halts — it does **not** run step 10 (cleanup) in that session. The next `/sprint-autopilot-on` invocation reads the marker in step 1 and jumps directly to step 10 with a clean context window, where seven CRITICAL deterministic script calls run the cleanup (checkbox marking, worktree removal, lock release, artifact commit, sprint-complete state, verification, state-file delete).
|
|
54
106
|
|
|
55
|
-
This behavior is not configurable: it's a mitigation for late-session instruction decay that
|
|
107
|
+
This behavior is not configurable: it's a mitigation for late-session instruction decay that drops cleanup actions in long single-session runs. The extra session is short (typically ~60-100 turns, under $2). Enforced by the `sprint_finalize_pending` terminal state in `_Sprintpilot/lib/orchestrator/state-machine.js`.
|
|
108
|
+
|
|
109
|
+
### Resume divergence
|
|
110
|
+
|
|
111
|
+
At session start, the orchestrator fingerprints `_bmad-output/`, sprint-status.yaml, and per-story branch HEADs and compares against the fingerprint stamped at the last halt. When they differ, two escape paths proceed without manual state surgery:
|
|
112
|
+
|
|
113
|
+
- **External completion (auto)** — when the persisted `current_story` is `done` in sprint-status (story merged outside the autopilot: manual PR merge, hotfix, UI action), the stale story identity is cleared and the orchestrator picks the next pending story. Logged as `divergence_accepted, reason: external_completion`.
|
|
114
|
+
- **`--accept-divergence` flag** — catch-all for divergence patterns the auto-acknowledge doesn't cover (multiple stories completed externally, branch heads moved, etc.). Logged as `reason: explicit_accept`.
|
|
115
|
+
|
|
116
|
+
Divergences outside both paths emit `resume_divergence` with the diff so the user/LLM can resolve.
|
|
117
|
+
|
|
118
|
+
### Terminal statuses for epic-done routing
|
|
119
|
+
|
|
120
|
+
A story counts as "non-remaining" for end-of-epic detection when its sprint-status entry is any of: `done` / `skipped` / `wont_do` / `won't_do` / `cancelled` / `canceled` / `deferred` / `abandoned`. Hand-edit sprint-status to flag deferred work without lying it shipped — the orchestrator routes to RETROSPECTIVE once every entry in the epic is terminal.
|
|
121
|
+
|
|
122
|
+
When deferred entries can't be reclassified in time, the LLM can emit `user_input { kind: 'trigger_retrospective' }` to force-route to RETROSPECTIVE for the current epic regardless of `remaining_stories_in_epic`. This is the canonical way to "close out epic N with retro" while non-terminal stories remain.
|
|
56
123
|
|
|
57
124
|
---
|
|
58
125
|
|
|
@@ -79,6 +146,9 @@ This behavior is not configurable: it's a mitigation for late-session instructio
|
|
|
79
146
|
| `bmad-sprint-planning` | Generate `sprint-status.yaml` tracking file from epics list |
|
|
80
147
|
| `bmad-sprint-status` | Check current sprint status and surface risks at any time |
|
|
81
148
|
| `bmad-correct-course` | Manage significant scope or direction changes mid-sprint |
|
|
149
|
+
| `sprintpilot-plan-sprint` *(v2.3.0)* | **Optional, opt-in.** After BMad sprint planning, build a dependency-aware sprint plan with per-epic + cross-epic edges, plan-aware queue ordering, and optional external issue-tracker links. Auto-triggered when a stale plan is detected; only runs on greenfield projects when `autopilot.auto_plan_on_start: true`. Replaces the legacy `_Sprintpilot/sprints/dependencies.yaml` workflow. See "Sprint Planning + DAG-Aware Execution (v2.3.0)" above. |
|
|
150
|
+
| `sprintpilot-sprint-progress` *(v2.3.0)* | **Read-only diagnostic.** Wraps `autopilot progress --json` with LLM judgment: classifies sprint health (`HEALTHY` / `STALLED` / `NEEDS-INPUT` / `EXHAUSTED` / `NO-PLAN`) from the recent ledger tail and suggests one concrete next action. Surfaces `issue_id` brackets when an issue_tracker is configured. Pass a story key as argument to drill into a single story's plan entry. Never mutates state — points users at the appropriate `user_input` command when corrective action is needed. |
|
|
151
|
+
| `sprintpilot-dependency-graph` *(v2.3.0)* | **Read-only renderer.** Generates the sprint dependency graph in a chosen format: `mermaid` (default; GitHub-renderable), `graphviz` (.dot), `text` (topological tree), `layers` (JSON parallel groups), or `json` (raw `{nodes, edges, epic}`). Asks interactively when no format is supplied; accepts `epic <id>` for per-epic scope. Inline-renders mermaid into chat. Halts politely when no plan exists — points the user at `/sprintpilot-plan-sprint` rather than building one. |
|
|
82
152
|
|
|
83
153
|
### Phase 2 — Story development (the mandatory per-story loop)
|
|
84
154
|
|