@planu/cli 4.3.25 → 4.4.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 (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/engine/constitution/sdd-rules-registry.d.ts +12 -0
  3. package/dist/engine/constitution/sdd-rules-registry.js +105 -0
  4. package/dist/engine/evidence-index/done-drift.d.ts +6 -0
  5. package/dist/engine/evidence-index/done-drift.js +44 -0
  6. package/dist/engine/evidence-index/index-builder.d.ts +10 -0
  7. package/dist/engine/evidence-index/index-builder.js +138 -0
  8. package/dist/engine/host-rules-templates/templates.js +3 -0
  9. package/dist/engine/spec-format/lean-spec-generator.js +17 -12
  10. package/dist/engine/spec-grounding/contract.d.ts +19 -0
  11. package/dist/engine/spec-grounding/contract.js +186 -0
  12. package/dist/engine/spec-metrics/actionable-metrics.d.ts +10 -0
  13. package/dist/engine/spec-metrics/actionable-metrics.js +69 -0
  14. package/dist/engine/spec-quality/generic-output-gate.d.ts +3 -0
  15. package/dist/engine/spec-quality/generic-output-gate.js +105 -0
  16. package/dist/tools/create-spec.js +160 -30
  17. package/dist/tools/update-status/evidence-gate.js +23 -6
  18. package/dist/tools/update-status/transition-guard.js +49 -0
  19. package/dist/types/actionable-spec-metrics.d.ts +8 -0
  20. package/dist/types/actionable-spec-metrics.js +2 -0
  21. package/dist/types/evidence-gates.d.ts +1 -1
  22. package/dist/types/evidence-index.d.ts +24 -0
  23. package/dist/types/evidence-index.js +2 -0
  24. package/dist/types/index.d.ts +5 -0
  25. package/dist/types/index.js +5 -0
  26. package/dist/types/sdd-constitution.d.ts +27 -0
  27. package/dist/types/sdd-constitution.js +2 -0
  28. package/dist/types/spec-format.d.ts +7 -0
  29. package/dist/types/spec-grounding.d.ts +22 -0
  30. package/dist/types/spec-grounding.js +2 -0
  31. package/dist/types/spec-quality.d.ts +10 -0
  32. package/package.json +9 -9
  33. package/planu-native.json +29 -8
  34. package/planu-plugin.json +35 -7
@@ -25,6 +25,8 @@ export * from './migration/index.js';
25
25
  export * from './migration-advanced.js';
26
26
  export * from './privacy.js';
27
27
  export * from './events.js';
28
+ export * from './evidence-gates.js';
29
+ export * from './evidence-index.js';
28
30
  export * from './analytics.js';
29
31
  export * from './sdd-flow.js';
30
32
  export * from './sdd-model-routing.js';
@@ -48,6 +50,7 @@ export * from './dynamic-migration.js';
48
50
  export * from './multi-agent.js';
49
51
  export * from './ai-native.js';
50
52
  export * from './actuals-tracking.js';
53
+ export * from './actionable-spec-metrics.js';
51
54
  export * from './actuals.js';
52
55
  export * from './risk.js';
53
56
  export * from './context-budget.js';
@@ -62,6 +65,7 @@ export * from './webhook.js';
62
65
  export * from './ci.js';
63
66
  export * from './spec-templates.js';
64
67
  export * from './spec-generator.js';
68
+ export * from './spec-grounding.js';
65
69
  export * from './registry.js';
66
70
  export * from './tool-groups.js';
67
71
  export * from './code-transforms.js';
@@ -104,6 +108,7 @@ export * from './legal.js';
104
108
  export * from './mcp-recommendation.js';
105
109
  export * from './approval.js';
106
110
  export * from './scan-project.js';
111
+ export * from './sdd-constitution.js';
107
112
  export * from './import-spec.js';
108
113
  export * from './error-telemetry.js';
109
114
  export * from './audit-trail.js';
@@ -26,6 +26,8 @@ export * from './migration/index.js';
26
26
  export * from './migration-advanced.js';
27
27
  export * from './privacy.js';
28
28
  export * from './events.js';
29
+ export * from './evidence-gates.js';
30
+ export * from './evidence-index.js';
29
31
  export * from './analytics.js';
30
32
  export * from './sdd-flow.js';
31
33
  export * from './sdd-model-routing.js';
@@ -49,6 +51,7 @@ export * from './dynamic-migration.js';
49
51
  export * from './multi-agent.js';
50
52
  export * from './ai-native.js';
51
53
  export * from './actuals-tracking.js';
54
+ export * from './actionable-spec-metrics.js';
52
55
  export * from './actuals.js';
53
56
  export * from './risk.js';
54
57
  export * from './context-budget.js';
@@ -63,6 +66,7 @@ export * from './webhook.js';
63
66
  export * from './ci.js';
64
67
  export * from './spec-templates.js';
65
68
  export * from './spec-generator.js';
69
+ export * from './spec-grounding.js';
66
70
  export * from './registry.js';
67
71
  export * from './tool-groups.js';
68
72
  export * from './code-transforms.js';
@@ -105,6 +109,7 @@ export * from './legal.js';
105
109
  export * from './mcp-recommendation.js';
106
110
  export * from './approval.js';
107
111
  export * from './scan-project.js';
112
+ export * from './sdd-constitution.js';
108
113
  export * from './import-spec.js';
109
114
  export * from './error-telemetry.js';
110
115
  export * from './audit-trail.js';
@@ -0,0 +1,27 @@
1
+ export type SddConstitutionRuleLevel = 'blocking' | 'advisory';
2
+ export interface SddConstitutionRule {
3
+ id: string;
4
+ title: string;
5
+ level: SddConstitutionRuleLevel;
6
+ category: 'grounding' | 'quality' | 'evidence' | 'approval' | 'metrics';
7
+ description: string;
8
+ nextAction: string;
9
+ }
10
+ export interface SddConstitutionOverride {
11
+ ruleId: string;
12
+ level?: SddConstitutionRuleLevel;
13
+ enabled?: boolean;
14
+ rationale: string;
15
+ }
16
+ export interface EffectiveSddConstitutionRule extends SddConstitutionRule {
17
+ enabled: boolean;
18
+ overrideRationale?: string;
19
+ }
20
+ export interface SddConstitutionViolation {
21
+ ruleId: string;
22
+ level: SddConstitutionRuleLevel;
23
+ message: string;
24
+ evidence: string[];
25
+ nextAction: string;
26
+ }
27
+ //# sourceMappingURL=sdd-constitution.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sdd-constitution.js.map
@@ -1,6 +1,7 @@
1
1
  import type { Spec } from './spec/core.js';
2
2
  import type { Estimation } from './estimation.js';
3
3
  import type { SpecStatus } from './common/index.js';
4
+ import type { CriterionGroundingRecord, TechnicalReferenceGroundingRecord } from './spec-grounding.js';
4
5
  /** A criterion in the lean spec frontmatter. */
5
6
  export interface LeanCriterion {
6
7
  text: string;
@@ -29,6 +30,12 @@ export interface LeanSpecInput {
29
30
  estimation: Estimation;
30
31
  /** SPEC-461 Phase 3: Extra criteria from autopilot pattern detection. */
31
32
  extraCriteria?: string[];
33
+ /** SPEC-1074: Explicit criteria after grounding filters are applied. */
34
+ criteriaOverride?: LeanCriterion[];
35
+ /** SPEC-1074: Criterion-level grounding records for new specs. */
36
+ groundingCriteria?: CriterionGroundingRecord[];
37
+ /** SPEC-1074: Technical reference grounding records for new specs. */
38
+ groundingTechnicalReferences?: TechnicalReferenceGroundingRecord[];
32
39
  /** SPEC-481: Acceptance criteria format. Defaults to 'checkbox'. */
33
40
  acFormat?: 'checkbox' | 'bdd';
34
41
  }
@@ -0,0 +1,22 @@
1
+ export type GroundingSource = 'user_input' | 'project_evidence' | 'documented_assumption' | 'ungrounded_advisory';
2
+ export type GroundingConfidence = 'low' | 'medium' | 'high';
3
+ export interface CriterionGroundingRecord {
4
+ text: string;
5
+ source: GroundingSource;
6
+ evidence: string[];
7
+ confidence: GroundingConfidence;
8
+ }
9
+ export interface TechnicalReferenceGroundingRecord {
10
+ path: string;
11
+ section: 'create' | 'modify' | 'test';
12
+ source: GroundingSource;
13
+ evidence: string[];
14
+ confidence: GroundingConfidence;
15
+ }
16
+ export interface GroundingGateResult {
17
+ passed: boolean;
18
+ required: boolean;
19
+ issues: string[];
20
+ records: CriterionGroundingRecord[];
21
+ }
22
+ //# sourceMappingURL=spec-grounding.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=spec-grounding.js.map
@@ -35,6 +35,16 @@ export interface SpecQualityReport {
35
35
  risk: QualityDimensionDetail;
36
36
  };
37
37
  }
38
+ export type GenericSpecOutputIssueKind = 'generic-criterion' | 'unsupported-verification' | 'placeholder-reference' | 'generic-technical-reference';
39
+ export interface GenericSpecOutputIssue {
40
+ kind: GenericSpecOutputIssueKind;
41
+ phrase: string;
42
+ reason: string;
43
+ }
44
+ export interface GenericSpecOutputGateResult {
45
+ passed: boolean;
46
+ issues: GenericSpecOutputIssue[];
47
+ }
38
48
  /** A single over-engineering signal detected in a spec. SPEC-485 */
39
49
  export interface ComplexitySignal {
40
50
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "4.3.25",
3
+ "version": "4.4.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.3.25",
38
- "@planu/core-darwin-x64": "4.3.25",
39
- "@planu/core-linux-arm64-gnu": "4.3.25",
40
- "@planu/core-linux-arm64-musl": "4.3.25",
41
- "@planu/core-linux-x64-gnu": "4.3.25",
42
- "@planu/core-linux-x64-musl": "4.3.25",
43
- "@planu/core-win32-arm64-msvc": "4.3.25",
44
- "@planu/core-win32-x64-msvc": "4.3.25"
37
+ "@planu/core-darwin-arm64": "4.4.0",
38
+ "@planu/core-darwin-x64": "4.4.0",
39
+ "@planu/core-linux-arm64-gnu": "4.4.0",
40
+ "@planu/core-linux-arm64-musl": "4.4.0",
41
+ "@planu/core-linux-x64-gnu": "4.4.0",
42
+ "@planu/core-linux-x64-musl": "4.4.0",
43
+ "@planu/core-win32-arm64-msvc": "4.4.0",
44
+ "@planu/core-win32-x64-msvc": "4.4.0"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24.0.0"
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.3.25",
4
+ "version": "4.4.0",
5
5
  "packageName": "@planu/cli",
6
6
  "modes": {
7
7
  "lightweight": {
8
8
  "requiresMcp": false,
9
9
  "requiresDaemon": false,
10
- "hosts": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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": ["codex", "claude-code"],
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.3.25",
5
+ "version": "4.4.0",
6
6
  "icon": "assets/plugin/icon.svg",
7
- "command": ["npx", "@planu/cli@latest"],
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": ["planu://specs/list", "planu://specs/{id}", "planu://project/status", "planu://roadmap"],
27
- "prompts": ["create-spec-from-idea", "review-spec-readiness", "generate-implementation-plan"],
28
- "subagents": ["sdd-orchestrator", "spec-challenger", "test-generator"]
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": ["mcp-tools", "file-editing"]
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": ["sdd", "spec-driven-development", "mcp", "specs", "planning", "ai", "bdd", "tdd"]
57
+ "keywords": [
58
+ "sdd",
59
+ "spec-driven-development",
60
+ "mcp",
61
+ "specs",
62
+ "planning",
63
+ "ai",
64
+ "bdd",
65
+ "tdd"
66
+ ]
39
67
  }