@planu/cli 7.1.3 → 7.1.5
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 +10 -0
- package/README.md +9 -5
- package/dist/sdd-engine/cli.d.ts +3 -0
- package/dist/sdd-engine/cli.js +7 -0
- package/dist/sdd-engine/contracts.d.ts +1 -1
- package/dist/sdd-engine/legacy-catalog.d.ts +11 -0
- package/dist/sdd-engine/legacy-catalog.js +112 -0
- package/dist/sdd-engine/server.d.ts +0 -2
- package/dist/sdd-engine/server.js +1 -25
- package/dist/sdd-engine/tools/workspace-tools.js +10 -4
- package/dist/types/sdd-engine.d.ts +15 -0
- package/package.json +5 -3
- package/templates/skills/legacy-migrator.md +61 -16
- package/templates/skills/lib-sync.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [7.1.5] - 2026-09-18
|
|
2
|
+
|
|
3
|
+
- list v6 `planu/specs` in `sdd_list_features` as `data.legacy` without bulk rewrite
|
|
4
|
+
- website lead/analytics buttons: consent status, honeypot rename, local `/api` mock
|
|
5
|
+
|
|
6
|
+
## [7.1.4] - 2026-09-18
|
|
7
|
+
|
|
8
|
+
- public install is `npx -y @planu/cli@latest` (same as Claude/Codex): `cli`, `planu`, and `sdd-engine` bins always start MCP stdio
|
|
9
|
+
- stop gating MCP startup on argv/realpath so npx shims cannot exit silently
|
|
10
|
+
|
|
1
11
|
## [7.1.3] - 2026-09-18
|
|
2
12
|
|
|
3
13
|
- start the MCP stdio server when invoked through an `npx` `.bin` symlink (`npx -y @planu/cli@latest`)
|
package/README.md
CHANGED
|
@@ -25,19 +25,21 @@ Authentication is **not required**. Do not call `mcp_auth`.
|
|
|
25
25
|
|
|
26
26
|
## Installation
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Paste this into Claude Code, Cursor, Codex, or any MCP client:
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
32
|
"mcpServers": {
|
|
33
33
|
"planu": {
|
|
34
34
|
"command": "npx",
|
|
35
|
-
"args": ["-y", "
|
|
35
|
+
"args": ["-y", "@planu/cli@latest"]
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
That is the whole install. `npx @planu/cli` starts the MCP stdio server (`cli`, `planu`, and `sdd-engine` are the same binary). Each host restart resolves **latest** from npm.
|
|
42
|
+
|
|
41
43
|
Local development in this repo:
|
|
42
44
|
|
|
43
45
|
```json
|
|
@@ -45,14 +47,14 @@ Local development in this repo:
|
|
|
45
47
|
"mcpServers": {
|
|
46
48
|
"planu": {
|
|
47
49
|
"command": "node",
|
|
48
|
-
"args": ["dist/sdd-engine/
|
|
50
|
+
"args": ["dist/sdd-engine/cli.js"],
|
|
49
51
|
"cwd": "/absolute/path/to/sdd-mcp-server"
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
Set `cwd` to the project that owns `.sdd/`, or set `PLANU_WORKSPACE` to that absolute path. The server also walks up from cwd until it finds `.sdd/`. A home-directory cwd with no ancestor `.sdd` will not see repo features. `pnpm start`
|
|
57
|
+
Set `cwd` to the project that owns `.sdd/`, or set `PLANU_WORKSPACE` to that absolute path. The server also walks up from cwd until it finds `.sdd/`. A home-directory cwd with no ancestor `.sdd` will not see repo features. `pnpm start` runs the MCP server.
|
|
56
58
|
|
|
57
59
|
**Requirements:** Node.js >= 22.13.
|
|
58
60
|
|
|
@@ -70,6 +72,8 @@ sdd_init_workspace → sdd_create_feature → architect trinity → sdd_lock_spe
|
|
|
70
72
|
4. **Execute:** `sdd_get_active_task` → `sdd_apply_file_patch` → `sdd_complete_task`.
|
|
71
73
|
5. **Janitor:** prune local branches and orphaned worktrees.
|
|
72
74
|
|
|
75
|
+
Legacy `planu/specs/SPEC-*` files stay on disk. `sdd_list_features` returns them under `legacy` (id, path, archive/active/unknown, `migratedTo`) so the trace is never empty. They are not executable until migrated via `.sdd/skills/legacy-migrator.md` into `.sdd/features/FEAT-*`. There is no bulk rewrite of `done` specs.
|
|
76
|
+
|
|
73
77
|
### Canonical tools
|
|
74
78
|
|
|
75
79
|
`sdd_init_workspace`, `sdd_list_features`, `sdd_create_feature`, `sdd_lock_spec`, `sdd_read_spec_artifact`, `sdd_read_file_slice`, `sdd_get_active_task`, `sdd_apply_file_patch`, `sdd_complete_task`
|
|
@@ -109,7 +113,7 @@ pnpm test tests/sdd-engine
|
|
|
109
113
|
MCP:
|
|
110
114
|
|
|
111
115
|
```bash
|
|
112
|
-
node dist/sdd-engine/
|
|
116
|
+
node dist/sdd-engine/cli.js
|
|
113
117
|
```
|
|
114
118
|
|
|
115
119
|
---
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export type { ArtifactType, FilePermission, ErrorCode, SddErrorDetails, SddSuccess, SddFailure, SddResult, InitWorkspaceInput, ListFeaturesInput, CreateFeatureInput, LockSpecInput, ReadSpecArtifactInput, ReadFileSliceInput, GetActiveTaskInput, ApplyFilePatchInput, CompleteTaskInput, ParsedManifest, ActiveTaskDetails, ActiveTaskResult, CompleteTaskResult, FeatureSummary, } from '../types/sdd-engine.js';
|
|
2
|
+
export type { ArtifactType, FilePermission, ErrorCode, SddErrorDetails, SddSuccess, SddFailure, SddResult, InitWorkspaceInput, ListFeaturesInput, CreateFeatureInput, LockSpecInput, ReadSpecArtifactInput, ReadFileSliceInput, GetActiveTaskInput, ApplyFilePatchInput, CompleteTaskInput, ParsedManifest, ActiveTaskDetails, ActiveTaskResult, CompleteTaskResult, FeatureSummary, LegacySpecSummary, LegacyCatalogSummary, } from '../types/sdd-engine.js';
|
|
3
3
|
export declare const FeatureIdSchema: z.ZodString;
|
|
4
4
|
export declare const ArtifactTypeSchema: z.ZodEnum<{
|
|
5
5
|
plan: "plan";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LegacyCatalogSummary, LegacySpecSummary } from '../types/sdd-engine.js';
|
|
2
|
+
export declare function classifyLegacyStatus(status: string | null): LegacySpecSummary['lifecycle'];
|
|
3
|
+
export declare function parseLegacyFrontmatter(content: string): {
|
|
4
|
+
id: string | null;
|
|
5
|
+
title: string | null;
|
|
6
|
+
status: string | null;
|
|
7
|
+
migratedTo: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare function inferredFeatId(legacyId: string): string;
|
|
10
|
+
export declare function collectLegacyCatalog(workspaceRoot: string, sddDir: string): Promise<LegacyCatalogSummary>;
|
|
11
|
+
//# sourceMappingURL=legacy-catalog.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
const LEGACY_SPEC_ROOTS = ['planu/specs', 'legacy-specs'];
|
|
4
|
+
const ARCHIVE_STATUSES = new Set(['done', 'completed', 'complete', 'discarded']);
|
|
5
|
+
const ACTIVE_STATUSES = new Set([
|
|
6
|
+
'implementing',
|
|
7
|
+
'approved',
|
|
8
|
+
'review',
|
|
9
|
+
'validating',
|
|
10
|
+
'draft',
|
|
11
|
+
'planning',
|
|
12
|
+
]);
|
|
13
|
+
export function classifyLegacyStatus(status) {
|
|
14
|
+
if (!status) {
|
|
15
|
+
return 'unknown';
|
|
16
|
+
}
|
|
17
|
+
const normalized = status.trim().toLowerCase();
|
|
18
|
+
if (ARCHIVE_STATUSES.has(normalized)) {
|
|
19
|
+
return 'archive';
|
|
20
|
+
}
|
|
21
|
+
if (ACTIVE_STATUSES.has(normalized)) {
|
|
22
|
+
return 'active';
|
|
23
|
+
}
|
|
24
|
+
return 'unknown';
|
|
25
|
+
}
|
|
26
|
+
export function parseLegacyFrontmatter(content) {
|
|
27
|
+
const head = content.slice(0, 4000);
|
|
28
|
+
const fence = /^---\r?\n([\s\S]*?)\r?\n---/.exec(head);
|
|
29
|
+
const block = head.startsWith('---') ? (fence?.[1] ?? head) : head;
|
|
30
|
+
return {
|
|
31
|
+
id: matchField(block, 'id'),
|
|
32
|
+
title: matchField(block, 'title'),
|
|
33
|
+
status: matchField(block, 'status'),
|
|
34
|
+
migratedTo: matchField(block, 'sdd_migrated_to'),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function inferredFeatId(legacyId) {
|
|
38
|
+
return `FEAT-${legacyId}`;
|
|
39
|
+
}
|
|
40
|
+
export async function collectLegacyCatalog(workspaceRoot, sddDir) {
|
|
41
|
+
const specs = [];
|
|
42
|
+
const seen = new Set();
|
|
43
|
+
for (const relativeRoot of LEGACY_SPEC_ROOTS) {
|
|
44
|
+
const absRoot = path.join(workspaceRoot, relativeRoot);
|
|
45
|
+
const folders = await listSpecFolders(absRoot);
|
|
46
|
+
for (const folder of folders) {
|
|
47
|
+
const specPath = path.join(folder, 'spec.md');
|
|
48
|
+
let content;
|
|
49
|
+
try {
|
|
50
|
+
content = await fs.readFile(specPath, 'utf-8');
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const meta = parseLegacyFrontmatter(content);
|
|
56
|
+
const folderName = path.basename(folder);
|
|
57
|
+
const idMatch = /^SPEC[-_]\d+/i.exec(folderName);
|
|
58
|
+
const id = meta.id ?? idMatch?.[0]?.toUpperCase() ?? folderName;
|
|
59
|
+
if (seen.has(id)) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
seen.add(id);
|
|
63
|
+
const featAlias = inferredFeatId(id);
|
|
64
|
+
const featExists = await pathExists(path.join(sddDir, 'features', featAlias));
|
|
65
|
+
specs.push({
|
|
66
|
+
id,
|
|
67
|
+
title: meta.title ?? folderName,
|
|
68
|
+
lifecycle: classifyLegacyStatus(meta.status),
|
|
69
|
+
legacyStatus: meta.status,
|
|
70
|
+
path: path.relative(workspaceRoot, specPath).split(path.sep).join('/'),
|
|
71
|
+
migratedTo: meta.migratedTo ?? (featExists ? featAlias : null),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
specs.sort((a, b) => a.id.localeCompare(b.id));
|
|
76
|
+
return {
|
|
77
|
+
total: specs.length,
|
|
78
|
+
active: specs.filter((spec) => spec.lifecycle === 'active').length,
|
|
79
|
+
archive: specs.filter((spec) => spec.lifecycle === 'archive').length,
|
|
80
|
+
unknown: specs.filter((spec) => spec.lifecycle === 'unknown').length,
|
|
81
|
+
specs,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function matchField(block, key) {
|
|
85
|
+
const match = new RegExp(`^${key}:\\s*(.+)$`, 'im').exec(block);
|
|
86
|
+
if (!match?.[1]) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
return match[1].trim().replace(/^['"]|['"]$/g, '') || null;
|
|
90
|
+
}
|
|
91
|
+
async function listSpecFolders(absRoot) {
|
|
92
|
+
const found = [];
|
|
93
|
+
try {
|
|
94
|
+
const entries = await fs.readdir(absRoot, { withFileTypes: true });
|
|
95
|
+
for (const entry of entries) {
|
|
96
|
+
if (entry.isDirectory()) {
|
|
97
|
+
found.push(path.join(absRoot, entry.name));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
return found;
|
|
105
|
+
}
|
|
106
|
+
async function pathExists(target) {
|
|
107
|
+
return fs
|
|
108
|
+
.access(target)
|
|
109
|
+
.then(() => true)
|
|
110
|
+
.catch(() => false);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=legacy-catalog.js.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
2
|
export declare function createUltralightSddServer(workspaceRoot?: string): McpServer;
|
|
4
3
|
export declare function runServer(): Promise<void>;
|
|
5
|
-
export declare function isSameBinEntry(argv1: string | undefined, modulePath: string): boolean;
|
|
6
4
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { realpathSync } from 'node:fs';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
3
|
import { registerUltralightSddTools } from './tools.js';
|
|
@@ -9,7 +5,7 @@ import { resolveSddWorkspaceRoot } from './workspace-root.js';
|
|
|
9
5
|
export function createUltralightSddServer(workspaceRoot) {
|
|
10
6
|
const server = new McpServer({
|
|
11
7
|
name: 'sdd-engine',
|
|
12
|
-
version: '7.1.
|
|
8
|
+
version: '7.1.5',
|
|
13
9
|
}, {
|
|
14
10
|
capabilities: {
|
|
15
11
|
tools: {},
|
|
@@ -24,24 +20,4 @@ export async function runServer() {
|
|
|
24
20
|
const transport = new StdioServerTransport();
|
|
25
21
|
await server.connect(transport);
|
|
26
22
|
}
|
|
27
|
-
export function isSameBinEntry(argv1, modulePath) {
|
|
28
|
-
if (!argv1) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
return realpathSync(argv1) === realpathSync(modulePath);
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return resolve(argv1) === resolve(modulePath);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function isDirectInvocation() {
|
|
39
|
-
return isSameBinEntry(process.argv[1], fileURLToPath(import.meta.url));
|
|
40
|
-
}
|
|
41
|
-
if (isDirectInvocation()) {
|
|
42
|
-
runServer().catch((err) => {
|
|
43
|
-
process.stderr.write(`[SDD-Engine] Fatal error: ${String(err)}\n`);
|
|
44
|
-
process.exit(1);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
23
|
//# sourceMappingURL=server.js.map
|
|
@@ -6,10 +6,11 @@ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
|
6
6
|
import { InitWorkspaceInputSchema, ListFeaturesInputSchema, CreateFeatureInputSchema, LockSpecInputSchema, } from '../contracts.js';
|
|
7
7
|
import { TaskWindowManager } from '../task-window.js';
|
|
8
8
|
import { formatResult } from './format-result.js';
|
|
9
|
+
import { collectLegacyCatalog } from '../legacy-catalog.js';
|
|
9
10
|
export function registerWorkspaceTools(server, sddDir, workspaceRoot) {
|
|
10
11
|
const taskWindow = new TaskWindowManager();
|
|
11
12
|
registerInitTool(server, sddDir, workspaceRoot);
|
|
12
|
-
registerListTool(server, sddDir, taskWindow);
|
|
13
|
+
registerListTool(server, sddDir, workspaceRoot, taskWindow);
|
|
13
14
|
registerCreateTool(server, sddDir);
|
|
14
15
|
registerLockTool(server, sddDir);
|
|
15
16
|
}
|
|
@@ -32,17 +33,22 @@ function registerInitTool(server, sddDir, workspaceRoot) {
|
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
function registerListTool(server, sddDir, taskWindow) {
|
|
36
|
+
function registerListTool(server, sddDir, workspaceRoot, taskWindow) {
|
|
36
37
|
server.registerTool('sdd_list_features', {
|
|
37
|
-
description: 'Lists
|
|
38
|
+
description: 'Lists v7 FEAT-* features and a read-only catalog of legacy planu/specs SPEC-* (trace only; not executable until migrated).',
|
|
38
39
|
inputSchema: ListFeaturesInputSchema.shape,
|
|
39
40
|
}, async (rawArgs) => {
|
|
40
41
|
const args = ListFeaturesInputSchema.parse(rawArgs);
|
|
41
42
|
const featuresDir = path.join(sddDir, 'features');
|
|
42
43
|
const featuresList = await collectFeatures(featuresDir, taskWindow, args.status_filter);
|
|
44
|
+
const legacy = await collectLegacyCatalog(workspaceRoot, sddDir);
|
|
43
45
|
return formatResult({
|
|
44
46
|
success: true,
|
|
45
|
-
data: {
|
|
47
|
+
data: {
|
|
48
|
+
total: featuresList.length,
|
|
49
|
+
features: featuresList,
|
|
50
|
+
legacy,
|
|
51
|
+
},
|
|
46
52
|
});
|
|
47
53
|
});
|
|
48
54
|
}
|
|
@@ -88,6 +88,21 @@ export interface FeatureSummary {
|
|
|
88
88
|
status: 'planning' | 'executing' | 'done';
|
|
89
89
|
locked: boolean;
|
|
90
90
|
}
|
|
91
|
+
export interface LegacySpecSummary {
|
|
92
|
+
id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
lifecycle: 'active' | 'archive' | 'unknown';
|
|
95
|
+
legacyStatus: string | null;
|
|
96
|
+
path: string;
|
|
97
|
+
migratedTo: string | null;
|
|
98
|
+
}
|
|
99
|
+
export interface LegacyCatalogSummary {
|
|
100
|
+
total: number;
|
|
101
|
+
active: number;
|
|
102
|
+
archive: number;
|
|
103
|
+
unknown: number;
|
|
104
|
+
specs: LegacySpecSummary[];
|
|
105
|
+
}
|
|
91
106
|
export interface SddLockFile {
|
|
92
107
|
specHash?: string;
|
|
93
108
|
planHash?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.5",
|
|
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",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"./package.json": "./package.json"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"
|
|
12
|
+
"cli": "dist/sdd-engine/cli.js",
|
|
13
|
+
"planu": "dist/sdd-engine/cli.js",
|
|
14
|
+
"sdd-engine": "dist/sdd-engine/cli.js"
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
15
17
|
"dist/",
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
"build": "pnpm build:ts",
|
|
106
108
|
"build:ts": "pnpm clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node scripts/copy-runtime-assets.mjs",
|
|
107
109
|
"dev": "tsc --watch",
|
|
108
|
-
"start": "node dist/sdd-engine/
|
|
110
|
+
"start": "node dist/sdd-engine/cli.js",
|
|
109
111
|
"clean": "rm -rf dist",
|
|
110
112
|
"lint": "eslint src/ tests/ --max-warnings 0 --cache --cache-strategy content --cache-location node_modules/.cache/eslint/",
|
|
111
113
|
"lint:gate": "eslint src/ tests/ --max-warnings 0",
|
|
@@ -6,24 +6,69 @@ role: Spec Fragmentation Specialist
|
|
|
6
6
|
# SDD LEGACY MIGRATOR DIRECTIVE
|
|
7
7
|
|
|
8
8
|
You act as a Specification Fragmentation Specialist.
|
|
9
|
-
|
|
9
|
+
Old Planu v6 specs (`planu/specs/SPEC-*`, `legacy-specs/SPEC-*`) stay on disk. `sdd_list_features` returns them in `data.legacy` (id, path, lifecycle, `migratedTo`). They are **not** executable. `sdd_lock_spec` / `sdd_apply_file_patch` still require a `FEAT-*` trinity.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Read a legacy spec with `sdd_read_file_slice` using `legacy.specs[].path`. Then follow this skill to create `FEAT-SPEC-{n}` and stamp `sdd_migrated_to`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- Ensure all critical constraints, edge cases, and business logic from the monolithic spec are captured.
|
|
15
|
-
- Do not hallucinate new requirements; only restructure the existing ones.
|
|
13
|
+
There is no MCP tool `migrate_spec`. Migration is cognitive: read the old artifact, emit a Holy Trinity, lock it.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
- **`spec.md`:** Focus on pure requirements, out-of-scope boundaries, strict typed contracts, and the error matrix.
|
|
19
|
-
- **`plan.md`:** Focus on architectural decisions, frozen dependencies, and the exhaustive file manifest (CREATE, MODIFY, READ_ONLY).
|
|
20
|
-
- **`tasks.md`:** Translate implicit steps into explicit, atomic, verifiable tasks with checkboxes (`- [ ] TASK-N: ...`).
|
|
15
|
+
## Do not bulk-convert the archive
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
- ALL generated artifacts MUST be written entirely in Technical English.
|
|
17
|
+
A host app may have hundreds of `SPEC-*` files. Most are finished history. Copying every `done` spec into `.sdd/features/` creates empty locked features and noise.
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
Triage first, migrate only what still governs work.
|
|
20
|
+
|
|
21
|
+
### Inventory (run in the target repo)
|
|
22
|
+
|
|
23
|
+
Count `status:` in each `planu/specs/**/spec.md` (or `legacy-specs/**/spec.md`). Bucket:
|
|
24
|
+
|
|
25
|
+
| Bucket | Typical v6 `status` | Action |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Archive | `done`, `completed`, `complete`, `discarded` | Keep the folder. Do not create a `FEAT-*` unless the work is being reopened. |
|
|
28
|
+
| Active | `implementing`, `approved`, `review`, `validating`, `draft` | Migrate one spec at a time before more product code. |
|
|
29
|
+
| Unknown | missing `status` | Open the file. If the code already shipped, archive. If work remains, treat as Active. |
|
|
30
|
+
|
|
31
|
+
Never invent requirements. If the old spec is too thin to lock, mark it archive or rewrite as a **new** `FEAT-*` with the user, not as a fake migration.
|
|
32
|
+
|
|
33
|
+
## ID mapping
|
|
34
|
+
|
|
35
|
+
- Legacy id `SPEC-1047` stays on disk as history.
|
|
36
|
+
- v7 id MUST be `FEAT-*` (example: `FEAT-SPEC-1047` or `FEAT-PAYMENTS-1047`).
|
|
37
|
+
- Put `Legacy-Spec: SPEC-1047` plus the old path in the new `spec.md` frontmatter or header so the two remain traceable.
|
|
38
|
+
- After a successful lock, add to the **old** spec (do not rewrite its body):
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
sdd_migrated_to: FEAT-SPEC-1047
|
|
42
|
+
sdd_migrated_at: <ISO date>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## One-spec workflow (mandatory order)
|
|
46
|
+
|
|
47
|
+
1. Adopt this skill. Adopt `spec-architect.md` for quality of the new trinity.
|
|
48
|
+
2. `sdd_init_workspace` if `.sdd/` is missing (`scope: project`).
|
|
49
|
+
3. Read the entire legacy `spec.md` (and `technical.md` / `progress.md` if they still exist).
|
|
50
|
+
4. `sdd_create_feature` with the `FEAT-*` id and the legacy title.
|
|
51
|
+
5. Rewrite into:
|
|
52
|
+
- `spec.md` — BDD, Out-of-Scope, typed contracts, error matrix, `Legacy-Spec` pointer.
|
|
53
|
+
- `plan.md` — decisions, frozen dependencies, exhaustive File Manifest (`CREATE` / `MODIFY` / `READ_ONLY`).
|
|
54
|
+
- `tasks.md` — atomic `- [ ] TASK-N:` lines with `Verification:` commands. Check off only work that is already true in the tree.
|
|
55
|
+
6. If the legacy spec is already implemented, tasks may all be `[x]` **only** when each verification command still passes. Otherwise leave remaining work `[ ]`.
|
|
56
|
+
7. Five architect laws in `spec-architect.md` must hold. Do not lock an empty skeleton.
|
|
57
|
+
8. `sdd_lock_spec`.
|
|
58
|
+
9. Stamp `sdd_migrated_to` on the old spec.
|
|
59
|
+
10. Continue execution with `spec-executor.md` if tasks remain. Do not use native Write during execution.
|
|
60
|
+
|
|
61
|
+
Language: Technical English in all new SDD artifacts.
|
|
62
|
+
|
|
63
|
+
## Preservation rules
|
|
64
|
+
|
|
65
|
+
- Copy constraints, edge cases, and error behavior. Do not add product scope.
|
|
66
|
+
- Out-of-Scope is mandatory even if the old spec never had it.
|
|
67
|
+
- File Manifest must match the real tree (paths that no longer exist are not `MODIFY`).
|
|
68
|
+
- Leave `planu/specs/` in place. v7 does not delete or import that directory.
|
|
69
|
+
|
|
70
|
+
## Host notes (CONKER-scale)
|
|
71
|
+
|
|
72
|
+
Typical shape: majority `done` = archive; tens of `implementing`/`approved`/`draft` = the real queue; a large `status`-less set = triage, not a dump into `.sdd`.
|
|
73
|
+
|
|
74
|
+
New work in that repo starts with `sdd_create_feature`, never with a new `planu/specs/SPEC-*`.
|
|
@@ -33,6 +33,6 @@ Any change to the MCP core (`src/sdd-engine/**`, `src/types/sdd-engine.ts`, `src
|
|
|
33
33
|
|
|
34
34
|
- Do not add a core tool without adding it to the 9-or-updated canonical list everywhere.
|
|
35
35
|
- Do not change `sdd_init_workspace` copy paths without updating `templates/`.
|
|
36
|
-
- Do not ship `dist/index.js` as the MCP process; the bin is `dist/sdd-engine/
|
|
36
|
+
- Do not ship `dist/index.js` as the MCP process; the bin is `dist/sdd-engine/cli.js` (`cli`, `planu`, and `sdd-engine`).
|
|
37
37
|
- Never delete `website/`. Core surface changes MUST update `website/src/main.ts` and `website/scripts/facts.mjs` so planu.dev matches the live nine `sdd_*` tools.
|
|
38
38
|
- Never delete `website/public/donations/*-qr.svg`. BTC, ETH and SOL QR assets and visible addresses are the funding surface; keep them on the page, fail the build if they drift.
|