compound-workflow 1.6.5 → 1.6.7

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "Clarify -> plan -> execute -> verify -> capture workflow: commands, skills, and agents for Claude Code",
5
5
  "author": {
6
6
  "name": "Compound Workflow"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "Clarify -> plan -> execute -> verify -> capture workflow for Cursor",
5
5
  "author": {
6
6
  "name": "Compound Workflow"
@@ -0,0 +1,5 @@
1
+ {
2
+ "pluginId": "compound-workflow@local",
3
+ "scope": "user",
4
+ "installPath": "/Users/cjerochim/Documents/DEVELOPMENT/compound-workflow"
5
+ }
package/README.md CHANGED
@@ -42,6 +42,8 @@ If your package manager didn’t run postinstall, run once:
42
42
  npx compound-workflow install
43
43
  ```
44
44
 
45
+ Restart Cursor after install; enable third-party plugins in Settings if skills/commands don't appear.
46
+
45
47
  **4. After updating the package**
46
48
 
47
49
  To get the latest commands and wiring (e.g. after `npm update compound-workflow` or a new release), run install again so your project’s `opencode.json` is refreshed:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -58,93 +58,93 @@ const requiredChecks = [
58
58
  description: "README standards baseline guardrail",
59
59
  },
60
60
  {
61
- file: "src/.agents/commands/workflow/plan.md",
61
+ file: "src/.agents/commands/workflow-plan.md",
62
62
  pattern: "Contract precedence:",
63
63
  description: "plan command precedence note",
64
64
  },
65
65
  {
66
- file: "src/.agents/commands/workflow/triage.md",
66
+ file: "src/.agents/commands/workflow-triage.md",
67
67
  pattern: "Contract precedence:",
68
68
  description: "triage command precedence note",
69
69
  },
70
70
  {
71
- file: "src/.agents/commands/workflow/triage.md",
71
+ file: "src/.agents/commands/workflow-triage.md",
72
72
  pattern: "independently runnable",
73
73
  description: "triage command explicitly standalone while work auto-runs triage",
74
74
  },
75
75
  {
76
- file: "src/.agents/commands/workflow/work.md",
76
+ file: "src/.agents/commands/workflow-work.md",
77
77
  pattern: "Contract precedence:",
78
78
  description: "work command precedence note",
79
79
  },
80
80
  {
81
- file: "src/.agents/commands/workflow/plan.md",
81
+ file: "src/.agents/commands/workflow-plan.md",
82
82
  pattern: "Start `/workflow:work`",
83
83
  description: "plan command default next-step routes to work",
84
84
  },
85
85
  {
86
- file: "src/.agents/commands/workflow/work.md",
86
+ file: "src/.agents/commands/workflow-work.md",
87
87
  pattern: "HARD GATE - WORKTREE FIRST",
88
88
  description: "worktree hard-gate wording in work command",
89
89
  },
90
90
  {
91
- file: "src/.agents/commands/workflow/work.md",
91
+ file: "src/.agents/commands/workflow-work.md",
92
92
  pattern: "required prompt/create gate",
93
93
  description: "mandatory worktree decision prompt/create gate in work command",
94
94
  },
95
95
  {
96
- file: "src/.agents/commands/workflow/work.md",
96
+ file: "src/.agents/commands/workflow-work.md",
97
97
  pattern: "Do not infer or assume an answer when the user has not answered.",
98
98
  description: "worktree decision cannot be silently assumed",
99
99
  },
100
100
  {
101
- file: "src/.agents/commands/workflow/work.md",
101
+ file: "src/.agents/commands/workflow-work.md",
102
102
  pattern:
103
103
  "No file writes, implementation commands, test/lint/typecheck commands, or dependency-install commands may run before this gate passes.",
104
104
  description: "pre-gate write/command prohibition in work command",
105
105
  },
106
106
  {
107
- file: "src/.agents/commands/workflow/work.md",
107
+ file: "src/.agents/commands/workflow-work.md",
108
108
  pattern: "workflow_complete: false (pending /workflow:review current)",
109
109
  description: "implementation-complete pending-review status in work command",
110
110
  },
111
111
  {
112
- file: "src/.agents/commands/workflow/work.md",
112
+ file: "src/.agents/commands/workflow-work.md",
113
113
  pattern: "Standards Compliance Gate (REQUIRED for code/config changes)",
114
114
  description: "required standards gate in work command",
115
115
  },
116
116
  {
117
- file: "src/.agents/commands/workflow/work.md",
117
+ file: "src/.agents/commands/workflow-work.md",
118
118
  pattern: "This gate cannot run until the isolation/worktree gate is passed and recorded (`gate_status: passed`).",
119
119
  description: "standards gate ordering with worktree gate",
120
120
  },
121
121
  {
122
- file: "src/.agents/commands/workflow/review.md",
122
+ file: "src/.agents/commands/workflow-review.md",
123
123
  pattern: "Contract precedence:",
124
124
  description: "review command precedence note",
125
125
  },
126
126
  {
127
- file: "src/.agents/commands/workflow/review.md",
127
+ file: "src/.agents/commands/workflow-review.md",
128
128
  pattern: "Independent Reviewer Pass (REQUIRED)",
129
129
  description: "required independent reviewer pass in review command",
130
130
  },
131
131
  {
132
- file: "src/.agents/commands/workflow/review.md",
132
+ file: "src/.agents/commands/workflow-review.md",
133
133
  pattern: "review_independence_mode: independent|degraded",
134
134
  description: "explicit review independence mode in review command",
135
135
  },
136
136
  {
137
- file: "src/.agents/commands/workflow/review.md",
137
+ file: "src/.agents/commands/workflow-review.md",
138
138
  pattern: "what was skipped and why",
139
139
  description: "review skipped-pass disclosure requirement",
140
140
  },
141
141
  {
142
- file: "src/.agents/commands/workflow/review.md",
142
+ file: "src/.agents/commands/workflow-review.md",
143
143
  pattern: "standards_compliance: pass|pass-with-notes|fail",
144
144
  description: "review standards compliance output field",
145
145
  },
146
146
  {
147
- file: "src/.agents/commands/workflow/review.md",
147
+ file: "src/.agents/commands/workflow-review.md",
148
148
  pattern: "standards `MUST` violations => blocking finding and review recommendation `fail`",
149
149
  description: "review must-violation fail criteria",
150
150
  },
@@ -162,22 +162,22 @@ const requiredChecks = [
162
162
 
163
163
  const forbiddenChecks = [
164
164
  {
165
- file: "src/.agents/commands/workflow/work.md",
165
+ file: "src/.agents/commands/workflow-work.md",
166
166
  pattern: "## When to Use Reviewer Agents",
167
167
  description: "legacy optional reviewer section in work command",
168
168
  },
169
169
  {
170
- file: "src/.agents/commands/workflow/work.md",
170
+ file: "src/.agents/commands/workflow-work.md",
171
171
  pattern: "**Don't use by default.**",
172
172
  description: "legacy skip-by-default reviewer wording in work command",
173
173
  },
174
174
  {
175
- file: "src/.agents/commands/workflow/work.md",
175
+ file: "src/.agents/commands/workflow-work.md",
176
176
  pattern: "skip specialist reviewers by default",
177
177
  description: "legacy skip-by-default specialist reviewer wording",
178
178
  },
179
179
  {
180
- file: "src/.agents/commands/workflow/work.md",
180
+ file: "src/.agents/commands/workflow-work.md",
181
181
  pattern: "Follow project coding standards (see AGENTS.md)",
182
182
  description: "legacy advisory-only coding standards wording in work command",
183
183
  },
@@ -1,11 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * compound-workflow install
4
+ *
4
5
  * Native-only install: writes opencode.json from package metadata,
5
6
  * merges AGENTS.md, and ensures standard docs/todo directories.
7
+ *
8
+ * DECLARATIVE SOURCE OF TRUTH (no manual wiring):
9
+ * - Commands: add/remove .md under src/.agents/commands/ (frontmatter: invocation, name, description).
10
+ * Registry (src/.agents/registry.json) + generate-platform-artifacts → opencode.managed.json → install.
11
+ * - Agents: add/remove .md under src/.agents/agents/ (frontmatter: name, description). Same pipeline.
12
+ * - Skills: add/remove dir src/.agents/skills/<name>/SKILL.md. OpenCode uses skills path; install syncs
13
+ * each skill into .cursor/skills/ (symlinks) so Cursor discovers them. Prune removes stale symlinks.
14
+ * Run install (or npm install compound-workflow) after any change; no other registration needed.
6
15
  */
7
16
  import fs from "node:fs";
8
17
  import path from "node:path";
18
+ import os from "node:os";
9
19
  import { fileURLToPath } from "node:url";
10
20
  import { spawnSync } from "node:child_process";
11
21
 
@@ -15,25 +25,30 @@ function usage(exitCode = 0) {
15
25
  const msg = `
16
26
  Usage:
17
27
  (automatic) npm install compound-workflow # runs install via postinstall; no npx needed
18
- (manual) npx compound-workflow install [--root <projectDir>] [--dry-run] [--no-config]
28
+ (manual) npx compound-workflow install [--root <projectDir>] [--dry-run] [--no-config] [--no-register-cursor] [--register-cursor]
19
29
 
20
30
  Install writes opencode.json (from package), merges AGENTS.md, creates standard
21
31
  docs/todos directories, and prompts for Repo Config Block (unless --no-config).
32
+ When Cursor is detected (~/.cursor), registers the plugin so skills/commands appear.
22
33
 
23
- --root <dir> Project directory (default: cwd)
24
- --dry-run Print planned changes only
25
- --no-config Skip Repo Config Block reminder
34
+ --root <dir> Project directory (default: cwd)
35
+ --dry-run Print planned changes only
36
+ --no-config Skip Repo Config Block reminder
37
+ --no-register-cursor Do not register plugin with Cursor (skip apply to ~/.claude/)
38
+ --register-cursor Force registration with Cursor even if ~/.cursor not found
26
39
  `;
27
40
  (exitCode === 0 ? console.log : console.error)(msg.trimStart());
28
41
  process.exit(exitCode);
29
42
  }
30
43
 
31
44
  function parseArgs(argv) {
32
- const out = { root: process.cwd(), dryRun: false, noConfig: false };
45
+ const out = { root: process.cwd(), dryRun: false, noConfig: false, noRegisterCursor: false, registerCursor: false };
33
46
  for (let i = 2; i < argv.length; i++) {
34
47
  const arg = argv[i];
35
48
  if (arg === "--dry-run") out.dryRun = true;
36
49
  else if (arg === "--no-config") out.noConfig = true;
50
+ else if (arg === "--no-register-cursor") out.noRegisterCursor = true;
51
+ else if (arg === "--register-cursor") out.registerCursor = true;
37
52
  else if (arg === "--root") {
38
53
  const value = argv[i + 1];
39
54
  if (!value) usage(1);
@@ -331,15 +346,159 @@ function writePluginManifests(targetRoot, dryRun, isSelfInstall) {
331
346
  const cursorDir = path.join(targetRoot, ".cursor-plugin");
332
347
  const claudeDir = path.join(targetRoot, ".claude-plugin");
333
348
 
349
+ const installPathAbs = realpathSafe(targetRoot);
350
+ const registrationDescriptor = {
351
+ pluginId: "compound-workflow@local",
352
+ scope: "user",
353
+ installPath: installPathAbs,
354
+ };
355
+
334
356
  if (dryRun) {
335
- console.log("[dry-run] Would write .cursor-plugin/plugin.json and .claude-plugin/plugin.json");
357
+ console.log("[dry-run] Would write .cursor-plugin/plugin.json, .claude-plugin/plugin.json, .cursor-plugin/registration.json");
336
358
  return;
337
359
  }
338
360
  fs.mkdirSync(cursorDir, { recursive: true });
339
361
  fs.mkdirSync(claudeDir, { recursive: true });
340
362
  fs.writeFileSync(path.join(cursorDir, "plugin.json"), JSON.stringify(cursorOut, null, 2) + "\n", "utf8");
341
363
  fs.writeFileSync(path.join(claudeDir, "plugin.json"), JSON.stringify(claudeOut, null, 2) + "\n", "utf8");
342
- console.log("Wrote: .cursor-plugin/plugin.json, .claude-plugin/plugin.json");
364
+ fs.writeFileSync(path.join(cursorDir, "registration.json"), JSON.stringify(registrationDescriptor, null, 2) + "\n", "utf8");
365
+ console.log("Wrote: .cursor-plugin/plugin.json, .claude-plugin/plugin.json, .cursor-plugin/registration.json");
366
+ }
367
+
368
+ /**
369
+ * Cursor discovers skills only from .agents/skills, .cursor/skills, ~/.cursor/skills.
370
+ * Populate .cursor/skills/ with symlinks to the package skills so Cursor finds them.
371
+ */
372
+ function syncCursorSkills(targetRoot, dryRun, isSelfInstall) {
373
+ const packageSkillsAbs = isSelfInstall
374
+ ? path.join(PACKAGE_ROOT, "src", ".agents", "skills")
375
+ : path.join(targetRoot, "node_modules", "compound-workflow", "src", ".agents", "skills");
376
+ if (!fs.existsSync(packageSkillsAbs)) return;
377
+
378
+ const cursorSkillsDir = path.join(targetRoot, ".cursor", "skills");
379
+ let entries;
380
+ try {
381
+ entries = fs.readdirSync(packageSkillsAbs, { withFileTypes: true });
382
+ } catch {
383
+ return;
384
+ }
385
+
386
+ const skillDirs = entries.filter((e) => e.isDirectory() && fs.existsSync(path.join(packageSkillsAbs, e.name, "SKILL.md"))).map((e) => e.name);
387
+ if (skillDirs.length === 0) return;
388
+
389
+ if (dryRun) {
390
+ console.log("[dry-run] Would symlink", skillDirs.length, "skills into .cursor/skills/");
391
+ return;
392
+ }
393
+
394
+ fs.mkdirSync(cursorSkillsDir, { recursive: true });
395
+ const packageSkillsReal = realpathSafe(packageSkillsAbs);
396
+ const skillSet = new Set(skillDirs);
397
+
398
+ // Prune: remove symlinks that point at our package but are no longer in the package
399
+ try {
400
+ for (const entry of fs.readdirSync(cursorSkillsDir, { withFileTypes: true })) {
401
+ if (!entry.isSymbolicLink()) continue;
402
+ const linkPath = path.join(cursorSkillsDir, entry.name);
403
+ try {
404
+ const resolved = realpathSafe(linkPath);
405
+ if (!resolved.startsWith(packageSkillsReal + path.sep) && resolved !== packageSkillsReal) continue;
406
+ const base = path.basename(resolved);
407
+ if (skillSet.has(base)) continue;
408
+ fs.rmSync(linkPath);
409
+ } catch {
410
+ /* ignore broken symlinks or permission errors */
411
+ }
412
+ }
413
+ } catch {
414
+ /* .cursor/skills not readable */
415
+ }
416
+
417
+ for (const name of skillDirs) {
418
+ const linkPath = path.join(cursorSkillsDir, name);
419
+ const targetPath = path.join(packageSkillsAbs, name);
420
+ try {
421
+ if (fs.existsSync(linkPath)) {
422
+ const stat = fs.lstatSync(linkPath);
423
+ if (!stat.isSymbolicLink()) continue;
424
+ try {
425
+ if (realpathSafe(linkPath) !== realpathSafe(targetPath)) continue;
426
+ } catch {
427
+ continue;
428
+ }
429
+ fs.rmSync(linkPath);
430
+ }
431
+ fs.symlinkSync(targetPath, linkPath, "dir");
432
+ } catch (err) {
433
+ if (err.code === "EPERM" && process.platform === "win32") {
434
+ try {
435
+ fs.symlinkSync(targetPath, linkPath, "junction");
436
+ } catch {
437
+ console.warn("[cursor] Could not symlink skill", name, err.message);
438
+ }
439
+ } else {
440
+ console.warn("[cursor] Could not symlink skill", name, err.message);
441
+ }
442
+ }
443
+ }
444
+ console.log("Synced", skillDirs.length, "skills to .cursor/skills/");
445
+ }
446
+
447
+ function cursorDetected() {
448
+ return fs.existsSync(path.join(os.homedir(), ".cursor"));
449
+ }
450
+
451
+ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegister) {
452
+ if (dryRun) return;
453
+ if (noRegisterCursor && !forceRegister) return;
454
+ const shouldApply = forceRegister || (cursorDetected() && !noRegisterCursor);
455
+ if (!shouldApply) {
456
+ console.log("[cursor] Cursor not detected; skipped plugin registration. Use --register-cursor to force.");
457
+ return;
458
+ }
459
+
460
+ const registrationPath = path.join(targetRoot, ".cursor-plugin", "registration.json");
461
+ if (!fs.existsSync(registrationPath)) return;
462
+ let descriptor;
463
+ try {
464
+ descriptor = readJsonMaybe(registrationPath);
465
+ } catch {
466
+ return;
467
+ }
468
+ if (!descriptor?.pluginId || !descriptor?.installPath) return;
469
+
470
+ const claudePluginsDir = path.join(os.homedir(), ".claude", "plugins");
471
+ const installedPath = path.join(claudePluginsDir, "installed_plugins.json");
472
+ const settingsPath = path.join(os.homedir(), ".claude", "settings.json");
473
+
474
+ let installed = {};
475
+ if (fs.existsSync(installedPath)) {
476
+ try {
477
+ installed = readJsonMaybe(installedPath) ?? {};
478
+ } catch {
479
+ installed = {};
480
+ }
481
+ }
482
+ const plugins = ensureObject(installed.plugins);
483
+ plugins[descriptor.pluginId] = [{ scope: descriptor.scope || "user", installPath: descriptor.installPath }];
484
+ installed.plugins = plugins;
485
+
486
+ let settings = {};
487
+ if (fs.existsSync(settingsPath)) {
488
+ try {
489
+ settings = readJsonMaybe(settingsPath) ?? {};
490
+ } catch {
491
+ settings = {};
492
+ }
493
+ }
494
+ settings.enabledPlugins = ensureObject(settings.enabledPlugins);
495
+ settings.enabledPlugins[descriptor.pluginId] = true;
496
+
497
+ fs.mkdirSync(claudePluginsDir, { recursive: true });
498
+ fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
499
+ fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + "\n", "utf8");
500
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
501
+ console.log("Registered compound-workflow with Cursor. Restart Cursor; enable 'Include third-party Plugins, Skills, and other configs' in Settings if needed.");
343
502
  }
344
503
 
345
504
  function reportOpenCodeIntegration(targetRoot, dryRun) {
@@ -406,6 +565,8 @@ function main() {
406
565
 
407
566
  writeOpenCodeJson(targetRoot, args.dryRun, isSelfInstall);
408
567
  writePluginManifests(targetRoot, args.dryRun, isSelfInstall);
568
+ syncCursorSkills(targetRoot, args.dryRun, isSelfInstall);
569
+ applyCursorRegistration(targetRoot, args.dryRun, args.noRegisterCursor, args.registerCursor);
409
570
  reportOpenCodeIntegration(targetRoot, args.dryRun);
410
571
  writeAgentsMd(targetRoot, args.dryRun);
411
572
  ensureDirs(targetRoot, args.dryRun);
@@ -2,7 +2,7 @@
2
2
  name: install
3
3
  invocation: install
4
4
  description: Install compound-workflow in this project (native mode): writes opencode.json, merges AGENTS.md, and creates docs/todo dirs.
5
- argument-hint: "[--dry-run] [--root <path>] [--no-config]"
5
+ argument-hint: "[--dry-run] [--root <path>] [--no-config] [--no-register-cursor] [--register-cursor]"
6
6
  ---
7
7
 
8
8
  # /install
@@ -32,9 +32,15 @@ npx compound-workflow install --no-config
32
32
  - `--dry-run`: Print planned changes only; no writes.
33
33
  - `--root <path>`: Target project directory (default: current directory).
34
34
  - `--no-config`: Skip Repo Config Block reminder; still writes opencode.json, AGENTS.md, and dirs.
35
+ - `--no-register-cursor`: Do not register the plugin with Cursor (skip writing to ~/.claude/).
36
+ - `--register-cursor`: Force registration with Cursor even if Cursor is not detected in the default location.
35
37
 
36
38
  After running, suggest `opencode debug config` in the project to verify OpenCode resolution.
37
39
 
40
+ ## Cursor
41
+
42
+ One command installs and registers the plugin with Cursor when Cursor is detected (`~/.cursor` exists). Restart Cursor after install; if skills or commands do not appear, enable "Include third-party Plugins, Skills, and other configs" in Cursor Settings > Features. Use `--no-register-cursor` to skip registration (e.g. in CI).
43
+
38
44
  ## What Install does
39
45
 
40
46
  1. Ensures `compound-workflow` is installed in the project.
@@ -12,7 +12,7 @@ Checks:
12
12
  - Managed entries in opencode.json point to existing source files
13
13
  - Flags missing required frontmatter fields:
14
14
  - commands: description (all)
15
- - commands/workflow/**: invocation (recommended/expected)
15
+ - commands/workflow-*.md: invocation (recommended/expected)
16
16
  - agents: description (all)
17
17
  `;
18
18
  (exitCode === 0 ? console.log : console.error)(msg.trimStart());
@@ -178,7 +178,7 @@ function main() {
178
178
  for (const c of cmds) {
179
179
  if (!c.id) errors.push(`Command missing id (name/invocation): ${c.rel}`);
180
180
  if (!c.fm.description) errors.push(`Command missing frontmatter description: ${c.rel} (${c.id || "?"})`);
181
- if (c.rel.startsWith(".agents/commands/workflow/") && !c.fm.invocation) {
181
+ if (c.rel.includes("commands/workflow-") && !c.fm.invocation) {
182
182
  errors.push(`Workflow command missing frontmatter invocation: ${c.rel} (${c.id || "?"})`);
183
183
  }
184
184
  if (c.id && !commandsReg[c.id]) errors.push(`Command not registered in opencode.json: ${c.id} (source: ${c.rel})`);
@@ -9,8 +9,11 @@ description: General coding practices, implementation styles, and patterns for t
9
9
 
10
10
  These rules are mandatory for code/config implementation work. They are pass/fail gates, not advisory guidance.
11
11
 
12
+ **Declarative over imperative:** Prefer declarative solutions by requirement. Describe *what* should hold (state, transitions, invariants) and let the runtime or framework determine *how*; avoid imperative step-by-step control that mutates shared state in place.
13
+
12
14
  ### MUST
13
15
 
16
+ - **MUST prefer declarative over imperative:** Orchestration and data flow MUST be expressed declaratively (state/events/transitions, pure transforms) rather than imperative sequences (mutating variables, step-by-step handlers). When both are feasible, choose the declarative option.
14
17
  - **MUST keep orchestration declarative** in containers/controllers: describe state transitions and event flow explicitly instead of imperative step-by-step control logic.
15
18
  - **MUST use immutable transforms** for domain and controller data operations (`input -> output`), returning new values instead of mutating existing objects/arrays.
16
19
  - **MUST keep domain logic in pure entity functions** (no side effects, no hidden mutable module state, no IO in entity transforms/predicates).
@@ -22,6 +25,7 @@ These rules are mandatory for code/config implementation work. They are pass/fai
22
25
 
23
26
  ### MUST NOT
24
27
 
28
+ - **MUST NOT choose imperative over declarative** when a declarative solution is feasible (e.g. state machine + events over manual flags and step counters; pure transforms over in-place mutation).
25
29
  - **MUST NOT implement mutation-heavy imperative handlers** that modify shared state in-place across multiple steps.
26
30
  - **MUST NOT use hidden mutable accumulators** (`let` variables mutated through control flow) when a pure transform is feasible.
27
31
  - **MUST NOT mix business decision logic into containers/presentation** when it belongs in domain entities/controllers.
@@ -34,6 +38,7 @@ Use this format when reporting standards compliance in execution or review evide
34
38
 
35
39
  ```markdown
36
40
  standards_compliance:
41
+ - declarative_over_imperative: pass|fail (evidence: file:line) # Declarative solutions required; no imperative choice when declarative feasible
37
42
  - declarative_flow: pass|fail (evidence: file:line)
38
43
  - immutable_transforms: pass|fail (evidence: file:line)
39
44
  - maintainability_boundaries: pass|fail (evidence: file:line)
package/src/AGENTS.md CHANGED
@@ -54,7 +54,7 @@ If workflow documents conflict, resolve them in this order:
54
54
 
55
55
  1. `docs/principles/workflow-baseline-principles.md`
56
56
  2. This file (`src/AGENTS.md`) non-negotiables and repo config
57
- 3. Workflow command specs (`src/.agents/commands/workflow/*.md`)
57
+ 3. Workflow command specs (`src/.agents/commands/workflow-*.md`)
58
58
  4. Skill docs (`src/.agents/skills/*/SKILL.md`)
59
59
 
60
60
  ## Non-negotiables (Structure Integrity)
@@ -161,15 +161,17 @@ worktree_bootstrap_notes:
161
161
 
162
162
  ## Directory Layout
163
163
 
164
- - Commands: `.agents/commands/*.md` and `.agents/commands/workflow/*.md` (workflow namespace)
164
+ - Commands: `.agents/commands/*.md` and `.agents/commands/workflow-*.md` (workflow namespace)
165
165
  - Skills: `.agents/skills/*/SKILL.md`
166
166
  - Skills may optionally include tool-specific agent metadata under `.agents/skills/*/agents/` (for example `openai.yaml`) when required by that skill's validator/runtime.
167
167
  - References: `.agents/references/**`
168
168
  - Agents: `.agents/agents/**/*.md`
169
169
 
170
+ **Single source of truth (declarative):** Commands and agents are discovered from the registry and `generate-platform-artifacts`; skills are discovered by scanning `skills/` for `*/SKILL.md`. Add or remove files/dirs, then run install—no other registration. See install-cli header comment for the full pipeline.
171
+
170
172
  ## Implemented Components (Current Scope)
171
173
 
172
- - Commands: `workflow:brainstorm`, `workflow:plan`, `workflow:triage`, `workflow:work`, `workflow:review`, `workflow:tech-review`, `workflow:compound` (under `.agents/commands/workflow/`), plus `test-browser`, `metrics`, `assess`, `install` (root commands)
174
+ - Commands: `workflow:brainstorm`, `workflow:plan`, `workflow:triage`, `workflow:work`, `workflow:review`, `workflow:tech-review`, `workflow:compound` (under `.agents/commands/` as `workflow-*.md`), plus `test-browser`, `metrics`, `assess`, `install` (root commands)
173
175
  - Skills: `brainstorming`, `document-review`, `technical-review`, `compound-docs` (alias: `compound_doc`), `capture-skill`, `file-todos`, `agent-browser`, `git-worktree`, `process-metrics`, `react-ddd-mvc-frontend`, `xstate-actor-orchestration`, `standards`, `pii-protection-prisma`, `financial-workflow-integrity`, `audit-traceability`, `data-foundations`
174
176
  - Agents:
175
177
  - `repo-research-analyst`
@@ -27,37 +27,37 @@
27
27
  {
28
28
  "id": "workflow:brainstorm",
29
29
  "description": "Explore requirements and approaches through collaborative dialogue before planning implementation",
30
- "rel": "workflow/brainstorm.md"
30
+ "rel": "workflow-brainstorm.md"
31
31
  },
32
32
  {
33
33
  "id": "workflow:compound",
34
34
  "description": "Document a durable learning (solved problem or implementation insight) into docs/solutions/ to compound institutional knowledge",
35
- "rel": "workflow/compound.md"
35
+ "rel": "workflow-compound.md"
36
36
  },
37
37
  {
38
38
  "id": "workflow:plan",
39
39
  "description": "Transform feature descriptions into well-structured project plans using an explicit fidelity and confidence model",
40
- "rel": "workflow/plan.md"
40
+ "rel": "workflow-plan.md"
41
41
  },
42
42
  {
43
43
  "id": "workflow:review",
44
44
  "description": "Review a PR/branch/diff with structured findings. Does not implement fixes unless explicitly requested.",
45
- "rel": "workflow/review.md"
45
+ "rel": "workflow-review.md"
46
46
  },
47
47
  {
48
48
  "id": "workflow:tech-review",
49
49
  "description": "Run technical review on a plan (technical correctness before build). Optional plan path or latest in docs/plans/.",
50
- "rel": "workflow/tech-review.md"
50
+ "rel": "workflow-tech-review.md"
51
51
  },
52
52
  {
53
53
  "id": "workflow:triage",
54
54
  "description": "Manual triage command to prioritize todo files into an executable ready queue (priority, dependencies, recommended action)",
55
- "rel": "workflow/triage.md"
55
+ "rel": "workflow-triage.md"
56
56
  },
57
57
  {
58
58
  "id": "workflow:work",
59
59
  "description": "Execute a plan file systematically (implementation + verification) without auto-shipping",
60
- "rel": "workflow/work.md"
60
+ "rel": "workflow-work.md"
61
61
  }
62
62
  ],
63
63
  "agents": [