@planu/cli 8.2.0 → 8.2.1
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 +9 -0
- package/README.md +12 -6
- package/dist/sdd-engine/host-rule-pack.d.ts +4 -0
- package/dist/sdd-engine/host-rule-pack.js +90 -0
- package/dist/sdd-engine/patch-sandbox.js +9 -2
- package/dist/sdd-engine/server.js +1 -1
- package/dist/sdd-engine/tools/workspace-tools.js +19 -22
- package/package.json +1 -1
- package/templates/AGENTS.md +12 -2
- package/templates/host/planu-sdd.md +9 -0
- package/templates/skills/git-janitor.md +4 -0
- package/templates/skills/lib-sync.md +1 -0
- package/templates/skills/preflight-guardian.md +4 -0
- package/templates/skills/spec-architect.md +2 -0
- package/templates/skills/spec-executor.md +1 -0
- package/templates/skills/verification-auditor.md +1 -0
- package/templates/skills/visual-release-auditor.md +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
## [8.2.1] - 2026-09-21
|
|
4
|
+
|
|
5
|
+
- reject `sdd_apply_file_patch` under `planu/specs`; `sdd_list_features` / `sdd_init_workspace` warn when that tree exists, without a `legacy` catalog
|
|
6
|
+
- forbid `SPEC-*` stubs in skills: retire host hooks that still require `planu/specs/SPEC-*/spec.md`
|
|
7
|
+
- `sdd_init_workspace` always writes Planu-owned Cursor/Claude/Gemini host rules so FEAT-only wins over leftover v6 docs
|
|
8
|
+
- replace `AGENTS.md` only when it still requires `planu/specs/SPEC-*` or instructs calling `create_spec`; never clobber project `CLAUDE.md`
|
|
9
|
+
|
|
1
10
|
## [8.2.0] - 2026-09-21
|
|
2
11
|
|
|
3
12
|
- preserve existing `AGENTS.md` on `sdd_init_workspace` unless `force: true`
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Authentication is **not required**. Do not call `mcp_auth`.
|
|
|
25
25
|
|
|
26
26
|
## Installation
|
|
27
27
|
|
|
28
|
-
Paste this into **Claude Code, Cursor, Windsurf, Codex, or any MCP client**. Prefer a **project** config
|
|
28
|
+
Paste this into **Claude Code, Cursor, Windsurf, Codex, Copilot, Gemini CLI, OpenCode, or any stdio MCP client**. Prefer a **project** config so the host can bind the open folder. A user-global server with no workspace interpolation will start in `$HOME` and fail closed.
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
@@ -44,9 +44,15 @@ Paste this into **Claude Code, Cursor, Windsurf, Codex, or any MCP client**. Pre
|
|
|
44
44
|
| Host | Where to put it | How the project is bound |
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| Cursor | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` | `${workspaceFolder}` is interpolated into `PLANU_WORKSPACE` (absolute or `~/...`). Cursor user-global `cwd` is not reliable. |
|
|
47
|
-
| Claude Code | `.mcp.json` in the project
|
|
48
|
-
|
|
|
49
|
-
|
|
|
47
|
+
| Claude Code | `.mcp.json` in the project | Process cwd is the launch directory; unexpanded `${workspaceFolder}` is ignored. |
|
|
48
|
+
| Codex | `.codex/config.toml` (trusted project) or `~/.codex/config.toml` | TOML `[mcp_servers.planu]`. ChatGPT desktop, Codex CLI, and Codex IDE share this file. Set `cwd` to the repo. JSON `mcpServers` is the wrong format. |
|
|
49
|
+
| Copilot / VS Code | `.vscode/mcp.json` | Top-level key is `servers`. `${workspaceFolder}` is interpolated. |
|
|
50
|
+
| Gemini CLI | `.gemini/settings.json` | `mcpServers` JSON. No `${workspaceFolder}` interpolation; use repo `cwd`. |
|
|
51
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | User-global Cascade config. Prefer an absolute project `PLANU_WORKSPACE`; do not use `$HOME`. |
|
|
52
|
+
| OpenCode | `opencode.json` | `mcp.planu` with `type: "local"` and a command array. |
|
|
53
|
+
| Claude Desktop | `claude_desktop_config.json` | `mcpServers` JSON. Set `PLANU_WORKSPACE` to an absolute project path. |
|
|
54
|
+
| ChatGPT web | Plugins / remote MCP only | Cannot spawn local stdio. Use Codex desktop or CLI for Planu. |
|
|
55
|
+
| Other stdio | Cline, Zed, JetBrains, Amazon Q | Same `npx -y @planu/cli@latest` process; bind via cwd, roots, or `PLANU_WORKSPACE`. |
|
|
50
56
|
|
|
51
57
|
`npx @planu/cli` starts the MCP stdio server (`cli`, `planu`, and `sdd-engine` are the same binary). Each host restart resolves **latest** from npm.
|
|
52
58
|
|
|
@@ -66,7 +72,7 @@ Local development in this repo:
|
|
|
66
72
|
}
|
|
67
73
|
```
|
|
68
74
|
|
|
69
|
-
The published server asks the host for MCP roots and binds to the open project that owns `.sdd/`. Unexpanded `${workspaceFolder}` and a `PLANU_WORKSPACE` equal to `$HOME` are ignored. A `~/...` workspace path is expanded against `$HOME` so hosts that interpolate tildes still bind the open folder. If the process cwd is still the user home directory, project-scoped tools return `ERR_WORKSPACE_UNRESOLVED` instead of creating `.sdd` under `$HOME`. `sdd_init_workspace`
|
|
75
|
+
The published server asks the host for MCP roots and binds to the open project that owns `.sdd/`. Unexpanded `${workspaceFolder}` and a `PLANU_WORKSPACE` equal to `$HOME` are ignored. A `~/...` workspace path is expanded against `$HOME` so hosts that interpolate tildes still bind the open folder. If the process cwd is still the user home directory, project-scoped tools return `ERR_WORKSPACE_UNRESOLVED` instead of creating `.sdd` under `$HOME`. `sdd_init_workspace` always writes Planu-owned Cursor, Claude, and Gemini host rules. Existing `AGENTS.md` is preserved unless `force: true` or the file still requires `planu/specs/SPEC-*` or instructs calling `create_spec`. `sdd_lock_spec` refuses empty skeletons and can reseal with `relock: true` and `reason`. Do not set a shell-global `PLANU_WORKSPACE`. `pnpm start` runs the MCP server.
|
|
70
76
|
|
|
71
77
|
**Requirements:** Node.js >= 22.13.
|
|
72
78
|
|
|
@@ -78,7 +84,7 @@ The published server asks the host for MCP roots and binds to the open project t
|
|
|
78
84
|
sdd_init_workspace → sdd_create_feature → architect trinity → sdd_lock_spec → execute tasks → verify → git-janitor
|
|
79
85
|
```
|
|
80
86
|
|
|
81
|
-
1. **Initialize:** `sdd_init_workspace` writes `.sdd
|
|
87
|
+
1. **Initialize:** `sdd_init_workspace` writes `.sdd/`, copies skills, and stamps `.cursor/rules/planu-sdd.mdc`, `.claude/rules/planu-sdd.md`, and `.gemini/planu-sdd.md`. Existing `AGENTS.md` is preserved unless `force: true` or it is still a v6 host contract.
|
|
82
88
|
2. **Architect:** Adopt `spec-architect.md`. Call `sdd_create_feature` with a title and omit `id` to reserve the next global `FEAT-NNNN-TITLE` identifier. Explicit `FEAT-*` IDs remain supported for imports; `SPEC-001` is rejected.
|
|
83
89
|
3. **Lock:** `sdd_lock_spec` hashes spec, plan, and tasks. It rejects empty skeletons. Reseal after review with `relock: true` and `reason`.
|
|
84
90
|
4. **Execute:** `sdd_get_active_task` → `sdd_apply_file_patch` → `sdd_complete_task`. CREATE, MODIFY, and READ_ONLY may use `*` / `**` (dot-prefixed segments require an exact entry). DELETE is an exact path. `.sdd/` and `.git/` are never writable.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isStaleV6HostDoc(content: string): boolean;
|
|
2
|
+
export declare function copyGlobalRules(workspaceRoot: string, force?: boolean): Promise<'preserved' | 'replaced' | 'created'>;
|
|
3
|
+
export declare function installHostRulePack(workspaceRoot: string): Promise<string[]>;
|
|
4
|
+
//# sourceMappingURL=host-rule-pack.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const TEMPLATES_ROOT = path.resolve(moduleDir, '..', '..', 'templates');
|
|
6
|
+
const FALLBACK_HOST_BODY = `# Planu v8 host contract
|
|
7
|
+
|
|
8
|
+
The only SDD contract is \`.sdd/features/{FEAT-*}/spec.md\`, \`plan.md\`, and \`tasks.md\`.
|
|
9
|
+
|
|
10
|
+
- Feature IDs are \`FEAT-*\`. \`SPEC-001\` is invalid.
|
|
11
|
+
- Use the nine \`sdd_*\` tools. Never call deleted v6 tools (\`create_spec\`, \`challenge_spec\`, \`check_readiness\`, \`validate\`, \`planu_status\`, …).
|
|
12
|
+
- Never create, thin, or copy files under \`planu/specs/\`. Planu does not read that tree.
|
|
13
|
+
- If a pre-push, commitlint, or husky guard still requires \`planu/specs/SPEC-*/spec.md\`, that guard is the defect. Delete or rewrite it. Do not stub a SPEC file.
|
|
14
|
+
- Quality lives in \`.sdd/skills/\`. There is no validate MCP tool.
|
|
15
|
+
`;
|
|
16
|
+
const PROHIBITION = /\b(never|do not|don't|no longer|not|forbidden|prohibited|deleted|removed|retired|invalid|reject(?:s|ed)?)\b/iu;
|
|
17
|
+
const LEGACY_TREE = /planu\/specs\/SPEC-|write (?:specs )?to planu\/specs/iu;
|
|
18
|
+
const INSTRUCTS_CREATE_SPEC = /(?:call|calls|calling|use|uses|using|run|runs|running|invoke|invokes|invoking)\s+`?create_spec`?/iu;
|
|
19
|
+
function normalizeWraps(content) {
|
|
20
|
+
return content.replace(/\n[ \t]+(?![-*+]\s|\d+[.)]\s|#)/gu, ' ');
|
|
21
|
+
}
|
|
22
|
+
function sentencesOf(content) {
|
|
23
|
+
return normalizeWraps(content)
|
|
24
|
+
.split(/\n+|(?<=[.!?])\s+/)
|
|
25
|
+
.map((part) => part.trim())
|
|
26
|
+
.filter((part) => part.length > 0);
|
|
27
|
+
}
|
|
28
|
+
function isRequiredMention(sentence, mention) {
|
|
29
|
+
return mention.test(sentence) && !PROHIBITION.test(sentence);
|
|
30
|
+
}
|
|
31
|
+
export function isStaleV6HostDoc(content) {
|
|
32
|
+
return sentencesOf(content).some((sentence) => isRequiredMention(sentence, LEGACY_TREE) ||
|
|
33
|
+
isRequiredMention(sentence, INSTRUCTS_CREATE_SPEC));
|
|
34
|
+
}
|
|
35
|
+
export async function copyGlobalRules(workspaceRoot, force) {
|
|
36
|
+
const sourcePath = path.join(TEMPLATES_ROOT, 'AGENTS.md');
|
|
37
|
+
const targetPath = path.resolve(workspaceRoot, 'AGENTS.md');
|
|
38
|
+
const existed = await fs
|
|
39
|
+
.access(targetPath)
|
|
40
|
+
.then(() => true)
|
|
41
|
+
.catch(() => false);
|
|
42
|
+
const existing = existed ? await fs.readFile(targetPath, 'utf-8') : '';
|
|
43
|
+
if (existed && force !== true && !isStaleV6HostDoc(existing)) {
|
|
44
|
+
return 'preserved';
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const content = await fs.readFile(sourcePath, 'utf-8');
|
|
48
|
+
await fs.writeFile(targetPath, content, 'utf-8');
|
|
49
|
+
return existed ? 'replaced' : 'created';
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return existed ? 'preserved' : 'created';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function readHostBody() {
|
|
56
|
+
try {
|
|
57
|
+
return await fs.readFile(path.join(TEMPLATES_ROOT, 'host', 'planu-sdd.md'), 'utf-8');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return FALLBACK_HOST_BODY;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export async function installHostRulePack(workspaceRoot) {
|
|
64
|
+
try {
|
|
65
|
+
const body = await readHostBody();
|
|
66
|
+
const cursorRule = `---
|
|
67
|
+
description: Planu v8 FEAT-only. Specs live in .sdd/features. Never write planu/specs or SPEC-* stubs.
|
|
68
|
+
alwaysApply: true
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
${body}`;
|
|
72
|
+
const targets = [
|
|
73
|
+
{ relative: path.join('.cursor', 'rules', 'planu-sdd.mdc'), contents: cursorRule },
|
|
74
|
+
{ relative: path.join('.claude', 'rules', 'planu-sdd.md'), contents: body },
|
|
75
|
+
{ relative: path.join('.gemini', 'planu-sdd.md'), contents: body },
|
|
76
|
+
];
|
|
77
|
+
const written = [];
|
|
78
|
+
for (const target of targets) {
|
|
79
|
+
const fullPath = path.join(workspaceRoot, target.relative);
|
|
80
|
+
await fs.mkdir(path.dirname(fullPath), { recursive: true });
|
|
81
|
+
await fs.writeFile(fullPath, target.contents, 'utf-8');
|
|
82
|
+
written.push(target.relative);
|
|
83
|
+
}
|
|
84
|
+
return written;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=host-rule-pack.js.map
|
|
@@ -88,16 +88,19 @@ export class PatchSandbox {
|
|
|
88
88
|
rejectsProtectedRoot(workspacePath, fullPath, normalizedTarget, permission) {
|
|
89
89
|
const sddRoot = path.resolve(workspacePath, '.sdd');
|
|
90
90
|
const gitRoot = path.resolve(workspacePath, '.git');
|
|
91
|
+
const legacySpecsRoot = path.resolve(workspacePath, 'planu', 'specs');
|
|
91
92
|
if (isSddEnginePath(normalizedTarget) ||
|
|
92
93
|
isGitPath(normalizedTarget) ||
|
|
94
|
+
isLegacySpecsPath(normalizedTarget) ||
|
|
93
95
|
this.isWithin(sddRoot, fullPath) ||
|
|
94
|
-
this.isWithin(gitRoot, fullPath)
|
|
96
|
+
this.isWithin(gitRoot, fullPath) ||
|
|
97
|
+
this.isWithin(legacySpecsRoot, fullPath)) {
|
|
95
98
|
return true;
|
|
96
99
|
}
|
|
97
100
|
return permission === 'DELETE' && this.isRawProtectedDelete(workspacePath, fullPath);
|
|
98
101
|
}
|
|
99
102
|
async rejectsResolvedProtectedRoot(workspaceRealPath, containmentTarget) {
|
|
100
|
-
for (const dirName of ['.sdd', '.git']) {
|
|
103
|
+
for (const dirName of ['.sdd', '.git', path.join('planu', 'specs')]) {
|
|
101
104
|
const realRoot = await fs.realpath(path.join(workspaceRealPath, dirName)).catch(() => null);
|
|
102
105
|
if (realRoot && this.isWithin(realRoot, containmentTarget)) {
|
|
103
106
|
return true;
|
|
@@ -307,6 +310,10 @@ function isGitPath(relativePath) {
|
|
|
307
310
|
const posix = toPosixPath(relativePath);
|
|
308
311
|
return posix === '.git' || posix.startsWith('.git/');
|
|
309
312
|
}
|
|
313
|
+
function isLegacySpecsPath(relativePath) {
|
|
314
|
+
const posix = toPosixPath(relativePath);
|
|
315
|
+
return posix === 'planu/specs' || posix.startsWith('planu/specs/');
|
|
316
|
+
}
|
|
310
317
|
function globPatternToRegExpSource(pattern) {
|
|
311
318
|
let source = '';
|
|
312
319
|
for (let i = 0; i < pattern.length; i++) {
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import * as fs from 'node:fs/promises';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
5
4
|
import { InitWorkspaceInputSchema, ListFeaturesInputSchema, CreateFeatureInputSchema, LockSpecInputSchema, } from '../contracts.js';
|
|
6
5
|
import { TaskWindowManager } from '../task-window.js';
|
|
7
6
|
import { formatResult } from './format-result.js';
|
|
8
7
|
import { homeFallbackFailure } from '../workspace-root.js';
|
|
9
8
|
import { writeLockedTrinity } from '../lock-integrity.js';
|
|
9
|
+
import { copyGlobalRules, installHostRulePack } from '../host-rule-pack.js';
|
|
10
|
+
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
10
11
|
const MISSING_SDD_HINT = 'No .sdd directory in the client project. Call sdd_init_workspace with scope=project. MCP hosts should advertise roots; do not pin PLANU_WORKSPACE globally.';
|
|
12
|
+
const LEGACY_SPECS_HINT = 'Planu ignores planu/specs. Do not create SPEC-* stubs or copy a FEAT into that tree. Retire host hooks that require planu/specs/SPEC-*/spec.md; the only contract is .sdd/features/FEAT-*.';
|
|
13
|
+
async function composeWorkspaceHint(workspaceRoot, extra) {
|
|
14
|
+
const legacySpecsPresent = await fs
|
|
15
|
+
.access(path.join(workspaceRoot, 'planu', 'specs'))
|
|
16
|
+
.then(() => true)
|
|
17
|
+
.catch(() => false);
|
|
18
|
+
if (!legacySpecsPresent) {
|
|
19
|
+
return extra;
|
|
20
|
+
}
|
|
21
|
+
return extra ? `${extra} ${LEGACY_SPECS_HINT}` : LEGACY_SPECS_HINT;
|
|
22
|
+
}
|
|
11
23
|
export function registerWorkspaceTools(server, workspace) {
|
|
12
24
|
const taskWindow = new TaskWindowManager();
|
|
13
25
|
registerInitTool(server, workspace);
|
|
@@ -37,6 +49,8 @@ function registerInitTool(server, workspace) {
|
|
|
37
49
|
await fs.mkdir(skillsDir, { recursive: true });
|
|
38
50
|
await copySkillTemplates(skillsDir);
|
|
39
51
|
const agentsMd = await copyGlobalRules(resolved.workspaceRoot, args.force);
|
|
52
|
+
const hostRules = args.scope === 'project' ? await installHostRulePack(resolved.workspaceRoot) : [];
|
|
53
|
+
const hint = await composeWorkspaceHint(resolved.workspaceRoot, 'Commit .sdd/ with the project. Host quality gates must map .sdd/ as versioned documentation. Cursor, Claude, Gemini, and Codex load Planu-owned host rules from sdd_init_workspace.');
|
|
40
54
|
return formatResult({
|
|
41
55
|
success: true,
|
|
42
56
|
data: {
|
|
@@ -47,7 +61,8 @@ function registerInitTool(server, workspace) {
|
|
|
47
61
|
workspaceRoot: resolved.workspaceRoot,
|
|
48
62
|
source: resolved.source,
|
|
49
63
|
agentsMd,
|
|
50
|
-
|
|
64
|
+
hostRules,
|
|
65
|
+
versionedHint: hint,
|
|
51
66
|
},
|
|
52
67
|
});
|
|
53
68
|
});
|
|
@@ -65,6 +80,7 @@ function registerListTool(server, workspace, taskWindow) {
|
|
|
65
80
|
}
|
|
66
81
|
const featuresDir = path.join(resolved.sddDir, 'features');
|
|
67
82
|
const featuresList = await collectFeatures(featuresDir, taskWindow, args.status_filter);
|
|
83
|
+
const hint = await composeWorkspaceHint(resolved.workspaceRoot, resolved.sddPresent ? undefined : MISSING_SDD_HINT);
|
|
68
84
|
return formatResult({
|
|
69
85
|
success: true,
|
|
70
86
|
data: {
|
|
@@ -73,7 +89,7 @@ function registerListTool(server, workspace, taskWindow) {
|
|
|
73
89
|
workspaceRoot: resolved.workspaceRoot,
|
|
74
90
|
sddPresent: resolved.sddPresent,
|
|
75
91
|
source: resolved.source,
|
|
76
|
-
hint
|
|
92
|
+
hint,
|
|
77
93
|
},
|
|
78
94
|
});
|
|
79
95
|
});
|
|
@@ -225,25 +241,6 @@ async function copySkillTemplates(skillsDir) {
|
|
|
225
241
|
await fs.writeFile(path.join(skillsDir, 'spec-executor.md'), '# Spec Executor Skill\n\nOperate in Zero-Freedom mode.\n', 'utf-8');
|
|
226
242
|
}
|
|
227
243
|
}
|
|
228
|
-
async function copyGlobalRules(workspaceRoot, force) {
|
|
229
|
-
const sourcePath = path.resolve(moduleDir, '..', '..', '..', 'templates', 'AGENTS.md');
|
|
230
|
-
const targetPath = path.resolve(workspaceRoot, 'AGENTS.md');
|
|
231
|
-
const existed = await fs
|
|
232
|
-
.access(targetPath)
|
|
233
|
-
.then(() => true)
|
|
234
|
-
.catch(() => false);
|
|
235
|
-
if (existed && force !== true) {
|
|
236
|
-
return 'preserved';
|
|
237
|
-
}
|
|
238
|
-
try {
|
|
239
|
-
const content = await fs.readFile(sourcePath, 'utf-8');
|
|
240
|
-
await fs.writeFile(targetPath, content, 'utf-8');
|
|
241
|
-
return existed ? 'replaced' : 'created';
|
|
242
|
-
}
|
|
243
|
-
catch {
|
|
244
|
-
return existed ? 'preserved' : 'created';
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
244
|
async function collectFeatures(featuresDir, taskWindow, statusFilter) {
|
|
248
245
|
const result = [];
|
|
249
246
|
try {
|
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -5,8 +5,8 @@ Canonical contract: `PLANU_V8_MANIFESTO.txt`.
|
|
|
5
5
|
|
|
6
6
|
1. **SDD Skills Primacy:**
|
|
7
7
|
- ALWAYS refer to `.sdd/skills/` for role directives.
|
|
8
|
-
- Before beginning any task, load and adopt the matching persona (Preflight Guardian, Spec Architect, Spec Executor, Verification Auditor, Legacy Sunset, Reconciler, Git Janitor, Lib Sync).
|
|
9
|
-
- Start architecture and execution with `preflight-guardian.md`; finish implementation with the independent `verification-auditor.md`.
|
|
8
|
+
- Before beginning any task, load and adopt the matching persona (Preflight Guardian, Spec Architect, Spec Executor, Verification Auditor, Visual Release Auditor, Legacy Sunset, Reconciler, Git Janitor, Lib Sync).
|
|
9
|
+
- Start architecture and execution with `preflight-guardian.md`; finish implementation with the independent `verification-auditor.md`. For `website/**` or `planu.dev`, also adopt `visual-release-auditor.md`.
|
|
10
10
|
- Use `legacy-sunset.md` only for classified, snapshotted, and explicitly authorized permanent retirement.
|
|
11
11
|
- Core (`src/sdd-engine`) changes MUST follow `lib-sync.md`: update the published package, templates, server-card, and tests in the same change.
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ Canonical contract: `PLANU_V8_MANIFESTO.txt`.
|
|
|
18
18
|
| `spec-architect.md` | Creating or completing an unlocked Holy Trinity before user-approved lock. |
|
|
19
19
|
| `spec-executor.md` | Implementing the active task of a locked feature through canonical SDD tools. |
|
|
20
20
|
| `verification-auditor.md` | Independently proving completed implementation against acceptance criteria. |
|
|
21
|
+
| `visual-release-auditor.md` | Website or planu.dev layout, CSS, or deploy — browser proof at desktop and mobile. |
|
|
21
22
|
| `legacy-sunset.md` | Detaching, archiving, and explicitly authorized permanent legacy retirement. |
|
|
22
23
|
| `reconciler.md` | Requirements changed while a feature is still unlocked, or a locked delta must be identified. |
|
|
23
24
|
| `lib-sync.md` | Core or public package behavior, metadata, templates, or tool surface changes. |
|
|
@@ -43,9 +44,18 @@ Canonical contract: `PLANU_V8_MANIFESTO.txt`.
|
|
|
43
44
|
- Nine MCP tools: `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`.
|
|
44
45
|
- Deleted v6 names must never be called. Authentication is not required.
|
|
45
46
|
|
|
47
|
+
7. **No v6 spec tree:**
|
|
48
|
+
- Planu reads only `.sdd/features/FEAT-*`. Never create or thin `planu/specs/SPEC-*` to satisfy commitlint, husky, or a "known limitation".
|
|
49
|
+
- If a host hook still requires the retired v6 tree, delete or rewrite the hook. Duplicating a FEAT into SPEC is forbidden.
|
|
50
|
+
- `sdd_init_workspace` always stamps `.cursor/rules/planu-sdd.mdc`, `.claude/rules/planu-sdd.md`, and `.gemini/planu-sdd.md`. Existing `AGENTS.md` is preserved unless `force` is true or the file still treats the retired v6 tree as the contract. Never write `planu/specs/SPEC-*` and never call `create_spec`.
|
|
51
|
+
|
|
46
52
|
Failure to adhere to these rules compromises the SDD environment and is strictly forbidden.
|
|
47
53
|
|
|
48
54
|
## Git Hygiene (Mandatory)
|
|
49
55
|
|
|
50
56
|
- **Zero-Garbage Policy:** Never leave dangling git branches or orphaned `git worktree` directories after a feature is completed or aborted.
|
|
51
57
|
- When finishing a feature, always invoke the `git-janitor.md` skill before switching context.
|
|
58
|
+
|
|
59
|
+
## Full-cycle release (Mandatory)
|
|
60
|
+
|
|
61
|
+
Validated work is not done until it is on `main` and released. After verification-auditor PASS, visual-release-auditor PASS when the website changed, and an independent advanced review PASS: commit on `main`, push `origin main`, deploy `planu.dev` when website files changed (`pnpm --dir website build` + `wrangler deploy`), prove the live CSS hash, and publish `@planu/cli` when the public package contract or version changed. Do not stop at a local PASS or wait for a second "dale" to ship. Force-push to `main` remains forbidden.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Planu v8 host contract
|
|
2
|
+
|
|
3
|
+
The only SDD contract is `.sdd/features/{FEAT-*}/spec.md`, `plan.md`, and `tasks.md`.
|
|
4
|
+
|
|
5
|
+
- Feature IDs are `FEAT-*`. `SPEC-001` is invalid.
|
|
6
|
+
- Use the nine `sdd_*` tools. Never call deleted v6 tools (`create_spec`, `challenge_spec`, `check_readiness`, `validate`, `planu_status`, …).
|
|
7
|
+
- Never create, thin, or copy files under `planu/specs/`. Planu does not read that tree.
|
|
8
|
+
- If a pre-push, commitlint, or husky guard still requires `planu/specs/SPEC-*/spec.md`, that guard is the defect. Delete or rewrite it. Do not stub a SPEC file.
|
|
9
|
+
- Quality lives in `.sdd/skills/`. There is no validate MCP tool.
|
|
@@ -28,3 +28,7 @@ Never `git push --force` to `main`/`master`. Never skip hooks unless the user ex
|
|
|
28
28
|
- Include `git status --short`, ignored/untracked large artifacts, and stale generated reports in the hygiene report.
|
|
29
29
|
- Remote branches are observations unless the user explicitly authorizes remote deletion.
|
|
30
30
|
- Finish by rerunning `git status --short --branch`, `git worktree list`, and the surviving local-branch inventory.
|
|
31
|
+
|
|
32
|
+
## Full-cycle release
|
|
33
|
+
|
|
34
|
+
A feature is not finished at local PASS. After independent advanced review PASS: commit on `main`, push `origin HEAD` to `origin/main`, then release what changed (`pnpm --dir website build && wrangler deploy` for website; npm publish only when `package.json` version and lib-sync surfaces moved). Do not wait for another ship confirmation. Never `git push --force` to `main`.
|
|
@@ -17,6 +17,7 @@ Any change to the MCP core (`src/sdd-engine/**`, `src/types/sdd-engine.ts`, `src
|
|
|
17
17
|
|
|
18
18
|
2. **Cognitive starter pack (copied by `sdd_init_workspace`)**
|
|
19
19
|
- `templates/AGENTS.md`
|
|
20
|
+
- `templates/host/planu-sdd.md`
|
|
20
21
|
- `templates/skills/*.md`
|
|
21
22
|
- After editing templates, copy the same bytes into `.sdd/skills/` in this repo
|
|
22
23
|
|
|
@@ -46,6 +46,10 @@ Preflight never edits product files and never marks tasks complete.
|
|
|
46
46
|
- Confirm the command is scoped to the task and that required tools are available.
|
|
47
47
|
- Record checks that cannot run in the current environment. Do not convert blocked evidence into a pass.
|
|
48
48
|
|
|
49
|
+
6. **Retired v6 host tree**
|
|
50
|
+
- If `planu/specs/` exists, treat it as dead. Do not list, stub, thin, or copy FEAT contracts into `SPEC-*`.
|
|
51
|
+
- Host hooks that require `planu/specs/SPEC-*/spec.md` must be removed or rewritten to ignore that path. Duplicating specs is forbidden.
|
|
52
|
+
|
|
49
53
|
## Outcome
|
|
50
54
|
|
|
51
55
|
Return exactly one readiness result:
|
|
@@ -50,6 +50,8 @@ Your objective is to produce airtight, deterministic, and unambiguous specificat
|
|
|
50
50
|
3. Review against the 5 laws above. An empty skeleton MUST NOT be locked.
|
|
51
51
|
4. Freeze the design by invoking `sdd_lock_spec(feature_id)` only after user approval.
|
|
52
52
|
|
|
53
|
+
Never author `planu/specs/**` or `SPEC-*` ids. If a host guard still requires that tree, the guard is the defect — do not emit a trace spec to appease it.
|
|
54
|
+
|
|
53
55
|
## LOCK READINESS GATE
|
|
54
56
|
|
|
55
57
|
Before authoring, adopt `preflight-guardian.md`. Before calling `sdd_lock_spec`, also require:
|
|
@@ -23,6 +23,7 @@ You do not make architectural decisions, you do not add dependencies, and you do
|
|
|
23
23
|
3. **Diff Sandboxing (Strict Perimeter Enforcement):**
|
|
24
24
|
- Apply changes via `sdd_apply_file_patch(feature_id, path, search_content, replace_content)`.
|
|
25
25
|
- NEVER use native Write, StrReplace, or Edit tools during execution. They bypass the sandbox.
|
|
26
|
+
- Never write `planu/specs/**` with MCP or native tools. `sdd_apply_file_patch` rejects that tree. Do not stub `SPEC-*` files to pass a host hook.
|
|
26
27
|
- If the server responds with `ERR_FILE_OUT_OF_MANIFEST`, the file is not in `plan.md`. Never attempt workarounds. Report that the plan requires architectural revision.
|
|
27
28
|
- Delete only through an exact `DELETE:` manifest entry with empty search and replacement payloads. Never substitute native filesystem deletion.
|
|
28
29
|
|
|
@@ -44,6 +44,7 @@ Count-only assertions, existence checks, snapshots without semantics, and tests
|
|
|
44
44
|
- Inspect final `git diff` and `git status --short`.
|
|
45
45
|
- Confirm no new dependency, generated artifact, secret, or out-of-manifest file was introduced.
|
|
46
46
|
- For public MCP changes, inspect the final consumer-visible tool schema and package surface, not only source declarations.
|
|
47
|
+
- For `website/**` or `planu.dev`, adopt `visual-release-auditor.md` and require executed browser evidence. Do not approve from tests or curl alone.
|
|
47
48
|
- For deletion or legacy retirement, prove absence from runtime reachability, package contents, templates, active documentation, and supported entrypoints.
|
|
48
49
|
|
|
49
50
|
## Verdict
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-release-auditor
|
|
3
|
+
role: Live Surface Verifier
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# VISUAL RELEASE AUDITOR
|
|
7
|
+
|
|
8
|
+
Tests, curl, and a hero screenshot do not prove `planu.dev`. Adopt this skill whenever `website/**` changes, layout/CSS/HTML changes, or the site will be deployed.
|
|
9
|
+
|
|
10
|
+
## Required executed evidence
|
|
11
|
+
|
|
12
|
+
1. Open the real page in a browser (local Vite before deploy; `https://planu.dev/` after deploy).
|
|
13
|
+
2. Desktop ~1440px: header stays one row; hero shows copy and the contract card; `#commercial` places `.support-copy` beside `.lead-form`; footer `.donation-rail` spans the content width (~1180px).
|
|
14
|
+
3. Mobile ~390px: support, setup grid, and donation rail stack to one column; host tabs wrap; section titles are not hidden under the sticky header.
|
|
15
|
+
4. Confirm `link[rel=stylesheet]` matches the build hash. After wrangler, production HTML must reference the new CSS, not the previous asset.
|
|
16
|
+
5. Hit shared layout routes: `/`, `/privacy/`, `/changelog/`, and a 404.
|
|
17
|
+
|
|
18
|
+
Measure the grid. On desktop the form `x` is to the right of the copy. A collapsed donation column or an empty commercial column is FAIL.
|
|
19
|
+
|
|
20
|
+
## Verdict
|
|
21
|
+
|
|
22
|
+
- `APPROVED`: desktop, mobile, and production CSS hash all observed.
|
|
23
|
+
- `CHANGES_REQUESTED`: overlap, empty column, clipped heading, or stale CSS.
|
|
24
|
+
- `BLOCKED`: no browser; do not claim visual PASS.
|
|
25
|
+
|
|
26
|
+
Do not push or deploy website changes until APPROVED.
|