pi-spine 1.0.0 → 1.0.2
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 +21 -9
- package/package.json +7 -2
- package/scripts/coverage-parse.mjs +70 -0
- package/skills/create-spine-tasks/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -145,13 +145,21 @@ The `.spine/agents/supervisor.md` template (from `spine init`) documents this no
|
|
|
145
145
|
|
|
146
146
|
---
|
|
147
147
|
|
|
148
|
-
## Adoption
|
|
148
|
+
## Adoption
|
|
149
149
|
|
|
150
|
-
pi-spine is
|
|
150
|
+
pi-spine is published on [npm](https://www.npmjs.com/package/pi-spine) and [pi.dev](https://pi.dev/packages/pi-spine).
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm install -g pi-spine
|
|
154
|
+
# or from pi:
|
|
155
|
+
pi install npm:pi-spine
|
|
156
|
+
```
|
|
157
|
+
|
|
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.
|
|
151
159
|
|
|
152
160
|
| Doc | Purpose |
|
|
153
161
|
|-----|---------|
|
|
154
|
-
| [local-install.md](docs/adoption/local-install.md) | Git/path install
|
|
162
|
+
| [local-install.md](docs/adoption/local-install.md) | Git/path install for development |
|
|
155
163
|
| [bootstrap-checklist.md](docs/adoption/bootstrap-checklist.md) | First-time consumer setup |
|
|
156
164
|
| [operator-runbook.md](docs/adoption/operator-runbook.md) | Daily operator procedures (preflight, land loop, recovery) |
|
|
157
165
|
| [real-project-readiness.md](docs/adoption/real-project-readiness.md) | Phase 9 adoption plan |
|
|
@@ -192,7 +200,7 @@ The repo ships [`.cursor/rules/`](.cursor/rules/) for Cursor IDE sessions. Rules
|
|
|
192
200
|
|
|
193
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).
|
|
194
202
|
|
|
195
|
-
**CLI:** `spine rules discover`, `spine rules sync`, `spine rules select --task <id
|
|
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`.
|
|
196
204
|
|
|
197
205
|
---
|
|
198
206
|
|
|
@@ -472,13 +480,17 @@ In a pi session (`/spine` runs preflight before batch guidance; `/spine-plan` in
|
|
|
472
480
|
| `/spine-pause` | `spine batch pause` — stop scheduling |
|
|
473
481
|
| `/spine-resume` | `spine batch resume` — continue paused or failed batch |
|
|
474
482
|
| `/spine-abort` | `spine batch abort` — archive-first abort (`--hard` kills workers) |
|
|
475
|
-
| `/spine-
|
|
476
|
-
| `/spine-
|
|
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) |
|
|
477
487
|
| `/spine-settings` | Editable config menu + inline `set` (delegates to `spine settings`) |
|
|
478
488
|
| `/spine-deps` | Show dependency graph (`spine deps`; usage: `/spine-deps <all\|paths>`) |
|
|
479
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 |
|
|
480
492
|
|
|
481
|
-
|
|
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:
|
|
482
494
|
|
|
483
495
|
```text
|
|
484
496
|
spine preflight # required before batch (FR-BATCH-11)
|
|
@@ -525,7 +537,7 @@ Do **not** run Taskplane and pi-spine batches on the same repo at the same time.
|
|
|
525
537
|
|
|
526
538
|
## Project status
|
|
527
539
|
|
|
528
|
-
**
|
|
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/`.
|
|
529
541
|
|
|
530
542
|
## Continuous integration
|
|
531
543
|
|
|
@@ -540,7 +552,7 @@ Every push and pull request to `main` runs [GitHub Actions CI](.github/workflows
|
|
|
540
552
|
| [docs/PRD.md](docs/PRD.md) | Product requirements and implementation contract (v1.2) |
|
|
541
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 |
|
|
542
554
|
| [docs/adoption/upstream-execution-workflow.md](docs/adoption/upstream-execution-workflow.md) | Authoring → validation → batch (optional zero-pi upstream) |
|
|
543
|
-
| [docs/adoption/local-install.md](docs/adoption/local-install.md) | Git/path install
|
|
555
|
+
| [docs/adoption/local-install.md](docs/adoption/local-install.md) | Git/path install for development |
|
|
544
556
|
| [docs/adoption/operator-runbook.md](docs/adoption/operator-runbook.md) | Daily operator procedures |
|
|
545
557
|
| [docs/adoption/real-project-readiness.md](docs/adoption/real-project-readiness.md) | Phase 9 adoption plan |
|
|
546
558
|
| pi.dev package page | Install and package manifest (when published) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-spine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Orchestration spine for long-running pi development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -48,15 +48,20 @@
|
|
|
48
48
|
"bin/",
|
|
49
49
|
"extensions/",
|
|
50
50
|
"skills/",
|
|
51
|
+
"scripts/coverage-parse.mjs",
|
|
51
52
|
"src/",
|
|
52
53
|
"templates/"
|
|
53
54
|
],
|
|
54
55
|
"peerDependencies": {
|
|
55
|
-
"@earendil-works/pi-coding-agent": "*"
|
|
56
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
57
|
+
"typebox": "*"
|
|
56
58
|
},
|
|
57
59
|
"peerDependenciesMeta": {
|
|
58
60
|
"@earendil-works/pi-coding-agent": {
|
|
59
61
|
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"typebox": {
|
|
64
|
+
"optional": true
|
|
60
65
|
}
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse Node test runner coverage summary output.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {string} output Combined stdout/stderr from a coverage test run.
|
|
9
|
+
* @returns {number | null} Aggregate line coverage percent, or null if not found.
|
|
10
|
+
*/
|
|
11
|
+
export function parseAggregateLineCoverage(output) {
|
|
12
|
+
const tableMatch = output.match(/^\s*[^\s]*\s*all files\s+\|\s+([\d.]+)\s+\|/m);
|
|
13
|
+
if (tableMatch) {
|
|
14
|
+
const value = Number.parseFloat(tableMatch[1]);
|
|
15
|
+
if (Number.isFinite(value)) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const summaryMatch = output.match(/Line coverage \(in-scope\):\s*([\d.]+)%/);
|
|
21
|
+
if (summaryMatch) {
|
|
22
|
+
const value = Number.parseFloat(summaryMatch[1]);
|
|
23
|
+
if (Number.isFinite(value)) {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param {string} output Combined stdout/stderr from a coverage test run.
|
|
33
|
+
* @returns {Map<string, number>} Repo-relative path → line coverage percent.
|
|
34
|
+
*/
|
|
35
|
+
export function parsePerFileLineCoverage(output) {
|
|
36
|
+
/** @type {Map<string, number>} */
|
|
37
|
+
const byFile = new Map();
|
|
38
|
+
const rowRe = /^\s*(?:[^\s]*\s+)?([^\s|]+\.(?:mjs|ts))\s+\|\s+([\d.]+)\s+\|/gm;
|
|
39
|
+
for (const match of output.matchAll(rowRe)) {
|
|
40
|
+
const filePath = match[1];
|
|
41
|
+
const linePct = Number.parseFloat(match[2]);
|
|
42
|
+
if (filePath === "all" || filePath === "files" || !Number.isFinite(linePct)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
byFile.set(filePath, linePct);
|
|
46
|
+
}
|
|
47
|
+
return byFile;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {string} output
|
|
52
|
+
* @param {Record<string, number>} thresholds
|
|
53
|
+
* @returns {Array<{ path: string, actual: number | null, required: number }>}
|
|
54
|
+
*/
|
|
55
|
+
export function findFileCoverageFailures(output, thresholds) {
|
|
56
|
+
const byFile = parsePerFileLineCoverage(output);
|
|
57
|
+
/** @type {Array<{ path: string, actual: number | null, required: number }>} */
|
|
58
|
+
const failures = [];
|
|
59
|
+
for (const [filePath, required] of Object.entries(thresholds)) {
|
|
60
|
+
const basename = path.basename(filePath);
|
|
61
|
+
let actual = byFile.get(filePath) ?? null;
|
|
62
|
+
if (actual === null) {
|
|
63
|
+
actual = byFile.get(basename) ?? null;
|
|
64
|
+
}
|
|
65
|
+
if (actual === null || actual < required) {
|
|
66
|
+
failures.push({ path: filePath, actual, required });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return failures;
|
|
70
|
+
}
|
|
@@ -8,7 +8,7 @@ description: Decomposes PRDs and feature briefs into spine task packets (PROMPT.
|
|
|
8
8
|
|
|
9
9
|
Creates structured task packets (`PROMPT.md` + `STATUS.md`) for autonomous execution via **pi-spine** (`spine batch start`, `/spine`). The spine engine handles waves, worktree lanes, checkpoint discipline, cross-model review, integrate gates, and the dashboard — so `PROMPT.md` stays focused on **what** to build, not **how** the orchestrator runs.
|
|
10
10
|
|
|
11
|
-
Works from a local pi-spine checkout (`pi install /path/to/pi-spine -l`)
|
|
11
|
+
Works from a local pi-spine checkout (`pi install /path/to/pi-spine -l`) or after `pi install npm:pi-spine`.
|
|
12
12
|
|
|
13
13
|
## Architecture
|
|
14
14
|
|