@planu/cli 4.4.2 → 4.5.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 +17 -1
- package/dist/engine/elicitation/answer-extractor.js +53 -1
- package/dist/engine/elicitation/decision-gap-detector.d.ts +3 -0
- package/dist/engine/elicitation/decision-gap-detector.js +162 -0
- package/dist/engine/elicitation/question-grounding-gate.d.ts +3 -0
- package/dist/engine/elicitation/question-grounding-gate.js +54 -0
- package/dist/engine/implementation-contract/common.d.ts +5 -0
- package/dist/engine/implementation-contract/common.js +30 -0
- package/dist/engine/implementation-contract/evaluator.d.ts +3 -0
- package/dist/engine/implementation-contract/evaluator.js +105 -0
- package/dist/engine/implementation-contract/index.d.ts +4 -0
- package/dist/engine/implementation-contract/index.js +4 -0
- package/dist/engine/implementation-contract/renderer.d.ts +4 -0
- package/dist/engine/implementation-contract/renderer.js +98 -0
- package/dist/engine/readiness-checker.js +18 -6
- package/dist/engine/skill-registry/index.d.ts +1 -0
- package/dist/engine/skill-registry/index.js +1 -0
- package/dist/engine/skill-registry/installer.d.ts +2 -2
- package/dist/engine/skill-registry/installer.js +69 -37
- package/dist/engine/skill-registry/skill-security-scanner.d.ts +12 -0
- package/dist/engine/skill-registry/skill-security-scanner.js +87 -0
- package/dist/engine/spec-format/bdd-parser.js +9 -0
- package/dist/engine/spec-format/lean-spec-generator.js +10 -2
- package/dist/tools/challenge-spec/implementation-contract-challenge-scenarios.d.ts +3 -0
- package/dist/tools/challenge-spec/implementation-contract-challenge-scenarios.js +51 -0
- package/dist/tools/challenge-spec.js +4 -0
- package/dist/tools/create-spec/question-generator.d.ts +1 -1
- package/dist/tools/create-spec/question-generator.js +20 -96
- package/dist/tools/create-spec.js +19 -2
- package/dist/tools/skill-registry/install.js +9 -0
- package/dist/types/clarification.d.ts +8 -0
- package/dist/types/elicitation.d.ts +21 -0
- package/dist/types/skill-registry.d.ts +59 -0
- package/dist/types/spec-format.d.ts +21 -0
- package/package.json +18 -18
- package/planu-native.json +29 -8
- package/planu-plugin.json +35 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InteractiveQuestion } from './clarification.js';
|
|
2
|
+
import type { InteractiveOption } from './interactive-question.js';
|
|
2
3
|
/** Primitive field types supported by the MCP elicitation protocol. */
|
|
3
4
|
export type ElicitationFieldType = 'text' | 'number' | 'boolean' | 'enum' | 'multi-select';
|
|
4
5
|
/** Shared base for all elicitation field definitions. */
|
|
@@ -174,6 +175,26 @@ export type ElicitOrFallbackOutcome = {
|
|
|
174
175
|
* - 'technical': inferred from codebase signals; elicitation is skipped
|
|
175
176
|
*/
|
|
176
177
|
export type DecisionType = 'policy' | 'business' | 'technical';
|
|
178
|
+
export type DecisionGapKind = 'behavior' | 'permission' | 'provider' | 'billing-model' | 'data' | 'failure' | 'scope';
|
|
179
|
+
export interface DecisionGap {
|
|
180
|
+
id: string;
|
|
181
|
+
kind: DecisionGapKind;
|
|
182
|
+
header: string;
|
|
183
|
+
question: string;
|
|
184
|
+
evidence: string[];
|
|
185
|
+
impact: string;
|
|
186
|
+
options: InteractiveOption[];
|
|
187
|
+
multiSelect: boolean;
|
|
188
|
+
blocking: boolean;
|
|
189
|
+
}
|
|
190
|
+
export interface QuestionGroundingContext {
|
|
191
|
+
gap: DecisionGap;
|
|
192
|
+
requestText: string;
|
|
193
|
+
}
|
|
194
|
+
export interface QuestionGroundingResult {
|
|
195
|
+
passed: boolean;
|
|
196
|
+
reason?: string;
|
|
197
|
+
}
|
|
177
198
|
/**
|
|
178
199
|
* Outcome when the decision was already cached in conventions.json.
|
|
179
200
|
* The caller can return this value immediately without prompting the user.
|
|
@@ -69,6 +69,63 @@ export interface SkillInstallResult {
|
|
|
69
69
|
hasScripts: boolean;
|
|
70
70
|
/** Installed version, if available. */
|
|
71
71
|
version?: string;
|
|
72
|
+
/** Security scan summary for this install, when the skill source was scanned. */
|
|
73
|
+
securityScan?: SkillSecurityScanResult;
|
|
74
|
+
}
|
|
75
|
+
/** Severity labels returned by the skill security scanner. */
|
|
76
|
+
export type SkillSecuritySeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | 'UNKNOWN';
|
|
77
|
+
/** Recommendation labels returned by the skill security scanner. */
|
|
78
|
+
export type SkillSecurityRecommendation = 'SAFE' | 'CAUTION' | 'DO_NOT_INSTALL' | 'UNKNOWN';
|
|
79
|
+
/** Policy to use when the external skill security scanner cannot run. */
|
|
80
|
+
export type SkillSecurityScannerUnavailablePolicy = 'fail-closed' | 'allow';
|
|
81
|
+
/** Options controlling skill security scanning during installation. */
|
|
82
|
+
export interface SkillInstallOptions {
|
|
83
|
+
/** Policy for scanner execution failures. Defaults to fail-closed for external skills. */
|
|
84
|
+
scannerUnavailablePolicy?: SkillSecurityScannerUnavailablePolicy;
|
|
85
|
+
}
|
|
86
|
+
/** In-memory skill content prepared before writing to host skill directories. */
|
|
87
|
+
export interface PreparedSkillInstallContent {
|
|
88
|
+
/** SKILL.md content to write or scan. */
|
|
89
|
+
content: string;
|
|
90
|
+
/** Whether the source skill advertises executable script files. */
|
|
91
|
+
hasScripts: boolean;
|
|
92
|
+
/** Installed version, if available. */
|
|
93
|
+
version?: string;
|
|
94
|
+
}
|
|
95
|
+
/** Normalized security scan summary persisted by Planu. */
|
|
96
|
+
export interface SkillSecurityScanResult {
|
|
97
|
+
/** Scanner name. */
|
|
98
|
+
scanner: 'skillspector';
|
|
99
|
+
/** Scanner version, if reported by the scanner. */
|
|
100
|
+
scannerVersion?: string;
|
|
101
|
+
/** ISO 8601 timestamp when Planu ran or recorded the scan. */
|
|
102
|
+
scannedAt: string;
|
|
103
|
+
/** Numeric risk score, 0-100. */
|
|
104
|
+
score: number;
|
|
105
|
+
/** Risk severity label. */
|
|
106
|
+
severity: SkillSecuritySeverity;
|
|
107
|
+
/** Scanner recommendation. */
|
|
108
|
+
recommendation: SkillSecurityRecommendation;
|
|
109
|
+
/** Number of findings/issues reported by the scanner. */
|
|
110
|
+
issuesCount: number;
|
|
111
|
+
/** Exact scanner command shape used, without secrets or environment values. */
|
|
112
|
+
command: string;
|
|
113
|
+
/** Whether the scanner completed successfully. */
|
|
114
|
+
available: boolean;
|
|
115
|
+
/** Optional failure reason when available=false. */
|
|
116
|
+
error?: string;
|
|
117
|
+
}
|
|
118
|
+
/** Minimal JSON shape emitted by SkillSpector in --format json mode. */
|
|
119
|
+
export interface SkillSpectorJsonReport {
|
|
120
|
+
risk_assessment?: {
|
|
121
|
+
score?: unknown;
|
|
122
|
+
severity?: unknown;
|
|
123
|
+
recommendation?: unknown;
|
|
124
|
+
};
|
|
125
|
+
issues?: unknown[];
|
|
126
|
+
metadata?: {
|
|
127
|
+
skillspector_version?: unknown;
|
|
128
|
+
};
|
|
72
129
|
}
|
|
73
130
|
/** Manifest tracking all skills installed in a project. */
|
|
74
131
|
export interface SkillManifest {
|
|
@@ -95,6 +152,8 @@ export interface InstalledSkillEntry {
|
|
|
95
152
|
sourceStatus?: 'active' | 'source-unavailable';
|
|
96
153
|
/** Absolute path to the installed skill directory. */
|
|
97
154
|
path: string;
|
|
155
|
+
/** Security scan summary captured during installation, when available. */
|
|
156
|
+
securityScan?: SkillSecurityScanResult;
|
|
98
157
|
}
|
|
99
158
|
/** SPEC-668: Result of a skills TTL refresh operation. */
|
|
100
159
|
export interface SkillTTLRefreshResult {
|
|
@@ -22,6 +22,10 @@ export interface BddScenario {
|
|
|
22
22
|
title: string;
|
|
23
23
|
steps: BddStep[];
|
|
24
24
|
done: boolean;
|
|
25
|
+
tests?: {
|
|
26
|
+
path: string;
|
|
27
|
+
line?: number;
|
|
28
|
+
}[];
|
|
25
29
|
}
|
|
26
30
|
/** Input for lean spec generation. */
|
|
27
31
|
export interface LeanSpecInput {
|
|
@@ -38,6 +42,8 @@ export interface LeanSpecInput {
|
|
|
38
42
|
groundingTechnicalReferences?: TechnicalReferenceGroundingRecord[];
|
|
39
43
|
/** SPEC-481: Acceptance criteria format. Defaults to 'checkbox'. */
|
|
40
44
|
acFormat?: 'checkbox' | 'bdd';
|
|
45
|
+
/** SPEC-1082: Test links to attach to generated BDD scenarios when available. */
|
|
46
|
+
scenarioTestPaths?: string[];
|
|
41
47
|
}
|
|
42
48
|
/** A file entry in the unified spec.md Technical section. */
|
|
43
49
|
export interface LeanFileEntry {
|
|
@@ -121,4 +127,19 @@ export interface LeanTechnicalInput {
|
|
|
121
127
|
filesToModify?: LeanFileEntry[];
|
|
122
128
|
filesToTest?: LeanFileEntry[];
|
|
123
129
|
}
|
|
130
|
+
export interface ImplementationContractInput {
|
|
131
|
+
description: string;
|
|
132
|
+
criteria: LeanCriterion[];
|
|
133
|
+
files: {
|
|
134
|
+
create: LeanFileEntry[];
|
|
135
|
+
modify: LeanFileEntry[];
|
|
136
|
+
test: LeanFileEntry[];
|
|
137
|
+
};
|
|
138
|
+
outOfScope: string[];
|
|
139
|
+
verificationCommands: string[];
|
|
140
|
+
}
|
|
141
|
+
export interface ImplementationContractIssue {
|
|
142
|
+
code: 'contract_missing' | 'contract_subsection_missing' | 'contract_subsection_empty' | 'contract_filler' | 'contract_needs_decision' | 'contract_unmapped_criterion' | 'contract_manual_verification_vague';
|
|
143
|
+
message: string;
|
|
144
|
+
}
|
|
124
145
|
//# sourceMappingURL=spec-format.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Planu — MCP Server for Spec Driven Development with native Rust acceleration for hot paths. Cross-platform (Linux/macOS/Windows, x64/arm64, glibc/musl).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"packageName": "@planu/core"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@planu/core-darwin-arm64": "4.
|
|
38
|
-
"@planu/core-darwin-x64": "4.
|
|
39
|
-
"@planu/core-linux-arm64-gnu": "4.
|
|
40
|
-
"@planu/core-linux-arm64-musl": "4.
|
|
41
|
-
"@planu/core-linux-x64-gnu": "4.
|
|
42
|
-
"@planu/core-linux-x64-musl": "4.
|
|
43
|
-
"@planu/core-win32-arm64-msvc": "4.
|
|
44
|
-
"@planu/core-win32-x64-msvc": "4.
|
|
37
|
+
"@planu/core-darwin-arm64": "4.5.0",
|
|
38
|
+
"@planu/core-darwin-x64": "4.5.0",
|
|
39
|
+
"@planu/core-linux-arm64-gnu": "4.5.0",
|
|
40
|
+
"@planu/core-linux-arm64-musl": "4.5.0",
|
|
41
|
+
"@planu/core-linux-x64-gnu": "4.5.0",
|
|
42
|
+
"@planu/core-linux-x64-musl": "4.5.0",
|
|
43
|
+
"@planu/core-win32-arm64-msvc": "4.5.0",
|
|
44
|
+
"@planu/core-win32-x64-msvc": "4.5.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24.0.0"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
],
|
|
130
130
|
"license": "SEE LICENSE IN LICENSE",
|
|
131
131
|
"dependencies": {
|
|
132
|
-
"@anthropic-ai/sdk": "^0.
|
|
132
|
+
"@anthropic-ai/sdk": "^0.104.1",
|
|
133
133
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
134
134
|
"glob": "^13.0.6",
|
|
135
135
|
"yaml": "^2.9.0",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"@commitlint/cli": "^21.0.2",
|
|
171
171
|
"@commitlint/config-conventional": "^21.0.2",
|
|
172
172
|
"@eslint/js": "^10.0.1",
|
|
173
|
-
"@napi-rs/cli": "^3.7.
|
|
173
|
+
"@napi-rs/cli": "^3.7.1",
|
|
174
174
|
"@secretlint/secretlint-rule-no-homedir": "^13.0.2",
|
|
175
175
|
"@secretlint/secretlint-rule-preset-recommend": "^13.0.2",
|
|
176
176
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
182
182
|
"@stryker-mutator/core": "^9.6.1",
|
|
183
183
|
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
184
|
-
"@supabase/supabase-js": "^2.
|
|
185
|
-
"@types/node": "^25.9.
|
|
184
|
+
"@supabase/supabase-js": "^2.108.1",
|
|
185
|
+
"@types/node": "^25.9.2",
|
|
186
186
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
187
187
|
"@vitest/coverage-v8": "^4.1.8",
|
|
188
188
|
"@vue/test-utils": "^2.4.11",
|
|
@@ -190,19 +190,19 @@
|
|
|
190
190
|
"eslint-config-prettier": "^10.1.8",
|
|
191
191
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
192
192
|
"eslint-plugin-import": "^2.32.0",
|
|
193
|
-
"happy-dom": "^20.10.
|
|
193
|
+
"happy-dom": "^20.10.2",
|
|
194
194
|
"husky": "^9.1.7",
|
|
195
195
|
"javascript-obfuscator": "^5.4.3",
|
|
196
|
-
"knip": "^6.
|
|
196
|
+
"knip": "^6.16.1",
|
|
197
197
|
"lint-staged": "^17.0.7",
|
|
198
198
|
"madge": "^8.0.0",
|
|
199
|
-
"prettier": "^3.8.
|
|
199
|
+
"prettier": "^3.8.4",
|
|
200
200
|
"secretlint": "^13.0.2",
|
|
201
|
-
"semantic-release": "^25.0.
|
|
201
|
+
"semantic-release": "^25.0.5",
|
|
202
202
|
"tsc-alias": "^1.8.17",
|
|
203
203
|
"type-coverage": "^2.29.7",
|
|
204
204
|
"typescript": "^6.0.3",
|
|
205
|
-
"typescript-eslint": "^8.
|
|
205
|
+
"typescript-eslint": "^8.61.0",
|
|
206
206
|
"vite": "^8.0.16",
|
|
207
207
|
"vitest": "^4.1.8",
|
|
208
208
|
"vue": "^3.5.35"
|
package/planu-native.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dev.planu.native",
|
|
3
3
|
"displayName": "Planu Native Lightweight Surface",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.0",
|
|
5
5
|
"packageName": "@planu/cli",
|
|
6
6
|
"modes": {
|
|
7
7
|
"lightweight": {
|
|
8
8
|
"requiresMcp": false,
|
|
9
9
|
"requiresDaemon": false,
|
|
10
|
-
"hosts": [
|
|
10
|
+
"hosts": [
|
|
11
|
+
"codex",
|
|
12
|
+
"claude-code"
|
|
13
|
+
],
|
|
11
14
|
"commands": [
|
|
12
15
|
{
|
|
13
16
|
"id": "planu.status",
|
|
14
17
|
"title": "Project status",
|
|
15
18
|
"description": "Show the compact Planu project snapshot without loading the MCP tool graph.",
|
|
16
19
|
"invocation": "planu status",
|
|
17
|
-
"hosts": [
|
|
20
|
+
"hosts": [
|
|
21
|
+
"codex",
|
|
22
|
+
"claude-code"
|
|
23
|
+
],
|
|
18
24
|
"requiresMcp": false,
|
|
19
25
|
"requiresDaemon": false,
|
|
20
26
|
"mapsTo": "handlePlanStatus"
|
|
@@ -24,7 +30,10 @@
|
|
|
24
30
|
"title": "Create spec",
|
|
25
31
|
"description": "Create a new spec through the CLI-backed SDD contract.",
|
|
26
32
|
"invocation": "planu spec create \"<title>\"",
|
|
27
|
-
"hosts": [
|
|
33
|
+
"hosts": [
|
|
34
|
+
"codex",
|
|
35
|
+
"claude-code"
|
|
36
|
+
],
|
|
28
37
|
"requiresMcp": false,
|
|
29
38
|
"requiresDaemon": false,
|
|
30
39
|
"mapsTo": "handleCreateSpec"
|
|
@@ -34,7 +43,10 @@
|
|
|
34
43
|
"title": "List specs",
|
|
35
44
|
"description": "List specs in the current project with optional status/type filters.",
|
|
36
45
|
"invocation": "planu spec list",
|
|
37
|
-
"hosts": [
|
|
46
|
+
"hosts": [
|
|
47
|
+
"codex",
|
|
48
|
+
"claude-code"
|
|
49
|
+
],
|
|
38
50
|
"requiresMcp": false,
|
|
39
51
|
"requiresDaemon": false,
|
|
40
52
|
"mapsTo": "handleListSpecs"
|
|
@@ -44,7 +56,10 @@
|
|
|
44
56
|
"title": "Validate spec",
|
|
45
57
|
"description": "Validate a spec against the current codebase from the native CLI surface.",
|
|
46
58
|
"invocation": "planu spec validate SPEC-001",
|
|
47
|
-
"hosts": [
|
|
59
|
+
"hosts": [
|
|
60
|
+
"codex",
|
|
61
|
+
"claude-code"
|
|
62
|
+
],
|
|
48
63
|
"requiresMcp": false,
|
|
49
64
|
"requiresDaemon": false,
|
|
50
65
|
"mapsTo": "handleValidate"
|
|
@@ -54,7 +69,10 @@
|
|
|
54
69
|
"title": "Audit technical debt",
|
|
55
70
|
"description": "Run the read-only project audit path for lightweight debt checks.",
|
|
56
71
|
"invocation": "planu audit debt",
|
|
57
|
-
"hosts": [
|
|
72
|
+
"hosts": [
|
|
73
|
+
"codex",
|
|
74
|
+
"claude-code"
|
|
75
|
+
],
|
|
58
76
|
"requiresMcp": false,
|
|
59
77
|
"requiresDaemon": false,
|
|
60
78
|
"mapsTo": "handleAudit"
|
|
@@ -64,7 +82,10 @@
|
|
|
64
82
|
"title": "Check release readiness",
|
|
65
83
|
"description": "Check local branch cleanliness and main/develop/release sync readiness.",
|
|
66
84
|
"invocation": "planu release check",
|
|
67
|
-
"hosts": [
|
|
85
|
+
"hosts": [
|
|
86
|
+
"codex",
|
|
87
|
+
"claude-code"
|
|
88
|
+
],
|
|
68
89
|
"requiresMcp": false,
|
|
69
90
|
"requiresDaemon": false,
|
|
70
91
|
"mapsTo": "releaseCommand"
|
package/planu-plugin.json
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
"name": "dev.planu.cli",
|
|
3
3
|
"displayName": "Planu — Spec Driven Development",
|
|
4
4
|
"description": "Manage software specs, estimations, and autonomous SDD workflows. Language-agnostic MCP server for Claude Code.",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.5.0",
|
|
6
6
|
"icon": "assets/plugin/icon.svg",
|
|
7
|
-
"command": [
|
|
7
|
+
"command": [
|
|
8
|
+
"npx",
|
|
9
|
+
"@planu/cli@latest"
|
|
10
|
+
],
|
|
8
11
|
"packageName": "@planu/cli",
|
|
9
12
|
"capabilities": {
|
|
10
13
|
"tools": [
|
|
@@ -23,17 +26,42 @@
|
|
|
23
26
|
"create_skill",
|
|
24
27
|
"skill_search"
|
|
25
28
|
],
|
|
26
|
-
"resources": [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
"resources": [
|
|
30
|
+
"planu://specs/list",
|
|
31
|
+
"planu://specs/{id}",
|
|
32
|
+
"planu://project/status",
|
|
33
|
+
"planu://roadmap"
|
|
34
|
+
],
|
|
35
|
+
"prompts": [
|
|
36
|
+
"create-spec-from-idea",
|
|
37
|
+
"review-spec-readiness",
|
|
38
|
+
"generate-implementation-plan"
|
|
39
|
+
],
|
|
40
|
+
"subagents": [
|
|
41
|
+
"sdd-orchestrator",
|
|
42
|
+
"spec-challenger",
|
|
43
|
+
"test-generator"
|
|
44
|
+
]
|
|
29
45
|
},
|
|
30
46
|
"compatibility": {
|
|
31
47
|
"minimumHostVersion": "1.0.0",
|
|
32
|
-
"requiredFeatures": [
|
|
48
|
+
"requiredFeatures": [
|
|
49
|
+
"mcp-tools",
|
|
50
|
+
"file-editing"
|
|
51
|
+
]
|
|
33
52
|
},
|
|
34
53
|
"repository": "https://github.com/planu-dev/planu",
|
|
35
54
|
"author": "Planu",
|
|
36
55
|
"license": "MIT",
|
|
37
56
|
"homepage": "https://planu.dev",
|
|
38
|
-
"keywords": [
|
|
57
|
+
"keywords": [
|
|
58
|
+
"sdd",
|
|
59
|
+
"spec-driven-development",
|
|
60
|
+
"mcp",
|
|
61
|
+
"specs",
|
|
62
|
+
"planning",
|
|
63
|
+
"ai",
|
|
64
|
+
"bdd",
|
|
65
|
+
"tdd"
|
|
66
|
+
]
|
|
39
67
|
}
|