@planu/cli 5.5.3 → 5.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 +38 -0
- package/dist/.planu-build.json +1 -1
- package/dist/engine/autopilot/bootstrap.js +1 -1
- package/dist/engine/cascade-hooks/core/append-releases.js +22 -12
- package/dist/engine/detection-utils.d.ts +1 -0
- package/dist/engine/detection-utils.js +33 -0
- package/dist/engine/doc-generator/portal/index.d.ts +1 -1
- package/dist/engine/doc-generator/portal/index.js +1 -1
- package/dist/engine/doc-generator/portal/portal-regenerator.d.ts +8 -3
- package/dist/engine/doc-generator/portal/portal-regenerator.js +16 -7
- package/dist/engine/evidence-gates/evidence-autofill.d.ts +1 -1
- package/dist/engine/evidence-gates/evidence-autofill.js +1 -1
- package/dist/engine/framework-detector.js +8 -6
- package/dist/engine/housekeeping/history-log.d.ts +1 -0
- package/dist/engine/housekeeping/history-log.js +58 -3
- package/dist/engine/housekeeping/index.d.ts +2 -1
- package/dist/engine/housekeeping/index.js +2 -1
- package/dist/engine/housekeeping/runtime-residue-sweep.d.ts +9 -0
- package/dist/engine/housekeeping/runtime-residue-sweep.js +57 -0
- package/dist/engine/next-spec-resolver/orchestration-planner.js +1 -1
- package/dist/engine/next-spec-resolver/session-writer.js +1 -1
- package/dist/engine/project-graph/cache.js +23 -3
- package/dist/engine/readiness-checker.js +1 -1
- package/dist/engine/sdd-flow/checkpoints.js +29 -2
- package/dist/engine/session/checkpoint-writer.d.ts +1 -1
- package/dist/engine/session/checkpoint-writer.js +6 -5
- package/dist/engine/session-state/writer.js +4 -3
- package/dist/engine/spec-format/lean-spec-generator.js +1 -1
- package/dist/engine/spec-migrator/planu-canonical-policy.d.ts +8 -1
- package/dist/engine/spec-migrator/planu-canonical-policy.js +14 -13
- package/dist/engine/spec-migrator/strict-planu-cleanup.js +28 -3
- package/dist/engine/universal-rules/rules/planu-release-policy.js +1 -1
- package/dist/engine/validator/spec-compliance-runner.js +45 -0
- package/dist/hosts/claude-code/ux/mcp-resources.js +7 -23
- package/dist/resources/specs.js +12 -33
- package/dist/storage/current-project.d.ts +3 -0
- package/dist/storage/current-project.js +21 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.js +1 -0
- package/dist/storage/migrations/canonical-storage.js +5 -0
- package/dist/storage/retention.d.ts +14 -0
- package/dist/storage/retention.js +279 -0
- package/dist/storage/spec-index.d.ts +23 -0
- package/dist/storage/spec-index.js +123 -0
- package/dist/storage/spec-store.d.ts +8 -3
- package/dist/storage/spec-store.js +76 -6
- package/dist/storage/storage-catalog.js +3 -3
- package/dist/storage/storage-layout.d.ts +8 -0
- package/dist/storage/storage-layout.js +9 -0
- package/dist/storage/transition-log.js +2 -0
- package/dist/tools/challenge-spec.js +10 -9
- package/dist/tools/create-spec.js +10 -0
- package/dist/tools/execute-sdd-flow.js +11 -2
- package/dist/tools/export-spec.js +2 -1
- package/dist/tools/force-status-analytics.js +2 -1
- package/dist/tools/generate-docs-site.js +2 -1
- package/dist/tools/generate-proposal.js +6 -2
- package/dist/tools/init-project/claude-md-generator.js +19 -2
- package/dist/tools/init-project/conventions-writer.d.ts +5 -2
- package/dist/tools/init-project/conventions-writer.js +18 -13
- package/dist/tools/init-project/git-setup.js +9 -0
- package/dist/tools/init-project/handler.js +9 -1
- package/dist/tools/init-project/legacy-root-migration.d.ts +15 -0
- package/dist/tools/init-project/legacy-root-migration.js +213 -0
- package/dist/tools/init-project/runtime-residue.d.ts +2 -0
- package/dist/tools/init-project/runtime-residue.js +11 -0
- package/dist/tools/session-checkpoint.js +1 -1
- package/dist/tools/update-status/index.js +7 -1
- package/dist/tools/update-status-actions.d.ts +7 -1
- package/dist/tools/update-status-actions.js +10 -2
- package/dist/types/housekeeping.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/retention.d.ts +12 -0
- package/dist/types/retention.js +3 -0
- package/dist/types/spec/core.d.ts +7 -0
- package/dist/types/spec/index-cache.d.ts +25 -0
- package/dist/types/spec/index-cache.js +3 -0
- package/dist/types/spec/index.d.ts +1 -0
- package/dist/types/spec/index.js +1 -0
- package/dist/types/spec-format.d.ts +1 -0
- package/package.json +1 -1
- package/planu-plugin.json +1 -1
- package/scripts/lib/pending-release-file.mjs +20 -4
|
@@ -146,4 +146,8 @@ export interface HousekeepingHistoryEntry {
|
|
|
146
146
|
prevSha: string;
|
|
147
147
|
sha256: string;
|
|
148
148
|
}
|
|
149
|
+
export interface RuntimeResidueSweepResult {
|
|
150
|
+
/** Absolute paths of every legacy runtime artifact removed from planu/. */
|
|
151
|
+
removed: string[];
|
|
152
|
+
}
|
|
149
153
|
//# sourceMappingURL=housekeeping.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -293,5 +293,6 @@ export * from './host-tool-filter.js';
|
|
|
293
293
|
export * from './reconcile.js';
|
|
294
294
|
export * from './release-pipeline.js';
|
|
295
295
|
export * from './network-policy.js';
|
|
296
|
+
export * from './retention.js';
|
|
296
297
|
export type { VerifiedImplementationReviewResult, VerifiedImplementationReviewOk, VerifiedImplementationReviewErr, ImplementationReviewRejectionReason, } from './handoff-artifacts.js';
|
|
297
298
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface RetentionResult {
|
|
2
|
+
readonly freedBytes: number;
|
|
3
|
+
readonly removedPaths: readonly string[];
|
|
4
|
+
}
|
|
5
|
+
export type RetentionKind = 'transition-log' | 'graph-cache' | 'spec-store-backup' | 'idempotency' | 'snapshot' | 'spec-artifacts';
|
|
6
|
+
export interface EnforceRetentionInput {
|
|
7
|
+
readonly kind: RetentionKind;
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly protectedPaths?: readonly string[];
|
|
10
|
+
readonly specId?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=retention.d.ts.map
|
|
@@ -139,6 +139,13 @@ export interface Spec {
|
|
|
139
139
|
* Contains failure scenarios, addressed count, and overall risk.
|
|
140
140
|
*/
|
|
141
141
|
challengeReport?: ChallengeReport;
|
|
142
|
+
/**
|
|
143
|
+
* SPEC-1699: sha256 digest of the spec.md content this record's title was
|
|
144
|
+
* last synced from. Absent or mismatched against the current spec.md means
|
|
145
|
+
* the record is stale and is refreshed on the next read that supplies a
|
|
146
|
+
* canonicalRoot (see spec-store.ts refreshSpecFromDisk).
|
|
147
|
+
*/
|
|
148
|
+
contentDigest?: string;
|
|
142
149
|
}
|
|
143
150
|
/** SPEC-964: Result of running challenge_spec on a spec. */
|
|
144
151
|
export interface ChallengeReport {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** One spec's fields as parsed from its canonical spec.md, plus a content digest. */
|
|
2
|
+
export interface SpecIndexRecord {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly status: string;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
readonly target: string;
|
|
8
|
+
readonly scope: string;
|
|
9
|
+
readonly difficulty: number | null;
|
|
10
|
+
readonly risk: string;
|
|
11
|
+
readonly createdAt: string | null;
|
|
12
|
+
readonly updatedAt: string;
|
|
13
|
+
readonly specPath: string;
|
|
14
|
+
readonly digest: string;
|
|
15
|
+
/** GIVEN/WHEN/THEN acceptance-criteria lines parsed from the spec.md body. */
|
|
16
|
+
readonly scenarios: readonly string[];
|
|
17
|
+
/** `TEST:` marker contents parsed from the spec.md body. */
|
|
18
|
+
readonly tests: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
/** Regenerable cache persisted at planu/.runtime/index.json. spec.md is authoritative. */
|
|
21
|
+
export interface SpecIndex {
|
|
22
|
+
readonly generatedAt: string;
|
|
23
|
+
readonly specs: Readonly<Record<string, SpecIndexRecord>>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index-cache.d.ts.map
|
package/dist/types/spec/index.js
CHANGED
|
@@ -72,6 +72,7 @@ export interface PlanuCanonicalPathPolicy {
|
|
|
72
72
|
readonly canonicalSpecFiles: readonly string[];
|
|
73
73
|
readonly canonicalSpecDirs: readonly string[];
|
|
74
74
|
readonly forbiddenHostAssetRootDirs: readonly string[];
|
|
75
|
+
readonly runtimeHomeDir: string;
|
|
75
76
|
readonly generatedRuntimePatterns: readonly string[];
|
|
76
77
|
readonly legacyMergeBeforeDeleteFiles: readonly string[];
|
|
77
78
|
}
|
package/package.json
CHANGED
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.
|
|
5
|
+
"version": "5.6.0",
|
|
6
6
|
"icon": "assets/plugin/icon.svg",
|
|
7
7
|
"command": ["npx", "@planu/cli@latest"],
|
|
8
8
|
"packageName": "@planu/cli",
|
|
@@ -116,15 +116,31 @@ export function isCommitReachable(repoRoot, commit, ontoCommit) {
|
|
|
116
116
|
throw new Error(`git merge-base --is-ancestor exited with status ${String(result.status)}`);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
const temporaryPath = `${pendingPath}.${process.pid}.${Date.now()}.tmp`;
|
|
119
|
+
async function readJsonObject(path) {
|
|
121
120
|
try {
|
|
122
|
-
|
|
121
|
+
const parsed = JSON.parse(await readFile(path, 'utf8'));
|
|
122
|
+
return parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if (error?.code === 'ENOENT') return {};
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* SPEC-1699: writes `entries` into the `releases` field of the committed
|
|
131
|
+
* planu/project.json, preserving every other field already on disk.
|
|
132
|
+
*/
|
|
133
|
+
export async function writePendingReleaseLedger(projectJsonPath, entries) {
|
|
134
|
+
const project = await readJsonObject(projectJsonPath);
|
|
135
|
+
const nextProject = { ...project, releases: entries };
|
|
136
|
+
const temporaryPath = `${projectJsonPath}.${process.pid}.${Date.now()}.tmp`;
|
|
137
|
+
try {
|
|
138
|
+
await writeFile(temporaryPath, `${JSON.stringify(nextProject, null, 2)}\n`, {
|
|
123
139
|
encoding: 'utf8',
|
|
124
140
|
flag: 'wx',
|
|
125
141
|
mode: 0o644,
|
|
126
142
|
});
|
|
127
|
-
await rename(temporaryPath,
|
|
143
|
+
await rename(temporaryPath, projectJsonPath);
|
|
128
144
|
} catch (error) {
|
|
129
145
|
await rm(temporaryPath, { force: true });
|
|
130
146
|
throw error;
|