@planu/cli 8.2.1 → 8.2.3

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [8.2.3] - 2026-09-24
4
+
5
+ - manifest parser ignores `none` placeholder paths and re-evaluates the section at every heading, so a plan title containing "File Manifest" no longer empties the manifest (`sdd_lock_spec` / `sdd_apply_file_patch`)
6
+ - Claude Code plugin marketplace: `/plugin marketplace add planu-dev/planu` then `/plugin install planu@planu`
7
+ - operator-only `pnpm eval:skills` measures pass@k of the spec-architect skill through headless `claude -p`
8
+ - retire orphan `.claude/hooks` scripts left after the v8 detach
9
+ - #commercial places the caret in the email field
10
+ - commercial email accepts click-to-type; header chrome no longer steals form clicks
11
+ - commercial email field is typeable; honeypot no longer covers the lead form
12
+ - commercial lead form is an opaque card with a 44px privacy-consent hit target
13
+ - interactive SDD cycle board on the homepage (lock, allowed write, rejected write, next task)
14
+ - homepage hero names the editor and the terminal, not only a generic agent
15
+ - homepage hero and meta speak to any MCP coding agent; vendor names live in install tabs, not the H1
16
+ - Spanish homepage uses LatAm wording (cambios controlados); drop parche/trinidad calques
17
+
18
+ ## [8.2.2] - 2026-09-21
19
+
20
+ - `sdd_init_workspace` copies cognitive skills into `.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and `.gemini/skills/` instead of `.sdd/skills` in client projects
21
+
3
22
  ## [8.2.1] - 2026-09-21
4
23
 
5
24
  - reject `sdd_apply_file_patch` under `planu/specs`; `sdd_list_features` / `sdd_init_workspace` warn when that tree exists, without a `legacy` catalog
package/README.md CHANGED
@@ -16,7 +16,7 @@ Planu v8 is a **thin MCP sandbox + cognitive skills** stack for Spec Driven Deve
16
16
  - **Zero-Freedom Execution** — mutations and exact `DELETE:` operations go through `sdd_apply_file_patch`; the File Manifest is the sandbox
17
17
  - **Single Task Window** — `sdd_get_active_task` + `sdd_read_file_slice`
18
18
  - **9 Canonical MCP Tools** — listed below
19
- - **Cognitive gates** — `.sdd/skills/` personas replace `challenge_spec` / `check_readiness` / `validate`
19
+ - **Cognitive gates** — host skills under `.claude/skills/planu-*`, `.cursor/skills/planu-*`, and `.agents/skills/planu-*` replace `challenge_spec` / `check_readiness` / `validate`
20
20
  - **Git Hygiene** — `git-janitor.md` skill (the server does not mutate Git)
21
21
 
22
22
  Authentication is **not required**. Do not call `mcp_auth`.
@@ -25,6 +25,17 @@ Authentication is **not required**. Do not call `mcp_auth`.
25
25
 
26
26
  ## Installation
27
27
 
28
+ ### Claude Code plugin
29
+
30
+ Claude Code users can install Planu as a plugin instead of hand-editing `.mcp.json`:
31
+
32
+ ```
33
+ /plugin marketplace add planu-dev/planu
34
+ /plugin install planu@planu
35
+ ```
36
+
37
+ This registers the same `npx -y @planu/cli@latest` server.
38
+
28
39
  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
40
 
30
41
  ```json
@@ -84,7 +95,7 @@ The published server asks the host for MCP roots and binds to the open project t
84
95
  sdd_init_workspace → sdd_create_feature → architect trinity → sdd_lock_spec → execute tasks → verify → git-janitor
85
96
  ```
86
97
 
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.
98
+ 1. **Initialize:** `sdd_init_workspace` writes `.sdd/features`, stamps host rules, and copies cognitive skills into `.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and `.gemini/skills/`. Existing `AGENTS.md` is preserved unless `force: true` or it is still a v6 host contract.
88
99
  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.
89
100
  3. **Lock:** `sdd_lock_spec` hashes spec, plan, and tasks. It rejects empty skeletons. Reseal after review with `relock: true` and `reason`.
90
101
  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.
@@ -114,7 +125,11 @@ src/
114
125
  │ ├── plan.md
115
126
  │ ├── tasks.md
116
127
  │ └── .lock
117
- └── skills/ # preflight, architect, executor, verifier, sunset, reconciler, lib-sync, janitor
128
+
129
+ .claude/skills/planu-*/SKILL.md # Claude Code
130
+ .cursor/skills/planu-*/SKILL.md # Cursor
131
+ .agents/skills/planu-*/SKILL.md # Codex
132
+ .gemini/skills/planu-*.md # Gemini
118
133
  ```
119
134
 
120
135
  ---
@@ -135,6 +150,8 @@ MCP:
135
150
  node dist/sdd-engine/cli.js
136
151
  ```
137
152
 
153
+ `pnpm eval:skills` is an operator-only eval of the spec-architect skill. It spends API budget by shelling out to the local `claude` CLI against a throwaway workspace, so it is not part of `pnpm check` and never runs in CI.
154
+
138
155
  ---
139
156
 
140
157
  ## License
@@ -1,4 +1,5 @@
1
1
  export declare function isStaleV6HostDoc(content: string): boolean;
2
2
  export declare function copyGlobalRules(workspaceRoot: string, force?: boolean): Promise<'preserved' | 'replaced' | 'created'>;
3
+ export declare function installHostSkillPack(workspaceRoot: string): Promise<string[]>;
3
4
  export declare function installHostRulePack(workspaceRoot: string): Promise<string[]>;
4
5
  //# sourceMappingURL=host-rule-pack.d.ts.map
@@ -11,7 +11,7 @@ The only SDD contract is \`.sdd/features/{FEAT-*}/spec.md\`, \`plan.md\`, and \`
11
11
  - Use the nine \`sdd_*\` tools. Never call deleted v6 tools (\`create_spec\`, \`challenge_spec\`, \`check_readiness\`, \`validate\`, \`planu_status\`, …).
12
12
  - Never create, thin, or copy files under \`planu/specs/\`. Planu does not read that tree.
13
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.
14
+ - Quality lives in \`.claude/skills/\`, \`.cursor/skills/\`, \`.agents/skills/\`, and \`.gemini/skills/\`. Specs stay in \`.sdd/features\`. There is no validate MCP tool.
15
15
  `;
16
16
  const PROHIBITION = /\b(never|do not|don't|no longer|not|forbidden|prohibited|deleted|removed|retired|invalid|reject(?:s|ed)?)\b/iu;
17
17
  const LEGACY_TREE = /planu\/specs\/SPEC-|write (?:specs )?to planu\/specs/iu;
@@ -52,6 +52,27 @@ export async function copyGlobalRules(workspaceRoot, force) {
52
52
  return existed ? 'preserved' : 'created';
53
53
  }
54
54
  }
55
+ const HOST_SKILL_DESCRIPTIONS = {
56
+ 'preflight-guardian': 'Use before architecture, first execution, resumed work, or any change under src/sdd-engine.',
57
+ 'spec-architect': 'Use when creating or completing an unlocked Holy Trinity before user-approved lock.',
58
+ 'spec-executor': 'Use when implementing the active task of a locked FEAT-* through sdd_apply_file_patch.',
59
+ 'verification-auditor': 'Use after implementation to independently prove locked BDD and task verification commands.',
60
+ 'visual-release-auditor': 'Use when website or planu.dev layout, CSS, or deploy needs desktop and mobile browser proof.',
61
+ 'legacy-sunset': 'Use only for classified, snapshotted, and explicitly authorized permanent legacy retirement.',
62
+ reconciler: 'Use when requirements changed while a feature is unlocked, or a locked delta must be identified.',
63
+ 'lib-sync': 'Use when core or public package behavior, metadata, templates, or tool surface changes.',
64
+ 'git-janitor': 'Use after approval or abandonment, before switching context, with authorization for destructive Git.',
65
+ };
66
+ function toHostSkillMarkdown(slug, source) {
67
+ const body = source.replace(/^---[\s\S]*?---\n*/u, '');
68
+ const description = HOST_SKILL_DESCRIPTIONS[slug] ?? `Planu SDD cognitive skill ${slug}.`;
69
+ return `---
70
+ name: planu-${slug}
71
+ description: ${description}
72
+ ---
73
+
74
+ ${body}`;
75
+ }
55
76
  async function readHostBody() {
56
77
  try {
57
78
  return await fs.readFile(path.join(TEMPLATES_ROOT, 'host', 'planu-sdd.md'), 'utf-8');
@@ -60,6 +81,34 @@ async function readHostBody() {
60
81
  return FALLBACK_HOST_BODY;
61
82
  }
62
83
  }
84
+ export async function installHostSkillPack(workspaceRoot) {
85
+ try {
86
+ const skillsDir = path.join(TEMPLATES_ROOT, 'skills');
87
+ const files = (await fs.readdir(skillsDir)).filter((file) => file.endsWith('.md'));
88
+ const written = [];
89
+ for (const file of files) {
90
+ const slug = file.replace(/\.md$/u, '');
91
+ const body = toHostSkillMarkdown(slug, await fs.readFile(path.join(skillsDir, file), 'utf-8'));
92
+ const hostSlug = `planu-${slug}`;
93
+ const targets = [
94
+ path.join('.claude', 'skills', hostSlug, 'SKILL.md'),
95
+ path.join('.cursor', 'skills', hostSlug, 'SKILL.md'),
96
+ path.join('.agents', 'skills', hostSlug, 'SKILL.md'),
97
+ path.join('.gemini', 'skills', `${hostSlug}.md`),
98
+ ];
99
+ for (const relative of targets) {
100
+ const fullPath = path.join(workspaceRoot, relative);
101
+ await fs.mkdir(path.dirname(fullPath), { recursive: true });
102
+ await fs.writeFile(fullPath, body, 'utf-8');
103
+ written.push(relative);
104
+ }
105
+ }
106
+ return written;
107
+ }
108
+ catch {
109
+ return [];
110
+ }
111
+ }
63
112
  export async function installHostRulePack(workspaceRoot) {
64
113
  try {
65
114
  const body = await readHostBody();
@@ -113,13 +113,10 @@ export function parseManifestContent(content) {
113
113
  let inManifestSection = false;
114
114
  for (const rawLine of content.split('\n')) {
115
115
  const line = rawLine.trim();
116
- if (/^#{1,3}\s+.*file\s+manifest/i.test(line)) {
117
- inManifestSection = true;
116
+ if (/^#{1,3}\s+/.test(line)) {
117
+ inManifestSection = /^#{1,3}\s+.*file\s+manifest/i.test(line);
118
118
  continue;
119
119
  }
120
- if (inManifestSection && /^#{1,3}\s+/.test(line)) {
121
- break;
122
- }
123
120
  if (inManifestSection && /^[-*]\s+/.test(line)) {
124
121
  parseManifestLine(line, allowedFiles);
125
122
  }
@@ -130,12 +127,20 @@ function parseManifestLine(rawLine, allowedFiles) {
130
127
  const item = rawLine.replace(/^[-*]\s+/, '').trim();
131
128
  const prefixMatch = /^(CREATE|MODIFY|READ_ONLY|DELETE):\s*`?([^`\s#]+)`?\s*$/i.exec(item);
132
129
  if (prefixMatch?.[1] && prefixMatch[2]) {
133
- allowedFiles.set(toPosixPath(prefixMatch[2].trim()), prefixMatch[1].toUpperCase());
130
+ const prefixPath = toPosixPath(prefixMatch[2].trim());
131
+ if (prefixPath.toLowerCase() === 'none') {
132
+ return;
133
+ }
134
+ allowedFiles.set(prefixPath, prefixMatch[1].toUpperCase());
134
135
  return;
135
136
  }
136
137
  const postfixMatch = /^`?([^`\s:#]+)`?:\s*(CREATE|MODIFY|READ_ONLY|DELETE)\s*$/i.exec(item);
137
138
  if (postfixMatch?.[1] && postfixMatch[2]) {
138
- allowedFiles.set(toPosixPath(postfixMatch[1].trim()), postfixMatch[2].toUpperCase());
139
+ const postfixPath = toPosixPath(postfixMatch[1].trim());
140
+ if (postfixPath.toLowerCase() === 'none') {
141
+ return;
142
+ }
143
+ allowedFiles.set(postfixPath, postfixMatch[2].toUpperCase());
139
144
  }
140
145
  }
141
146
  export function toPosixPath(value) {
@@ -4,7 +4,7 @@ import { registerUltralightSddTools } from './tools.js';
4
4
  export function createUltralightSddServer(workspaceRoot) {
5
5
  const server = new McpServer({
6
6
  name: 'sdd-engine',
7
- version: '8.2.1',
7
+ version: '8.2.2',
8
8
  }, {
9
9
  capabilities: {
10
10
  tools: {},
@@ -6,7 +6,7 @@ import { TaskWindowManager } from '../task-window.js';
6
6
  import { formatResult } from './format-result.js';
7
7
  import { homeFallbackFailure } from '../workspace-root.js';
8
8
  import { writeLockedTrinity } from '../lock-integrity.js';
9
- import { copyGlobalRules, installHostRulePack } from '../host-rule-pack.js';
9
+ import { copyGlobalRules, installHostRulePack, installHostSkillPack } from '../host-rule-pack.js';
10
10
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
11
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
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-*.';
@@ -46,22 +46,28 @@ function registerInitTool(server, workspace) {
46
46
  const featuresDir = path.join(targetBase, 'features');
47
47
  const skillsDir = path.join(targetBase, 'skills');
48
48
  await fs.mkdir(featuresDir, { recursive: true });
49
- await fs.mkdir(skillsDir, { recursive: true });
50
- await copySkillTemplates(skillsDir);
49
+ if (args.scope === 'global') {
50
+ await fs.mkdir(skillsDir, { recursive: true });
51
+ await copySkillTemplates(skillsDir);
52
+ }
51
53
  const agentsMd = await copyGlobalRules(resolved.workspaceRoot, args.force);
52
54
  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.');
55
+ const hostSkills = args.scope === 'project' ? await installHostSkillPack(resolved.workspaceRoot) : [];
56
+ const hint = await composeWorkspaceHint(resolved.workspaceRoot, 'Commit .sdd/features with the project. Host quality gates must map .sdd/ as versioned documentation. Cursor, Claude, Gemini, and Codex load Planu skills from sdd_init_workspace host folders, not .sdd/skills.');
54
57
  return formatResult({
55
58
  success: true,
56
59
  data: {
57
60
  initializedPath: targetBase,
58
61
  scope: args.scope,
59
62
  featuresDir,
60
- skillsDir,
63
+ skillsDir: args.scope === 'global'
64
+ ? skillsDir
65
+ : path.join(resolved.workspaceRoot, '.claude', 'skills'),
61
66
  workspaceRoot: resolved.workspaceRoot,
62
67
  source: resolved.source,
63
68
  agentsMd,
64
69
  hostRules,
70
+ hostSkills,
65
71
  versionedHint: hint,
66
72
  },
67
73
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "8.2.1",
3
+ "version": "8.2.3",
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",
@@ -87,6 +87,7 @@
87
87
  "eslint-config-prettier": "^10.1.8",
88
88
  "eslint-import-resolver-typescript": "^4.4.5",
89
89
  "eslint-plugin-import": "^2.32.0",
90
+ "happy-dom": "^20.14.5",
90
91
  "husky": "^9.1.7",
91
92
  "jiti": "2.7.0",
92
93
  "knip": "^6.37.0",
@@ -109,6 +110,7 @@
109
110
  "build:ts": "pnpm clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
110
111
  "dev": "tsc --watch",
111
112
  "start": "node dist/sdd-engine/cli.js",
113
+ "eval:skills": "node scripts/eval-skills.mjs",
112
114
  "clean": "rm -rf dist",
113
115
  "lint": "eslint src/ tests/ --max-warnings 0 --cache --cache-strategy content --cache-location node_modules/.cache/eslint/",
114
116
  "lint:gate": "eslint src/ tests/ --max-warnings 0",
@@ -4,7 +4,7 @@ You are operating within a Spec-Driven Development environment (Planu v8).
4
4
  Canonical contract: `PLANU_V8_MANIFESTO.txt`.
5
5
 
6
6
  1. **SDD Skills Primacy:**
7
- - ALWAYS refer to `.sdd/skills/` for role directives.
7
+ - ALWAYS refer to `.claude/skills/planu-*`, `.cursor/skills/planu-*`, `.agents/skills/planu-*`, or `.gemini/skills/planu-*` for role directives. Specs stay in `.sdd/features`.
8
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
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.
@@ -47,7 +47,7 @@ Canonical contract: `PLANU_V8_MANIFESTO.txt`.
47
47
  7. **No v6 spec tree:**
48
48
  - Planu reads only `.sdd/features/FEAT-*`. Never create or thin `planu/specs/SPEC-*` to satisfy commitlint, husky, or a "known limitation".
49
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`.
50
+ - `sdd_init_workspace` always stamps host rules and copies cognitive skills into `.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and `.gemini/skills/`. 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
51
 
52
52
  Failure to adhere to these rules compromises the SDD environment and is strictly forbidden.
53
53
 
@@ -6,4 +6,4 @@ The only SDD contract is `.sdd/features/{FEAT-*}/spec.md`, `plan.md`, and `tasks
6
6
  - Use the nine `sdd_*` tools. Never call deleted v6 tools (`create_spec`, `challenge_spec`, `check_readiness`, `validate`, `planu_status`, …).
7
7
  - Never create, thin, or copy files under `planu/specs/`. Planu does not read that tree.
8
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.
9
+ - Quality lives in `.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and `.gemini/skills/`. Specs stay in `.sdd/features`. There is no validate MCP tool.
@@ -18,7 +18,7 @@ Any change to the MCP core (`src/sdd-engine/**`, `src/types/sdd-engine.ts`, `src
18
18
  2. **Cognitive starter pack (copied by `sdd_init_workspace`)**
19
19
  - `templates/AGENTS.md`
20
20
  - `templates/host/planu-sdd.md`
21
- - `templates/skills/*.md`
21
+ - `templates/skills/*.md` copied by init into `.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and `.gemini/skills/`
22
22
  - After editing templates, copy the same bytes into `.sdd/skills/` in this repo
23
23
 
24
24
  3. **Host skills / rules** if tool names, lifecycle, or install command changed
@@ -47,5 +47,6 @@ The same change MUST also keep these surfaces coherent:
47
47
  - `planu.json`: remove or update obsolete configuration that points to retired storage;
48
48
  - package inspection: verify `pnpm pack --dry-run` contains required runtime and templates and excludes source-only or legacy artifacts;
49
49
  - negative tool gate: fail when a deleted v6 tool is registered or advertised outside historical documentation.
50
+ - `plugin/.claude-plugin/plugin.json`: version equal to `package.json`, MCP args `-y @planu/cli@latest`;
50
51
 
51
52
  A source build alone does not prove the published contract. Verify the packed artifact and a real MCP `initialize` plus `tools/list` exchange when the public surface changes.