@planu/cli 5.7.11 → 5.7.13
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 +43 -0
- package/dist/.planu-build.json +1 -1
- package/dist/cli/commands/doctor.d.ts +2 -1
- package/dist/cli/commands/doctor.js +51 -1
- package/dist/cli/commands/install.js +14 -0
- package/dist/cli/commands/package-handoff.js +10 -3
- package/dist/config/registries/strict-audit-scripts.json +4 -0
- package/dist/config/runtime-policy.json +2 -1
- package/dist/engine/abortable-process-runner.js +1 -0
- package/dist/engine/bump-carrier-binding.d.ts +10 -0
- package/dist/engine/bump-carrier-binding.js +276 -0
- package/dist/engine/doctor/npm-cache-check.d.ts +10 -0
- package/dist/engine/doctor/npm-cache-check.js +109 -0
- package/dist/engine/ears-gate.d.ts +1 -0
- package/dist/engine/ears-gate.js +64 -2
- package/dist/engine/framework-detector.d.ts +1 -0
- package/dist/engine/framework-detector.js +1 -1
- package/dist/engine/handoff-artifacts/schemas.d.ts +22 -0
- package/dist/engine/handoff-artifacts/schemas.js +13 -1
- package/dist/engine/runtime-policy.js +4 -0
- package/dist/engine/source-quality-binding.d.ts +26 -0
- package/dist/engine/source-quality-binding.js +162 -0
- package/dist/engine/source-quality-receipt-reader.d.ts +3 -0
- package/dist/engine/source-quality-receipt-reader.js +51 -0
- package/dist/engine/spec-format/bdd-parser.js +7 -4
- package/dist/engine/spec-format/technical-md-populator.js +114 -3
- package/dist/engine/spec-format/unified-spec-builder.js +33 -6
- package/dist/engine/spec-grounding/contract.js +3 -1
- package/dist/engine/spec-grounding/grounding-entry-parser.js +1 -0
- package/dist/engine/validator/blast-radius-gate.d.ts +3 -0
- package/dist/engine/validator/blast-radius-gate.js +225 -0
- package/dist/engine/validator/spec-compliance-runner.d.ts +2 -0
- package/dist/engine/validator/spec-compliance-runner.js +78 -25
- package/dist/engine/validator/strict-audits-gate.d.ts +3 -0
- package/dist/engine/validator/strict-audits-gate.js +74 -0
- package/dist/engine/validator/validation-report-writer.d.ts +2 -0
- package/dist/engine/validator/validation-report-writer.js +72 -32
- package/dist/storage/runtime-db.js +7 -3
- package/dist/storage/spec-store.js +6 -2
- package/dist/tools/challenge-spec/scenarios-data.js +4 -3
- package/dist/tools/challenge-spec/scenarios-utils.d.ts +1 -0
- package/dist/tools/challenge-spec/scenarios-utils.js +47 -3
- package/dist/tools/register-spec-tools/core-spec-tools.js +5 -0
- package/dist/tools/update-status/batch.js +1 -0
- package/dist/tools/update-status/file-sync.d.ts +1 -1
- package/dist/tools/update-status/file-sync.js +4 -2
- package/dist/tools/update-status/index.js +4 -1
- package/dist/tools/update-status/transition-guard.d.ts +0 -1
- package/dist/tools/update-status/transition-guard.js +9 -5
- package/dist/tools/validate-lint.js +19 -0
- package/dist/tools/validate.js +111 -4
- package/dist/types/abortable-process.d.ts +1 -0
- package/dist/types/handoff-artifacts.d.ts +11 -1
- package/dist/types/installation.d.ts +10 -0
- package/dist/types/runtime-policy.d.ts +1 -0
- package/dist/types/spec-format.d.ts +10 -0
- package/dist/types/spec-grounding.d.ts +1 -1
- package/dist/types/validation-evidence.d.ts +51 -1
- package/package.json +2 -2
- package/planu-plugin.json +1 -1
- package/src/i18n/messages/en.json +1 -1
- package/src/i18n/messages/es.json +1 -1
- package/src/i18n/messages/pt.json +1 -1
package/dist/tools/validate.js
CHANGED
|
@@ -69,8 +69,13 @@ import { validateContractCompliance } from '../engine/test-scaffold-generator.js
|
|
|
69
69
|
import { parseConventions, scanConventions } from '../engine/convention-scanner/index.js';
|
|
70
70
|
import { validateScopeCompliance } from '../engine/scope-boundaries/index.js';
|
|
71
71
|
import { compareWithBaseline } from '../storage/convention-baseline.js';
|
|
72
|
+
import { readFile } from 'node:fs/promises';
|
|
73
|
+
import { isAbsolute, join } from 'node:path';
|
|
72
74
|
import { writeImplementationReviewReport } from '../engine/validator/validation-report-writer.js';
|
|
73
75
|
import { runReliabilityGate } from '../engine/validator/reliability-gate.js';
|
|
76
|
+
import { runBlastRadiusGate } from '../engine/validator/blast-radius-gate.js';
|
|
77
|
+
import { runStrictAuditsGate } from '../engine/validator/strict-audits-gate.js';
|
|
78
|
+
import { collectDeclaredSpecFiles } from '../engine/validator/spec-compliance-runner.js';
|
|
74
79
|
import { buildGraphCoverageReport, formatGraphCoverageText } from './validate-graph-coverage.js';
|
|
75
80
|
import { buildMinimalityReport } from './validate-minimality.js';
|
|
76
81
|
import { buildValidateFailureFallback, validateStrictLayoutOrError } from './validate-helpers.js';
|
|
@@ -78,6 +83,7 @@ import { runLintCheck } from './validate-lint.js';
|
|
|
78
83
|
import { checkPlanuUncommittedChanges, runAssuranceGates } from './validate-assurance.js';
|
|
79
84
|
import { applyValidateStructuredCompat } from './validate-structured-compat.js';
|
|
80
85
|
import { getToolExecutionSignal } from './safe-handler.js';
|
|
86
|
+
import { remainingExecutionMs } from '../engine/execution/context.js';
|
|
81
87
|
import { DurableJobRuntime, publicJobCursor } from '../engine/execution/job-runtime.js';
|
|
82
88
|
import { scheduleValidateJobExecution } from '../engine/execution/validate-job-executor.js';
|
|
83
89
|
import { createPendingValidationSubmission } from '../engine/validation/durable-validation.js';
|
|
@@ -87,7 +93,7 @@ import { getRuntimePolicy } from '../engine/runtime-policy.js';
|
|
|
87
93
|
import { resolveValidationWorktree, ValidationWorktreeError, } from '../engine/validation/validation-worktree.js';
|
|
88
94
|
// Re-export for external use (SPEC-018)
|
|
89
95
|
export { validateContractCompliance };
|
|
90
|
-
const VALIDATION_GATE_TOTAL =
|
|
96
|
+
const VALIDATION_GATE_TOTAL = 11;
|
|
91
97
|
const GATE_DEADLINE_EXEMPT_PHASES = new Set(['lint', 'compliance']);
|
|
92
98
|
async function runWithGateDeadline(phase, command, work) {
|
|
93
99
|
if (GATE_DEADLINE_EXEMPT_PHASES.has(phase)) {
|
|
@@ -107,6 +113,58 @@ async function runWithGateDeadline(phase, command, work) {
|
|
|
107
113
|
clearTimeout(timer);
|
|
108
114
|
}
|
|
109
115
|
}
|
|
116
|
+
function computeIntegrationTimeoutMs() {
|
|
117
|
+
const blastRadiusTimeoutMs = getRuntimePolicy().validation.blastRadiusTimeoutMs;
|
|
118
|
+
return Math.max(0, Math.min(blastRadiusTimeoutMs, remainingExecutionMs() - blastRadiusTimeoutMs));
|
|
119
|
+
}
|
|
120
|
+
function isBlastRadiusPassed(blastRadiusGate) {
|
|
121
|
+
return blastRadiusGate.passed && blastRadiusGate.warningReason === null;
|
|
122
|
+
}
|
|
123
|
+
function blastRadiusIntegrationWarnings(blastRadiusGate) {
|
|
124
|
+
return blastRadiusGate.warningReason === null
|
|
125
|
+
? []
|
|
126
|
+
: [
|
|
127
|
+
{
|
|
128
|
+
file: 'blast-radius',
|
|
129
|
+
line: 0,
|
|
130
|
+
severity: 'warning',
|
|
131
|
+
rule: blastRadiusGate.warningReason,
|
|
132
|
+
message: 'Integration importers of the changed files were not exercised within the validate budget.',
|
|
133
|
+
suggestion: 'Run `npx vitest related --run <changed files>` without PLANU_EXCLUDE_INTEGRATION_TESTS, or raise validation.blastRadiusTimeoutMs, before marking this spec done.',
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
function strictAuditsQualityIssues(strictAuditsGate) {
|
|
138
|
+
const findingIssues = strictAuditsGate.findings.map((finding) => ({
|
|
139
|
+
file: finding.script,
|
|
140
|
+
line: 0,
|
|
141
|
+
severity: 'critical',
|
|
142
|
+
rule: 'strict-audits',
|
|
143
|
+
message: `Strict audit ${finding.script} failed: ${finding.line}`,
|
|
144
|
+
suggestion: 'Fix the strict audit finding before marking this spec done — the release runs the same script.',
|
|
145
|
+
}));
|
|
146
|
+
if (strictAuditsGate.skipped !== 'deadline-exceeded') {
|
|
147
|
+
return findingIssues;
|
|
148
|
+
}
|
|
149
|
+
return [
|
|
150
|
+
...findingIssues,
|
|
151
|
+
{
|
|
152
|
+
file: 'strict-audits',
|
|
153
|
+
line: 0,
|
|
154
|
+
severity: 'warning',
|
|
155
|
+
rule: 'strict-audits-skipped',
|
|
156
|
+
message: `Strict audits stopped at the validate deadline after: ${strictAuditsGate.executedScripts.join(', ')}`,
|
|
157
|
+
suggestion: 'Run `pnpm check:strict` locally before marking this spec done.',
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
function strictAuditsSuggestions(strictAuditsGate) {
|
|
162
|
+
return strictAuditsGate.passed
|
|
163
|
+
? []
|
|
164
|
+
: [
|
|
165
|
+
`Strict audits failed: ${String(strictAuditsGate.findings.length)} finding(s). Fix before marking as done.`,
|
|
166
|
+
];
|
|
167
|
+
}
|
|
110
168
|
export function createValidationStageRunner(onProgress) {
|
|
111
169
|
const startedAt = Date.now();
|
|
112
170
|
let completedGates = 0;
|
|
@@ -368,9 +426,21 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
368
426
|
});
|
|
369
427
|
const implementationQualityScore = calcQualityScore(result.qualityIssues);
|
|
370
428
|
const auditedFiles = [...new Set(result.qualityIssues.map((i) => i.file))];
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
429
|
+
const codeState = await scanCodeForSpec(executionSpec, projectPath);
|
|
430
|
+
const reliabilityGate = await runStage('reliability', 'scripts/check-reliability-policies.mjs --json', () => runReliabilityGate(projectPath, codeState.affectedFiles));
|
|
431
|
+
const blastRadiusGate = await runStage('blast-radius', "vitest related over the spec's affected source files", async () => {
|
|
432
|
+
const absoluteSpecPath = isAbsolute(executionSpec.specPath)
|
|
433
|
+
? executionSpec.specPath
|
|
434
|
+
: join(projectPath, executionSpec.specPath);
|
|
435
|
+
const raw = await readFile(absoluteSpecPath, 'utf-8');
|
|
436
|
+
const candidateFiles = [
|
|
437
|
+
...new Set([...collectDeclaredSpecFiles(raw), ...codeState.affectedFiles]),
|
|
438
|
+
];
|
|
439
|
+
return runBlastRadiusGate(projectPath, candidateFiles, {
|
|
440
|
+
timeoutMs: getRuntimePolicy().validation.blastRadiusTimeoutMs,
|
|
441
|
+
integrationTimeoutMs: computeIntegrationTimeoutMs(),
|
|
442
|
+
signal: getToolExecutionSignal(),
|
|
443
|
+
});
|
|
374
444
|
});
|
|
375
445
|
const { conventionViolations, regressionDetected } = await runStage('conventions', 'validate project conventions', () => scanProjectConventions(projectId, projectPath));
|
|
376
446
|
const lintCheck = await runStage('lint', knowledge.lintCommand ?? 'pnpm lint', () => runLintCheck(projectPath, knowledge.lintCommand ?? null, {
|
|
@@ -378,6 +448,10 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
378
448
|
specId,
|
|
379
449
|
maximumTimeoutMs: getRuntimePolicy().validation.durableLintTimeoutMs,
|
|
380
450
|
}));
|
|
451
|
+
const strictAuditsGate = await runStage('strict-audits', 'strict release audits declared by the project', () => runStrictAuditsGate(projectPath, {
|
|
452
|
+
timeoutMs: getRuntimePolicy().validation.durableLintTimeoutMs,
|
|
453
|
+
signal: getToolExecutionSignal(),
|
|
454
|
+
}));
|
|
381
455
|
const { assuranceGates, minimalityReport } = await runStage('assurance', 'validate assurance and minimality', async () => ({
|
|
382
456
|
assuranceGates: runAssuranceGates(projectPath),
|
|
383
457
|
minimalityReport: await buildMinimalityReport({
|
|
@@ -401,6 +475,7 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
401
475
|
conventionRegression: regressionDetected,
|
|
402
476
|
minimalityReport: minimalityReport ?? undefined,
|
|
403
477
|
signal: getToolExecutionSignal(),
|
|
478
|
+
blastRadius: blastRadiusGate,
|
|
404
479
|
}));
|
|
405
480
|
const effectiveResult = buildEffectiveValidationResult(result, validationReport.specCompliance);
|
|
406
481
|
const qualityGateSummary = buildQualityGateSummary({
|
|
@@ -410,6 +485,8 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
410
485
|
assurancePassed: assuranceGates.newCode.passed,
|
|
411
486
|
minimalityBlocked: minimalityReport?.blocked === true,
|
|
412
487
|
reliabilityPassed: reliabilityGate.passed,
|
|
488
|
+
blastRadiusPassed: isBlastRadiusPassed(blastRadiusGate),
|
|
489
|
+
strictAuditsPassed: strictAuditsGate.passed,
|
|
413
490
|
score: effectiveResult.score,
|
|
414
491
|
});
|
|
415
492
|
const output = {
|
|
@@ -525,6 +602,28 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
525
602
|
suggestion: 'Not blocking this spec — file is outside the spec Files section.',
|
|
526
603
|
});
|
|
527
604
|
}
|
|
605
|
+
for (const failure of blastRadiusGate.failures) {
|
|
606
|
+
output.qualityIssues.push({
|
|
607
|
+
file: failure.file,
|
|
608
|
+
line: 0,
|
|
609
|
+
severity: 'critical',
|
|
610
|
+
rule: 'blast-radius',
|
|
611
|
+
message: `Blast radius test failure: ${failure.message}`,
|
|
612
|
+
suggestion: 'Fix the failing importer tests (or raise validation.blastRadiusTimeoutMs) before marking this spec done.',
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
if (blastRadiusGate.skipped !== null) {
|
|
616
|
+
output.qualityIssues.push({
|
|
617
|
+
file: 'blast-radius',
|
|
618
|
+
line: 0,
|
|
619
|
+
severity: 'warning',
|
|
620
|
+
rule: 'blast-radius-skipped',
|
|
621
|
+
message: `Blast radius gate skipped: ${blastRadiusGate.skipped}`,
|
|
622
|
+
suggestion: 'No importer regression coverage ran for this validate call.',
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
output.qualityIssues.push(...blastRadiusIntegrationWarnings(blastRadiusGate));
|
|
626
|
+
output.qualityIssues.push(...strictAuditsQualityIssues(strictAuditsGate));
|
|
528
627
|
// Auto-suggest corrective actions based on validation results
|
|
529
628
|
// score is null when no criteria can be extracted — treat as 0 for comparisons.
|
|
530
629
|
const scoreValue = effectiveResult.score ?? 0;
|
|
@@ -562,6 +661,10 @@ export async function executeValidate(args, server, onProgress) {
|
|
|
562
661
|
else if (!reliabilityGate.passed) {
|
|
563
662
|
suggestions.push(`Reliability gate failed: ${String(reliabilityGate.failures.length)} violation(s) in this spec's files. Fix before marking as done.`);
|
|
564
663
|
}
|
|
664
|
+
if (blastRadiusGate.skipped === null && !blastRadiusGate.passed) {
|
|
665
|
+
suggestions.push('Fix the failing importer tests (or raise validation.blastRadiusTimeoutMs) before marking this spec done.');
|
|
666
|
+
}
|
|
667
|
+
suggestions.push(...strictAuditsSuggestions(strictAuditsGate));
|
|
565
668
|
if (!assuranceGates.newCode.passed) {
|
|
566
669
|
suggestions.push(`Assurance gate failed: ${String(assuranceGates.newCode.findings.length)} new-code domain inference issue(s) found.`);
|
|
567
670
|
}
|
|
@@ -713,6 +816,8 @@ function buildQualityGateSummary(input) {
|
|
|
713
816
|
...(!input.assurancePassed ? ['assurance'] : []),
|
|
714
817
|
...(input.minimalityBlocked ? ['minimality'] : []),
|
|
715
818
|
...(!input.reliabilityPassed ? ['reliability'] : []),
|
|
819
|
+
...(!input.blastRadiusPassed ? ['blast-radius'] : []),
|
|
820
|
+
...(!input.strictAuditsPassed ? ['strict-audits'] : []),
|
|
716
821
|
];
|
|
717
822
|
return {
|
|
718
823
|
passed: failures.length === 0,
|
|
@@ -724,6 +829,8 @@ function buildQualityGateSummary(input) {
|
|
|
724
829
|
assurancePassed: input.assurancePassed,
|
|
725
830
|
minimalityPassed: !input.minimalityBlocked,
|
|
726
831
|
reliabilityPassed: input.reliabilityPassed,
|
|
832
|
+
blastRadiusPassed: input.blastRadiusPassed,
|
|
833
|
+
strictAuditsPassed: input.strictAuditsPassed,
|
|
727
834
|
};
|
|
728
835
|
}
|
|
729
836
|
function buildExecutableCoverage(specCompliance) {
|
|
@@ -12,6 +12,7 @@ export interface AbortableProcessOptions {
|
|
|
12
12
|
timeoutMs: number;
|
|
13
13
|
maxBufferBytes: number;
|
|
14
14
|
signal?: AbortSignal;
|
|
15
|
+
env?: NodeJS.ProcessEnv;
|
|
15
16
|
/** Called synchronously after process-group termination has been requested. */
|
|
16
17
|
onCancellationAcknowledged?: () => void;
|
|
17
18
|
}
|
|
@@ -85,7 +85,7 @@ export interface ValidationReportV1 {
|
|
|
85
85
|
command: string;
|
|
86
86
|
scenarios: {
|
|
87
87
|
title: string;
|
|
88
|
-
verdict: 'pass' | 'fail' | 'missing';
|
|
88
|
+
verdict: 'pass' | 'fail' | 'missing' | 'indeterminate';
|
|
89
89
|
evidence: string[];
|
|
90
90
|
unverifiable?: true;
|
|
91
91
|
}[];
|
|
@@ -95,6 +95,16 @@ export interface ValidationReportV1 {
|
|
|
95
95
|
completedAt: string;
|
|
96
96
|
receiptId?: string;
|
|
97
97
|
receiptKey?: string;
|
|
98
|
+
blastRadius?: {
|
|
99
|
+
selectedFiles: number;
|
|
100
|
+
passed: boolean;
|
|
101
|
+
timedOut: boolean;
|
|
102
|
+
skipped?: string;
|
|
103
|
+
failures: {
|
|
104
|
+
file: string;
|
|
105
|
+
message: string;
|
|
106
|
+
}[];
|
|
107
|
+
};
|
|
98
108
|
}
|
|
99
109
|
export type ReconciliationReceiptState = 'prepared' | 'committed' | 'aborted';
|
|
100
110
|
/** Mutable, atomically replaced recovery record for a reconciliation transaction. */
|
|
@@ -13,4 +13,14 @@ export interface InstallationManifest {
|
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
installations: InstallationRecord[];
|
|
15
15
|
}
|
|
16
|
+
export type NpmCacheStatus = 'ok' | 'foreign-owned' | 'unreadable';
|
|
17
|
+
export interface NpmCacheFinding {
|
|
18
|
+
status: NpmCacheStatus;
|
|
19
|
+
cacheDir: string;
|
|
20
|
+
foreignCount: number;
|
|
21
|
+
scanned: number;
|
|
22
|
+
truncated: boolean;
|
|
23
|
+
sampleEntries: string[];
|
|
24
|
+
fix: string;
|
|
25
|
+
}
|
|
16
26
|
//# sourceMappingURL=installation.d.ts.map
|
|
@@ -59,6 +59,10 @@ export interface LeanFileEntry {
|
|
|
59
59
|
path: string;
|
|
60
60
|
status: 'pending' | 'done';
|
|
61
61
|
}
|
|
62
|
+
/** Bucket a labelled "Files to create/modify" or "Create:/Modify:/Test:" entry belongs to. */
|
|
63
|
+
export type LabeledFileBucketKind = 'create' | 'modify' | 'test';
|
|
64
|
+
/** Paths parsed from labelled Files lists, grouped by bucket. */
|
|
65
|
+
export type LabeledFileLists = Record<LabeledFileBucketKind, string[]>;
|
|
62
66
|
/** Result of a planu/ cleanup operation (SPEC-466). */
|
|
63
67
|
export interface CleanupResult {
|
|
64
68
|
deletedRootFiles: string[];
|
|
@@ -126,6 +130,7 @@ export interface UpdateStatusBatchInput {
|
|
|
126
130
|
projectPath?: string;
|
|
127
131
|
dryRun?: boolean;
|
|
128
132
|
reviewNotes?: string;
|
|
133
|
+
reason?: string;
|
|
129
134
|
evidence?: Record<string, UpdateStatusBatchEvidence>;
|
|
130
135
|
}
|
|
131
136
|
/** Report of detected migration drift (SPEC-715). Read-only — no FS mutations. */
|
|
@@ -195,6 +200,11 @@ export interface UnifiedSpecCandidateValidation {
|
|
|
195
200
|
valid: boolean;
|
|
196
201
|
issues: UnifiedSpecCandidateIssue[];
|
|
197
202
|
}
|
|
203
|
+
/** The first non-canonical author section found in a source description (SPEC-1753). */
|
|
204
|
+
export interface AuthorSection {
|
|
205
|
+
name: string;
|
|
206
|
+
body: string;
|
|
207
|
+
}
|
|
198
208
|
export interface CanonicalUnifiedSpecInput {
|
|
199
209
|
leanSpecBody: string;
|
|
200
210
|
sourceDescription: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type GroundingSource = 'user_input' | 'project_evidence' | 'documented_assumption' | 'ungrounded_advisory';
|
|
1
|
+
export type GroundingSource = 'user_input' | 'project_evidence' | 'review_evidence' | 'documented_assumption' | 'ungrounded_advisory';
|
|
2
2
|
export type GroundingConfidence = 'low' | 'medium' | 'high';
|
|
3
3
|
export interface CriterionGroundingRecord {
|
|
4
4
|
text: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AbortableProcessOptions, AbortableProcessResult } from './abortable-process.js';
|
|
1
2
|
export declare const VALIDATION_EVIDENCE_SCHEMA_VERSION: '1.0.0';
|
|
2
3
|
export type ValidationGateCapability = 'typecheck' | 'lint' | 'test-related' | 'test-full' | 'contract' | 'coverage' | 'migration' | 'fault-injection' | 'security' | 'native' | 'website' | 'reproducibility';
|
|
3
4
|
export type ValidationEvidenceStatus = 'passed' | 'failed' | 'cancelled' | 'invalidated';
|
|
@@ -59,7 +60,7 @@ export interface ValidationImpactPlan {
|
|
|
59
60
|
reason: string;
|
|
60
61
|
changedPaths: string[];
|
|
61
62
|
}
|
|
62
|
-
export type ScenarioVerdict = 'pass' | 'fail' | 'missing';
|
|
63
|
+
export type ScenarioVerdict = 'pass' | 'fail' | 'missing' | 'indeterminate';
|
|
63
64
|
export interface ScenarioTestLink {
|
|
64
65
|
path: string;
|
|
65
66
|
line?: number;
|
|
@@ -88,6 +89,11 @@ export interface DoneDriftMissingFileFinding {
|
|
|
88
89
|
specId: string;
|
|
89
90
|
missingPath: string;
|
|
90
91
|
}
|
|
92
|
+
export interface SpecComplianceRunnerFailure {
|
|
93
|
+
kind: 'runner-output-unparseable';
|
|
94
|
+
detail: string;
|
|
95
|
+
indeterminateScenarios: number;
|
|
96
|
+
}
|
|
91
97
|
export interface SpecComplianceResult {
|
|
92
98
|
dimensionScore: number;
|
|
93
99
|
perScenario: PerScenarioResult[];
|
|
@@ -95,6 +101,7 @@ export interface SpecComplianceResult {
|
|
|
95
101
|
evidenceSource?: 'frontmatter' | 'criteria' | 'none';
|
|
96
102
|
ignoredCriteriaTitles?: string[];
|
|
97
103
|
doneDriftFindings?: DoneDriftMissingFileFinding[];
|
|
104
|
+
runnerFailure?: SpecComplianceRunnerFailure;
|
|
98
105
|
}
|
|
99
106
|
export interface EvidenceTestLink {
|
|
100
107
|
path: string;
|
|
@@ -110,6 +117,10 @@ export interface ExecutableEvidence {
|
|
|
110
117
|
unmappedCriteria: string[];
|
|
111
118
|
ignoredCriteriaTitles: string[];
|
|
112
119
|
}
|
|
120
|
+
export interface SourceQualityReceiptMatch {
|
|
121
|
+
key: string;
|
|
122
|
+
path: string;
|
|
123
|
+
}
|
|
113
124
|
export interface ReliabilityGateViolation {
|
|
114
125
|
file: string;
|
|
115
126
|
line: number;
|
|
@@ -122,4 +133,43 @@ export interface ReliabilityGateResult {
|
|
|
122
133
|
warnings: ReliabilityGateViolation[];
|
|
123
134
|
executionError?: string;
|
|
124
135
|
}
|
|
136
|
+
export interface BlastRadiusGateFailure {
|
|
137
|
+
file: string;
|
|
138
|
+
message: string;
|
|
139
|
+
}
|
|
140
|
+
export interface BlastRadiusGateResult {
|
|
141
|
+
skipped: 'no-importable-files' | 'vitest-not-installed' | null;
|
|
142
|
+
selectedFiles: string[];
|
|
143
|
+
passed: boolean;
|
|
144
|
+
timedOut: boolean;
|
|
145
|
+
failures: BlastRadiusGateFailure[];
|
|
146
|
+
integrationImporters: string[];
|
|
147
|
+
warningReason: 'integration-importers-skipped' | null;
|
|
148
|
+
}
|
|
149
|
+
export interface RunBlastRadiusGateOptions {
|
|
150
|
+
timeoutMs: number;
|
|
151
|
+
integrationTimeoutMs?: number;
|
|
152
|
+
signal?: AbortSignal;
|
|
153
|
+
runProcess?: (command: string, args: string[], options: AbortableProcessOptions) => Promise<AbortableProcessResult>;
|
|
154
|
+
}
|
|
155
|
+
export type StrictAuditsSkipReason = 'no-strict-scripts' | 'deadline-exceeded';
|
|
156
|
+
export interface StrictAuditsGateFinding {
|
|
157
|
+
script: string;
|
|
158
|
+
line: string;
|
|
159
|
+
}
|
|
160
|
+
export interface StrictAuditsGateResult {
|
|
161
|
+
skipped: StrictAuditsSkipReason | null;
|
|
162
|
+
executedScripts: string[];
|
|
163
|
+
passed: boolean;
|
|
164
|
+
findings: StrictAuditsGateFinding[];
|
|
165
|
+
}
|
|
166
|
+
export interface StrictAuditScriptsRegistry {
|
|
167
|
+
schemaVersion: 1;
|
|
168
|
+
scripts: string[];
|
|
169
|
+
}
|
|
170
|
+
export interface RunStrictAuditsGateOptions {
|
|
171
|
+
timeoutMs: number;
|
|
172
|
+
signal?: AbortSignal;
|
|
173
|
+
runProcess?: (command: string, args: string[], options: AbortableProcessOptions) => Promise<AbortableProcessResult>;
|
|
174
|
+
}
|
|
125
175
|
//# sourceMappingURL=validation-evidence.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.13",
|
|
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",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"prepack": "pnpm build:ts && pnpm package:size",
|
|
90
90
|
"test:debug": "vitest run --inspect-brk --single-thread",
|
|
91
91
|
"validate": "pnpm build && pnpm verify:typescript-migration",
|
|
92
|
-
"validate:full": "pnpm build && pnpm
|
|
92
|
+
"validate:full": "pnpm build && pnpm verify:typescript-migration && (bash scripts/release-preflight.sh --verify || (pnpm typecheck && pnpm lint:gate && pnpm format:check && pnpm test:coverage))",
|
|
93
93
|
"docker:build": "docker build -t planu .",
|
|
94
94
|
"docker:run": "docker compose up",
|
|
95
95
|
"publish:blog": "node scripts/publish-blog.mjs",
|
package/planu-plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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": "5.7.
|
|
5
|
+
"version": "5.7.13",
|
|
6
6
|
"icon": "assets/plugin/icon.svg",
|
|
7
7
|
"command": ["npx", "@planu/cli@latest"],
|
|
8
8
|
"packageName": "@planu/cli",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"created": "Spec {id} created successfully",
|
|
4
4
|
"updated": "Spec {id} status updated to {status}",
|
|
5
5
|
"notFound": "Spec {id} not found",
|
|
6
|
-
"invalidTransition": "Invalid transition from {from} to {to}. Valid
|
|
6
|
+
"invalidTransition": "Invalid transition from {from} to {to}. Valid from {from}: {valid}.",
|
|
7
7
|
"actualsRequired": "Actuals (real metrics) are required when marking spec as done",
|
|
8
8
|
"duplicateTitle": "A spec with title '{title}' already exists. Using slug: {slug}"
|
|
9
9
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"created": "Spec {id} creada exitosamente",
|
|
4
4
|
"updated": "Spec {id} actualizada a estado {status}",
|
|
5
5
|
"notFound": "Spec {id} no encontrada",
|
|
6
|
-
"invalidTransition": "Transición inválida de {from} a {to}. Válido
|
|
6
|
+
"invalidTransition": "Transición inválida de {from} a {to}. Válido desde {from}: {valid}.",
|
|
7
7
|
"actualsRequired": "Se requieren métricas reales (actuals) al marcar spec como done",
|
|
8
8
|
"duplicateTitle": "Ya existe una spec con título '{title}'. Usando slug: {slug}"
|
|
9
9
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"created": "Spec {id} criada com sucesso",
|
|
4
4
|
"updated": "Spec {id} atualizada para status {status}",
|
|
5
5
|
"notFound": "Spec {id} não encontrada",
|
|
6
|
-
"invalidTransition": "Transição inválida de {from} para {to}. Válido
|
|
6
|
+
"invalidTransition": "Transição inválida de {from} para {to}. Válido a partir de {from}: {valid}.",
|
|
7
7
|
"actualsRequired": "Métricas reais (actuals) são obrigatórias ao marcar spec como done",
|
|
8
8
|
"duplicateTitle": "Já existe uma spec com título '{title}'. Usando slug: {slug}"
|
|
9
9
|
},
|