pi-spine 1.4.0 → 1.6.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 (36) hide show
  1. package/bin/spine-batch.mjs +3 -2
  2. package/bin/spine.mjs +12 -0
  3. package/extensions/spine/slash-commands.ts +170 -1
  4. package/package.json +6 -3
  5. package/skills/create-spine-tasks/SKILL.md +13 -1
  6. package/skills/create-spine-tasks/references/contract-template.md +6 -3
  7. package/skills/create-spine-tasks/references/requirements-checklist-template.md +1 -0
  8. package/skills/spine-orchestrate-waves/SKILL.md +200 -0
  9. package/skills/spine-orchestrate-waves/references/outer-loop.md +165 -0
  10. package/skills/spine-release-operator/SKILL.md +341 -0
  11. package/skills/spine-release-operator/references/issue-intake-checklist.md +107 -0
  12. package/skills/spine-release-operator/references/issue-template.md +51 -0
  13. package/skills/spine-release-operator/references/release-manifest-template.md +76 -0
  14. package/skills/spine-release-operator/references/release-profiles.md +100 -0
  15. package/src/batch/batch-state-io.mjs +137 -0
  16. package/src/batch/contract-prelanded.mjs +116 -14
  17. package/src/batch/contract-verify.mjs +48 -2
  18. package/src/batch/diagnosis-alternatives.mjs +8 -0
  19. package/src/batch/diagnosis.mjs +28 -2
  20. package/src/batch/engine-lanes/commit.mjs +6 -0
  21. package/src/batch/engine.mjs +10 -1
  22. package/src/batch/integrate-worktree.mjs +65 -15
  23. package/src/batch/lane-dirty-check.mjs +124 -0
  24. package/src/batch/lifecycle.mjs +10 -6
  25. package/src/batch/reconcile.mjs +254 -0
  26. package/src/batch/sequence-waves.mjs +221 -0
  27. package/src/batch/sequence.mjs +117 -4
  28. package/src/batch/state.mjs +18 -1
  29. package/src/cli/batch-complete.mjs +16 -0
  30. package/src/cli/sync-base.mjs +354 -0
  31. package/src/config/defaults.mjs +8 -1
  32. package/src/config/spine-preflight-lib.mjs +146 -2
  33. package/src/doctor/agents-model-inherit.mjs +318 -0
  34. package/src/doctor/run-doctor-checks.mjs +14 -0
  35. package/templates/spine-config.json +4 -0
  36. package/templates/spine-worktree-setup-flutter.sh +44 -0
@@ -0,0 +1,165 @@
1
+ # How to orchestrate multi-wave spine batches with an external agent
2
+
3
+ > **Sync source:** `docs/adoption/agent-orchestrated-waves.md` (canonical). Update the doc first, then re-copy here when content changes.
4
+
5
+ Run all pending tasks across multiple dependency waves without manual intervention between each step. An **external agent** (pi, OpenCode, Cursor, CI script) drives the land loop between waves while spine owns batch execution, review, and integrate gates.
6
+
7
+ **Gate approval by the external agent is intentional** — spine workers return `not_supported` from `spine_request_gate` (FR-SHIP-13). The agent-as-operator model decouples wave scheduling from engine internals.
8
+
9
+ ---
10
+
11
+ ## Prerequisites
12
+
13
+ - pi-spine installed and configured ([bootstrap-checklist.md](../../../docs/adoption/bootstrap-checklist.md))
14
+ - Tasks decomposed into dependency waves (`spine plan pending` shows wave structure)
15
+ - Familiarity with the [land loop](../../../docs/adoption/operator-runbook.md#4-land-loop)
16
+
17
+ ---
18
+
19
+ ## Responsibility split
20
+
21
+ | Layer | Owns |
22
+ |-------|------|
23
+ | **Spine engine** | Batch start, lane provisioning, worker spawn, review, contract verify, lane→orch merge, gate evidence, journal |
24
+ | **External agent** | Wave selection, `spine wait`, evidence review, `gate approve`, integrate decision, retry/dismiss, conflict resolution |
25
+
26
+ The engine never auto-approves the integrate gate or pushes to remote — those decisions belong to the operator (human or agent).
27
+
28
+ ---
29
+
30
+ ## Per-wave land loop
31
+
32
+ Run this sequence once per wave from the consumer repo root:
33
+
34
+ ```bash
35
+ spine preflight
36
+ WAVE=0 # agent picks the next wave index from plan output
37
+
38
+ spine batch start pending --wave $WAVE --attached
39
+ spine wait --until completed,needs_integrate,failed,aborted,needs_retry --timeout 4h
40
+
41
+ spine status --diagnose
42
+ # Read headline + suggestedCommand
43
+
44
+ # Land loop (after reviewing evidence)
45
+ spine gate status
46
+ # Inspect .spine/runtime/<batchId>/evidence/
47
+ spine gate approve
48
+ spine integrate
49
+ spine batch complete
50
+ git push origin main
51
+ ```
52
+
53
+ Increment `$WAVE` and repeat until `spine plan pending` shows no remaining waves.
54
+
55
+ ---
56
+
57
+ ## Multi-wave strategy
58
+
59
+ **Preferred: agent repeats per wave.** Each iteration is an independent land loop. The agent reviews evidence, approves or rejects the gate, handles failures, then starts the next wave. This approach:
60
+
61
+ - Decouples from `--auto-approve-gate` (which is stub/CI only)
62
+ - Allows the agent to react to partial wave success
63
+ - Avoids sequence halt issues on merge-blocked waves
64
+
65
+ **Optional: sequence dry-run as script template.** Generate the command sequence without executing:
66
+
67
+ ```bash
68
+ spine run sequence pending --attached --dry-run
69
+ ```
70
+
71
+ The agent can execute each printed block manually with judgment between steps.
72
+
73
+ **Not recommended for real pi:** `spine run sequence pending --auto-approve-gate --force` bypasses evidence review and is restricted to stub/CI environments by safety gates.
74
+
75
+ ---
76
+
77
+ ## Diagnosis → agent action table
78
+
79
+ After `spine wait` returns or `spine status --diagnose` reports a non-running state:
80
+
81
+ | Diagnosis | Agent action |
82
+ |-----------|--------------|
83
+ | `needs_integrate` | Review evidence under `.spine/runtime/<batchId>/evidence/` → `spine gate approve` → `spine integrate` → `spine batch complete` → push |
84
+ | `needs_retry` | `spine batch retry <taskId>` then `spine batch resume --attached`; amend PROMPT contract if scope is wrong |
85
+ | `needs_retry` + `review_exhausted` | Inspect `.reviews/` feedback; fix implementation or packet scope, then retry |
86
+ | `needs_retry` + `contract_failed` | Edit `PROMPT.md` `testCommand` or file scope, then retry |
87
+ | `failed` | Inspect journal (`spine journal follow`); fix contract/env before retry |
88
+ | `needs_replan` | Read reviewer feedback in `{taskFolder}/.reviews/final-*.md`; edit PROMPT scope, then retry |
89
+ | `merge_blocked` | Resolve conflicts on orch branch or lane worktree; `spine batch resume --force` |
90
+ | `engine_orphaned` | Do **not** start a second attached engine; `spine batch retry <taskId>` or `spine batch resume --attached --force` after confirming dead PIDs |
91
+ | `worker_orphaned` | `spine batch retry <taskId>` (reconciles orphan running → failed) |
92
+ | `worker_done_missing` | Read worker output log from headline; fix blocker, then `spine batch retry <taskId>` |
93
+ | `completed` | Already landed — run `spine batch complete` if not archived, then push |
94
+
95
+ ---
96
+
97
+ ## Anti-patterns
98
+
99
+ | Anti-pattern | Why it fails | Correct approach |
100
+ |--------------|-------------|------------------|
101
+ | Running `spine batch resume --attached` while `spine run sequence --attached` is active | Two engines on the same batch causes state corruption | Use one entry point; kill stale engines first (`spine status --diagnose` to check PIDs) |
102
+ | Approving gate without reading evidence | Merges untested or broken code to main | Always inspect `.spine/runtime/<batchId>/evidence/` before `spine gate approve` |
103
+ | Expecting workers to call `spine_request_gate` for integrate | Workers always receive `not_supported` (FR-SHIP-13) | Agent drives gate approval from the host shell |
104
+ | Using `--auto-approve-gate` with real pi workers | Bypasses evidence review; safety gates block this for real pi | Use per-wave agent loop with explicit gate approval |
105
+ | Starting next wave before land loop completes | Base branch diverges from orch; downstream waves may conflict | Complete `integrate` + `batch complete` + push before next wave |
106
+ | Bare full-suite `testCommand` with large output | Contract verify exceeds `maxBuffer` (10MB) and fails | Scope `testCommand` to relevant test files |
107
+
108
+ ---
109
+
110
+ ## Example: full backlog orchestration
111
+
112
+ ```bash
113
+ #!/usr/bin/env bash
114
+ set -euo pipefail
115
+
116
+ spine preflight
117
+
118
+ WAVES=$(spine plan pending --json | jq '.waveCount')
119
+
120
+ for ((WAVE=0; WAVE<WAVES; WAVE++)); do
121
+ echo "=== Wave $WAVE ==="
122
+
123
+ spine batch start pending --wave "$WAVE" --attached
124
+ spine wait --until completed,needs_integrate,failed,aborted,needs_retry --timeout 4h
125
+
126
+ DIAG=$(spine status --json | jq -r '.diagnosis')
127
+
128
+ if [ "$DIAG" = "needs_integrate" ]; then
129
+ spine gate status
130
+ spine gate approve
131
+ spine integrate
132
+ spine batch complete
133
+ git push origin main
134
+ else
135
+ echo "Wave $WAVE ended with diagnosis: $DIAG"
136
+ echo "Run: spine status --diagnose"
137
+ exit 1
138
+ fi
139
+ done
140
+
141
+ echo "All waves complete."
142
+ ```
143
+
144
+ Adapt for agent sessions: replace the bash loop with agent tool calls (`spine status --json` → parse → branch on diagnosis).
145
+
146
+ ---
147
+
148
+ ## Related docs
149
+
150
+ | Doc | Relevance |
151
+ |-----|-----------|
152
+ | [operator-runbook.md §4](../../../docs/adoption/operator-runbook.md#4-land-loop) | Land loop copy-paste sequence |
153
+ | [bootstrap-checklist.md](../../../docs/adoption/bootstrap-checklist.md) | First batch setup |
154
+ | [upstream-execution-workflow.md](../../../docs/adoption/upstream-execution-workflow.md) | PRD → task packets → batch |
155
+ | [QUICK-REFERENCE.md](../../../docs/QUICK-REFERENCE.md) | Command reference |
156
+ | [spine-orchestrate-waves SKILL.md](../SKILL.md) | pi skill entry with decision tree |
157
+
158
+ ## Related issues
159
+
160
+ - [#90](https://github.com/beettlle/pi-spine/issues/90) — agent-orchestrated multi-wave outer loop
161
+ - [#79](https://github.com/beettlle/pi-spine/issues/79) — `--auto-approve-gate` flag (deprioritized; agent loop replaces need)
162
+ - [#82](https://github.com/beettlle/pi-spine/issues/82) — sequence stops on merge_blocked
163
+ - [#84](https://github.com/beettlle/pi-spine/issues/84) — PROMPT authoring for cross-model
164
+ - [#71](https://github.com/beettlle/pi-spine/issues/71) — built-in supervisor (future; agent outer loop bridges gap)
165
+ - [#54](https://github.com/beettlle/pi-spine/issues/54) — `spine run sequence` (complementary, not replacement)
@@ -0,0 +1,341 @@
1
+ ---
2
+ name: spine-release-operator
3
+ description: End-to-end pi-spine release operator. Intakes open GitHub issues and pending spine tasks, composes a semver-profiled release (docs priority, 3–5 bug fixes, ~1 enhancement for minor), authors and audits small self-contained task packets, executes wave-by-wave batches, verifies tests, and publishes after operator approval. Use when asked to run a spine release cycle, release vX.Y.Z, patch/minor/major release, or ship pi-spine to npm.
4
+ compatibility: Requires spine CLI, gh CLI, git, Node >= 22. Run from pi-spine repo root on main.
5
+ ---
6
+
7
+ # Spine Release Operator
8
+
9
+ You are the **pi-spine release operator**. Drive a **curated release cycle** from intake through publish: select work by semver profile, author/audit task packets, execute batches, verify, and bump version — with **operator approval** before publish.
10
+
11
+ Invoke explicitly: `/skill:spine-release-operator` or "run a spine release cycle for v1.5.1".
12
+
13
+ **Not** for executing all pending tasks — use `spine-autonomous-operator` for that. This skill selects a **subset** fitting the release profile.
14
+
15
+ ## Skill boundaries
16
+
17
+ | Concern | Delegate to |
18
+ |---------|-------------|
19
+ | PROMPT/STATUS/Contract authoring | `create-spine-tasks` skill + templates |
20
+ | Batch land loop / recovery | Phases below (adapted from `spine-autonomous-operator`) |
21
+ | Semver scope budgets | [references/release-profiles.md](references/release-profiles.md) |
22
+ | Issue intake queries | [references/issue-intake-checklist.md](references/issue-intake-checklist.md) |
23
+ | Manifest format | [references/release-manifest-template.md](references/release-manifest-template.md) |
24
+ | npm publish mechanics | `docs/release/npm-publish.md` |
25
+ | Upstream bug filing | [references/issue-template.md](references/issue-template.md) |
26
+
27
+ ## Success criteria
28
+
29
+ 1. Release manifest written and operator-approved
30
+ 2. All **release-scoped** tasks `.DONE` and integrated on `main`
31
+ 3. `spine preflight` green; local test/coverage gates pass
32
+ 4. Operator explicitly approved publish; version bumped and tag pushed (if approved)
33
+ 5. Final report with composition table, issues closed/deferred, verification output
34
+
35
+ ## Hard rules
36
+
37
+ - **Never** hand-edit `.spine/batch-state.json` or `.spine/runtime/**`
38
+ - **Never** implement product code in task folders while a batch owns that scope
39
+ - **Never** claim batch/test/publish success without CLI output
40
+ - **Never** run `npm version` or `git push --tags` without explicit operator approval
41
+ - **Always** parse target version / bump type **before** task selection (Phase 2)
42
+ - **Always** prioritize documentation issues over enhancements
43
+ - **Always** run `spine gate approve` before `spine integrate`
44
+ - **Always** run `npm install` on `main` after successful integrate
45
+ - **Do not** execute tasks outside the approved manifest scope
46
+
47
+ ---
48
+
49
+ ## Phase 0 — Baseline and target version
50
+
51
+ ```bash
52
+ cd <repo-root> # pi-spine root
53
+ spine --version
54
+ spine doctor
55
+ node -p "require('./package.json').version"
56
+ git status
57
+ git branch --show-current # must be main
58
+ ```
59
+
60
+ **Parse invocation** for target version or bump type:
61
+
62
+ | Input | Action |
63
+ |-------|--------|
64
+ | "release for v1.5.1" | Profile = `patch`, target = `1.5.1` |
65
+ | "release for v1.6.0" | Profile = `minor`, target = `1.6.0` |
66
+ | "patch release" | Profile = `patch`, compute next patch from `package.json` |
67
+ | "minor release" | Profile = `minor`, compute next minor |
68
+ | No version given | **Ask operator** for target version or bump type |
69
+
70
+ Read [references/release-profiles.md](references/release-profiles.md) for profile budgets.
71
+
72
+ If not on `main`, stop. If git is dirty, commit or stash hygiene fixes before release work.
73
+
74
+ ---
75
+
76
+ ## Phase 1 — Intake inventory
77
+
78
+ Follow [references/issue-intake-checklist.md](references/issue-intake-checklist.md).
79
+
80
+ **GitHub issues:**
81
+
82
+ ```bash
83
+ gh issue list --repo beettlle/pi-spine --state open --limit 100 \
84
+ --json number,title,labels,body
85
+ gh issue list --repo beettlle/pi-spine --state open --label documentation --json number,title,labels
86
+ gh issue list --repo beettlle/pi-spine --state open --label bug --json number,title,labels
87
+ ```
88
+
89
+ **Pending tasks:**
90
+
91
+ ```bash
92
+ spine plan pending
93
+ spine tasks validate pending
94
+ spine tasks analyze pending
95
+ ```
96
+
97
+ **Map issues to tasks:**
98
+
99
+ ```bash
100
+ rg 'Closes:|Partial:' spine-tasks/*/PROMPT.md
101
+ ```
102
+
103
+ Read `spine-tasks/CONTEXT.md` for `Next Task ID`.
104
+
105
+ **Output:** intake table (issue #, labels, mapped SP-* or gap, bucket, profile fit).
106
+
107
+ ---
108
+
109
+ ## Phase 2 — Compose release manifest
110
+
111
+ Write manifest to:
112
+
113
+ ```
114
+ spine-tasks/_authoring/release-v{TARGET}/manifest.md
115
+ ```
116
+
117
+ Use [references/release-manifest-template.md](references/release-manifest-template.md).
118
+
119
+ ### Selection order (strict)
120
+
121
+ 1. **Documentation first** — all feasible doc items before feature work
122
+ 2. **Bug fixes** — target 3–5 with user impact
123
+ 3. **Enhancements** — per profile (0 for patch, 1–2 for minor)
124
+ 4. **Defer** everything else with one-line rationale
125
+
126
+ ### Apply profile budgets
127
+
128
+ | Profile | Docs | Bugs | Enh | Total cap |
129
+ |---------|------|------|-----|-----------|
130
+ | **patch** | 1–2 small | 3–5 | **0** | 5–8 tasks, S only |
131
+ | **minor** | 2–4 | 3–5 | 1–2 | 10–15 tasks, S/M |
132
+ | **major** | migration + pass | 3–5 critical | multiple | operator-defined |
133
+
134
+ Fill composition audit table. **Do not proceed** on `FAIL` without operator override.
135
+
136
+ ### Operator gate
137
+
138
+ Present manifest summary:
139
+
140
+ - Target version and profile
141
+ - Selected SP-* / issues by bucket
142
+ - Deferred count
143
+ - Profile audit status
144
+
145
+ Require explicit **"approve release scope"** before Phase 3.
146
+
147
+ ---
148
+
149
+ ## Phase 3 — Author gaps and audit packets
150
+
151
+ ### 3.1 Author new tasks (gaps only)
152
+
153
+ For issues in manifest without SP-*:
154
+
155
+ - Follow **`create-spine-tasks`** (lean mode default)
156
+ - Mission: `Closes: #NNN` (or `Partial:` when scoped)
157
+ - Size S/M; ≤4 impl steps; Contract + Testing step
158
+ - Update `dependencies.json`, `CONTEXT.md`, increment `Next Task ID`
159
+
160
+ ### 3.2 Audit release-scoped packets
161
+
162
+ For every task in manifest scope:
163
+
164
+ | Size | Action |
165
+ |------|--------|
166
+ | **S** | Keep if ≤4 impl steps |
167
+ | **M** | OK if disjoint file scope; warn in patch profile |
168
+ | **L/XL** | **Split** before inclusion |
169
+
170
+ **Decompose** when:
171
+ - More than 4 implementation steps
172
+ - Multiple unrelated file areas
173
+ - Same hot file in parallel tasks (serialize via `dependencies.json`)
174
+ - M/L in patch profile
175
+
176
+ **Contract hygiene:**
177
+ - [ ] No trailing `/` in contract paths
178
+ - [ ] No parenthetical paths
179
+ - [ ] Doc paths in File Scope match Documentation Requirements (#144)
180
+ - [ ] `dependencies.json` matches PROMPT `## Dependencies`
181
+ - [ ] Same-wave tasks have disjoint `fileScopeMustChange`
182
+
183
+ ```bash
184
+ spine tasks validate <release-scope>
185
+ spine tasks analyze <release-scope>
186
+ spine plan <release-scope>
187
+ ```
188
+
189
+ ### 3.3 Commit packet changes
190
+
191
+ ```bash
192
+ git add spine-tasks/
193
+ git commit -m "chore(spine): release v{TARGET} task packets"
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Phase 4 — Execute release scope
199
+
200
+ **Scope:** manifest tasks only — build a comma-separated release scope ID list.
201
+
202
+ ```bash
203
+ spine preflight
204
+ spine run sequence <release-scope> --dry-run
205
+ ```
206
+
207
+ For each wave `N` until all release-scoped tasks are `.DONE`:
208
+
209
+ ### 4.1 Start
210
+
211
+ ```bash
212
+ spine batch start <release-scope> --wave N --attached
213
+ ```
214
+
215
+ ### 4.2 Monitor
216
+
217
+ ```bash
218
+ spine status --diagnose
219
+ # or block:
220
+ spine wait --until completed,failed,needs_integrate,needs_retry,aborted --timeout 2h
221
+ ```
222
+
223
+ **Do not** start wave N+1 until wave N is integrated on `main`.
224
+
225
+ Wave sizing: prefer ≤4 M-sized tasks per wave; serialize hot shared files.
226
+
227
+ ### 4.3 Land loop
228
+
229
+ When diagnosis is `needs_integrate` or gate is open:
230
+
231
+ ```bash
232
+ spine gate status
233
+ spine gate approve
234
+ spine integrate
235
+ npm install
236
+ spine batch complete
237
+ ```
238
+
239
+ Verify: `git status` clean, `.DONE` count increased.
240
+
241
+ ### 4.4 Recovery
242
+
243
+ Always: `spine status --diagnose`
244
+
245
+ | Diagnosis | Action |
246
+ |-----------|--------|
247
+ | `running` | Wait; `spine watch` |
248
+ | `paused` | `spine batch resume` |
249
+ | `needs_retry` | Fix packet; `spine batch retry <taskId>` |
250
+ | `worker_orphaned` | abort → dismiss → prune worktree → retry |
251
+ | `needs_integrate` | Land loop |
252
+ | `state_drift` | `spine batch retry <taskId>` (pause first if task still `running`); then `spine batch resume --attached --force` |
253
+ | `failed` / `aborted` | Inspect journal; fix packet; dismiss; retry |
254
+ | Contract fail | Fix PROMPT on main, commit, abort, dismiss, retry |
255
+
256
+ **File upstream issues** for repeat engine faults — see [references/issue-template.md](references/issue-template.md).
257
+
258
+ ---
259
+
260
+ ## Phase 5 — Pre-publish verification (STOP)
261
+
262
+ ```bash
263
+ spine plan <release-scope> # should show 0 pending for scope
264
+ spine preflight
265
+ npm run release:check # typecheck → lint → tests → coverage (CI parity)
266
+ git status
267
+ ```
268
+
269
+ Present checklist from `docs/release/npm-publish.md`:
270
+
271
+ - [ ] All release-scoped tasks done
272
+ - [ ] Preflight green
273
+ - [ ] `npm run release:check` green (includes lint; ≥77% coverage)
274
+ - [ ] Clean git tree
275
+ - [ ] Bump type matches profile: patch | minor | major
276
+
277
+ **Human gate (required):** **STOP HERE.** Do not bump or push until operator explicitly approves publish and confirms bump type.
278
+
279
+ ---
280
+
281
+ ## Phase 6 — Publish (after approval only)
282
+
283
+ Only after operator says "approve publish" / "bump and push":
284
+
285
+ ```bash
286
+ npm version patch # or minor / major — must match Phase 2 profile
287
+ git push && git push --tags
288
+ ```
289
+
290
+ Monitor CI:
291
+
292
+ ```bash
293
+ gh run list --workflow release.yml --limit 3
294
+ ```
295
+
296
+ Post-publish smoke per `docs/release/npm-publish.md`:
297
+
298
+ ```bash
299
+ npm install -g pi-spine@<version>
300
+ spine version
301
+ spine doctor
302
+ ```
303
+
304
+ Update `spine-tasks/CONTEXT.md` release note (version + date).
305
+
306
+ Close GitHub issues where tasks had `Closes: #NNN` and work shipped.
307
+
308
+ ---
309
+
310
+ ## Final report (required)
311
+
312
+ 1. **Release manifest** — path, target version, profile, composition table
313
+ 2. **Tasks completed** — SP-IDs, waves, issues closed
314
+ 3. **Deferred backlog** — count and top items for next release
315
+ 4. **Authoring changes** — new SP-* created, splits/fixes in Phase 3
316
+ 5. **Issues filed** — pi-spine GitHub links or "none"
317
+ 6. **Recovery actions** — aborts, retries, contract fixes
318
+ 7. **Verification** — paste `spine preflight` tail, test/coverage output
319
+ 8. **Publish** — version bumped (Y/N), tag pushed (Y/N), workflow URL, or "awaiting operator approval"
320
+
321
+ ---
322
+
323
+ ## Repo-specific notes (pi-spine)
324
+
325
+ | Item | Value |
326
+ |------|-------|
327
+ | Tasks root | `spine-tasks/` |
328
+ | Issues repo | `beettlle/pi-spine` |
329
+ | Pre-publish gate | `npm run release:check` (typecheck → lint → tests → coverage; CI parity) |
330
+ | Publish | Tag-triggered `.github/workflows/release.yml` |
331
+ | Pending backlog | Run `spine plan pending` — release executes **subset only** |
332
+
333
+ ## Short prompt (resume mid-release)
334
+
335
+ ```text
336
+ Resume spine release v{TARGET}: check manifest at spine-tasks/_authoring/release-v{TARGET}/manifest.md →
337
+ verify remaining scope → preflight → for each wave: batch start --attached → diagnose →
338
+ gate approve → integrate → npm install → batch complete →
339
+ when scope done: tests + preflight → STOP for publish approval.
340
+ Post final report with composition table.
341
+ ```
@@ -0,0 +1,107 @@
1
+ # Issue intake checklist
2
+
3
+ Run during **Phase 1** before composing the release manifest.
4
+
5
+ ## GitHub queries
6
+
7
+ Repo: `beettlle/pi-spine`
8
+
9
+ ```bash
10
+ gh issue list --repo beettlle/pi-spine --state open --limit 100 \
11
+ --json number,title,labels,body
12
+
13
+ gh issue list --repo beettlle/pi-spine --state open --label documentation \
14
+ --json number,title,labels
15
+
16
+ gh issue list --repo beettlle/pi-spine --state open --label bug \
17
+ --json number,title,labels
18
+
19
+ gh issue list --repo beettlle/pi-spine --state open --label enhancement \
20
+ --json number,title,labels
21
+ ```
22
+
23
+ ## Label taxonomy
24
+
25
+ | Label | Release bucket | Priority notes |
26
+ |-------|----------------|----------------|
27
+ | `documentation` | Documentation | Highest user value — address before enhancements |
28
+ | `bug` | Bug fix | Prefer user-impact, reproducible, already-tasked |
29
+ | `enhancement` | Enhancement | One per minor; zero per patch |
30
+ | `priority:P1` | Any | Prefer over P2/P3 when scope allows |
31
+ | `priority:P2` | Any | Normal |
32
+ | `priority:P3` | Any | Defer unless trivial S doc fix |
33
+ | `skill:create-spine-tasks` | Documentation (usually) | Skill/template updates; often docs-only packets |
34
+
35
+ ## Issue → task mapping
36
+
37
+ 1. Grep pending and done tasks for issue links:
38
+
39
+ ```bash
40
+ rg 'Closes:|Partial:' spine-tasks/*/PROMPT.md
41
+ ```
42
+
43
+ 2. Classify each open issue:
44
+
45
+ | State | Action |
46
+ |-------|--------|
47
+ | Mapped to pending SP-* | Candidate for manifest if fits profile |
48
+ | Mapped to `.DONE` SP-* | Closed by shipped work — exclude |
49
+ | No SP-* yet | **Gap** — author with `create-spine-tasks` in Phase 3 |
50
+ | Epic / `[Epic]` in title | Defer unless major profile with operator approval |
51
+
52
+ ## Documentation issue heuristics
53
+
54
+ Prefer for release inclusion when:
55
+
56
+ - `label:documentation` or title starts with `Docs:`
57
+ - `skill:create-spine-tasks` issues that are template/rule updates only
58
+ - Pending SP-* with docs-only File Scope (`fileScopeMustNotChange` on `src/`, `bin/`, `tests/`)
59
+ - `testCommand: true` or scoped doc verification
60
+
61
+ Ensure **Documentation Requirements paths appear in File Scope** (issue #144).
62
+
63
+ ## Bug issue heuristics
64
+
65
+ Prefer when:
66
+
67
+ - Repro steps in issue body or linked diagnosis
68
+ - Already has pending SP-* with `Closes: #NNN`
69
+ - S/M size, disjoint file scope from parallel neighbors
70
+ - User-visible failure (contract fail, integrate hang, dirty worktree)
71
+
72
+ Exclude when:
73
+
74
+ - Fixed on `main` but issue not closed
75
+ - Requires external repo reproduction without minimal repro
76
+ - Blocked by epic infrastructure not in this release
77
+
78
+ ## Enhancement issue heuristics
79
+
80
+ **Patch profile:** exclude all.
81
+
82
+ **Minor profile:** pick exactly one (two only with operator override):
83
+
84
+ - User-visible or operator-visible improvement
85
+ - S/M size; split L/XL first
86
+ - Disjoint `fileScopeMustChange` from bug tasks in same wave
87
+ - P1/P2 over P3
88
+
89
+ ## Pending task inventory
90
+
91
+ ```bash
92
+ spine plan pending
93
+ spine tasks validate pending
94
+ spine tasks analyze pending
95
+ spine deps pending
96
+ ```
97
+
98
+ Read `spine-tasks/CONTEXT.md` for `Next Task ID` and phase notes.
99
+
100
+ Cross-reference pending SP-* with open issues. The release executes **manifest scope only**, not all pending tasks.
101
+
102
+ ## Intake output table
103
+
104
+ | Issue # | Labels | Mapped SP-* | Bucket | Profile fit | Notes |
105
+ |---------|--------|-------------|--------|-------------|-------|
106
+ | #130 | bug | SP-483 | bug | patch ✓ | post-merge restore |
107
+ | #90 | documentation | — (gap) | doc | minor ✓ | needs new SP-* |
@@ -0,0 +1,51 @@
1
+ # pi-spine upstream issue template
2
+
3
+ Use when filing engine/orchestrator bugs at https://github.com/beettlle/pi-spine/issues during **Phase 4** recovery.
4
+
5
+ ## Environment
6
+
7
+ - pi-spine: `spine --version`
8
+ - pi: `pi --version`
9
+ - Node: `node --version`
10
+ - Repo: `pi-spine` @ `git rev-parse --short HEAD`
11
+
12
+ ## Commands run
13
+
14
+ ```text
15
+ (paste exact spine commands)
16
+ ```
17
+
18
+ ## Diagnosis
19
+
20
+ ```text
21
+ (paste output of: spine status --diagnose)
22
+ ```
23
+
24
+ ## Journal excerpt
25
+
26
+ ```bash
27
+ spine journal replay --batch <batchId>
28
+ ```
29
+
30
+ ```text
31
+ (paste last 20–40 lines relevant to failure)
32
+ ```
33
+
34
+ ## Expected vs actual
35
+
36
+ - **Expected:** ...
37
+ - **Actual:** ...
38
+
39
+ ## Minimal reproduction
40
+
41
+ Steps another operator can follow on the pi-spine repo or a consumer repo.
42
+
43
+ ## Related issues
44
+
45
+ Search first before filing. Common clusters:
46
+
47
+ - Contract verifier false positives (#105, #118)
48
+ - Integrate / post-merge sync (#130, #114)
49
+ - Dirty worktree / graphify-out (#113)
50
+ - Batch complete stale state (#94)
51
+ - Doctor / provider auth (#97)