pi-spine 1.0.2 → 1.2.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.
Files changed (129) hide show
  1. package/README.md +61 -489
  2. package/bin/get-version.mjs +1 -13
  3. package/bin/spine-batch.mjs +162 -51
  4. package/bin/spine-cli/batch.mjs +3 -3
  5. package/bin/spine-cli/lane-logs.mjs +24 -0
  6. package/bin/spine-cli/scenarios.mjs +298 -0
  7. package/bin/spine-cli/wait.mjs +30 -0
  8. package/bin/spine-cli/watch.mjs +27 -0
  9. package/bin/spine-config.mjs +1 -212
  10. package/bin/spine-doctor.mjs +2 -418
  11. package/bin/spine-init.mjs +1 -398
  12. package/bin/spine-issue.mjs +196 -0
  13. package/bin/spine-journal.mjs +1 -0
  14. package/bin/spine-preflight.mjs +1 -700
  15. package/bin/spine-review-step.mjs +6 -4
  16. package/bin/spine-run.mjs +30 -0
  17. package/bin/spine-status.mjs +19 -1
  18. package/bin/spine-tasks.mjs +112 -13
  19. package/bin/spine-worker-runner.mjs +24 -14
  20. package/bin/spine.mjs +52 -2
  21. package/extensions/spine/worker-tools.ts +14 -12
  22. package/package.json +5 -2
  23. package/skills/create-spine-tasks/SKILL.md +135 -6
  24. package/skills/create-spine-tasks/references/clarify-template.md +73 -0
  25. package/skills/create-spine-tasks/references/contract-template.md +19 -0
  26. package/skills/create-spine-tasks/references/prompt-template.md +2 -0
  27. package/skills/create-spine-tasks/references/requirements-checklist-template.md +94 -0
  28. package/src/batch/abort.mjs +3 -12
  29. package/src/batch/agent-session-worker.mjs +45 -5
  30. package/src/batch/attached-engine-handoff.mjs +188 -0
  31. package/src/batch/attached-runner.mjs +312 -0
  32. package/src/batch/contract-prelanded.mjs +180 -0
  33. package/src/batch/contract-verify.mjs +140 -2
  34. package/src/batch/detached-start.mjs +105 -7
  35. package/src/batch/diagnosis-alternatives.mjs +46 -0
  36. package/src/batch/diagnosis-merge-failure.mjs +79 -0
  37. package/src/batch/diagnosis-retry-limbo.mjs +34 -0
  38. package/src/batch/diagnosis-stub.mjs +109 -0
  39. package/src/batch/diagnosis-task-done.mjs +110 -0
  40. package/src/batch/diagnosis-worker-done-missing.mjs +96 -0
  41. package/src/batch/diagnosis.mjs +174 -62
  42. package/src/batch/engine-lanes/merge.mjs +168 -77
  43. package/src/batch/engine-lanes/queue.mjs +4 -1
  44. package/src/batch/engine-lanes/review.mjs +32 -74
  45. package/src/batch/engine-lanes/watch.mjs +29 -0
  46. package/src/batch/engine-lanes.mjs +1 -0
  47. package/src/batch/engine-scope.mjs +42 -5
  48. package/src/batch/engine.mjs +115 -68
  49. package/src/batch/evidence.mjs +81 -17
  50. package/src/batch/gate.mjs +46 -17
  51. package/src/batch/git-helpers.mjs +96 -0
  52. package/src/batch/heartbeat.mjs +73 -7
  53. package/src/batch/integrate.mjs +3 -5
  54. package/src/batch/journal.mjs +25 -0
  55. package/src/batch/lane-commit.mjs +90 -5
  56. package/src/batch/lifecycle.mjs +131 -4
  57. package/src/batch/macro-phase.mjs +226 -0
  58. package/src/batch/merge/adoption-doc-merge.mjs +243 -0
  59. package/src/batch/merge/wave-merge-state.mjs +108 -0
  60. package/src/batch/metrics.mjs +74 -5
  61. package/src/batch/orphan-detect.mjs +74 -0
  62. package/src/batch/pause.mjs +223 -0
  63. package/src/batch/post-merge-limbo.mjs +345 -17
  64. package/src/batch/reconcile.mjs +473 -50
  65. package/src/batch/resume-common.mjs +6 -2
  66. package/src/batch/resume-engine.mjs +58 -1
  67. package/src/batch/resume-lane-reviews.mjs +16 -0
  68. package/src/batch/resume-multi-lanes.mjs +56 -1
  69. package/src/batch/resume-multi-validate.mjs +148 -8
  70. package/src/batch/resume-multi.mjs +45 -44
  71. package/src/batch/resume.mjs +64 -47
  72. package/src/batch/retry.mjs +56 -5
  73. package/src/batch/review-shared.mjs +196 -0
  74. package/src/batch/review-spawn.mjs +326 -0
  75. package/src/batch/review.mjs +178 -212
  76. package/src/batch/rules-manifest-drift.mjs +157 -0
  77. package/src/batch/salvage.mjs +2 -1
  78. package/src/batch/sequence.mjs +454 -0
  79. package/src/batch/state.mjs +18 -3
  80. package/src/batch/status-json.mjs +67 -0
  81. package/src/batch/task-stall-budget.mjs +94 -10
  82. package/src/batch/worker-host.mjs +185 -37
  83. package/src/batch/worker-output.mjs +196 -3
  84. package/src/batch/worktree.mjs +10 -0
  85. package/src/cli/handoff.mjs +1 -1
  86. package/src/cli/issue-draft.mjs +180 -0
  87. package/src/cli/journal-follow.mjs +239 -0
  88. package/src/cli/lane-logs.mjs +291 -0
  89. package/src/cli/rules.mjs +1 -1
  90. package/src/cli/sequence.mjs +108 -0
  91. package/src/cli/settings-set.mjs +3 -22
  92. package/src/cli/settings-slash.mjs +27 -5
  93. package/src/cli/wait.mjs +187 -0
  94. package/src/cli/watch.mjs +160 -0
  95. package/src/config/agent-model-resolve.mjs +48 -0
  96. package/src/config/cursor-rules/discover.mjs +3 -21
  97. package/src/config/defaults.mjs +7 -1
  98. package/src/config/settings-fields.mjs +48 -0
  99. package/src/config/spine-config-load.mjs +221 -0
  100. package/src/config/spine-init-constants.mjs +424 -0
  101. package/src/config/spine-preflight-lib.mjs +1180 -0
  102. package/src/dashboard/lane-throughput.mjs +351 -0
  103. package/src/dashboard/public/dashboard.css +25 -1
  104. package/src/dashboard/public/dashboard.js +224 -40
  105. package/src/dashboard/public/index.html +15 -9
  106. package/src/dashboard/server.mjs +4 -0
  107. package/src/dashboard/snapshot.mjs +387 -6
  108. package/src/dashboard/view.mjs +170 -15
  109. package/src/doctor/agent-model-inherit.mjs +61 -6
  110. package/src/doctor/run-doctor-checks.mjs +483 -0
  111. package/src/doctor/sequence-safety.mjs +57 -0
  112. package/src/doctor/stale-path.mjs +22 -0
  113. package/src/doctor/stale-worktrees.mjs +102 -0
  114. package/src/fixtures/scenario-registry.mjs +194 -0
  115. package/src/fs/atomic-write.mjs +49 -0
  116. package/src/migrate/taskplane-config.mjs +1 -1
  117. package/src/planner/file-scope.mjs +246 -0
  118. package/src/planner/format-plan.mjs +9 -7
  119. package/src/planner/index.mjs +6 -2
  120. package/src/planner/pending.mjs +92 -1
  121. package/src/planner/wave-scope.mjs +136 -0
  122. package/src/planner/waves.mjs +133 -0
  123. package/src/tasks/analyze/index.mjs +453 -0
  124. package/src/tasks/packet/index.mjs +1 -0
  125. package/src/tasks/packet/parse-prompt.mjs +42 -1
  126. package/src/tasks/packet/validate-prompt.mjs +124 -0
  127. package/src/util/command-exists.mjs +19 -0
  128. package/templates/docs/constitution.md +61 -0
  129. package/templates/spine-config.json +9 -2
package/README.md CHANGED
@@ -4,27 +4,7 @@
4
4
 
5
5
  **Orchestration spine for long-running pi development.**
6
6
 
7
- pi-spine is a [pi](https://pi.dev) package that helps you run parallel, multi-day agent batches on real codebases. It combines the strongest ideas from [Taskplane](https://pi.dev/packages/taskplane), [Babysitter](https://github.com/a5c-ai/babysitter), and [pi-conductor](https://www.npmjs.com/package/@feniix/pi-conductor) without asking you to operate three separate orchestrators—or pick one and miss what the others do well.
8
-
9
- ---
10
-
11
- ## Why this exists
12
-
13
- Long-running agent development fails for the same reasons repeatedly:
14
-
15
- - **Context loss** when sessions compact or crash
16
- - **Parallel collisions** when multiple agents edit one checkout
17
- - **Opaque recovery** when a batch pauses and you cannot tell whether to resume, force-resume, or abort
18
- - **Premature integration** when lane work merges without explicit approval or test evidence
19
- - **Tool fragmentation** when each orchestrator owns state differently and none covers the full workflow
20
-
21
- Taskplane, Babysitter, and pi-conductor each solve important slices of this problem. None of them, used alone, gives you **Taskplane-style task packets**, **Babysitter-grade audit history**, and **pi-conductor-style human gates** in one pi-native flow.
22
-
23
- pi-spine exists to be that spine: a thin, composable layer you install once and run from your pi session.
24
-
25
- ---
26
-
27
- ## What pi-spine is (and is not)
7
+ pi-spine is a [pi](https://pi.dev) package for parallel, multi-day agent batches on real codebases. It combines Taskplane-style task packets, Babysitter-grade audit history, and pi-conductor-style human gates in one pi-native flow — **compose, don't merge** three orchestrators into a fourth monolith.
28
8
 
29
9
  | pi-spine is | pi-spine is not |
30
10
  |-------------|-----------------|
@@ -34,70 +14,6 @@ pi-spine exists to be that spine: a thin, composable layer you install once and
34
14
  | **Human gates** before integrate/merge | A clone of pi-conductor's external control-plane DB |
35
15
  | Worktree-isolated parallel lanes | Cross-harness routing (Cursor, Codex, etc.) in v1 |
36
16
 
37
- Design philosophy: **compose, don't merge.** pi-spine adopts patterns; it does not reimplement three products as a fourth monolith.
38
-
39
- ---
40
-
41
- ## Advantages over using the others directly
42
-
43
- ### vs Taskplane alone
44
-
45
- Taskplane is the best pi-native batch orchestrator today: dependency waves, worktree lanes, cross-model review, dashboard, and orch-branch integration. pi-spine builds on that foundation rather than competing with it.
46
-
47
- | You get with pi-spine | Gap when using Taskplane only |
48
- |-----------------------|-------------------------------|
49
- | **Orchestration journal** — append-only timeline of batch, lane, task, gate, and integrate events | Batch state and diagnostics exist, but post-mortem replay across lane death is harder to reconstruct |
50
- | **Explicit integrate gates** — merge blocked until you approve an evidence bundle (tests, diff stat, task scorecard) | Integration is powerful; human approval is less formalized |
51
- | **Journal-driven reconciliation** — resume hints grounded in event history | Resume works, but stale or partial lane recovery can be opaque in long batches |
52
- | **Same task packets** — point `--tasks-root` at existing `taskplane-tasks/` | No migration rewrite required |
53
-
54
- **When to stay on Taskplane only:** You are happy with its dashboard, supervisor, and merge flow and do not need formal gates or a dedicated audit journal.
55
-
56
- ### vs Babysitter alone
57
-
58
- Babysitter excels at **deterministic, event-sourced workflow orchestration** and cross-harness portability. Its pi plugin is experimental and thin; the heavy lifting lives in the SDK and harness adapters.
59
-
60
- | You get with pi-spine | Gap when using Babysitter only |
61
- |-----------------------|----------------------------------|
62
- | **pi-native first-class UX** — slash commands, skills, worker sessions in pi | Pi integration is experimental; not the primary Babysitter surface |
63
- | **File-based task packets** — `PROMPT.md` / `STATUS.md` as agent memory | Process definitions in JavaScript; different authoring model |
64
- | **Git worktree lanes** tuned for coding batches | Not the core Babysitter story |
65
- | **Lighter mental model** — journal at orchestration boundaries, not full process replay | Full replay engine is powerful but heavier for solo pi batch work |
66
-
67
- **When to stay on Babysitter only:** You need one workflow engine across many harnesses (Codex, Cursor, Gemini) and want JS process definitions with full deterministic replay.
68
-
69
- ### vs pi-conductor alone
70
-
71
- pi-conductor is an actively developed **agent-native control plane**: durable workers, gates, artifacts, and PR-oriented flows via model-callable tools.
72
-
73
- | You get with pi-spine | Gap when using pi-conductor only |
74
- |-----------------------|----------------------------------|
75
- | **Taskplane-compatible packets** — reuse existing `TP-*` / `SP-*` folders | Objectives and tool-native orchestration; different task contract |
76
- | **Wave + lane batch model** — familiar `/spine-plan all` → parallel worktrees | Scheduler and conductor tools; different UX paradigm |
77
- | **Opinionated worker/reviewer pipeline** — step checkpoints, `.DONE`, inline review | More flexible control plane; you assemble more yourself |
78
- | **In-repo task folders** as the handoff artifact for humans and agents | State largely outside the repo |
79
-
80
- **When to stay on pi-conductor only:** You want tool-driven orchestration (`conductor_run_work`, gate dashboard, PR readiness) and prefer objectives over folder-based packets.
81
-
82
- ### The combined picture
83
-
84
- ```text
85
- Audit / replay clarity
86
- ▲
87
- │
88
- Babysitter │ pi-spine
89
- │
90
- ──────────────────┼──────────────────► Batch orchestration
91
- │
92
- pi-conductor │ Taskplane
93
- │
94
- Gates │ Packets + dashboard
95
- ```
96
-
97
- pi-spine targets the upper-right: **batch orchestration with strong audit trail and human gates**, using task packets you may already have.
98
-
99
- ---
100
-
101
17
  ## Feature summary
102
18
 
103
19
  - **Taskplane-compatible tasks** — `PROMPT.md`, `STATUS.md`, `dependencies.json`
@@ -108,32 +24,22 @@ pi-spine targets the upper-right: **batch orchestration with strong audit trail
108
24
  - **Orchestration journal** — JSONL event log for debugging and resume context
109
25
  - **Human gates** — approve or reject integrate with test/build evidence
110
26
  - **Local dashboard** — batch, lane, and gate visibility (SSE)
111
- - **`create-spine-tasks` skill** — decompose PRDs into `spine-tasks/` packets (local install; no npm publish)
112
-
113
- See `docs/PRD.md` for the full specification.
114
-
115
- ---
27
+ - **`create-spine-tasks` skill** — decompose PRDs into `spine-tasks/` packets (local install)
116
28
 
117
- ## Honest limits (v2.2)
29
+ ## Inspired by
118
30
 
119
- pi-spine v2.2 ships operator-driven batch monitoring, not Taskplane-style autonomous supervision.
31
+ pi-spine builds on ideas from [Taskplane](https://pi.dev/packages/taskplane), [Babysitter](https://github.com/a5c-ai/babysitter), and [pi-conductor](https://www.npmjs.com/package/@feniix/pi-conductor). For comparisons, trade-offs, and when to use each tool alone, see **[Why pi-spine?](docs/adoption/why-pi-spine.md)**.
120
32
 
121
- | Out of v2.2 | What to use instead |
122
- |-------------|---------------------|
123
- | **Supervisor mail** — conversational nudges between orchestrator and workers | `spine status --diagnose`, dashboard diagnosis banner, runbook recovery paths |
124
- | **Autonomous monitor agent** — background Pi session polling batch health | Same CLI + dashboard surfaces; human operator runs suggested commands |
33
+ ## Honest limits
125
34
 
126
- **Primary monitor surfaces:**
35
+ pi-spine ships operator-driven batch monitoring, not autonomous supervision.
127
36
 
128
- - **`spine status --diagnose`** — diagnosis, headline, `suggestedCommand`, lane health (use daily after detached start/resume)
129
- - **Dashboard** — `spine dashboard` / `/spine-dashboard`; diagnosis banner and action chips match `--diagnose` reconciliation (default port 8109)
130
- - **[Operator runbook](docs/adoption/operator-runbook.md)** — stall recovery, orphan handling, land loop, gate races
37
+ | Out of scope | What to use instead |
38
+ |--------------|---------------------|
39
+ | **Supervisor mail** — conversational nudges between orchestrator and workers | `spine status --diagnose`, dashboard diagnosis banner |
40
+ | **Autonomous monitor agent** — background session polling batch health | CLI + dashboard surfaces; human operator runs suggested commands |
131
41
 
132
- The `.spine/agents/supervisor.md` template (from `spine init`) documents this no-agent reality; the batch engine does not spawn it.
133
-
134
- **Optional stretch (not blocking v2.2 publish):** a minimal supervisor session journaling `supervisor.nudge` events — deferred unless consumer pilot feedback shows dashboard + diagnose are insufficient ([FR-SHIP-11](docs/PRD-v2.2-ship-readiness-handoff.md#fr-ship-11-design-decision)).
135
-
136
- ---
42
+ Primary monitor surfaces: **`spine status --diagnose`**, **`spine dashboard`** / `/spine-dashboard`, and the **[operator runbook](docs/adoption/operator-runbook.md)**. The `.spine/agents/supervisor.md` template documents this no-agent reality; the batch engine does not spawn it.
137
43
 
138
44
  ## Prerequisites
139
45
 
@@ -143,433 +49,99 @@ The `.spine/agents/supervisor.md` template (from `spine init`) documents this no
143
49
  | [pi](https://pi.dev) coding agent | Yes |
144
50
  | Git (worktree support) | Yes |
145
51
 
146
- ---
147
-
148
- ## Adoption
149
-
150
- pi-spine is published on [npm](https://www.npmjs.com/package/pi-spine) and [pi.dev](https://pi.dev/packages/pi-spine).
52
+ ## Install
151
53
 
152
54
  ```bash
153
- npm install -g pi-spine
154
- # or from pi:
155
55
  pi install npm:pi-spine
56
+ # or: npm install -g pi-spine
156
57
  ```
157
58
 
158
- For development from a git checkout or local path (slash commands, `spine` CLI without publishing), see **[docs/adoption/local-install.md](docs/adoption/local-install.md)**. After install, `spine doctor` warns when a stale global `spine` on PATH does not match your checkout.
59
+ For git/path development installs, see **[local-install.md](docs/adoption/local-install.md)**. After install, `spine doctor` warns when a stale global `spine` on PATH does not match your checkout.
159
60
 
160
61
  | Doc | Purpose |
161
62
  |-----|---------|
162
- | [local-install.md](docs/adoption/local-install.md) | Git/path install for development |
163
63
  | [bootstrap-checklist.md](docs/adoption/bootstrap-checklist.md) | First-time consumer setup |
164
- | [operator-runbook.md](docs/adoption/operator-runbook.md) | Daily operator procedures (preflight, land loop, recovery) |
165
- | [real-project-readiness.md](docs/adoption/real-project-readiness.md) | Phase 9 adoption plan |
166
-
167
- ### Task authoring (`create-spine-tasks` skill)
168
-
169
- After `pi install /path/to/pi-spine -l`, the **`create-spine-tasks`** skill is available in pi. Use it to decompose a PRD or feature brief into `spine-tasks/<ID>-<slug>/` folders (`PROMPT.md`, `STATUS.md`, `dependencies.json` updates).
170
-
171
- Example prompt in pi:
172
-
173
- ```text
174
- Use the create-spine-tasks skill to break docs/PRD.md into M-sized SP-* tasks
175
- under spine-tasks/. Update CONTEXT.md and dependencies.json.
176
- ```
177
-
178
- Skill source: [`skills/create-spine-tasks/SKILL.md`](skills/create-spine-tasks/SKILL.md). See [bootstrap-checklist.md](docs/adoption/bootstrap-checklist.md) for the greenfield flow.
179
-
180
- ### Cursor rules (contributors)
181
-
182
- The repo ships [`.cursor/rules/`](.cursor/rules/) for Cursor IDE sessions. Rules are versioned in git (no secrets or machine-local paths).
183
-
184
- **Primary subset for pi-spine** (Node.js CLI / `.mjs` codebase):
185
-
186
- | Rule | Role |
187
- |------|------|
188
- | [`critical-rules-quick-reference.mdc`](.cursor/rules/critical-rules-quick-reference.mdc) | Always-on condensed anti-patterns |
189
- | [`general-llm-anti-patterns.mdc`](.cursor/rules/general-llm-anti-patterns.mdc) | Universal LLM coding pitfalls |
190
- | [`javascript-3-development-standards.mdc`](.cursor/rules/javascript-3-development-standards.mdc) | JS/TS/MJS standards (globs on `**/*.{js,mjs,cjs,ts,tsx}`) |
191
- | [`owasp-secure-coding-practices.mdc`](.cursor/rules/owasp-secure-coding-practices.mdc) | Security baseline (evidence exec, CLI) |
192
- | [`git-workflow-and-pr.mdc`](.cursor/rules/git-workflow-and-pr.mdc) | Commits, PRs, CI expectations |
193
- | [`documentation-policy.mdc`](.cursor/rules/documentation-policy.mdc) | When to write docs vs task packets |
194
- | [`taskplane-task-authoring.mdc`](.cursor/rules/taskplane-task-authoring.mdc) | Authoring `PROMPT.md` / `STATUS.md` |
195
- | [`taskplane-worker-cursor.mdc`](.cursor/rules/taskplane-worker-cursor.mdc) | Executing task packets in Cursor |
196
- | [`engineering-philosophy.mdc`](.cursor/rules/engineering-philosophy.mdc) | Design trade-offs |
197
- | [`cursor-integration.mdc`](.cursor/rules/cursor-integration.mdc) | Rules vs skills in Cursor |
198
-
199
- **Phase / milestone audits:** follow [`.cursor/rules/audit-workflow.mdc`](.cursor/rules/audit-workflow.mdc). For pi-spine, invoke the JavaScript audit ([`javascript-3-brutal-audit.mdc`](.cursor/rules/javascript-3-brutal-audit.mdc)) after major phases.
200
-
201
- **Spine batch workers:** When `.cursor/rules/` exists, pi-spine auto-selects rules per task (PROMPT File Scope + committed manifest) and injects them into worker prompts (FR-WORK-05). Glob-triggered language packs (Swift, Python, Java, Go, Rust, AWS, iOS, Obsidian) load when File Scope matches their frontmatter globs. **`taskplane-worker-cursor.mdc`** is always included via the default rules profile. Explicit `config.standards` paths **append** after auto-selection. See [docs/design/cursor-rules-discovery.md](docs/design/cursor-rules-discovery.md).
202
-
203
- **CLI:** `spine rules discover`, `spine rules sync`, `spine rules select --task <id> [--role worker|reviewer]` — run `sync` after rule changes and commit `.spine/rules-manifest.json`. Reviewer selection (FR-REV-08): `spine rules select --task <id> --role reviewer --review-type plan|code|final`.
204
-
205
- ---
64
+ | [operator-runbook.md](docs/adoption/operator-runbook.md) | Daily operator procedures |
65
+ | [cursor-rules-discovery.md](docs/design/cursor-rules-discovery.md) | Contributor Cursor rules (contributors) |
206
66
 
207
67
  ## Quick start
208
68
 
209
- ```bash
210
- # Install the pi package (when published)
211
- pi install npm:pi-spine
212
-
213
- # In your project repo
214
- cd my-project
215
- spine init
216
- spine doctor
217
- spine plan all
218
- spine preflight
219
- ```
220
-
221
- Run **`spine preflight`** before every batch (FR-BATCH-11). It verifies:
222
-
223
- | Check | Requirement |
224
- |-------|-------------|
225
- | Doctor | `spine doctor` passes (Node, git, pi, config, agents, model provider) |
226
- | Git clean | No uncommitted changes in the working tree |
227
- | No active batch | No healthy active batch in `.spine/batch-state.json` (or Taskplane `.pi/batch-state.json`) |
228
- | Tasks root | Configured tasks folder exists with discoverable `PROMPT.md` task folders |
229
- | Dependencies | `{tasksRoot}/dependencies.json` parses and references valid task IDs |
230
- | Wave plan | Dependency waves and lane assignment (same output as `spine plan all`) |
231
-
232
- `spine doctor` also prints an advisory **lanes.maxParallel sizing** line when config is valid: configured value vs a conservative suggestion from CPU count (`floor(cpus/2)`, capped at 4). Lanes are parallel agents and git worktrees, not CPU threads — the hint never fails doctor; it may warn when `configured > suggested + 1` so you can lower `.spine/spine-config.json` → `lanes.maxParallel` if API cost or supervision feels high.
233
-
234
- Use `spine preflight --json` for automation. Exit code is non-zero when any check fails.
235
-
236
- ### Settings (FR-CFG-03)
237
-
238
- Inspect and update registered `.spine/spine-config.json` fields:
239
-
240
- ```bash
241
- spine settings show # all editable fields
242
- spine settings show lanes.maxParallel --json # single value
243
- spine settings set lanes.maxParallel 2 # validate and persist
244
- spine settings set dashboard.port 8110 --dry-run # preview without writing
245
- ```
246
-
247
- Only paths in the editable registry can be changed; invalid values exit non-zero with actionable errors. Writes use atomic tmp + rename.
248
-
249
- ### Batch status and reconciliation
250
-
251
- Reconciled batch diagnosis (FR-BATCH-12–14) derives operator-facing state from task records, git, `.DONE` files, and batch-state — not from raw `phase` alone:
252
-
253
- ```bash
254
- spine status # headline + suggested next command
255
- spine status --diagnose # verbose signal breakdown
256
- spine status --json # automation-friendly output
257
- spine status --verbose # include segment frontier (NFR-OBS-05)
258
- ```
259
-
260
- Output includes `diagnosis`, `headline`, `suggestedCommand`, and optional `alternatives[]` per PRD §18.3. Diagnosis taxonomy (FR-BATCH-13): `running`, `paused`, `needs_retry`, `needs_merge`, `needs_integrate`, `completed`, `completed_manual`, `limbo_stale`, `failed`, `aborted`.
261
-
262
- Reads `.spine/batch-state.json` first, then Taskplane `.pi/batch-state.json` during dogfood. When no batch exists, status reports a healthy idle state with `spine preflight` or `spine plan all` as the suggested next action.
263
-
264
- ### Batch dismiss, complete, and next action
265
-
266
- Archive-first lifecycle for terminal limbo (FR-BATCH-15–16, §18.6):
267
-
268
- ```bash
269
- spine batch dismiss --reason "manual recovery" # limbo_stale, completed_manual, aborted
270
- spine batch complete --detect-manual-merge # after manual merge to main
271
- spine batch complete --batch ID # orch on main + merge satisfied (FR-BATCH-16)
272
- spine integrate [--dry-run] # merge orch branch → main (FR-INT-01)
273
- spine next # print suggestedCommand from reconciliation
274
- spine next --execute # run suggested command (dismiss, preflight, etc.)
275
- ```
276
-
277
- **Post-batch landing on `main`** (after `spine batch start` succeeds):
278
-
279
- 1. `spine status --diagnose` — expect `needs_integrate` when orch has commits not on `main`
280
- 2. `spine gate status` — review evidence under `.spine/runtime/{batchId}/evidence/`
281
- 3. `spine gate approve` — required when `gates.requireBeforeIntegrate` is true
282
- 4. `spine integrate` — local `--no-ff` merge of `orchBranch` → `baseBranch` (journal `integrate.started` / `integrate.completed`)
283
- 5. `spine batch complete` — archive batch record (refuses if orch is ahead of `main` but not merged; refuses **empty orch** when `mergeResults` claim success)
284
- 4. Push `main` to your remote when ready (pi-spine never auto-pushes)
285
-
286
- `spine batch complete` validates orch integration using `countCommitsAhead` (same guard family as lane **EmptyMerge** at merge time). When `gates.requireBeforeIntegrate` is true, integrate is blocked until you approve the evidence bundle.
287
-
288
- ```bash
289
- spine gate status # pending integrate gate + evidence paths
290
- spine gate approve # required before integrate (exit 2 if skipped)
291
- spine gate reject --reason "…" # refuse merge; journals gate.rejected
292
- spine integrate # merge after approval
293
- spine integrate --force-integrate # bypass only with SPINE_ALLOW_FORCE=1 (journaled)
294
- ```
295
-
296
- Evidence is collected under `.spine/runtime/{batchId}/evidence/` (`summary.md` is an honest post-mortem per NFR-OBS-03, plus `diff-stat.txt` and optional test/build output from `spine-config.json` or `.pi/taskplane-config.json`). `spine batch dismiss` / `complete` also write `.spine/runtime/{batchId}/post-mortem.md` and record the path in `batch-history.json`.
297
-
298
- In pi: `/spine-gate` and `/spine-integrate` delegate to `spine gate` and `spine integrate`.
299
-
300
- **Limbo recovery playbook** (Taskplane batch red, all tasks green, empty `mergeResults`):
301
-
302
- 1. `spine status --diagnose` — expect `limbo_stale` or `completed_manual`
303
- 2. If work is already on `main`: `spine batch complete --detect-manual-merge`
304
- 3. If batch should be cleared without claiming merge: `spine batch dismiss --reason …`
305
- 4. Do not hand-edit `.pi/batch-state.json`; pi-spine archives to `.spine/runtime/{batchId}/archive/` first
306
-
307
- In pi: `/spine-dismiss`, `/spine-next`, and `/spine` route to the same reconciliation (never suggest pause for terminal limbo).
308
-
309
- ### Wave planning
310
-
311
- Preview dependency waves and parallel lanes before starting a batch (FR-SCHED-01–06):
312
-
313
- ```bash
314
- spine plan all # all discovered tasks (full backlog)
315
- spine plan pending # tasks without `.DONE` marker
316
- spine plan TP-008 # explicit task ID(s)
317
- spine plan 'taskplane-tasks/TP-008-*' # glob on task folder paths
318
- spine plan pending --json # JSON plan; scope.mode pending + excluded count
319
- ```
320
-
321
- Each `spine plan` run writes a plan artifact to `.spine/runtime/plan-{timestamp}.json`.
322
-
323
- **Waves, lanes, and ticks:** A **wave** is a dependency group — tasks in wave *N* start only after wave *N−1* merges. Within a wave, the planner assigns **virtual lanes** from file-scope overlap: disjoint scopes get separate lanes (parallel up to `lanes.maxParallel`); overlapping scopes share one lane (serialized on one worktree). A **tick** queues virtual lanes when there are more lanes than `maxParallel` (tick 0 runs lanes 0…`maxParallel−1`, tick 1 runs the rest, and so on). The batch engine runs **one worker at a time per physical lane/worktree** and parallelizes only across distinct lane numbers in the same tick. The dashboard **Lanes** table shows **Active tasks** (running/pending in the current wave on that lane) separately from **Batch assignment** (all tasks ever bound to the lane).
324
-
325
- ### Running a batch (Phase 2–5)
326
-
327
- pi-spine runs batches without Taskplane `/orch`. **Single-task** batches always work. **Multi-task** batches are allowed when the plan has one wave with multiple virtual lanes (disjoint file scopes), when scope is explicit (task IDs), or when scope is **`pending`** (unfinished tasks only). **`spine batch start all`** resolves to the same pending-filtered set as `pending` (unlike `spine plan all`, which previews the full backlog):
328
-
329
- ```bash
330
- spine preflight # required (FR-BATCH-11)
331
- spine batch start TP-012 # one task (detached engine; returns immediately)
332
- spine batch start TP-012 --attached # foreground engine (blocks until batch completes)
333
- spine batch start TP-997 TP-998 # explicit multi-task (one wave, parallel lanes)
334
- spine batch start pending # all tasks without `.DONE`, dependency order
335
- spine batch start all # same as pending (not full backlog)
336
- spine run pending # alias for batch start (PRD §15.2 automation)
337
- spine run pending --dry-run --skip-preflight # flag passthrough
338
- spine batch start TP-012 --dry-run # preflight + plan only
339
- spine batch start TP-012 --json # machine-readable result
340
- ```
341
-
342
- If every discovered task has a `.DONE` marker, `pending` / `all` batch start fails fast: `No pending tasks (all discovered tasks have .DONE).` Tasks that already have `.DONE` on disk are skipped before the worker runs (journal event `task.skipped_done_on_disk`). Wave integrate / `batch complete` between waves is still manual — pi-spine does not auto-integrate mid-batch.
343
-
344
- **What happens:** preflight → planner waves + lane ticks (`lanes.maxParallel`, FR-SCHED-03/04) → `.spine/batch-state.json` (schema v1, includes `segments[]`) → one git worktree per physical lane (`.worktrees/spine-{batchId}/lane-N`, branch `task/spine-lane-N-{batchId}`) → workers run in parallel across lanes per tick, serialized within a lane when multiple tasks share it → `.DONE` → **lane auto-commit** → after each wave, **sequential merges** into `orch/spine-{batchId}` (FR-BATCH-08) only when every wave task is `succeeded` or `skipped` (§17.4 mixed-outcome policy; GAP-MERGE-01).
345
-
346
- **Detached by default:** `spine batch start` and `spine batch resume` spawn the batch engine in the background (like `/orch`) and return once `.spine/batch-state.json` shows the batch running again. Monitor with `spine status --diagnose`; engine logs append to `.spine/runtime/detached-engine.log`. Use `--attached` to run the engine in the foreground (previous behavior).
69
+ 1. **Install and init** — `pi install npm:pi-spine` then `cd my-project && spine init && spine doctor`
70
+ 2. **Plan and preflight** — `spine preflight && spine plan all` (pi: `/spine-plan all`)
71
+ 3. **Start a batch** — `spine batch start pending` (pi: `/spine pending`)
72
+ 4. **Monitor** — `spine status --diagnose` (pi: `/spine-status`)
73
+ 5. **Land on main** — `spine gate status` → `spine gate approve` → `spine integrate` (pi: `/spine-gate` → `/spine-integrate`)
347
74
 
348
- **Mixed outcomes:** if any task in a wave is `failed` or still `pending`, merge is blocked, phase becomes `failed`, and messaging names failed IDs with `/spine-retry-task` / `/spine-skip-task` hints (never “batch ran smoothly”). Operator override: `spine batch force-merge --wave 0` then `spine batch resume --force`.
75
+ Full command reference: **[docs/QUICK-REFERENCE.md](docs/QUICK-REFERENCE.md)**.
349
76
 
350
- Workers should still **commit at step boundaries** (see `.spine/agents/worker.md`); auto-commit is a safety net for pi sessions that finish with `.DONE` but forgot to commit.
77
+ ## Commands at a glance
351
78
 
352
- ### Step review (FR-REV, TP-020)
79
+ ### CLI
353
80
 
354
- When a task `PROMPT.md` has **Review Level > 0**, workers call the reviewer after step boundaries:
81
+ | Command | Purpose |
82
+ |---------|---------|
83
+ | `spine init` | Create `.spine/` config and agent stubs |
84
+ | `spine doctor` | Validate Node, git, pi, config |
85
+ | `spine preflight` | Required checks before batch start |
86
+ | `spine plan all` / `pending` | Preview dependency waves and lanes |
87
+ | `spine batch start pending` | Run unfinished tasks in dependency order |
88
+ | `spine status --diagnose` | Reconciled batch diagnosis + next action |
89
+ | `spine batch pause` / `resume` | Stop or continue scheduling |
90
+ | `spine gate status` / `approve` | Review evidence; approve integrate |
91
+ | `spine integrate` | Merge orch branch → main |
92
+ | `spine dashboard` | Local SSE dashboard (default port 8109) |
355
93
 
356
- ```bash
357
- spine review step --step 1 --type plan # level >= 1
358
- spine review step --step 1 --type code # level >= 2 (optional --baseline <sha>)
359
- ```
360
-
361
- - Verdicts: structured JSON `{ "verdict": "APPROVE"|"REVISE", "feedback": "..." }` (also written in the review artifact)
362
- - Artifacts: `{taskFolder}/.reviews/{step}-{timestamp}.md`
363
- - Journal: `review.started`, `review.completed`, `review.failed`
364
- - **Fail closed (FR-REV-06):** if review spawn fails at level > 0, the worker stops (non-zero exit) — no silent skip
365
-
366
- Reviewer model is configured separately in `.spine/spine-config.json` (`agents.reviewer`).
367
-
368
- ### Worker Pi tools (PRD §14.5)
369
-
370
- Lane workers register three spine tools via `registerSpineWorkerTools`: `spine_review_step`, `spine_report_progress`, and `spine_request_gate`.
371
-
372
- **`spine_request_gate` limitation (v2.2):** Permanent `not_supported` for all gate kinds (`integrate`, `manual`, `conflict`). Workers cannot open or refresh human gates; the tool returns structured JSON with `suggestedCommand: spine gate approve` so models do not invent host commands. **Operator workaround:** run `spine gate status` and `spine gate approve` from a **host shell** — not from inside a worker session. Integrate gates still open automatically when the batch engine completes a wave.
373
-
374
- See [operator runbook §5.1](docs/adoption/operator-runbook.md#51-worker-spine_request_gate-fr-ship-13--v22) and [worker-gate-inventory.md](docs/design/worker-gate-inventory.md).
375
-
376
- ### Pause and resume (Phase 3 — single and multi lane)
377
-
378
- ```bash
379
- spine batch pause # stop scheduling; journal batch.paused
380
- spine batch resume # continue paused batch (detached; returns immediately)
381
- spine batch resume --attached # foreground resume (blocks until batch completes)
382
- spine batch resume --force # resume failed batch after stale lane state
383
- spine batch pause --json
384
- ```
385
-
386
- Resume skips tasks already marked complete via `.DONE` or journal `task.completed`, respawns workers in existing lane worktrees for pending segments across all lanes, logs `batch.resumed` with `{ resumeForced, pendingSegments }`, then runs lane commit + merge per wave.
387
-
388
- Multi-task batches (more than one task or lane) use the same commands; validation and execution resume pending tasks in parallel within each wave, then merge succeeded lane branches into the orch branch.
389
-
390
- In pi: `/spine-pause` and `/spine-resume` delegate to `spine batch pause|resume`. When `spine status` reports `diagnosis: paused`, the suggested command is `spine batch resume` (not Taskplane pause).
391
-
392
- ### Abort (Phase 3 — archive-first, §18.6)
393
-
394
- Stop a batch without losing recoverable state (closes GAP-ABORT-01):
395
-
396
- ```bash
397
- spine batch abort # graceful: abort signal; worker may finish step boundary
398
- spine batch abort --hard # SIGKILL lane workers; remove worktrees (configurable)
399
- spine batch abort --reason "stall kill" # journal reason on batch.aborted
400
- spine batch abort --hard --json
401
- ```
94
+ ### pi slash commands
402
95
 
403
- **Archive-first:** pi-spine always writes `.spine/runtime/{batchId}/archive/batch-state.json` (including `segments[]`) **before** clearing `.spine/batch-state.json` or Taskplane `.pi/batch-state.json`. The journal append-only log is preserved; `batch.aborted` is appended with reason and prior tail metadata.
96
+ | Command | Purpose |
97
+ |---------|---------|
98
+ | `/spine-plan all` | Preview waves and lanes |
99
+ | `/spine pending` | Start batch for pending tasks |
100
+ | `/spine-status` | Batch diagnosis + lane health |
101
+ | `/spine-gate` | Gate inspection and resolution |
102
+ | `/spine-integrate` | Merge orch branch after gate approval |
103
+ | `/spine-dashboard` | Start dashboard in background |
404
104
 
405
- Graceful abort writes `.spine/runtime/{batchId}/abort-signal.json` (`hard: false`). The worker host polls this signal and sends SIGTERM so the worker can exit at the next poll boundary. Hard abort sets `hard: true`, kills `lane.workerPid` when recorded, and removes lane worktrees unless `lanes.cleanupWorktreesOnHardAbort` is `false` in `.spine/spine-config.json`.
406
-
407
- In pi: `/spine-abort` and `/spine-abort --hard` delegate to `spine batch abort`. When a batch was aborted, `spine status` reports `diagnosis: aborted` — use `spine batch dismiss` to clear limbo if needed.
408
-
409
- ### Retry and skip (Phase 3)
410
-
411
- When a task fails or segment state drifts (Taskplane GAP-RETRY-01), reset task + segments atomically before resume:
412
-
413
- ```bash
414
- spine batch retry TP-012 # reset task + segments; journal pendingSegments
415
- spine batch skip TP-012 # skip failed task; unblock wave merge (FR-BATCH-10)
416
- spine batch force-merge --wave 0 # operator override for §17.4 (then resume --force)
417
- spine batch retry TP-012 --json
418
- ```
419
-
420
- Retry clears task timestamps, resets all segment records for the task to `pending`, decrements `failedTasks`, and journals `task.retry_requested` with `{ taskId, previousClassification, pendingSegments }`. Resume refuses segment drift (`RetrySegmentDrift`) until retry or `--force`.
421
-
422
- In pi: `/spine-retry-task <taskId>` and `/spine-skip-task <taskId>` delegate to `spine batch retry|skip`. When `spine status` reports `diagnosis: needs_retry`, the suggested command is `/spine-retry-task {id}`.
423
-
424
- **Runtime layout:**
425
-
426
- | Path | Purpose |
427
- |------|---------|
428
- | `.spine/batch-state.json` | Active batch (pi-spine native; not `.pi/batch-state.json`) |
429
- | `.spine/batch-history.json` | Terminal batch summaries (complete/dismiss/aborted) |
430
- | `.spine/runtime/{batchId}/archive/batch-state.json` | Archived batch snapshot after abort/dismiss/complete |
431
- | `.spine/runtime/{batchId}/abort-signal.json` | In-flight abort request (graceful or hard) |
432
- | `.spine/runtime/{batchId}/journal/events.jsonl` | Append-only journal |
433
- | `.worktrees/spine-{batchId}/lane-N` | Lane worktree (N = 1 … `lanes.maxParallel`) |
434
-
435
- **Recovery:** `spine status --diagnose` → `spine batch dismiss` or `spine batch complete` (same as Phase 1b lifecycle).
436
-
437
- **Multi-task paused batch:** when more than one task is still pending, `spine status --diagnose` reports `diagnosis: paused` with a headline naming how many tasks remain (for example, “2 tasks pending — use spine batch resume (multi-task)”). Run `spine batch resume` (detached by default) to continue all lanes; use `--attached` to block until the batch finishes. This replaces the Phase 8 workaround of starting a fresh single-task batch after a multi-task pause (batch `20260602T181027`).
438
-
439
- ### Journal replay and state validation (TP-014)
440
-
441
- Audit orchestration timelines and validate batch-state cache integrity:
442
-
443
- ```bash
444
- spine journal replay --batch 20260601T120000 # human table: time | type | lane | task | summary
445
- spine journal replay --batch 20260601T120000 --json
446
- spine state validate # active .spine/batch-state.json
447
- spine state validate --batch 20260601T120000 # archived runtime copy
448
- spine state validate --diagnose # extra context on validation failure
449
- ```
450
-
451
- Journal events use **schema v1** (`schemaVersion`, `eventId`, ISO `timestamp`, optional `correlationId`, `payload`). Legacy JSONL lines without `schemaVersion` remain readable.
452
-
453
- On **complete** or **dismiss**, pi-spine appends a summary entry to `.spine/batch-history.json` and writes terminal journal events (`batch.completed` / `batch.dismissed`).
454
-
455
- **CI / tests without `pi`:** set `SPINE_WORKER_STUB=1` so the worker runner touches `.DONE` instead of spawning `pi` (see `bin/spine-worker-runner.mjs`). Use `SPINE_WORKER_STUB_FAIL_TASKS=TP-998` (comma-separated) to simulate task failure for mixed-outcome tests.
456
-
457
- **Heartbeat and stall (TP-013):** during a batch, the engine polls lane progress (STATUS.md mtime, lane-branch commits) and appends `lane.heartbeat` to the journal on an interval (default 10 minutes). Stall kill uses §18.4 grace after progress. Configure in `.spine/spine-config.json`:
458
-
459
- ```json
460
- "lanes": {
461
- "stallTimeoutMinutes": 60,
462
- "stallGraceAfterProgressMinutes": 15,
463
- "heartbeatIntervalMinutes": 10
464
- }
465
- ```
466
-
467
- With `pi` on PATH, `spine batch start` runs `pi -p` against the task `PROMPT.md` (disable via `SPINE_WORKER_PI_AGENT=0`).
468
-
469
- Do **not** run `spine batch start` and Taskplane `/orch` on the same repo concurrently.
470
-
471
- In a pi session (`/spine` runs preflight before batch guidance; `/spine-plan` invokes the planner):
472
-
473
- | Command | Status |
474
- |---------|--------|
475
- | `/spine` | Preflight + `spine batch start` for a **single** task ID (Phase 2) |
476
- | `/spine-plan` | Preview waves and lanes (usage: `/spine-plan <all\|paths>`) |
477
- | `/spine-status` | Reconciled batch diagnosis + lane health (FR-BATCH-14) |
478
- | `/spine-dismiss` | `spine batch dismiss` (limbo / completed_manual) |
479
- | `/spine-next` | `spine next` — suggested next command |
480
- | `/spine-pause` | `spine batch pause` — stop scheduling |
481
- | `/spine-resume` | `spine batch resume` — continue paused or failed batch |
482
- | `/spine-abort` | `spine batch abort` — archive-first abort (`--hard` kills workers) |
483
- | `/spine-retry-task` | `spine batch retry <taskId>` — retry failed task |
484
- | `/spine-skip-task` | `spine batch skip <taskId>` — skip failed task |
485
- | `/spine-gate` | Gate inspection and resolution (`spine gate status`, `approve`, `reject`) |
486
- | `/spine-integrate` | Merge orch branch → `main` (`spine integrate`; requires gate approval) |
487
- | `/spine-settings` | Editable config menu + inline `set` (delegates to `spine settings`) |
488
- | `/spine-deps` | Show dependency graph (`spine deps`; usage: `/spine-deps <all\|paths>`) |
489
- | `/spine-dashboard` | Start local SSE dashboard (`spine dashboard` in background) |
490
- | `/spine-validate` | `spine tasks validate` — PROMPT packet validation |
491
- | `/spine-handoff` | `spine handoff` — session handoff artifact |
492
-
493
- Implemented slash commands include **`/spine`**, **`/spine-plan`**, **`/spine-status`**, **`/spine-dismiss`**, **`/spine-next`**, **`/spine-pause`**, **`/spine-resume`**, **`/spine-abort`**, **`/spine-retry-task`**, **`/spine-skip-task`**, **`/spine-gate`**, **`/spine-integrate`**, **`/spine-settings`**, **`/spine-deps`**, **`/spine-dashboard`**, **`/spine-validate`**, and **`/spine-handoff`**. **`/spine <task-id>`** starts a single-task batch when preflight passes. **`/spine`** runs `spine preflight` first and blocks batch guidance when preflight fails. Example flow:
105
+ ## How it works
494
106
 
495
107
  ```text
496
- spine preflight # required before batch (FR-BATCH-11)
497
- /spine-plan all # preview waves and lanes
498
- /spine all # run the batch
499
- /spine-status # monitor progress
500
- /spine-gate # review evidence before merge
501
- /spine-integrate # merge orch branch (after gate approval)
502
- ```
503
-
504
- Optional: run the dashboard in another terminal or from pi with `/spine-dashboard`:
505
-
506
- ```bash
507
- spine dashboard # default http://127.0.0.1:8109
508
- spine dashboard --port 8110 # override CLI port
108
+ preflight → plan waves → batch start (worktree lanes)
109
+ → workers (PROMPT/STATUS, .DONE) → lane merge → orch branch
110
+ → gate approve → integrate → main
509
111
  ```
510
112
 
511
- As soon as the server is listening, the CLI prints the browser URL, listen address, SSE note, suggested `spine status` / `spine batch start` commands, and API paths (keep the terminal open while the dashboard runs).
512
-
513
- Set `dashboard.port` in `.spine/spine-config.json` (default **8109**, avoids Taskplane port 8099). Example from `spine init`:
514
-
515
- ```json
516
- "dashboard": {
517
- "port": 8109
518
- }
519
- ```
113
+ Waves serialize dependency groups; lanes parallelize disjoint file scopes within a wave. See **[EXECUTION-FLOW-DIAGRAMS.md](docs/EXECUTION-FLOW-DIAGRAMS.md)** and **[EXECUTION-FLOW.md](docs/EXECUTION-FLOW.md)** for lifecycle detail.
520
114
 
521
- The browser UI streams reconciled snapshots over SSE (`/api/events`, **2s** poll interval per NFR-OBS-02). Panels: batch summary, **diagnosis banner** (badge color from `diagnosis`, not raw `phase`), copyable CLI action chips (primary + `alternatives[]` — run commands in your terminal; no HTTP mutations), wave progress (with a lane ≠ wave reminder), lane table (**Active tasks** vs **Batch assignment**), integrate gate, and journal tail. Diagnosis fields match `spine status --json` and `buildDashboardSnapshot()` (NFR-OBS-04 / GAP-UX-03).
115
+ ## Best-of-N (dev script)
522
116
 
523
- ---
117
+ `scripts/best-of-n.mjs` runs the same prompt through multiple pi models in parallel worktrees — for comparing outputs, not production batches. Git checkout only; not shipped on npm. See **[docs/QUICK-REFERENCE.md](docs/QUICK-REFERENCE.md)** (dev scripts) and `scripts/best-of-n.mjs`.
524
118
 
525
119
  ## Migrating from Taskplane
526
120
 
527
- If you already use Taskplane task folders:
528
-
529
121
  1. Install pi-spine in the same or a new repo.
530
122
  2. `spine init` then `spine doctor`
531
- 3. Migrate config from `.pi/taskplane-config.json` (see `spine migrate-from-taskplane`).
123
+ 3. Migrate config from `.pi/taskplane-config.json` (`spine migrate-from-taskplane`).
532
124
  4. Run `/spine-plan all` and compare to your last Taskplane plan.
533
125
 
534
- Do **not** run Taskplane and pi-spine batches on the same repo at the same time.
535
-
536
- ---
126
+ Do **not** run Taskplane and pi-spine batches on the same repo concurrently. See **[bootstrap-checklist.md](docs/adoption/bootstrap-checklist.md)**.
537
127
 
538
128
  ## Project status
539
129
 
540
- **v1.0.1 published** on [npm](https://www.npmjs.com/package/pi-spine) and [pi.dev](https://pi.dev/packages/pi-spine). Install with `npm install -g pi-spine` or `pi install npm:pi-spine`. API may still evolve in patch releases; see release notes in git tags and `docs/release/`.
541
-
542
- ## Continuous integration
543
-
544
- Every push and pull request to `main` runs [GitHub Actions CI](.github/workflows/ci.yml): `npm ci`, `npm run typecheck`, `npm test` (when defined), **`npm run coverage:check`** (≥77% line coverage on `src/`, `bin/`, `extensions/`), and CLI smoke checks (`spine version`, `help`, `doctor`). `spine init` sets `testing.testWithCoverage` to the same command by default.
130
+ **v1.1.0** on [npm](https://www.npmjs.com/package/pi-spine) and [pi.dev](https://pi.dev/packages/pi-spine). API may still evolve in patch releases; see git tags and **[docs/release/](docs/release/)**.
545
131
 
546
- ---
132
+ CI runs on every push and PR: typecheck, tests, coverage, and CLI smoke checks — see **[.github/workflows/ci.yml](.github/workflows/ci.yml)** and **[npm-publish.md](docs/release/npm-publish.md)**.
547
133
 
548
134
  ## Documentation
549
135
 
550
136
  | Document | Purpose |
551
137
  |----------|---------|
552
- | [docs/PRD.md](docs/PRD.md) | Product requirements and implementation contract (v1.2) |
553
- | [docs/PRD-v1.3-upstream-execution-bridge.md](docs/PRD-v1.3-upstream-execution-bridge.md) | v1.3 addendum: validate, explore, final verdict, handoff, metrics |
554
- | [docs/adoption/upstream-execution-workflow.md](docs/adoption/upstream-execution-workflow.md) | Authoring → validation → batch (optional zero-pi upstream) |
555
- | [docs/adoption/local-install.md](docs/adoption/local-install.md) | Git/path install for development |
138
+ | [docs/PRD.md](docs/PRD.md) | Product requirements and implementation contract |
139
+ | [docs/QUICK-REFERENCE.md](docs/QUICK-REFERENCE.md) | Operator command reference |
140
+ | [docs/EXECUTION-FLOW.md](docs/EXECUTION-FLOW.md) | Batch lifecycle and scheduling |
141
+ | [docs/adoption/why-pi-spine.md](docs/adoption/why-pi-spine.md) | Positioning vs Taskplane, Babysitter, pi-conductor |
556
142
  | [docs/adoption/operator-runbook.md](docs/adoption/operator-runbook.md) | Daily operator procedures |
557
- | [docs/adoption/real-project-readiness.md](docs/adoption/real-project-readiness.md) | Phase 9 adoption plan |
558
- | pi.dev package page | Install and package manifest (when published) |
559
-
560
- ---
143
+ | [docs/adoption/bootstrap-checklist.md](docs/adoption/bootstrap-checklist.md) | First-time setup |
561
144
 
562
145
  ## License
563
146
 
564
147
  MIT (intended).
565
-
566
- ---
567
-
568
- ## Related projects
569
-
570
- - [Taskplane](https://pi.dev/packages/taskplane) — parallel task orchestration for pi
571
- - [Babysitter](https://github.com/a5c-ai/babysitter) — event-sourced workflow SDK
572
- - [pi-conductor](https://www.npmjs.com/package/@feniix/pi-conductor) — durable agent control plane for pi
573
- - [pi-subagents](https://www.npmjs.com/package/pi-subagents) — optional delegation layer (planned v1.1 backend)
574
-
575
- pi-spine respects these tools: it composes their best patterns rather than replacing them outright.