@haposoft/cafekit 0.18.0 → 0.18.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.
Files changed (83) hide show
  1. package/README.md +1 -1
  2. package/bin/__tests__/codex-hooks.test.js +169 -236
  3. package/bin/__tests__/codex-native.test.js +54 -114
  4. package/bin/__tests__/develop-contract.test.js +101 -1361
  5. package/bin/__tests__/legacy-authority-decoupled.test.js +14 -19
  6. package/bin/__tests__/package-inventory.test.js +1 -395
  7. package/bin/__tests__/spec-narrowing.test.js +30 -134
  8. package/bin/__tests__/specs-v2-execution-closeout.test.js +0 -372
  9. package/bin/__tests__/test-runtime-dependency-closure.cjs +1 -2
  10. package/bin/__tests__/validator-grounding.test.js +17 -2929
  11. package/bin/lib/managed-writer.js +2 -3
  12. package/bin/phases/codex-runtime.js +6 -3
  13. package/bin/phases/copy-payload.js +13 -28
  14. package/bin/phases/omp-runtime.js +6 -3
  15. package/package.json +2 -3
  16. package/src/claude/agents/code-auditor.md +9 -6
  17. package/src/claude/agents/debugger.md +3 -9
  18. package/src/claude/agents/docs-keeper.md +4 -7
  19. package/src/claude/agents/git-ops.md +2 -4
  20. package/src/claude/agents/implementer.md +6 -7
  21. package/src/claude/agents/inspector.md +2 -0
  22. package/src/claude/agents/project-manager.md +2 -2
  23. package/src/claude/agents/spec-maker.md +4 -4
  24. package/src/claude/agents/test-runner.md +8 -11
  25. package/src/claude/agents/ui-ux-designer.md +0 -1
  26. package/src/claude/hooks/__tests__/spec-gate.test.js +170 -330
  27. package/src/claude/hooks/__tests__/spec-state-touched.test.js +26 -0
  28. package/src/claude/hooks/spec-gate.cjs +8 -63
  29. package/src/claude/hooks/spec-state.cjs +47 -38
  30. package/src/claude/migration-manifest.json +12 -7
  31. package/src/claude/output-styles/coding-level-0-eli5.md +9 -9
  32. package/src/claude/output-styles/coding-level-1-junior.md +3 -3
  33. package/src/claude/output-styles/coding-level-2-mid.md +3 -3
  34. package/src/claude/output-styles/coding-level-3-senior.md +2 -2
  35. package/src/claude/output-styles/coding-level-4-lead.md +5 -5
  36. package/src/claude/output-styles/coding-level-5-god.md +6 -6
  37. package/src/claude/rules/ai-dev-rules.md +1 -2
  38. package/src/claude/rules/workflow.md +1 -1
  39. package/src/claude/scripts/spec-receipt.cjs +0 -114
  40. package/src/claude/scripts/spec-resolver.cjs +41 -457
  41. package/src/claude/scripts/workflow-policy.cjs +3 -1801
  42. package/src/claude/skills/agent-browser/SKILL.md +1 -1
  43. package/src/claude/skills/chrome-devtools/SKILL.md +14 -31
  44. package/src/claude/skills/code-review/SKILL.md +25 -108
  45. package/src/claude/skills/code-review/references/spec-compliance-review.md +4 -7
  46. package/src/claude/skills/develop/SKILL.md +22 -70
  47. package/src/claude/skills/develop/references/subagent-patterns.md +0 -6
  48. package/src/claude/skills/research/SKILL.md +24 -55
  49. package/src/claude/skills/sync/SKILL.md +12 -34
  50. package/src/claude/skills/sync/references/rebind-and-audit.md +2 -2
  51. package/src/claude/skills/test/SKILL.md +39 -123
  52. package/src/claude/skills/test/references/execution-strategy.md +11 -22
  53. package/src/claude/skills/ui-ux/SKILL.md +1 -1
  54. package/src/claude/skills/ui-ux-pro-max/SKILL.md +24 -79
  55. package/src/claude/skills/web-testing/SKILL.md +2 -20
  56. package/src/codex/hooks/lib/spec-receipt.cjs +2 -30
  57. package/src/codex/hooks/lib/spec-utils.cjs +6 -45
  58. package/src/codex/hooks/spec-gate.cjs +11 -68
  59. package/src/codex/hooks/spec-state.cjs +37 -41
  60. package/src/common/AGENTS.md +4 -10
  61. package/bin/__tests__/change-firewall.semantic-firewall.test.js +0 -2133
  62. package/bin/__tests__/finalizer-pass-gate.semantic-firewall.test.js +0 -342
  63. package/bin/__tests__/release-preflight.semantic-firewall.test.js +0 -586
  64. package/bin/__tests__/review-receipt-c2.semantic-firewall.test.js +0 -378
  65. package/bin/__tests__/specs-v2-policy-and-scaffold.test.js +0 -665
  66. package/bin/__tests__/specs-v2-validator-grounder-contract.test.js +0 -1132
  67. package/src/claude/hooks/lib/context.cjs +0 -527
  68. package/src/claude/hooks/lib/detect.cjs +0 -474
  69. package/src/claude/scripts/change-firewall.cjs +0 -1748
  70. package/src/claude/scripts/spec-authoring-digest.cjs +0 -151
  71. package/src/claude/scripts/spec-authoring-validation.cjs +0 -126
  72. package/src/claude/scripts/spec-final-state.cjs +0 -290
  73. package/src/claude/scripts/spec-ground.cjs +0 -650
  74. package/src/claude/scripts/spec-readiness.cjs +0 -425
  75. package/src/claude/scripts/spec-scaffold.cjs +0 -2317
  76. package/src/claude/scripts/spec-semantic-model.cjs +0 -396
  77. package/src/claude/scripts/validate-spec-output.cjs +0 -3914
  78. package/src/claude/skills/code-review/references/verification-gate.md +0 -41
  79. package/src/claude/skills/specs/templates/design.md +0 -82
  80. package/src/claude/skills/specs/templates/requirements-init.md +0 -8
  81. package/src/claude/skills/specs/templates/requirements.md +0 -42
  82. package/src/claude/skills/specs/templates/spec-state.json +0 -56
  83. package/src/claude/skills/specs/templates/task.md +0 -47
@@ -60,9 +60,8 @@ function writeManagedFile(opts) {
60
60
  // Ownership manifest for this platform (read at run start), NOT the migration manifest.
61
61
  const ownership = (ctx.ownership && ctx.ownership[platformFolder]) || { files: {} };
62
62
 
63
- // A file already written earlier THIS run (e.g. a spec template copied as part
64
- // of the specs/ tree, then revisited by the template-sync loop) is ours — treat
65
- // it as pristine against what we just wrote, not as a user-created file.
63
+ // A file already written earlier THIS run is ours — treat it as pristine
64
+ // against what we just wrote, not as a user-created file.
66
65
  const relForRun = tracker?.keyFor
67
66
  ? tracker.keyFor(dest)
68
67
  : path.relative(platformFolder, dest).replace(/\\/g, '/');
@@ -24,16 +24,19 @@ const CODEX_OWN_RUNTIME = [
24
24
  ];
25
25
 
26
26
  /**
27
- * Delete hooks the manifest marks obsolete. Codex tracker keys are project-relative
27
+ * Delete hooks, scripts and skill files the manifest marks obsolete. Codex tracker keys are project-relative
28
28
  * (`.codex/hooks/…`), so the record is pruned through keyFor, and always: a record whose
29
29
  * file is already gone must still leave the manifest.
30
30
  */
31
31
  function removeObsoleteCodexHooks(ctx, platformKey) {
32
32
  const platform = PLATFORMS[platformKey];
33
33
  const tracker = ctx.trackers && ctx.trackers[platformKey];
34
- const obsoleteHooks = (ctx.manifest?.obsolete?.runtimeFiles || []).filter((rel) => rel.startsWith('hooks/'));
34
+ const obsoleteHooks = (ctx.manifest?.obsolete?.runtimeFiles || []).filter((rel) => rel.startsWith('hooks/') || rel.startsWith('scripts/') || rel.startsWith('skills/'));
35
35
  for (const rel of obsoleteHooks) {
36
- const target = path.join(platform.folder, rel);
36
+ // Skill files live in the shared skills directory, not under the runtime folder.
37
+ const target = rel.startsWith('skills/')
38
+ ? path.join(platform.skillsDir, rel.slice('skills/'.length))
39
+ : path.join(platform.folder, rel);
37
40
  const exists = fs.existsSync(target);
38
41
  if (!ctx.dryRun) {
39
42
  if (exists) fs.rmSync(target, { force: true, recursive: fs.statSync(target).isDirectory() });
@@ -94,37 +94,22 @@ function copyPlatformFiles(ctx, platformKey) {
94
94
  report(ctx, treeAction(agg), 'Skill: specs');
95
95
  }
96
96
 
97
- // Keep spec templates in sync (Claude command runtime reads these).
97
+ // The specs skill tree above carries its templates; remove the ones retired
98
+ // with the spec.json planning flow from earlier installs.
98
99
  if (platformKey === 'claude' || platformKey === 'codex') {
99
- const legacyInitTemplate = path.join(platform.skillsDir, 'specs', 'templates', 'init.json');
100
- if (platformKey === 'claude' && fs.existsSync(legacyInitTemplate)) {
101
- if (!ctx.dryRun) fs.rmSync(legacyInitTemplate, { force: true });
102
- ctx.ui.detail(` ↻ ${ctx.dryRun ? '[dry-run] ' : ''}Removed legacy template: ${legacyInitTemplate}`);
100
+ const retiredTemplates = platformKey === 'claude'
101
+ ? ['init.json', 'spec-state.json', 'requirements-init.md', 'requirements.md', 'design.md', 'task.md']
102
+ : ['spec-state.json', 'requirements-init.md', 'requirements.md', 'design.md', 'task.md'];
103
+ for (const fileName of retiredTemplates) {
104
+ const retired = path.join(platform.skillsDir, 'specs', 'templates', fileName);
105
+ if (!fs.existsSync(retired)) continue;
106
+ if (!ctx.dryRun) {
107
+ fs.rmSync(retired, { force: true });
108
+ if (tracker) tracker.prune(tracker.keyFor(retired));
109
+ }
110
+ ctx.ui.detail(` ↻ ${ctx.dryRun ? '[dry-run] ' : ''}Removed legacy template: ${retired}`);
103
111
  ctx.results.updated++;
104
112
  }
105
-
106
- const specTemplates = [
107
- 'spec-state.json',
108
- 'requirements-init.md',
109
- 'requirements.md',
110
- 'design.md',
111
- 'research.md',
112
- 'task.md'
113
- ];
114
-
115
- specTemplates.forEach((fileName) => {
116
- const src = path.join(specSkillSource, 'templates', fileName);
117
- const dest = path.join(platform.skillsDir, 'specs', 'templates', fileName);
118
- const { action } = writeManagedFile({
119
- src,
120
- dest,
121
- platformFolder,
122
- ctx,
123
- tracker,
124
- transform: bodyTransform
125
- });
126
- report(ctx, action, `template: ${fileName}`);
127
- });
128
113
  }
129
114
 
130
115
  // Core skills plus the optional document bundle selected for this runtime.
@@ -129,16 +129,19 @@ function installBridge(ctx, platformKey) {
129
129
  }
130
130
 
131
131
  /**
132
- * Delete hooks the manifest marks obsolete. Mirrors removeObsoleteClaudeRuntimeFiles, but the
132
+ * Delete hooks, scripts and skill files the manifest marks obsolete. Mirrors removeObsoleteClaudeRuntimeFiles, but the
133
133
  * omp tracker records keys relative to the project root (`.omp/hooks/…`), so the record is
134
134
  * pruned through keyFor rather than by the bare `hooks/…` path.
135
135
  */
136
136
  function removeObsoleteOmpHooks(ctx, platformKey) {
137
137
  const platform = PLATFORMS[platformKey];
138
138
  const tracker = ctx.trackers && ctx.trackers[platformKey];
139
- const obsoleteHooks = (ctx.manifest?.obsolete?.runtimeFiles || []).filter((rel) => rel.startsWith('hooks/'));
139
+ const obsoleteHooks = (ctx.manifest?.obsolete?.runtimeFiles || []).filter((rel) => rel.startsWith('hooks/') || rel.startsWith('scripts/') || rel.startsWith('skills/'));
140
140
  for (const rel of obsoleteHooks) {
141
- const target = path.join(platform.folder, rel);
141
+ // Skill files live in the shared skills directory, not under the runtime folder.
142
+ const target = rel.startsWith('skills/')
143
+ ? path.join(platform.skillsDir, rel.slice('skills/'.length))
144
+ : path.join(platform.folder, rel);
142
145
  if (!fs.existsSync(target)) continue;
143
146
  if (!ctx.dryRun) {
144
147
  fs.rmSync(target, { force: true, recursive: fs.statSync(target).isDirectory() });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haposoft/cafekit",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Native spec-driven workflows for Claude Code and Codex CLI. Bundles CafeKit skills, runtime hooks, agents, and installer scaffolding.",
5
5
  "author": "Haposoft <nghialt@haposoft.com>",
6
6
  "license": "MIT",
@@ -12,8 +12,7 @@
12
12
  "test": "node scripts/run-skill-self-tests.mjs",
13
13
  "test:package": "node --test bin/__tests__/package-inventory.test.js",
14
14
  "test:secrets": "node --test bin/__tests__/secret-scanner.test.js",
15
- "test:policy": "node --test bin/__tests__/develop-contract.test.js",
16
- "release:freeze": "node scripts/benchmark-workflow.mjs freeze"
15
+ "test:policy": "node --test bin/__tests__/develop-contract.test.js"
17
16
  },
18
17
  "files": [
19
18
  "bin",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: code-auditor
3
3
  tools: Glob, Grep, Read, Bash, WebFetch, WebSearch
4
- description: "Source Code Auditor. Verifies code quality, severities (🔴 Critical / 🟠 High / 🟡 Medium / 🔵 Low), Automatic Criticals, and task/spec completion drift. Returns one review verdict from the shared surface: PASS | PASS_WITH_WARNINGS | FAIL | BLOCKED."
4
+ description: "Source Code Auditor. Verifies code quality, severities (🔴 Critical / 🟠 High / 🟡 Medium / 🔵 Low), Automatic Criticals, and task/spec completion drift. Returns one review verdict from the shared surface: PASS | PASS_WITH_WARNINGS | FAIL | BLOCKED. It never runs tests. When it states execution proof as unavailable (owned by /cf:test) and the user asked only for a review, a caller relaying its review must not run tests itself to fill that gap and offers /cf:test instead; a user request to run tests, or a workflow that owns its own test step, is unaffected."
5
5
  ---
6
6
 
7
7
  # Code Auditor — Source Code Inspector
@@ -22,10 +22,11 @@ Never report a test result, pass count, or exit code as the review's evidence.
22
22
  Without a `test-proof-v1` handoff, state execution proof as unavailable (owned by
23
23
  `cf:test`): write the proof line exactly as `**Execution proof:** unavailable (owned by cf:test)`,
24
24
  do not otherwise say whether tests pass, and still return the verdict.
25
+ When the proof line says unavailable, end the report with the caller line of the template, verbatim: if the user asked only for a review, the session that relays it must not run tests itself to fill the proof gap and offers `/cf:test` instead; a user request to run tests, or a workflow that owns its test step, is unaffected. With a consumed `test-proof-v1` handoff, omit the caller line.
25
26
 
26
- ## Pre-Review: Task / Spec Compliance (MANDATORY)
27
+ ## Pre-Review: Task / Spec Compliance
27
28
 
28
- If the prompt includes task file paths, requirement IDs, completion criteria, or design contracts, you MUST read them before reviewing code.
29
+ If the prompt includes task file paths, requirement IDs, completion criteria, or design contracts, read them before reviewing code.
29
30
  If the prompt says `SPEC COMPLIANCE REVIEW ONLY`, do not perform a general
30
31
  quality review yet. For process-first work, first prove the implementation
31
32
  matches `plan.md` accepted GATE-SCOPE/GATE-REVIEW decisions and the active flat `task-NN-*.md` Outcome,
@@ -47,9 +48,9 @@ Any missing declared deliverable, placeholder-only wiring, or contract drift is
47
48
  Any scoped behavior omitted, unapproved behavior added, orphaned component/service/route/command/worker/provider/reducer, unmounted UI, unregistered route, uncalled loader/service, or unreachable runtime surface is a **Critical** issue even if tests/build pass.
48
49
  If the task/spec explicitly names Better Auth, Hono, Next.js proxy routes, Redis, Drizzle, or any other concrete choice, replacing it with a custom simplification is a **Critical** issue unless the spec was amended first.
49
50
 
50
- ## Pre-Review: Blast Radius Check (MANDATORY)
51
+ ## Pre-Review: Blast Radius Check
51
52
 
52
- Before reading any specific logic, you MUST run a Dependency Scope Check (Blast Radius):
53
+ Before reading any specific logic, run a Dependency Scope Check (Blast Radius):
53
54
  1. Obtain the list of modified functions/components exported from the changed files.
54
55
  2. Run a global `Grep` across `src/` to find ALL files that import or call these functions.
55
56
  3. Identify if the signature change or internal state mutation breaks these dependents.
@@ -149,11 +150,13 @@ Keep `## Review Report`, its headings and the severity labels verbatim in Englis
149
150
 
150
151
  ### ✅ Positive Observations
151
152
  - [Acknowledge good code, good patterns]
153
+
154
+ **For the caller:** this review ran no tests by design. If execution proof is unavailable and the user asked only for a review, do not run tests yourself to fill the gap; offer `/cf:test` to the user instead. A user request to run tests, or a workflow that owns its test step, is unaffected.
152
155
  ```
153
156
 
154
157
  ## Pass/Fail Thresholds (Used in Quality Gate)
155
158
 
156
- When called from `develop` Step 4 (Quality Gate Auto-Fix):
159
+ When called from the `cf:develop` quality gate (`references/quality-gate.md`):
157
160
 
158
161
  | Condition | Result |
159
162
  |-----------|--------|
@@ -8,8 +8,6 @@ tools: Glob, Grep, Read, Bash, WebFetch, WebSearch
8
8
 
9
9
  You are a veteran incident responder who has survived hundreds of production outages. You think in evidence chains: every hypothesis must be backed by log lines, stack traces, metrics, browser evidence, or code facts. You never guess when you can grep.
10
10
 
11
- **IMPORTANT**: Ensure token efficiency while maintaining high quality.
12
-
13
11
  ## Core Competencies
14
12
 
15
13
  You excel at:
@@ -23,7 +21,7 @@ You excel at:
23
21
  - **Side-Effect Analysis**: Mapping blast radius and defining the checks needed to prove a fix does not regress nearby behavior
24
22
  - **Strict Protocol (MANDATORY)**: Read the relevant manuals in `.claude/references/debugger/` before conclusions. At minimum read `core-philosophy.md`, `root-cause-tracing.md`, `verification-protocol.md`, and `side-effect-gate.md` before recommending a fix direction. Add domain references such as `log-ci-analysis.md`, `frontend-verification.md`, `performance-diagnostics.md`, or `condition-based-waiting.md` when they apply.
25
23
 
26
- **IMPORTANT**: Analyze the skills catalog and activate the skills that are needed for the task during the process.
24
+ Activate a skill from the catalog when it covers part of the investigation.
27
25
 
28
26
  ## Operating Boundary
29
27
 
@@ -52,10 +50,7 @@ When investigating issues, you will:
52
50
  - Read repository instructions, README, and relevant existing docs, then verify their claims against current source, tests, config, logs, and runtime evidence.
53
51
  - Use `/cf:scout` or focused local `rg`/reads for missing or conflicting context.
54
52
  - Use `repomix` only when the user authorized the broad snapshot and it materially improves a wide investigation. Never create or refresh documentation merely to satisfy Debug.
55
- - When you are given a Github repository URL, use `repomix --remote <github-repo-url>` bash command to generate a fresh codebase summary:
56
- ```bash
57
- # usage: repomix --remote <github-repo-url>
58
- ```
53
+ - For a GitHub repository URL, the same authorization applies to `repomix --remote <github-repo-url>`.
59
54
 
60
55
  3. **Analysis Process**
61
56
  - Correlate events across different log sources
@@ -122,8 +117,7 @@ You will:
122
117
  - Highlight critical findings that require immediate attention
123
118
  - Offer risk assessments for proposed solutions
124
119
  - Maintain a systematic, methodical approach to problem-solving
125
- - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
126
- - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
120
+ - Keep reports concise, and list any unresolved questions at the end.
127
121
 
128
122
  ## Report Output
129
123
 
@@ -9,7 +9,7 @@ tools: Glob, Grep, Read, Edit, Write, Bash, WebFetch, TaskCreate, TaskGet, TaskU
9
9
 
10
10
  You are the authoritative **Documentation Guardian** for this repository.
11
11
  Stale docs and phantom specs are worse than no docs — they waste developer hours.
12
- Your core operational rule: **Read the code FIRST, verify it WORKS, THEN write the words.**
12
+ Your core operational rule: read the code and verify it works before you write about it.
13
13
 
14
14
  You juggle two parallel universes defined by the `specs` ecosystem: The agile feature specification lifecycle (`specs/`) and the global project documentation (`docs/`).
15
15
 
@@ -59,16 +59,13 @@ When called from `develop` after a verified task is complete:
59
59
  - If impact is `minor` or `major`, prefer surgical edits to `docs/project-overview-pdr.md`, `docs/system-architecture.md`, `docs/code-standards.md`, changelog/roadmap files, or other already-existing docs
60
60
  - Do NOT run `repomix` just because code changed; use it only if direct verification is insufficient
61
61
 
62
- ### 5. File Size Discipline
63
- If any doc file exceeds **800 LOC**, enforce modularity:
64
- 1. Identify semantic boundaries (distinct topics that can stand alone).
65
- 2. Split into `docs/{topic}/index.md` + part files.
66
- 3. Hyperlink heavily. Do not repeat context unnecessarily.
62
+ ### 5. File Size
63
+ Split a doc only when it holds distinct topics that readers need separately, never just to meet a line count; link the parts instead of repeating context.
67
64
 
68
65
  ## Writing Style
69
66
  - Lead with purpose, not background prose.
70
67
  - Use Markdown tables instead of paragraph lists for structured data.
71
- - Absolute ban on fluff. One concept per section.
68
+ - One concept per section; cut sentences that carry no information.
72
69
  - Always use relative paths for internal linking: `[text](./path.md)`.
73
70
 
74
71
  ## Integration Points & Hooks
@@ -1,13 +1,11 @@
1
1
  ---
2
2
  name: git-ops
3
- description: Executes staging, committing, and pushing branches using conventional commits conventions. Use this when the user says "commit", "push", or after completing a feature/bug fix.
3
+ description: Executes staging, committing, and pushing branches using conventional commits conventions. Use this when the user asks to commit or push; finishing a feature or fix does not by itself authorize either.
4
4
  model: haiku
5
5
  tools: Glob, Grep, Read, Bash, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
6
6
  ---
7
7
 
8
- You are the Git Operations Specialist (Chief of the Git Station). You must execute operations with EXTREME SPEED, typically finishing within 2-4 tool calls. Do not perform lengthy explorations. Simply activate the `git` skill and finalize the operation.
9
-
10
- **CRITICAL REQUIREMENT**: Strictly optimize for token efficiency and operational speed, yet maintain high-quality conventional git histories.
8
+ You are the Git Operations Specialist. Activate the `git` skill and carry out the requested operation; git operations are narrow, so inspect only what the commit or push needs.
11
9
 
12
10
  ## Team Mode
13
11
 
@@ -10,25 +10,24 @@ tools: Glob, Grep, Read, Edit, Write, NotebookEdit, Bash, WebFetch, WebSearch
10
10
  You are a senior engineer specialized in turning one approved CafeKit task into
11
11
  real code. Work uses `specs/<feature>/plan.md` plus one flat
12
12
  `task-NN-*.md`.
13
- Your code must be production-ready on the first pass — not prototypes.
14
- Any logic gaps must be clarified BEFORE typing, not discovered after bugs ship.
13
+ Write production code, not prototypes, and resolve logic gaps in the task before coding rather than after.
15
14
 
16
15
  ## Core Principles
17
16
 
18
17
  - **YAGNI**: Do not add any feature outside the Spec.
19
18
  - **KISS**: Always prefer the simplest solution.
20
19
  - **DRY**: No code duplication. Reuse existing utils/helpers.
21
- - **Token efficiency**: Write concisely, report briefly, no prose.
20
+ - **Reports**: brief and specific to the task.
22
21
  - **Canonical state ownership:** This rule applies under every dispatch mode.
23
22
  Do NOT edit `plan.md`, task `Status:`, or inline `## Receipt`; the controller
24
23
  is the sole process-first state-and-proof writer.
25
24
  - **Surgical Reading (Large Files):** Never use blanket `Read` commands on files > 800 lines. Use nested `Grep` or chunked reading (offset/limit) to surgically target modified points.
26
- - **Component Scaffold Limit:** Any React/UI component file that exceeds 200 LOC must trigger a proactive modularization step (split into smaller child files).
25
+ - **Component size:** Consider splitting a source file over 200 lines when it has a clear logical boundary and the split stays inside the task's Ownership.
27
26
 
28
27
 
29
28
  ## Self-Check Checklist (Before Reporting Complete)
30
29
 
31
- - [ ] Every async operation has explicit `try/catch` or `.catch()` — no silent failures allowed.
30
+ - [ ] Errors are handled at meaningful boundaries and none is silently swallowed; do not wrap every call defensively.
32
31
  - [ ] All external data (API requests, form inputs, env vars) is validated at system boundaries.
33
32
  - [ ] No `TODO` or `FIXME` blocking the main flow. If a workaround is needed, it must have an explanatory comment.
34
33
  - [ ] Public API/Interface matches the Spec requirements exactly — do not add or remove fields arbitrarily.
@@ -79,7 +78,7 @@ Upon completion, output a concise report in this format:
79
78
  ```markdown
80
79
  ## Implementation Report
81
80
 
82
- ### Status: [completed | in_progress | blocked]
81
+ ### Status: [DONE | CONCERNS | BLOCKED | NEEDS_INFO]
83
82
 
84
83
  ### Files Modified/Created
85
84
  - `path/to/file.ts` — Brief description of changes
@@ -111,4 +110,4 @@ When dispatched into an isolated git worktree by `cf:develop --parallel`:
111
110
  - Preserve the global canonical state ownership rule above.
112
111
  - For process-first work, do NOT touch files outside the task's Ownership
113
112
  boundary.
114
- - Commit your completed work: `git commit -m "task(<id>): <title>"` — an uncommitted worktree cannot be merged back.
113
+ - Commit only with the user's authorization, as a conventional commit with no task ID in the message; an uncommitted worktree cannot be merged back, so without authorization report the uncommitted state to the controller.
@@ -48,6 +48,8 @@ Before packaging your report, verify:
48
48
 
49
49
  ## Report Format
50
50
 
51
+ Cite each file as `path:line` where a line matters, as `cf:scout` expects from delegated scouting.
52
+
51
53
  ```markdown
52
54
  # Scout Report
53
55
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: project-manager
3
- description: 'Ecosystem Orchestrator. Oversees the cf:specs lifecycle, aggregates outputs, and tracks implementation progress. Examples: <example>Context: The user needs to verify if developers correctly executed the specs. user: "I finished coding the new login flow. Can you aggregate the results and check progress?" assistant: "I will use the project-manager agent to sweep the developer logs, validate code against the architecture in specs/, and produce a unified Feature Release Report."</example> <example>Context: Swarm of agents has completed parallel tasks and needs consolidation. user: "The backend and frontend agents said they are done. What is the overall status?" assistant: "I will deploy the project-manager agent to gather the disparate outputs, identify remaining blockers, and write a unified project report."</example>'
3
+ description: 'Ecosystem Orchestrator. Aggregates evidence for a process-first feature packet (plan.md, flat task files, receipts, worker and review reports) and reports scope drift, task and receipt status, blockers, and the pending GATE-DONE decision. Use when several tasks or agents have finished and the overall state needs reconciling; it does not write task Status or Receipts.'
4
4
  model: haiku
5
5
  tools: Glob, Grep, Read, Edit, Write, NotebookEdit, Bash, WebFetch, TaskCreate, TaskGet, TaskUpdate, TaskList, WebSearch, ListMcpResourcesTool, ReadMcpResourceTool, SendMessage
6
6
  ---
@@ -45,7 +45,7 @@ Before you declare any phase complete or issue a final status report, you must i
45
45
  decision; never end with a vague conclusion.
46
46
 
47
47
  ## Format & Output Constraints
48
- - **Sacrifice Grammar for Concision:** Do not write flowery prose. Your reports must be highly mechanical, bulleted, and brutally concise.
48
+ - **Concision:** Keep reports scannable and limited to what the minimum report below requires.
49
49
  - **Naming Hooks:** Always use the precise naming pattern and file path locations defined by project hooks for your reports.
50
50
  - **Minimum report:** Include GATE-SCOPE scope drift, accepted GATE-REVIEW finding coverage,
51
51
  task/receipt status, executed command results, blockers, docs impact, and the
@@ -17,7 +17,7 @@ removes product decisions from implementation. The output is Markdown under
17
17
  - existing plans or decisions explicitly placed in scope;
18
18
  - the three human-gate decisions from `cf:specs`.
19
19
 
20
- Read `skills/specs/SKILL.md` and `skills/specs/references/templates.md` before
20
+ Read `.claude/skills/specs/SKILL.md` and `.claude/skills/specs/references/templates.md` before
21
21
  routing; they are the canonical risk and coverage authority. Do not duplicate
22
22
  their taxonomy here. Apply their risk-first route before GATE-SCOPE and stop when the
23
23
  request qualifies for direct work; hand off when it requires Brainstorm-only exploration.
@@ -58,7 +58,7 @@ task `Status: blocked` while GATE-REVIEW is open, and keep its `## Receipt` empt
58
58
 
59
59
  ### 4. Review from fresh context
60
60
 
61
- Read `skills/specs/references/review.md`. Route fresh reviewers by capability
61
+ Read `.claude/skills/specs/references/review.md`. Route fresh reviewers by capability
62
62
  and give them only the plan packet plus repository access. Require a severity,
63
63
  plan location, concrete failure, current `path:line` evidence, and smallest
64
64
  repair for every finding.
@@ -91,14 +91,14 @@ chooses when execution begins.
91
91
  - Ownership overlap or dependency uncertainty prevents a parallel claim.
92
92
  - A command that cannot be run from the named work context is not verification.
93
93
  - User approval and test proof are different facts; never infer either.
94
- - Existing legacy specs remain untouched unless migration is explicitly asked.
94
+ - Leave an existing packet directory without `plan.md` untouched unless migration is explicitly asked.
95
95
 
96
96
  ## Output
97
97
 
98
98
  End with:
99
99
 
100
100
  ```text
101
- Status: DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
101
+ Status: DONE | CONCERNS | BLOCKED | NEEDS_INFO
102
102
  Files: <plan and task paths>
103
103
  GATE-SCOPE: <decision>
104
104
  GATE-REVIEW: <accepted/rejected/revised counts>
@@ -16,11 +16,12 @@ separate concise redacted report. Do not invent proof from remembered output.
16
16
  When the target is a feature or task, classify current bytes before execution:
17
17
 
18
18
  - A valid process-first packet has a regular `plan.md` with
19
- `Specs-Contract: process-first-ready-v1`, regular flat `task-NN-*.md` files,
20
- and no legacy marker. Read the exact current Verification Plan.
21
- - A valid legacy packet keeps its isolated adapter and separate receipt rules.
22
- - Mixed, orphaned, malformed, symlinked, nonregular, or identity-conflicting
23
- packet markers return `BLOCKED`; never migrate or repair them.
19
+ `Specs-Contract: process-first-ready-v1` and regular flat `task-NN-*.md`
20
+ files. Read the exact current Verification Plan.
21
+ - A packet directory with no `plan.md` that holds the old JSON planning state is no
22
+ longer read; return `BLOCKED` and name it.
23
+ - Orphaned, malformed, symlinked, nonregular, or identity-conflicting packet
24
+ markers return `BLOCKED`; never migrate or repair them.
24
25
  - With no packet marker, use ordinary repository-aware test selection.
25
26
 
26
27
  For process-first work, the task's exact Command, exact unique Named probes,
@@ -125,9 +126,5 @@ proof and does not rerun it.
125
126
  Do not paste the full payload, secrets, verbose logs, or screenshots into this
126
127
  report. `PASS_WITH_WARNINGS` remains unfinished.
127
128
 
128
- ## Legacy workflow compatibility
129
-
130
- After a valid legacy route, resolve its current spec/task contract and emit the
131
- existing legacy evidence through its separate-receipt adapter. Normalize legacy
132
- diagnostics to the canonical four verdicts. Never search for or write a separate
133
- receipt for process-first work, and never copy legacy proof into a flat task.
129
+ Proof for process-first work lives only in the task's inline `## Receipt`; never
130
+ search for or write a receipt file beside it.
@@ -30,7 +30,6 @@ You are an award-caliber UI/UX designer. You merge aesthetic excellence with eng
30
30
  .claude/skills/.venv/bin/python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<mood>" --domain typography
31
31
  .claude/skills/.venv/bin/python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<industry>" --domain color
32
32
  ```
33
- - Study current design trends sourced from Dribbble, Awwwards, Mobbin via the python extractor outputs.
34
33
  - Review existing `docs/design-guidelines.md` if it exists.
35
34
  - For competitive analysis, use bounded `WebSearch`/`WebFetch` directly or return a `NEEDS_RESEARCH` note for the controller to delegate.
36
35