@planu/cli 6.0.0 → 6.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/CHANGELOG.md +26 -0
- package/dist/.planu-build.json +1 -1
- package/dist/cli/commands/job.js +7 -1
- package/dist/cli/router.js +24 -5
- package/dist/config/official-sdd-tools.d.ts +0 -1
- package/dist/config/official-sdd-tools.js +0 -3
- package/dist/core/spec-validator.js +1 -1
- package/dist/engine/coach/i18n.d.ts +1 -1
- package/dist/engine/coach/i18n.js +2 -2
- package/dist/engine/code-scanner/layer-scanner.d.ts +3 -1
- package/dist/engine/code-scanner/layer-scanner.js +19 -3
- package/dist/engine/convention-scanner/codebase-scanner.js +140 -8
- package/dist/engine/conventions-ttl.d.ts +0 -2
- package/dist/engine/conventions-ttl.js +1 -1
- package/dist/engine/evidence-gates/artifact-reader.d.ts +0 -2
- package/dist/engine/evidence-gates/artifact-reader.js +0 -2
- package/dist/engine/execution/deadline-io.d.ts +1 -1
- package/dist/engine/execution/deadline-io.js +2 -2
- package/dist/engine/execution/package-handoff-job-executor.d.ts +1 -1
- package/dist/engine/execution/package-handoff-job-executor.js +42 -13
- package/dist/engine/execution/startup-recovery.d.ts +3 -0
- package/dist/engine/execution/startup-recovery.js +15 -0
- package/dist/engine/execution/validate-job-executor.d.ts +1 -1
- package/dist/engine/execution/validate-job-executor.js +23 -3
- package/dist/engine/handoff-packager.d.ts +2 -0
- package/dist/engine/handoff-packager.js +25 -9
- package/dist/engine/network-policy.js +31 -0
- package/dist/engine/test-selection/policy.js +1 -1
- package/dist/engine/validation-evidence-ledger.js +8 -37
- package/dist/engine/validation-impact-planner.d.ts +1 -3
- package/dist/engine/validation-impact-planner.js +2 -18
- package/dist/engine/validator/analyzer.js +0 -1
- package/dist/engine/validator/reliability-gate.js +6 -1
- package/dist/index.js +3 -11
- package/dist/security/adapters/local-file.js +8 -1
- package/dist/security/secret-provider.js +0 -2
- package/dist/storage/migrations/sdd-core-v6.js +101 -23
- package/dist/storage/project-identity.js +18 -2
- package/dist/tools/check-readiness.js +45 -35
- package/dist/tools/create-spec.js +18 -22
- package/dist/tools/init-project/agents-md-writer.js +0 -3
- package/dist/tools/package-handoff.js +19 -16
- package/dist/tools/update-status/approval-gates.d.ts +1 -1
- package/dist/tools/update-status/approval-gates.js +28 -5
- package/dist/tools/update-status/evidence-payload.d.ts +0 -2
- package/dist/tools/update-status/index.d.ts +1 -1
- package/dist/tools/update-status/index.js +25 -12
- package/dist/tools/update-status/transition-guard.d.ts +1 -1
- package/dist/tools/update-status/transition-guard.js +18 -2
- package/dist/tools/validate.js +29 -7
- package/dist/types/common/learning.d.ts +0 -17
- package/dist/types/durable-job.d.ts +15 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +0 -3
- package/dist/types/living-spec/annotations.d.ts +0 -30
- package/dist/types/living-spec/annotations.js +14 -0
- package/dist/types/living-spec.d.ts +0 -1
- package/dist/types/living-spec.js +0 -1
- package/dist/types/project/core.d.ts +0 -2
- package/dist/types/project/planu-config.d.ts +0 -1
- package/dist/types/readiness.d.ts +2 -0
- package/dist/types/security.d.ts +1 -1
- package/dist/types/spec-quality.d.ts +0 -20
- package/dist/types/timing.d.ts +0 -6
- package/dist/types/validation-evidence.d.ts +2 -2
- package/dist/types/validation.d.ts +2 -0
- package/package.json +10 -9
- package/scripts/check-reliability-policies.mjs +504 -0
- package/dist/engine/timing/structured-log.d.ts +0 -10
- package/dist/engine/timing/structured-log.js +0 -36
- package/dist/types/analysis-detection.d.ts +0 -14
- package/dist/types/analysis-detection.js +0 -5
- package/dist/types/lessons.d.ts +0 -28
- package/dist/types/lessons.js +0 -3
- package/dist/types/living-spec/dashboard-and-sync.d.ts +0 -82
- package/dist/types/living-spec/dashboard-and-sync.js +0 -3
- package/dist/types/vector-store.d.ts +0 -46
- package/dist/types/vector-store.js +0 -21
- package/planu-plugin.json +0 -35
package/dist/tools/validate.js
CHANGED
|
@@ -177,7 +177,13 @@ export function createValidationStageRunner(onProgress) {
|
|
|
177
177
|
}
|
|
178
178
|
/** Public MCP boundary: persist and acknowledge validation work without running it inline. */
|
|
179
179
|
export async function handleValidate(args) {
|
|
180
|
-
|
|
180
|
+
let projectId;
|
|
181
|
+
try {
|
|
182
|
+
projectId = resolveProjectId(args);
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
return validationWorktreeErrorResult(error, args.specId);
|
|
186
|
+
}
|
|
181
187
|
if (!projectId) {
|
|
182
188
|
return missingProjectIdError;
|
|
183
189
|
}
|
|
@@ -209,8 +215,8 @@ export async function handleValidate(args) {
|
|
|
209
215
|
structuredContent: { error: 'project_not_found', code: 404, context: { projectId } },
|
|
210
216
|
};
|
|
211
217
|
}
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
218
|
+
const storedSpec = await specStore.getSpec(projectId, args.specId, args.projectPath === undefined ? knowledge.projectPath : undefined);
|
|
219
|
+
if (!storedSpec?.specPath) {
|
|
214
220
|
return {
|
|
215
221
|
content: [{ type: 'text', text: ti('spec.notFound', { id: args.specId }) }],
|
|
216
222
|
isError: true,
|
|
@@ -223,16 +229,32 @@ export async function handleValidate(args) {
|
|
|
223
229
|
}
|
|
224
230
|
let validationWorktree;
|
|
225
231
|
try {
|
|
232
|
+
const requestedProjectPath = args.projectPath ?? knowledge.projectPath;
|
|
233
|
+
const selectedSpecPath = isAbsolute(storedSpec.specPath)
|
|
234
|
+
? storedSpec.specPath
|
|
235
|
+
: join(requestedProjectPath, storedSpec.specPath);
|
|
226
236
|
validationWorktree = await resolveValidationWorktree({
|
|
227
|
-
requestedProjectPath
|
|
237
|
+
requestedProjectPath,
|
|
228
238
|
canonicalProjectPath: knowledge.projectPath,
|
|
229
|
-
canonicalSpecPath:
|
|
239
|
+
canonicalSpecPath: selectedSpecPath,
|
|
230
240
|
specId: args.specId,
|
|
231
241
|
});
|
|
232
242
|
}
|
|
233
243
|
catch (error) {
|
|
234
244
|
return validationWorktreeErrorResult(error, args.specId);
|
|
235
245
|
}
|
|
246
|
+
const spec = await specStore.getSpec(projectId, args.specId, validationWorktree.projectPath);
|
|
247
|
+
if (!spec) {
|
|
248
|
+
return {
|
|
249
|
+
content: [{ type: 'text', text: ti('spec.notFound', { id: args.specId }) }],
|
|
250
|
+
isError: true,
|
|
251
|
+
structuredContent: {
|
|
252
|
+
error: 'spec_not_found',
|
|
253
|
+
code: 404,
|
|
254
|
+
context: { specId: args.specId, projectId },
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
}
|
|
236
258
|
const submissionLock = await acquireValidationSubmissionLock(projectId, args.specId);
|
|
237
259
|
try {
|
|
238
260
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
@@ -371,7 +393,8 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
371
393
|
},
|
|
372
394
|
};
|
|
373
395
|
}
|
|
374
|
-
const
|
|
396
|
+
const projectPath = args.projectPath ?? knowledge.projectPath;
|
|
397
|
+
const spec = await specStore.getSpec(projectId, specId, projectPath);
|
|
375
398
|
if (!spec) {
|
|
376
399
|
return {
|
|
377
400
|
content: [{ type: 'text', text: ti('spec.notFound', { id: specId }) }],
|
|
@@ -384,7 +407,6 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
384
407
|
},
|
|
385
408
|
};
|
|
386
409
|
}
|
|
387
|
-
const projectPath = args.projectPath ?? knowledge.projectPath;
|
|
388
410
|
const executionSpec = args.specPath ? { ...spec, specPath: args.specPath } : spec;
|
|
389
411
|
const runStage = createValidationStageRunner(onProgress);
|
|
390
412
|
// SPEC-1017: fail closed when planu/ contains non-canonical artifacts.
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
import type { ExecutionMode } from './primitives.js';
|
|
2
|
-
export interface CalibrationMetrics {
|
|
3
|
-
specId: string;
|
|
4
|
-
estimatedHours: number;
|
|
5
|
-
actualHours: number;
|
|
6
|
-
estimatedComplexity: number;
|
|
7
|
-
actualComplexity: number;
|
|
8
|
-
specCompleteness: number;
|
|
9
|
-
driftCount: number;
|
|
10
|
-
completedAt: string;
|
|
11
|
-
}
|
|
12
|
-
export interface CalibrationState {
|
|
13
|
-
totalSpecs: number;
|
|
14
|
-
avgAccuracy: number;
|
|
15
|
-
coefficients: Record<string, number>;
|
|
16
|
-
history: CalibrationMetrics[];
|
|
17
|
-
lastCalibrated: string;
|
|
18
|
-
}
|
|
19
2
|
export interface LearnedRegistryEntry {
|
|
20
3
|
id: string;
|
|
21
4
|
registry: string;
|
|
@@ -36,13 +36,23 @@ export interface ValidateDurableJobPayload {
|
|
|
36
36
|
readonly freshnessLease?: ValidationFreshnessLease;
|
|
37
37
|
readonly specPath: string;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
interface PackageHandoffDurableJobPayloadV1 {
|
|
40
40
|
readonly kind: 'package-handoff';
|
|
41
41
|
readonly schemaVersion: 1;
|
|
42
42
|
readonly projectId: string;
|
|
43
43
|
readonly specId: string;
|
|
44
44
|
readonly specVersion: string;
|
|
45
45
|
}
|
|
46
|
+
interface PackageHandoffDurableJobPayloadV2 {
|
|
47
|
+
readonly kind: 'package-handoff';
|
|
48
|
+
readonly schemaVersion: 2;
|
|
49
|
+
readonly projectId: string;
|
|
50
|
+
readonly specId: string;
|
|
51
|
+
readonly specVersion: string;
|
|
52
|
+
readonly selectedProjectPath: string;
|
|
53
|
+
readonly selectedSpecPath: string;
|
|
54
|
+
}
|
|
55
|
+
export type PackageHandoffDurableJobPayload = PackageHandoffDurableJobPayloadV1 | PackageHandoffDurableJobPayloadV2;
|
|
46
56
|
/** Outcome of one deadline-bounded package-handoff stage execution. */
|
|
47
57
|
interface PackageHandoffStageOutcome<T> {
|
|
48
58
|
readonly ok: boolean;
|
|
@@ -101,5 +111,9 @@ export interface DurableJobRecord {
|
|
|
101
111
|
readonly createdAt: string;
|
|
102
112
|
readonly updatedAt: string;
|
|
103
113
|
}
|
|
114
|
+
export interface DurableJobRecoveryActions {
|
|
115
|
+
recoverValidate(): Promise<void>;
|
|
116
|
+
recoverPackageHandoff(): Promise<void>;
|
|
117
|
+
}
|
|
104
118
|
export {};
|
|
105
119
|
//# sourceMappingURL=durable-job.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from './spec/index.js';
|
|
|
4
4
|
export * from './project.js';
|
|
5
5
|
export * from './project-knowledge-graph.js';
|
|
6
6
|
export * from './analysis.js';
|
|
7
|
-
export * from './analysis-detection.js';
|
|
8
7
|
export * from './execution.js';
|
|
9
8
|
export * from './stack/index.js';
|
|
10
9
|
export * from './mcp.js';
|
|
@@ -49,7 +48,6 @@ export * from './elicitation.js';
|
|
|
49
48
|
export type * from './verifiable-criteria.js';
|
|
50
49
|
export * from './conventions.js';
|
|
51
50
|
export * from './status.js';
|
|
52
|
-
export * from './lessons.js';
|
|
53
51
|
export * from './housekeeping.js';
|
|
54
52
|
export * from './cross-repo-search.js';
|
|
55
53
|
export * from './spec-lock.js';
|
|
@@ -74,7 +72,6 @@ export * from './validation-config.js';
|
|
|
74
72
|
export * from './nli-context.js';
|
|
75
73
|
export * from './reviewer-tokens.js';
|
|
76
74
|
export * from './legacy-guidance.js';
|
|
77
|
-
export * from './vector-store.js';
|
|
78
75
|
export * from './universal-rules/index.js';
|
|
79
76
|
export * from './opencode.js';
|
|
80
77
|
export * from './host-tool-filter.js';
|
package/dist/types/index.js
CHANGED
|
@@ -5,7 +5,6 @@ export * from './spec/index.js';
|
|
|
5
5
|
export * from './project.js';
|
|
6
6
|
export * from './project-knowledge-graph.js';
|
|
7
7
|
export * from './analysis.js';
|
|
8
|
-
export * from './analysis-detection.js';
|
|
9
8
|
export * from './execution.js';
|
|
10
9
|
export * from './stack/index.js';
|
|
11
10
|
export * from './mcp.js';
|
|
@@ -49,7 +48,6 @@ export * from './sdd-constitution.js';
|
|
|
49
48
|
export * from './elicitation.js';
|
|
50
49
|
export * from './conventions.js';
|
|
51
50
|
export * from './status.js';
|
|
52
|
-
export * from './lessons.js';
|
|
53
51
|
export * from './housekeeping.js';
|
|
54
52
|
export * from './cross-repo-search.js';
|
|
55
53
|
export * from './spec-lock.js';
|
|
@@ -74,7 +72,6 @@ export * from './validation-config.js';
|
|
|
74
72
|
export * from './nli-context.js';
|
|
75
73
|
export * from './reviewer-tokens.js';
|
|
76
74
|
export * from './legacy-guidance.js';
|
|
77
|
-
export * from './vector-store.js';
|
|
78
75
|
// SPEC-753: workspace_overview + reconcile_status_json types
|
|
79
76
|
// SPEC-756: MCP config auto-update types
|
|
80
77
|
// SPEC-773: CVE refresh log
|
|
@@ -18,29 +18,8 @@ export interface SpecAnnotation {
|
|
|
18
18
|
/** A single annotation validation entry. */
|
|
19
19
|
/** Suggestion for annotating a file that lacks annotations. */
|
|
20
20
|
/** SHA-256 hash snapshot of a file. */
|
|
21
|
-
interface FileHashEntry {
|
|
22
|
-
file: string;
|
|
23
|
-
hash: string;
|
|
24
|
-
/** Size in bytes. */
|
|
25
|
-
size: number;
|
|
26
|
-
/** ISO timestamp of last snapshot. */
|
|
27
|
-
snapshotAt: string;
|
|
28
|
-
}
|
|
29
21
|
/** Exported function signature tracked for drift detection. */
|
|
30
|
-
interface FunctionSignature {
|
|
31
|
-
name: string;
|
|
32
|
-
params: string;
|
|
33
|
-
returnType: string;
|
|
34
|
-
file: string;
|
|
35
|
-
line: number;
|
|
36
|
-
}
|
|
37
22
|
/** A complete hash snapshot for a spec, including file hashes and function signatures. */
|
|
38
|
-
export interface SpecHashSnapshot {
|
|
39
|
-
specId: string;
|
|
40
|
-
createdAt: string;
|
|
41
|
-
files: FileHashEntry[];
|
|
42
|
-
signatures: FunctionSignature[];
|
|
43
|
-
}
|
|
44
23
|
/** Change classification for function signatures. */
|
|
45
24
|
/** A single signature change between two snapshots. */
|
|
46
25
|
/** File hash diff between two snapshots. */
|
|
@@ -48,15 +27,6 @@ export interface SpecHashSnapshot {
|
|
|
48
27
|
/** Extended criterion status that includes annotation-based statuses. */
|
|
49
28
|
/** Extended drift report fields for annotation-based mode. */
|
|
50
29
|
/** Entry in the auto-reconciliation log. */
|
|
51
|
-
export interface ReconcileLogEntry {
|
|
52
|
-
timestamp: string;
|
|
53
|
-
changeType: 'completion-update' | 'status-flip' | 'hash-update' | 'timestamp-update';
|
|
54
|
-
specId: string;
|
|
55
|
-
description: string;
|
|
56
|
-
previousValue: string;
|
|
57
|
-
newValue: string;
|
|
58
|
-
}
|
|
59
|
-
export {};
|
|
60
30
|
/** Classification of reconciliation changes. */
|
|
61
31
|
/** Input for the validate_annotations tool. */
|
|
62
32
|
/** Input for the generate_annotations tool. */
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
// Planu — Living Spec types: annotations, hashing, signatures, reconciliation
|
|
2
2
|
export {};
|
|
3
|
+
/** Result of parsing all @spec annotations from a set of files. */
|
|
4
|
+
/** Result of validating annotations against stored specs. */
|
|
5
|
+
/** A single annotation validation entry. */
|
|
6
|
+
/** Suggestion for annotating a file that lacks annotations. */
|
|
7
|
+
/** SHA-256 hash snapshot of a file. */
|
|
8
|
+
/** Exported function signature tracked for drift detection. */
|
|
9
|
+
/** A complete hash snapshot for a spec, including file hashes and function signatures. */
|
|
10
|
+
/** Change classification for function signatures. */
|
|
11
|
+
/** A single signature change between two snapshots. */
|
|
12
|
+
/** File hash diff between two snapshots. */
|
|
13
|
+
/** Report of hash and signature changes for a spec. */
|
|
14
|
+
/** Extended criterion status that includes annotation-based statuses. */
|
|
15
|
+
/** Extended drift report fields for annotation-based mode. */
|
|
16
|
+
/** Entry in the auto-reconciliation log. */
|
|
3
17
|
/** Classification of reconciliation changes. */
|
|
4
18
|
/** Input for the validate_annotations tool. */
|
|
5
19
|
/** Input for the generate_annotations tool. */
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
// 500-line file-size hard limit. Consumers should keep importing from
|
|
4
4
|
// '@/types/index.js' (or this barrel) — no call-site changes needed.
|
|
5
5
|
export * from './living-spec/annotations.js';
|
|
6
|
-
export * from './living-spec/dashboard-and-sync.js';
|
|
7
6
|
//# sourceMappingURL=living-spec.js.map
|
|
@@ -8,7 +8,6 @@ import type { HypermediaFramework, TurboSubtype, RenderingMode, BuildToolDetecti
|
|
|
8
8
|
import type { EdgeDbDetectionResult } from '../edge-db.js';
|
|
9
9
|
import type { LegalProfile } from '../legal.js';
|
|
10
10
|
import type { AiNativeDetectionResult } from '../ai-native.js';
|
|
11
|
-
import type { OtelDetectionResult } from '../analysis-detection.js';
|
|
12
11
|
import type { LlmDetectionResult } from '../llm-security.js';
|
|
13
12
|
import type { SupplyChainReport } from '../supply-chain.js';
|
|
14
13
|
import type { LocalFirstDetectionResult } from '../local-first.js';
|
|
@@ -86,7 +85,6 @@ export interface ProjectKnowledge {
|
|
|
86
85
|
rendering?: RenderingMode;
|
|
87
86
|
templateEngine?: string;
|
|
88
87
|
hasBundler?: boolean;
|
|
89
|
-
otelDetection?: OtelDetectionResult;
|
|
90
88
|
supplyChain?: SupplyChainReport;
|
|
91
89
|
llmDetection?: LlmDetectionResult;
|
|
92
90
|
localFirst?: LocalFirstDetectionResult;
|
|
@@ -121,7 +121,6 @@ export interface InitProjectResultInput {
|
|
|
121
121
|
/** SPEC-187: Architecture rules files skipped (already existed) */
|
|
122
122
|
architectureRulesSkipped: string[];
|
|
123
123
|
/** SPEC-200: One-time opt-in prompt shown on first init_project (null if already prompted) */
|
|
124
|
-
telemetryOptInPrompt?: string | null;
|
|
125
124
|
/** SPEC-232: Result of the post-init convention scan ('ok' | 'failed' | 'skipped') */
|
|
126
125
|
conventionScanStatus?: 'ok' | 'failed' | 'skipped';
|
|
127
126
|
/** SPEC-263: Planu hooks configured in .claude.json */
|
|
@@ -67,6 +67,8 @@ export interface HandoffVersionFence {
|
|
|
67
67
|
readonly specVersion: string;
|
|
68
68
|
readonly getCurrentSpecVersion: () => Promise<string | undefined>;
|
|
69
69
|
readonly signal?: AbortSignal;
|
|
70
|
+
/** Durable executors already verified the selected root, so read failures must remain terminal. */
|
|
71
|
+
readonly strictSpecRead?: boolean;
|
|
70
72
|
}
|
|
71
73
|
export interface PackageHandoffInput {
|
|
72
74
|
projectId?: string;
|
package/dist/types/security.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SecretStoreKind = 'local-file' | 'macos-keychain' | '
|
|
1
|
+
export type SecretStoreKind = 'local-file' | 'macos-keychain' | 'environment';
|
|
2
2
|
export type MacOSKeychainOperation = 'get' | 'set' | 'delete';
|
|
3
3
|
export interface MacOSKeychainPendingOperation {
|
|
4
4
|
readonly fence: number;
|
|
@@ -50,27 +50,7 @@ export interface GenericSpecOutputGateResult {
|
|
|
50
50
|
issues: GenericSpecOutputIssue[];
|
|
51
51
|
}
|
|
52
52
|
/** A single over-engineering signal detected in a spec. SPEC-485 */
|
|
53
|
-
export interface ComplexitySignal {
|
|
54
|
-
type: string;
|
|
55
|
-
description: string;
|
|
56
|
-
evidence: string;
|
|
57
|
-
}
|
|
58
53
|
/** Simplicity analysis result for a spec. SPEC-485 */
|
|
59
|
-
export interface SimplicityCheck {
|
|
60
|
-
/** Score 0-100, higher = simpler design */
|
|
61
|
-
score: number;
|
|
62
|
-
/** Over-engineering signals detected in the spec text */
|
|
63
|
-
signals: ComplexitySignal[];
|
|
64
|
-
/** Suggested simpler alternative, or null if none needed */
|
|
65
|
-
simpleAlternative: string | null;
|
|
66
|
-
/** Effort vs value assessment */
|
|
67
|
-
effortVsValue: {
|
|
68
|
-
estimatedHours: number;
|
|
69
|
-
roi: 'low' | 'medium' | 'high';
|
|
70
|
-
};
|
|
71
|
-
/** Overall recommendation */
|
|
72
|
-
recommendation: 'approve' | 'simplify' | 'review';
|
|
73
|
-
}
|
|
74
54
|
/** Result of zero-ambiguity criteria quality check. SPEC-486 */
|
|
75
55
|
export interface CriteriaQualityResult {
|
|
76
56
|
/** Score 0-100: 50pts for GWT, 30pts for concrete value, 20pts for function ref */
|
package/dist/types/timing.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/** A structured timing record emitted during create_spec instrumentation. */
|
|
2
|
-
export interface TimingRecord {
|
|
3
|
-
step: string;
|
|
4
|
-
durationMs: number;
|
|
5
|
-
ts: string;
|
|
6
|
-
}
|
|
7
1
|
/** Result when a budget-wrapped step exceeds its time limit. */
|
|
8
2
|
interface BudgetExceeded {
|
|
9
3
|
exceeded: true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AbortableProcessOptions, AbortableProcessResult } from './abortable-process.js';
|
|
2
2
|
import type { BuildFreshnessResult } from './build-freshness.js';
|
|
3
3
|
export declare const VALIDATION_EVIDENCE_SCHEMA_VERSION: '1.0.0';
|
|
4
|
-
export type ValidationGateCapability = 'typecheck' | 'lint' | 'test-related' | 'test-full' | 'contract' | 'coverage' | 'migration' | 'fault-injection' | 'security' | '
|
|
4
|
+
export type ValidationGateCapability = 'typecheck' | 'lint' | 'test-related' | 'test-full' | 'contract' | 'coverage' | 'migration' | 'fault-injection' | 'security' | 'reproducibility';
|
|
5
5
|
type ValidationEvidenceStatus = 'passed' | 'failed' | 'cancelled' | 'invalidated';
|
|
6
6
|
export interface ValidationEvidenceKeyInput {
|
|
7
7
|
projectPath: string;
|
|
@@ -55,7 +55,7 @@ export interface ValidationEvidenceAudit {
|
|
|
55
55
|
timeSavedMs: number;
|
|
56
56
|
}
|
|
57
57
|
export interface ValidationImpactPlan {
|
|
58
|
-
kind: 'none' | 'lifecycle' | 'source' | 'dependency' | '
|
|
58
|
+
kind: 'none' | 'lifecycle' | 'source' | 'dependency' | 'full';
|
|
59
59
|
gates: ValidationGateCapability[];
|
|
60
60
|
heavy: boolean;
|
|
61
61
|
reason: string;
|
|
@@ -47,6 +47,8 @@ export interface SpecValidationResult {
|
|
|
47
47
|
* Options for validateSpecFormat().
|
|
48
48
|
*/
|
|
49
49
|
export interface ValidateSpecFormatOptions {
|
|
50
|
+
/** Exact spec.md snapshot supplied by a caller that already performed the bounded read. */
|
|
51
|
+
rawSpec?: string | null;
|
|
50
52
|
/**
|
|
51
53
|
* When true, runs only fast structural checks (frontmatter shape, required
|
|
52
54
|
* sections). Skips quality scoring.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Planu — MCP Server for Spec Driven Development. Cross-platform (Linux/macOS/Windows, x64/arm64).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"!dist/**/*.map",
|
|
17
17
|
"scripts/lib/portable-paths.mjs",
|
|
18
18
|
"src/i18n/messages/",
|
|
19
|
-
"
|
|
19
|
+
"scripts/check-reliability-policies.mjs",
|
|
20
20
|
"README.md",
|
|
21
21
|
"CHANGELOG.md",
|
|
22
22
|
"LICENSE"
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
"check:sdd-core": "node scripts/check-sdd-core-closure.mjs",
|
|
50
50
|
"measure:sdd-core": "node scripts/measure-sdd-core.mjs --baseline tests/fixtures/sdd-core-baseline.json --measure-current",
|
|
51
51
|
"check:destructive-ops": "bash scripts/check-no-automatic-destructive-ops.sh",
|
|
52
|
-
"check:
|
|
53
|
-
"check:
|
|
52
|
+
"check:deps:fresh": "node scripts/check-dependency-freshness.mjs",
|
|
53
|
+
"check:strict": "pnpm check && pnpm generate:host-tool-registry -- --check && node scripts/prune-dead-exports.mjs --check && pnpm audit:deadcode && pnpm audit:circular && pnpm audit:types",
|
|
54
|
+
"check:preflight": "pnpm check:deps:fresh && pnpm check && pnpm test:contracts && pnpm measure:sdd-core && pnpm build",
|
|
54
55
|
"test:contracts": "node scripts/test-contracts.mjs",
|
|
55
56
|
"test:migrations": "vitest run tests/storage/corruption-contract.test.ts tests/integration/runtime-storage.test.ts tests/integration/canonical-storage-migration.test.ts tests/storage/sdd-core-migration.test.ts",
|
|
56
57
|
"test:fault-injection": "vitest run tests/integration/durable-job-runtime.test.ts tests/integration/idempotent-operations.test.ts tests/storage/sdd-core-migration.test.ts",
|
|
57
58
|
"audit:deadcode": "knip",
|
|
58
|
-
"audit:circular": "madge --circular --extensions ts src/",
|
|
59
|
+
"audit:circular": "madge --circular --extensions ts --ts-config tsconfig.json src/",
|
|
59
60
|
"audit:types": "type-coverage --at-least 98 --ignore-catch --strict --ignore-files 'tests/**'",
|
|
60
61
|
"prepare": "husky || true",
|
|
61
62
|
"prepack": "pnpm build:ts && pnpm package:size",
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
103
104
|
"glob": "^13.0.6",
|
|
104
105
|
"yaml": "^2.9.0",
|
|
105
|
-
"zod": "^4.
|
|
106
|
+
"zod": "^4.6.1"
|
|
106
107
|
},
|
|
107
108
|
"devDependencies": {
|
|
108
109
|
"@commitlint/cli": "^21.2.2",
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"@eslint/js": "^10.0.1",
|
|
111
112
|
"@secretlint/secretlint-rule-no-homedir": "^13.0.5",
|
|
112
113
|
"@secretlint/secretlint-rule-preset-recommend": "^13.0.5",
|
|
113
|
-
"@types/node": "^
|
|
114
|
+
"@types/node": "^22.20.2",
|
|
114
115
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
115
116
|
"@vitest/coverage-v8": "^5.0.0",
|
|
116
117
|
"eslint": "10.10.0",
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"eslint-plugin-import": "^2.32.0",
|
|
120
121
|
"husky": "^9.1.7",
|
|
121
122
|
"jiti": "2.7.0",
|
|
122
|
-
"knip": "^6.
|
|
123
|
+
"knip": "^6.35.1",
|
|
123
124
|
"lint-staged": "^17.5.0",
|
|
124
125
|
"madge": "^8.0.0",
|
|
125
126
|
"prettier": "^3.9.6",
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
"tsc-alias": "^1.9.4",
|
|
128
129
|
"type-coverage": "^2.30.1",
|
|
129
130
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
130
|
-
"typescript-eslint": "^8.
|
|
131
|
+
"typescript-eslint": "^8.70.0",
|
|
131
132
|
"vite": "^8.2.2",
|
|
132
133
|
"vitest": "^5.0.0"
|
|
133
134
|
}
|