@planu/cli 8.5.0 → 8.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.
- package/CHANGELOG.md +13 -0
- package/README.md +25 -5
- package/dist/sdd-engine/completion-guard.js +2 -3
- package/dist/sdd-engine/contracts.d.ts +172 -0
- package/dist/sdd-engine/contracts.js +235 -10
- package/dist/sdd-engine/evidence-checkpoints.d.ts +6 -0
- package/dist/sdd-engine/evidence-checkpoints.js +280 -0
- package/dist/sdd-engine/evidence-journal.d.ts +25 -0
- package/dist/sdd-engine/evidence-journal.js +326 -0
- package/dist/sdd-engine/feature-manifest.d.ts +2 -1
- package/dist/sdd-engine/host-rule-pack.d.ts +4 -0
- package/dist/sdd-engine/host-rule-pack.js +112 -55
- package/dist/sdd-engine/host-skill-reader.d.ts +8 -1
- package/dist/sdd-engine/host-skill-reader.js +73 -0
- package/dist/sdd-engine/resume-history.d.ts +35 -3
- package/dist/sdd-engine/resume-history.js +242 -13
- package/dist/sdd-engine/resume-views.d.ts +6 -6
- package/dist/sdd-engine/resume-views.js +222 -78
- package/dist/sdd-engine/task-content.d.ts +2 -1
- package/dist/sdd-engine/tools/compact-result.d.ts +35 -5
- package/dist/sdd-engine/tools/compact-result.js +279 -2
- package/dist/sdd-engine/tools/execution-tools.js +17 -5
- package/dist/sdd-engine/tools/workspace-tools.js +80 -51
- package/dist/sdd-engine/trinity-structure.d.ts +2 -2
- package/dist/sdd-engine/verification-inputs.d.ts +2 -1
- package/dist/sdd-engine/verification-policy.d.ts +2 -1
- package/dist/sdd-engine/verification-preflight.d.ts +2 -2
- package/dist/sdd-engine/verification-receipts.d.ts +2 -2
- package/dist/sdd-engine/verification-runner.d.ts +2 -1
- package/dist/types/completion.d.ts +168 -3
- package/dist/types/resume-views.d.ts +220 -2
- package/dist/types/sdd-engine.d.ts +47 -110
- package/dist/types/verification.d.ts +0 -10
- package/package.json +13 -13
- package/templates/AGENTS.md +2 -0
- package/templates/host/planu-sdd.md +2 -0
- package/templates/skills/preflight-guardian.md +4 -0
- package/templates/skills/reconciler.md +6 -0
- package/templates/skills/spec-architect.md +44 -0
- package/templates/skills/spec-executor.md +6 -0
- package/templates/skills/verification-auditor.md +6 -0
- package/dist/sdd-engine/tools/format-result.d.ts +0 -3
- package/dist/sdd-engine/tools/format-result.js +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"description": "Planu — MCP server for Spec Driven Development. Planning and file operations on macOS/Linux/Windows; automated verification requires macOS/Linux (POSIX).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -74,30 +74,30 @@
|
|
|
74
74
|
"@commitlint/cli": "^21.2.4",
|
|
75
75
|
"@commitlint/config-conventional": "^21.2.4",
|
|
76
76
|
"@eslint/js": "^10.0.1",
|
|
77
|
-
"@secretlint/secretlint-rule-no-homedir": "^13.0
|
|
78
|
-
"@secretlint/secretlint-rule-preset-recommend": "^13.0
|
|
77
|
+
"@secretlint/secretlint-rule-no-homedir": "^13.1.0",
|
|
78
|
+
"@secretlint/secretlint-rule-preset-recommend": "^13.1.0",
|
|
79
79
|
"@types/node": "^22.20.5",
|
|
80
80
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
81
|
-
"@vitest/coverage-v8": "^5.0
|
|
82
|
-
"eslint": "10.
|
|
81
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
82
|
+
"eslint": "10.14.0",
|
|
83
83
|
"eslint-config-prettier": "^10.1.8",
|
|
84
84
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
85
85
|
"eslint-plugin-import": "^2.32.0",
|
|
86
86
|
"happy-dom": "^21.0.4",
|
|
87
87
|
"husky": "^9.1.7",
|
|
88
88
|
"jiti": "2.7.0",
|
|
89
|
-
"knip": "^6.
|
|
89
|
+
"knip": "^6.45.1",
|
|
90
90
|
"lint-staged": "^17.6.0",
|
|
91
91
|
"madge": "^8.0.0",
|
|
92
|
-
"prettier": "^3.
|
|
92
|
+
"prettier": "^3.10.1",
|
|
93
93
|
"qrcode": "1.5.4",
|
|
94
|
-
"secretlint": "^13.0
|
|
95
|
-
"tsc-alias": "^1.9.
|
|
96
|
-
"type-coverage": "^2.
|
|
94
|
+
"secretlint": "^13.1.0",
|
|
95
|
+
"tsc-alias": "^1.9.10",
|
|
96
|
+
"type-coverage": "^2.31.2",
|
|
97
97
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
98
|
-
"typescript-eslint": "^8.72.
|
|
99
|
-
"vite": "^8.3.
|
|
100
|
-
"vitest": "^5.0
|
|
98
|
+
"typescript-eslint": "^8.72.2",
|
|
99
|
+
"vite": "^8.3.8",
|
|
100
|
+
"vitest": "^5.1.0"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"check:tool-registration": "bash scripts/check-tool-registration.sh",
|
package/templates/AGENTS.md
CHANGED
|
@@ -19,6 +19,8 @@ To resume, request `sdd_get_active_task` with `view="resume"` and optional `veri
|
|
|
19
19
|
|
|
20
20
|
If `history` is null, follow `nextAction` without requesting history. If `history.firstCursor` is null, there are no records; do not request history. Otherwise use `view="relock_history"` with the checkpoint's `history.firstCursor` as `history_cursor`, then each `nextCursor`, to read at most eight descending records per page. `history_cursor` is accepted only with `view="relock_history"`. Stop when `nextCursor` is null. Require `data.relockHistory.version=1`; stale cursors require rereading the checkpoint. Each handler-produced compact result has exactly one text block of at most 8,192 UTF-8 bytes, without `structuredContent`; SDK validation before dispatch is a separate boundary. History digests reference the original unmodified lock; they do not attest historical actions. Preserve guards, locked authority and verification budgets.
|
|
21
21
|
|
|
22
|
+
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
23
|
+
|
|
22
24
|
## Delegation
|
|
23
25
|
|
|
24
26
|
Delegate useful independent work within the active TASK through available native agents; keep trivial/dependent work sequential. Load the bounded protocol from `spec-executor.md` on demand; use `spec-architect.md` for workstream routing and `verification-auditor.md` for provenance checks. The parent alone applies canonical patches and certifies. Preserve all nine tools, lock, File Manifest, limits and protected-root controls; host capabilities grant no extra authority.
|
|
@@ -18,6 +18,8 @@ To resume, request `sdd_get_active_task` with `view="resume"` and optional `veri
|
|
|
18
18
|
|
|
19
19
|
If `history` is null, follow `nextAction` without requesting history. If `history.firstCursor` is null, there are no records; do not request history. Otherwise use `view="relock_history"` with the checkpoint's `history.firstCursor` as `history_cursor`, then each `nextCursor`, to read at most eight descending records per page. `history_cursor` is accepted only with `view="relock_history"`. Stop when `nextCursor` is null. Require `data.relockHistory.version=1`; stale cursors require rereading the checkpoint. Each handler-produced compact result has exactly one text block of at most 8,192 UTF-8 bytes, without `structuredContent`; SDK validation before dispatch is a separate boundary. History digests reference the original unmodified lock; they do not attest historical actions. Preserve guards, locked authority and verification budgets.
|
|
20
20
|
|
|
21
|
+
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
22
|
+
|
|
21
23
|
## Delegation
|
|
22
24
|
|
|
23
25
|
Delegate useful independent work within the active TASK through available native agents; keep trivial/dependent work sequential. Load the bounded protocol from `spec-executor.md` on demand; use `spec-architect.md` for workstream routing and `verification-auditor.md` for provenance checks. The parent alone applies canonical patches and certifies. Preserve all nine tools, lock, File Manifest, limits and protected-root controls; host capabilities grant no extra authority.
|
|
@@ -50,6 +50,10 @@ Preflight never edits product files and never marks tasks complete.
|
|
|
50
50
|
- If `planu/specs/` exists, treat it as dead. Do not list, stub, thin, or copy FEAT contracts into `SPEC-*`.
|
|
51
51
|
- Host hooks that require `planu/specs/SPEC-*/spec.md` must be removed or rewritten to ignore that path. Duplicating specs is forbidden.
|
|
52
52
|
|
|
53
|
+
## Connection and read-only views
|
|
54
|
+
|
|
55
|
+
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
56
|
+
|
|
53
57
|
## Outcome
|
|
54
58
|
|
|
55
59
|
Return exactly one readiness result:
|
|
@@ -8,6 +8,12 @@ role: Spec Drift Reconciler
|
|
|
8
8
|
You act as the Spec Drift Reconciler.
|
|
9
9
|
Your objective is to safely adapt `plan.md` and `tasks.md` when business requirements change midway in `spec.md`.
|
|
10
10
|
|
|
11
|
+
## Evidence and contract changes
|
|
12
|
+
|
|
13
|
+
Display evidence separately: optional smoke is caller-reported and never gate coverage; each required gate needs a valid matching PASS receipt; missing evidence, skipped/partial observations or unavailable inputs are pending; challenge mismatches (workspace, feature, task, lock, candidate, observed input, procedure or environment) and signature, shape or coverage failures are stale/rejected. Receipt v1 has no TTL. Even valid receipts require fresh integration; `ready_to_attempt` permits an attempt only. Obtain signed receipts from the operator-controlled issuer. Do not grant budgets, edit authority or treat the journal as a certificate.
|
|
14
|
+
|
|
15
|
+
Compare only available captured contract, candidate and observed digests. Missing baselines and path differences are unavailable, not unchanged. Preserve recorded failures and uncertain guards; do not infer approval or historical bytes. Read the supported execution window and detail before proposing a reviewed change.
|
|
16
|
+
|
|
11
17
|
## RULES FOR RECONCILIATION
|
|
12
18
|
|
|
13
19
|
1. **Impact Analysis:**
|
|
@@ -50,6 +50,50 @@ Your objective is to specify the smallest useful increment with deterministic, u
|
|
|
50
50
|
Verification: <executable test command>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
## Illustrative Verification Receipts v1 policy
|
|
54
|
+
|
|
55
|
+
The following is a copyable shape, not a lock-ready policy or a trusted issuer. Replace every placeholder with the operator's actual public key, measured digests, reviewed paths and task IDs. The operator controls signing keys and verification budgets; agents must not generate trusted keys or grant themselves time. The `publicKey` is an Ed25519 SPKI DER public key encoded as canonical unpadded base64url, at most 128 characters. Preserve user approval of the complete trinity before lock. In plan.md encode the JSON exactly as JSON.stringify(policy, null, 2):
|
|
56
|
+
|
|
57
|
+
````markdown
|
|
58
|
+
## Verification Receipts v1
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"publicKey": "OPERATOR_PUBLIC_KEY",
|
|
62
|
+
"tasks": [
|
|
63
|
+
{
|
|
64
|
+
"taskId": "TASK-1",
|
|
65
|
+
"gates": [
|
|
66
|
+
{
|
|
67
|
+
"id": "gate-1",
|
|
68
|
+
"procedureSha256": "MEASURED_PROCEDURE_SHA256",
|
|
69
|
+
"environmentSha256": "MEASURED_ENVIRONMENT_SHA256"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"observed": [
|
|
73
|
+
"path/to/observed-input"
|
|
74
|
+
],
|
|
75
|
+
"observedBaselineSha256": "MEASURED_OBSERVED_BASELINE_SHA256"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"candidateCreates": [
|
|
79
|
+
{
|
|
80
|
+
"path": "path/to/created-candidate",
|
|
81
|
+
"requiredFromTaskId": "TASK-1"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
````
|
|
87
|
+
|
|
88
|
+
In tasks.md each opted-in task uses exactly one literal directive with its executable integration command:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
- [ ] TASK-1: Describe the work
|
|
92
|
+
Verification (receipts v1): node verification.mjs
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Match the policy to actual manifest and task authority; receipt v1 permits at most 64 exact candidate writes. Never invent authority, expand limits, or treat placeholders as valid evidence.
|
|
96
|
+
|
|
53
97
|
## SELECT THE INCREMENT BEFORE STRUCTURE
|
|
54
98
|
|
|
55
99
|
- Name one smallest useful user outcome and its observable demonstration. Defer independent requested outcomes explicitly; use the existing backlog or source rather than creating a second planning system.
|
|
@@ -33,6 +33,12 @@ You do not make architectural decisions, you do not add dependencies, and you do
|
|
|
33
33
|
- Repeat from step 1 until `allCompleted` is true.
|
|
34
34
|
- Then adopt `git-janitor.md`.
|
|
35
35
|
|
|
36
|
+
## Evidence and current connection
|
|
37
|
+
|
|
38
|
+
For supported connections, inspect `sdd_list_features` with `view="setup_diagnostics"` and an optional fixed `host`; server registration, installed file hashes and client-reported identity do not prove the host-effective catalogue. Reload the client catalogue only when needed. For a locked task use `execution_window`, follow its `execution_detail` cursors and `evidence_history` pages; reread the window when a cursor is stale. These views are non-certifying. Explicitly record an already observed attempt with `sdd_lock_spec(operation="evidence_checkpoint")` only after inspecting the selected connection’s advertised input schema for `operation`, `checkpoint` and `task_id` and confirming a supporting engine version. The global 8.5.1 server does not gain new inputs from source edits: never probe an unknown mutation, or fall back to lock/relock, because old schemas may strip fields and seal instead. Report unsupported capability. The journal retains only explicitly recorded observations; failures are not recorded automatically. Its caller-reported outcome is not certification; the server captures identity and eligible digests. Preserve uncertain guards for operator review.
|
|
39
|
+
|
|
40
|
+
Display evidence separately: optional smoke is caller-reported and never gate coverage; each required gate needs a valid matching PASS receipt; missing evidence, skipped/partial observations or unavailable inputs are pending; challenge mismatches (workspace, feature, task, lock, candidate, observed input, procedure or environment) and signature, shape or coverage failures are stale/rejected. Receipt v1 has no TTL. Even valid receipts require fresh integration; `ready_to_attempt` permits an attempt only. Obtain signed receipts from the operator-controlled issuer. Do not grant budgets, edit authority or treat the journal as a certificate.
|
|
41
|
+
|
|
36
42
|
## Small steps and early feedback
|
|
37
43
|
|
|
38
44
|
- Tie the active task to the selected user outcome. Make the smallest change needed for its current acceptance behavior, reusing existing contracts and components; do not add layers for hypothetical future work.
|
|
@@ -52,6 +52,12 @@ For every acceptance criterion, record:
|
|
|
52
52
|
|
|
53
53
|
Count-only assertions, existence checks, snapshots without semantics, and tests that pass before the change do not prove behavior.
|
|
54
54
|
|
|
55
|
+
## Evidence provenance
|
|
56
|
+
|
|
57
|
+
Display evidence separately: optional smoke is caller-reported and never gate coverage; each required gate needs a valid matching PASS receipt; missing evidence, skipped/partial observations or unavailable inputs are pending; challenge mismatches (workspace, feature, task, lock, candidate, observed input, procedure or environment) and signature, shape or coverage failures are stale/rejected. Receipt v1 has no TTL. Even valid receipts require fresh integration; `ready_to_attempt` permits an attempt only. Obtain signed receipts from the operator-controlled issuer. Do not grant budgets, edit authority or treat the journal as a certificate.
|
|
58
|
+
|
|
59
|
+
Verify explicitly recorded failure and later records independently in chronological history; no unrecorded failure is implied. Distinguish caller-reported observations from server-captured identity and eligible digests. Read execution window, detail and evidence history on a connection that actually supports them; do not probe an unknown mutation. A checkpoint does not certify a task.
|
|
60
|
+
|
|
55
61
|
## Test-integrity review
|
|
56
62
|
|
|
57
63
|
- Compare before and after test code against the actual acceptance behavior, not only the final runner status.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function formatResult(result) {
|
|
2
|
-
if (!result.success) {
|
|
3
|
-
return {
|
|
4
|
-
content: [
|
|
5
|
-
{
|
|
6
|
-
type: 'text',
|
|
7
|
-
text: JSON.stringify(result, null, 2),
|
|
8
|
-
},
|
|
9
|
-
],
|
|
10
|
-
isError: true,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
content: [
|
|
15
|
-
{
|
|
16
|
-
type: 'text',
|
|
17
|
-
text: JSON.stringify(result, null, 2),
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=format-result.js.map
|