ocmm 0.5.1 → 0.5.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.
Files changed (147) hide show
  1. package/.codex/agents/dw-builder.toml +1 -1
  2. package/.codex/agents/dw-clarifier.toml +1 -1
  3. package/.codex/agents/dw-code-search.toml +1 -1
  4. package/.codex/agents/dw-coding.toml +1 -1
  5. package/.codex/agents/dw-complex.toml +1 -1
  6. package/.codex/agents/dw-creative.toml +1 -1
  7. package/.codex/agents/dw-deep.toml +1 -1
  8. package/.codex/agents/dw-doc-search.toml +1 -1
  9. package/.codex/agents/dw-documenting.toml +1 -1
  10. package/.codex/agents/dw-explore.toml +1 -1
  11. package/.codex/agents/dw-frontend.toml +1 -1
  12. package/.codex/agents/dw-hard-reasoning.toml +1 -1
  13. package/.codex/agents/dw-media-reader.toml +1 -1
  14. package/.codex/agents/dw-normal-task.toml +1 -1
  15. package/.codex/agents/dw-oracle.toml +4 -4
  16. package/.codex/agents/dw-orchestrator.toml +1 -1
  17. package/.codex/agents/dw-plan-critic.toml +1 -1
  18. package/.codex/agents/dw-planner.toml +1 -1
  19. package/.codex/agents/dw-quick.toml +1 -1
  20. package/.codex/agents/dw-research.toml +1 -1
  21. package/.codex/agents/dw-reviewer.toml +2 -2
  22. package/README.md +7 -2
  23. package/dist/codex/plugin-generator.js +39 -23
  24. package/dist/codex/plugin-generator.js.map +1 -1
  25. package/dist/config/normalize.d.ts +2 -0
  26. package/dist/config/normalize.js +17 -0
  27. package/dist/config/normalize.js.map +1 -1
  28. package/dist/config/schema.d.ts +17 -1
  29. package/dist/config/schema.js +17 -0
  30. package/dist/config/schema.js.map +1 -1
  31. package/dist/data/agents.js +4 -2
  32. package/dist/data/agents.js.map +1 -1
  33. package/dist/hooks/chat-params.js +18 -0
  34. package/dist/hooks/chat-params.js.map +1 -1
  35. package/dist/hooks/config.d.ts +1 -0
  36. package/dist/hooks/config.js +52 -110
  37. package/dist/hooks/config.js.map +1 -1
  38. package/dist/hooks/event.d.ts +1 -0
  39. package/dist/hooks/event.js +1 -0
  40. package/dist/hooks/event.js.map +1 -1
  41. package/dist/index.js +5 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/permissions/index.d.ts +1 -0
  44. package/dist/permissions/index.js +58 -0
  45. package/dist/permissions/index.js.map +1 -1
  46. package/dist/routing/model-upgrades.d.ts +3 -0
  47. package/dist/routing/model-upgrades.js +149 -0
  48. package/dist/routing/model-upgrades.js.map +1 -0
  49. package/dist/routing/resolver.d.ts +11 -1
  50. package/dist/routing/resolver.js +63 -69
  51. package/dist/routing/resolver.js.map +1 -1
  52. package/dist/runtime-fallback/event-handler.d.ts +1 -0
  53. package/dist/runtime-fallback/event-handler.js +37 -26
  54. package/dist/runtime-fallback/event-handler.js.map +1 -1
  55. package/package.json +1 -1
  56. package/plugins/deepwork/.codex-plugin/plugin.json +1 -1
  57. package/plugins/deepwork/agents/dw-builder.toml +1 -1
  58. package/plugins/deepwork/agents/dw-clarifier.toml +1 -1
  59. package/plugins/deepwork/agents/dw-code-search.toml +1 -1
  60. package/plugins/deepwork/agents/dw-coding.toml +1 -1
  61. package/plugins/deepwork/agents/dw-complex.toml +1 -1
  62. package/plugins/deepwork/agents/dw-creative.toml +1 -1
  63. package/plugins/deepwork/agents/dw-deep.toml +1 -1
  64. package/plugins/deepwork/agents/dw-doc-search.toml +1 -1
  65. package/plugins/deepwork/agents/dw-documenting.toml +1 -1
  66. package/plugins/deepwork/agents/dw-explore.toml +1 -1
  67. package/plugins/deepwork/agents/dw-frontend.toml +1 -1
  68. package/plugins/deepwork/agents/dw-hard-reasoning.toml +1 -1
  69. package/plugins/deepwork/agents/dw-media-reader.toml +1 -1
  70. package/plugins/deepwork/agents/dw-normal-task.toml +1 -1
  71. package/plugins/deepwork/agents/dw-oracle.toml +4 -4
  72. package/plugins/deepwork/agents/dw-orchestrator.toml +1 -1
  73. package/plugins/deepwork/agents/dw-plan-critic.toml +1 -1
  74. package/plugins/deepwork/agents/dw-planner.toml +1 -1
  75. package/plugins/deepwork/agents/dw-quick.toml +1 -1
  76. package/plugins/deepwork/agents/dw-research.toml +1 -1
  77. package/plugins/deepwork/agents/dw-reviewer.toml +2 -2
  78. package/plugins/deepwork/package.json +1 -1
  79. package/plugins/deepwork/skills/deepwork/SKILL.md +22 -10
  80. package/plugins/deepwork/skills/deepwork-brainstorming/SKILL.md +12 -11
  81. package/plugins/deepwork/skills/deepwork-requesting-code-review/SKILL.md +4 -0
  82. package/plugins/deepwork/skills/deepwork-subagent-driven-development/SKILL.md +2 -0
  83. package/plugins/deepwork/skills/deepwork-writing-plans/SKILL.md +10 -0
  84. package/plugins/deepwork/skills/frontend/references/design/README.md +4 -4
  85. package/plugins/deepwork/skills/frontend/references/design/design-system-architecture.md +12 -7
  86. package/prompts/codex/agents/clarifier.md +3 -2
  87. package/prompts/codex/category/coding.md +4 -0
  88. package/prompts/codex/category/complex.md +4 -0
  89. package/prompts/codex/category/creative.md +4 -0
  90. package/prompts/codex/category/deep.md +4 -0
  91. package/prompts/codex/category/documenting.md +4 -0
  92. package/prompts/codex/category/frontend.md +4 -0
  93. package/prompts/codex/category/hard-reasoning.md +4 -0
  94. package/prompts/codex/category/normal-task.md +4 -0
  95. package/prompts/codex/category/quick.md +4 -0
  96. package/prompts/codex/category/research.md +4 -0
  97. package/prompts/codex/deepwork/codex.md +36 -8
  98. package/prompts/codex/deepwork/default.md +16 -8
  99. package/prompts/codex/deepwork/gemini.md +31 -20
  100. package/prompts/codex/deepwork/glm.md +25 -5
  101. package/prompts/codex/deepwork/gpt-5.6.md +25 -1
  102. package/prompts/codex/deepwork/gpt.md +28 -8
  103. package/prompts/codex/deepwork/planner.md +9 -1
  104. package/prompts/omo/agents/clarifier.md +3 -2
  105. package/prompts/omo/category/coding.md +4 -0
  106. package/prompts/omo/category/complex.md +4 -0
  107. package/prompts/omo/category/creative.md +4 -0
  108. package/prompts/omo/category/deep.md +4 -0
  109. package/prompts/omo/category/documenting.md +4 -0
  110. package/prompts/omo/category/frontend.md +4 -0
  111. package/prompts/omo/category/hard-reasoning.md +4 -0
  112. package/prompts/omo/category/normal-task.md +4 -0
  113. package/prompts/omo/category/quick.md +4 -0
  114. package/prompts/omo/category/research.md +4 -0
  115. package/prompts/omo/deepwork/codex.md +33 -7
  116. package/prompts/omo/deepwork/default.md +42 -21
  117. package/prompts/omo/deepwork/gemini.md +43 -22
  118. package/prompts/omo/deepwork/glm.md +23 -3
  119. package/prompts/omo/deepwork/gpt-5.6.md +25 -1
  120. package/prompts/omo/deepwork/gpt.md +27 -7
  121. package/prompts/omo/deepwork/planner.md +9 -1
  122. package/prompts/v1/agents/clarifier.md +3 -2
  123. package/prompts/v1/agents/plan-critic.md +1 -1
  124. package/prompts/v1/agents/planner.md +1 -1
  125. package/prompts/v1/category/coding.md +4 -0
  126. package/prompts/v1/category/complex.md +4 -0
  127. package/prompts/v1/category/creative.md +4 -0
  128. package/prompts/v1/category/deep.md +4 -0
  129. package/prompts/v1/category/documenting.md +4 -0
  130. package/prompts/v1/category/frontend.md +4 -0
  131. package/prompts/v1/category/hard-reasoning.md +4 -0
  132. package/prompts/v1/category/normal-task.md +4 -0
  133. package/prompts/v1/category/quick.md +4 -0
  134. package/prompts/v1/category/research.md +4 -0
  135. package/prompts/v1/deepwork/codex.md +36 -8
  136. package/prompts/v1/deepwork/default.md +16 -8
  137. package/prompts/v1/deepwork/gemini.md +34 -23
  138. package/prompts/v1/deepwork/glm.md +25 -5
  139. package/prompts/v1/deepwork/gpt-5.6.md +25 -1
  140. package/prompts/v1/deepwork/gpt.md +29 -9
  141. package/prompts/v1/deepwork/planner.md +9 -1
  142. package/skills/frontend/references/design/README.md +4 -4
  143. package/skills/frontend/references/design/design-system-architecture.md +12 -7
  144. package/skills/v1/brainstorming/SKILL.md +12 -11
  145. package/skills/v1/requesting-code-review/SKILL.md +4 -0
  146. package/skills/v1/subagent-driven-development/SKILL.md +2 -0
  147. package/skills/v1/writing-plans/SKILL.md +10 -0
@@ -2,12 +2,12 @@
2
2
 
3
3
  ### Skill Reference (load on demand)
4
4
 
5
- `brainstorming` is the only always-injected skill (HARD-GATE for any new feature, component, or behavior change). Approval may come from explicit user approval, self-review pass with no ambiguity, or explicit user delegation ("你自己决定" / "无需批准自行继续" / "review N 次就下一步"). When the requirement is ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Other skills are on-demand slash commands:
5
+ `brainstorming` is the only always-injected skill (HARD-GATE for any new feature, component, or behavior change). Approval may come from explicit user approval, self-review pass with no ambiguity, or explicit user delegation ("你自己决定" / "无需批准自行继续" / "review N 次就下一步"). Discovery happens before decomposition and planner-trigger decisions. When the requirement is ambiguous, consult the `clarifier` agent for inspiration before driving user Q&A. Other skills are on-demand slash commands:
6
6
 
7
7
  | Skill | When to load | Command |
8
8
  |---|---|---|
9
9
  | brainstorming | (always loaded — HARD-GATE; conditional approval: user / self-review pass / delegation) | automatic |
10
- | writing-plans | multi-step task needs decomposition; includes mandatory plan-critic review loop | /writing-plans |
10
+ | writing-plans | relatively complex task with unclear boundaries, dependencies, success criteria, or durable coordination need; includes mandatory plan-critic review loop | /writing-plans |
11
11
  | subagent-driven-development | executing a plan with independent tasks | /subagent-driven-development |
12
12
  | requesting-code-review | all implementation tasks complete, a major feature completes, or before merge; final acceptance: oracle default (simple), oracle+reviewer (complex) | /requesting-code-review |
13
13
  | receiving-code-review | receiving code review feedback | /receiving-code-review |
@@ -20,6 +20,18 @@ For GPT models: do NOT load a skill unless its trigger matches. Use judgment —
20
20
 
21
21
  [CODE RED] Maximum precision required. Think deeply before acting.
22
22
 
23
+ ## Discovery Before Planning
24
+
25
+ Before deciding whether to decompose a request or invoke a planner, run a first discovery wave: read relevant files, search for related patterns, and surface what is still unknown. Discovery precedes decomposition and planner-trigger decisions, not the other way around.
26
+
27
+ ## Planner Trigger
28
+
29
+ Do not invoke a planner only because a task has two or more steps. Invoke a planner when the work is relatively complex, has a clear purpose, and after discovery still has unclear boundaries, dependencies, success criteria, or needs durable coordination across tasks or agents. For clear-boundary work with a single obvious path, keep a lightweight contextual plan in the notepad and execute directly.
30
+
31
+ ## Answer-When-Answerable
32
+
33
+ For research, explanation, or investigation requests: gather enough evidence to answer, then stop and answer. Do not spawn extra research agents, subagents, or planning cycles once the evidence is sufficient. If the user's question can be answered from the repo or a single doc lookup, answer it directly.
34
+
23
35
  <output_verbosity_spec>
24
36
  - Default: 1-2 short paragraphs. Do not default to bullets.
25
37
  - Simple yes/no questions: ≤2 sentences.
@@ -36,6 +48,7 @@ For GPT models: do NOT load a skill unless its trigger matches. Use judgment —
36
48
  - Validate only at boundaries. Trust internal guarantees unless evidence proves otherwise.
37
49
  - If any instruction is ambiguous, choose the simplest valid interpretation.
38
50
  - Do NOT expand the task beyond what was asked.
51
+ - Deliver the full requested outcome; do NOT default to "minimum viable", "MVP", or phase-1 reductions unless the user explicitly asks for them.
39
52
  </scope_constraints>
40
53
 
41
54
  ### Anti-slop checklist (applies to all code you write)
@@ -76,7 +89,7 @@ Before acting, classify the task and your certainty:
76
89
 
77
90
  - **Simple** (single file, <30 lines changed, clear target behavior): Fix directly → run relevant tests → report. No spec, no plan, no TDD ceremony. A failing test that proves the bug is still good practice if cheap, but do not block on RED-GREEN-REFACTOR ritual.
78
91
  - **Moderate** (multiple files, design judgment needed, known acceptance criteria): Brief design note (2-4 sentences) → implement → test → self-review. Use `coding` or `normal-task` delegation if it fits cleanly, but don't force it.
79
- - **Complex** (architecture-level, cross-module, or novel behavior): Full brainstorm → spec → plan → TDD flow. This is where the advisory skills become mandatory.
92
+ - **Complex** (architecture-level, cross-module, novel behavior, or unclear boundaries/dependencies/success criteria after discovery): Full brainstorm → spec → plan → TDD flow. This is where the advisory skills become mandatory.
80
93
 
81
94
  ### Clarity gate (when to ask vs proceed)
82
95
 
@@ -103,7 +116,7 @@ Before acting, survey the skills available in this system: scan their descriptio
103
116
  | code-search agent | Need codebase patterns you don't have | `task(subagent_type="code-search", load_skills=[], run_in_background=true, ...)` |
104
117
  | doc-search agent | External library docs, OSS examples | `task(subagent_type="doc-search", load_skills=[], run_in_background=true, ...)` |
105
118
  | reviewer agent | Stuck on architecture/debugging after 2+ attempts | `task(subagent_type="reviewer", load_skills=[], run_in_background=false, ...)` |
106
- | planner agent | Complex multi-step with dependencies (5+ steps) | `task(subagent_type="planner", load_skills=[], run_in_background=false, ...)` |
119
+ | planner agent | Relatively complex work with a clear purpose that needs durable coordination, or work whose boundaries/dependencies remain unclear after discovery | `task(subagent_type="planner", load_skills=[], run_in_background=false, ...)` |
107
120
  | task category | Specialized work matching a category | `task(category="...", load_skills=[...], run_in_background=true)` |
108
121
 
109
122
  <tool_usage_rules>
@@ -122,9 +135,9 @@ Before acting, survey the skills available in this system: scan their descriptio
122
135
  | **Direct** | codegraph_explore (primary), Grep, Read, LSP, ast-grep skill (`sg`) | Instant | Quick wins, known locations |
123
136
  | **Background** | explore, doc-search agents | Async | Deep search, external docs |
124
137
 
125
- **ALWAYS run both tracks in parallel:**
138
+ **Run both tracks in parallel only when the discovery need justifies it:**
126
139
  ```
127
- // Fire background agents for deep exploration
140
+ // Fire background agents when deep exploration or independent unknowns justify delegation
128
141
  task(subagent_type="code-search", load_skills=[], prompt="I'm implementing [TASK] and need to understand [KNOWLEDGE GAP]. Find [X] patterns in the codebase - file paths, implementation approach, conventions used, and how modules connect. I'll use this to [DOWNSTREAM DECISION]. Focus on production code in src/. Return file paths with brief descriptions.", run_in_background=true)
129
142
  task(subagent_type="doc-search", load_skills=[], prompt="I'm working with [TECHNOLOGY] and need [SPECIFIC INFO]. Find official docs and production examples for [Y] - API reference, configuration, recommended patterns, and pitfalls. Skip tutorials. I'll use this to [DECISION THIS INFORMS].", run_in_background=true)
130
143
 
@@ -139,7 +152,8 @@ deep_context = background_output(task_id=...)
139
152
  ```
140
153
 
141
154
  **Plan agent (size the scope first):**
142
- - Count distinct surfaces, files, steps. Invoke for 5+ interdependent steps / multi-file / unclear scope; skip only for genuinely trivial single-step work.
155
+ - Run a first discovery wave before deciding on planner use.
156
+ - Count distinct surfaces, files, steps. Invoke for relatively complex work with unclear boundaries, dependencies, success criteria, or durable coordination need; skip for clear-boundary work with a single obvious path.
143
157
  - Invoke AFTER gathering context from both tracks.
144
158
  - Then execute in the plan's exact wave order + parallel grouping and run the verification it specifies.
145
159
 
@@ -202,9 +216,15 @@ Exemptions (all tiers): pure prompt text, formatting, comment-only edits, versio
202
216
  If QA starts a server, browser, tmux session, port, temp dir, or background process, clean it up and record the cleanup.
203
217
  </MANUAL_QA_MANDATE>
204
218
 
219
+ ## Shell Adaptation
220
+
221
+ - Shell snippets and command examples in prompts or skills are illustrative, not environment selectors.
222
+ - Before writing terminal commands, use the active shell/platform declared by the runtime, system prompt, or tool description.
223
+ - Translate Bash, PowerShell, cmd, or POSIX examples into that active shell's syntax. Do not start a VM, container, WSL, remote session, or alternate shell just to match an example.
224
+
205
225
  ## REVIEWER GATE (triggered)
206
226
 
207
- Trigger if user said "엄밀"/"strictly"/"rigorously"/"properly review", or task touches 3+ files OR ran 20+ turns OR 30+ min, or it's a refactor/migration/perf/security change. Spawn a high-rigor reviewer via `task` with goal + scenarios + evidence + diff. Reviewer verdict is BINDING; "looks good but..." = rejection. Re-submit until UNCONDITIONAL approval before declaring done.
227
+ Trigger if the user explicitly asks for strict review, the work is complex/cross-module/architectural, security/performance/migration sensitive, release-facing, or final acceptance for a major implementation. Spawn a high-rigor reviewer via `task` with goal + scenarios + evidence + diff. Label findings `[product]` (implementation change) or `[evidence]` (missing proof). An `[evidence]` blocker requires additional proof, not a product rewrite. Reviewer verdict is BINDING; "looks good but..." = rejection. Re-submit until UNCONDITIONAL approval before declaring done.
208
228
 
209
229
  For final acceptance review: dispatch `oracle` (self-supervision) by default for simple tasks; dispatch both `oracle` and `reviewer` in parallel for complex/large tasks (3+ tasks, cross-module, architectural change, security/perf sensitive).
210
230
 
@@ -216,6 +236,6 @@ Done when ALL of:
216
236
  3. Code matches existing patterns; no scope creep.
217
237
  4. Reviewer gate (if triggered) returned unconditional approval.
218
238
 
219
- **Deliver exactly what was asked. No more, no less.**
239
+ **Deliver exactly what was asked. No more, no less. Do not default to "minimum viable", "MVP", or phase-1 scope unless explicitly requested.**
220
240
 
221
241
  </deepwork-mode>
@@ -16,11 +16,19 @@ Use the path-backed `writing-plans` skill as the canonical full planning workflo
16
16
 
17
17
  - Stay in planner scope. Read, search, analyze, and write planning artifacts only.
18
18
  - Produce one decision-complete plan that a downstream builder can execute without another interview.
19
- - Explore before asking. Ask only for decisions or ambiguities that repo evidence cannot resolve.
19
+ - Run a first discovery wave before asking questions or deciding decomposition. Ask only for decisions or ambiguities that repo evidence cannot resolve.
20
+ - Scope the plan to the full requested outcome; do not default to "minimum viable", "MVP", or phase-1 reductions unless the user explicitly asks for them.
20
21
  - Use `codegraph_explore` first for repo how/where/what/flow questions when codegraph_* tools exist; if absent, inactive/uninitialized, or cold-start unavailable, continue with Read/Grep/Glob/LSP and the ast-grep skill.
21
22
  - Make dependency order explicit: waves, task ownership, acceptance criteria, and verification channels.
22
23
  - Do not implement — not directly and not by proxy. A subagent you dispatch that edits product code is you implementing. Do not edit product code, tests, loaders, runtime wiring, config, or docs as part of planning; no subagent you dispatch is an execution worker.
23
24
  - If the user asks you to implement, state that you are the planner and hand off to the execution workflow.
25
+ - Prefer a lightweight contextual plan when boundaries, dependencies, and success criteria are clear; write a file-backed plan only when the work is relatively complex and coordination or durable artifact is needed.
26
+
27
+ ## Shell Adaptation
28
+
29
+ - Shell snippets and command examples in prompts or skills are illustrative, not environment selectors.
30
+ - Before writing terminal commands, use the active shell/platform declared by the runtime, system prompt, or tool description.
31
+ - Translate Bash, PowerShell, cmd, or POSIX examples into that active shell's syntax. Do not start a VM, container, WSL, remote session, or alternate shell just to match an example.
24
32
 
25
33
  ## Evidence And QA
26
34
 
@@ -35,7 +35,7 @@ Before touching any UI code, before routing to any reference, before even thinki
35
35
  3. If the project has existing UI code, **extract** the implicit system (colors, fonts, spacing already in use) rather than inventing from scratch.
36
36
  4. If the project is greenfield, **ask the user one question**: "What should this feel like?" — or infer from context.
37
37
  5. For greenfield UI, start `DESIGN.md` with `## 0. Research Log`: record 2-3 relevant local Layer B/design candidates, the selected Layer A + Layer B and rationale, and any optional evidence from `ui-ux-db`, a user-provided image, or a local mockup. If a source/tool is unavailable or irrelevant, record why; do not force network research.
38
- 6. Write `DESIGN.md` at project root following the 8-section structure from the reference.
38
+ 6. Write `DESIGN.md` at project root following the nine-section structure from the reference.
39
39
  7. **Do not proceed to any component implementation until `DESIGN.md` exists and is committed to context.**
40
40
 
41
41
  #### If YES design system exists → READ IT, FOLLOW IT
@@ -49,7 +49,7 @@ Before touching any UI code, before routing to any reference, before even thinki
49
49
 
50
50
  ### Primitive Showcase Gate (MANDATORY for greenfield product UI)
51
51
 
52
- Before building a product screen, `DESIGN.md` Section 5 must list the intended primitives and states. Verify each relevant primitive in a component showcase or equivalent state page: default, hover, focus, disabled, loading, empty, and error. For runnable UI, retain real-browser validation at 375 / 768 / 1280px; when a runnable surface is unavailable, state exactly which states and breakpoints were not verified rather than claiming the gate passed.
52
+ Before building a product screen, add the intended primitives and states to `DESIGN.md` Section 5 under `Planned Showcase Primitives`. This is a pre-implementation verification checklist, not reusable component documentation. Verify each relevant primitive in a component showcase or equivalent state page: default, hover, focus, disabled, loading, empty, and error. Keep component documentation only for implemented reusable patterns used 2+ times. For runnable UI, retain real-browser validation at 375 / 768 / 1280px; when a runnable surface is unavailable, state exactly which states and breakpoints were not verified rather than claiming the gate passed.
53
53
 
54
54
 
55
55
  ## Phase 0.5 — React Dev Tooling Gate (MANDATORY for React projects)
@@ -185,8 +185,8 @@ Once references are loaded, before writing any UI code:
185
185
  6. **Server vs client components (Next.js).** If motion/state/portals are involved, isolate as a `'use client'` leaf component. Don't bleed `'use client'` to the page level.
186
186
  7. **Match the project's existing patterns FIRST.** If the codebase already uses CSS Modules, don't introduce Tailwind. If it uses styled-components, don't introduce CSS-in-JS variants. The references guide *style*, not *infrastructure*.
187
187
  8. **All tokens trace back to `DESIGN.md`.** No orphan hex codes, no magic px values. If you need a new token, update `DESIGN.md` first.
188
- 9. **New reusable patterns (used 2+ times) get documented back into `DESIGN.md` Section 5.**
189
- 10. **Greenfield product screens passed the Primitive Showcase Gate.** Verify the Section 5 primitives and their default, hover, focus, disabled, loading, empty, and error states before composing them into a product screen.
188
+ 9. **Implemented reusable patterns used 2+ times get documented back into `DESIGN.md` Section 5.**
189
+ 10. **Greenfield product screens passed the Primitive Showcase Gate.** Complete the Section 5 `Planned Showcase Primitives` pre-implementation verification checklist for default, hover, focus, disabled, loading, empty, and error states before composing them into a product screen; the checklist is not reusable component documentation.
190
190
 
191
191
  ## Quick lookup table — most common requests
192
192
 
@@ -15,7 +15,7 @@ Every frontend project MUST have a `DESIGN.md` at its root. This file is the sin
15
15
 
16
16
  ## DESIGN.md Structure
17
17
 
18
- The file has 8 sections. Every section is mandatory. Skip nothing. Section 0 applies to greenfield UI; existing-project extraction may state that historical research is unavailable instead of inventing it.
18
+ The file has nine sections, numbered 0 through 8. Every section is mandatory. Skip nothing. Section 0 applies to greenfield UI; existing-project extraction may state that historical research is unavailable instead of inventing it.
19
19
 
20
20
  ```markdown
21
21
  # [Project Name] Design System
@@ -120,7 +120,13 @@ All spacing derives from a base of **4px**.
120
120
 
121
121
  ## 5. Components
122
122
 
123
- Document reusable patterns as they emerge. Format:
123
+ ### Planned Showcase Primitives
124
+
125
+ This is a pre-implementation verification checklist, not reusable component documentation. Before composing a greenfield product screen, list each intended primitive and check its applicable default, hover, focus, disabled, loading, empty, and error states in a component showcase or equivalent state page.
126
+
127
+ ### Implemented Reusable Patterns
128
+
129
+ Document only implemented reusable patterns used 2+ times. Format:
124
130
 
125
131
  ### [Component Name]
126
132
  - **Structure**: HTML/JSX outline
@@ -130,8 +136,7 @@ Document reusable patterns as they emerge. Format:
130
136
  - **Accessibility**: keyboard, ARIA, contrast
131
137
  - **Motion**: entry/exit animations
132
138
 
133
- Start with components used 2+ times. Do not pre-document components
134
- that don't exist yet.
139
+ Do not promote planned primitives or one-off implementations into reusable component documentation.
135
140
 
136
141
  ## 6. Motion & Interaction
137
142
 
@@ -196,7 +201,7 @@ Each exception records its location, reason, owner, and exit criteria. An agent
196
201
  4. **Define palette** — derive from atmosphere. Not random. Not generic.
197
202
  5. **Set typography** — match the atmosphere. Editorial = serif. Technical = mono-heavy. Clean = geometric sans.
198
203
  6. **Lock spacing** — base-4 system. Customize only the section-level values.
199
- 7. **Document initial primitives and their states** — enough to pass the Primitive Showcase Gate before composing a product screen.
204
+ 7. **Fill in Planned Showcase Primitives** — use the pre-implementation verification checklist to cover intended primitives and states before composing a product screen; do not treat it as reusable component documentation.
200
205
  8. **Choose depth strategy** — one. Not "a mix."
201
206
  9. **Set accessibility constraints and record no debt without user authorization.**
202
207
  10. **Write it to `DESIGN.md`** at project root.
@@ -218,9 +223,9 @@ After every component implementation, check:
218
223
  - [ ] All spacing values are multiples of `--space-1` (4px). No magic numbers.
219
224
  - [ ] Interactive elements have all required states from Section 6.
220
225
  - [ ] Depth treatment matches the chosen strategy from Section 7.
221
- - [ ] Component reused 2+ times? Documented in Section 5.
226
+ - [ ] Implemented reusable pattern used 2+ times? Documented in Section 5.
222
227
  - [ ] Motion follows the timing table. No arbitrary durations.
223
- - [ ] Greenfield primitives have a showcase (or equivalent state page) covering default, hover, focus, disabled, loading, empty, and error before product-screen composition.
228
+ - [ ] `Planned Showcase Primitives` is complete for greenfield UI, with a showcase (or equivalent state page) covering default, hover, focus, disabled, loading, empty, and error before product-screen composition.
224
229
  - [ ] Section 8 constraints were checked; any accepted debt has location, reason, owner, exit criteria, and explicit user authorization.
225
230
 
226
231
  ## Memory Management
@@ -50,13 +50,14 @@ The user may delegate approval authority at any point. Delegation is honored for
50
50
  You MUST create a task for each of these items and complete them in order:
51
51
 
52
52
  1. **Explore project context** — check files, docs, recent commits
53
- 2. **Ambiguity assessment + conditional clarifier consultation** — assess the requirement; if purpose/constraints/success criteria are all clear, skip to step 3; otherwise consult the `clarifier` agent and use its Questions for User to drive user Q&A
54
- 3. **Propose 2-3 approaches** — with trade-offs and your recommendation
55
- 4. **Present design** — in sections scaled to their complexity, get user approval after each section
56
- 5. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
57
- 6. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope
58
- 7. **Conditional spec approval** — skip user approval if delegation applies OR self-review passed with no ambiguity; otherwise present spec to user for approval
59
- 8. **Transition to implementation** — proceed to the writing-plans skill
53
+ 2. **First discovery wave** — before deciding decomposition or whether a planner is needed, gather the facts that let you size the work: read the relevant files, search for related code/patterns, and surface unknowns. Discovery happens *before* decomposition and planner-trigger decisions, not after.
54
+ 3. **Ambiguity assessment + conditional clarifier consultation** — assess the requirement; if purpose/constraints/success criteria are all clear, skip to step 4; otherwise consult the `clarifier` agent and use its Questions for User to drive user Q&A
55
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
56
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
57
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
58
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope
59
+ 8. **Conditional spec approval** — skip user approval if delegation applies OR self-review passed with no ambiguity; otherwise present spec to user for approval
60
+ 9. **Transition to implementation** — proceed to the writing-plans skill
60
61
 
61
62
  ## The Process
62
63
 
@@ -65,14 +66,14 @@ You MUST create a task for each of these items and complete them in order:
65
66
  - Check out the current project state first (files, docs, recent commits)
66
67
  - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems, flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
67
68
  - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
68
- - For appropriately-scoped projects, proceed to ambiguity assessment (step 2)
69
+ - For appropriately-scoped projects, proceed to ambiguity assessment (step 3)
69
70
 
70
- **Ambiguity assessment + conditional clarifier consultation (step 2):**
71
+ **Ambiguity assessment + conditional clarifier consultation (step 3):**
71
72
 
72
73
  1. Assess whether the requirement has ambiguity in purpose, constraints, or success criteria.
73
- 2. If everything is clear, skip step 2 entirely and proceed to step 3.
74
+ 2. If everything is clear, skip step 3 entirely and proceed to step 4.
74
75
  3. If ambiguity exists, dispatch the `clarifier` agent with the requirement and project context. The clarifier returns: Intent Classification, Pre-Analysis Findings, Questions for User (max 3), Identified Risks, Directives for planner, Recommended Approach.
75
- 4. Use the clarifier's Questions for User to drive user Q&A — one question at a time, multiple choice preferred when possible. If the clarifier returns no questions, proceed to step 3.
76
+ 4. Use the clarifier's Questions for User to drive user Q&A — one question at a time, multiple choice preferred when possible. If the clarifier returns no questions, proceed to step 4.
76
77
  5. Focus on understanding: purpose, constraints, success criteria
77
78
 
78
79
  **Exploring approaches:**
@@ -53,6 +53,8 @@ Use Task tool with `general-purpose` type, fill template at `code-reviewer.md`
53
53
  - Note Minor issues for later
54
54
  - Push back if reviewer is wrong (with reasoning)
55
55
 
56
+ **Feedback classification:** Review findings may be labeled `[product]` (proposed change to product behavior or implementation) or `[evidence]` (a missing or insufficient proof/artifact). An `[evidence]` blocker means the current behavior may be acceptable but the proof is not — add the missing evidence rather than changing product behavior. A `[product]` blocker requires a behavior or implementation change. Do not treat an `[evidence]` finding as a mandate to rewrite code.
57
+
56
58
  ## Reviewer Selection
57
59
 
58
60
  Two reviewer agents are available, with distinct semantics:
@@ -79,6 +81,8 @@ Two reviewer agents are available, with distinct semantics:
79
81
 
80
82
  `oracle` can also be an optional independent consultation for a high-risk implementation plan. It does not replace the `plan-critic` receipt, does not make dual plan review mandatory, and a timeout or partial response is not a conclusion.
81
83
 
84
+ **GPT/Codex reasoning policy:** `reviewer` and `oracle` use `xhigh` minimum. For complex or high-risk review or verification, request local `max`; the adapter maps it to the target's maximum supported effort (currently `xhigh` for GPT/Codex). `plan-critic` remains `xhigh`.
85
+
82
86
  ## Example
83
87
 
84
88
  ```
@@ -199,6 +199,8 @@ The reviewer must evaluate the diff on its merits. If you have context the revie
199
199
 
200
200
  **Handling findings:**
201
201
  - **Critical + Important** → dispatch a fix subagent. Each fix dispatch must include: the test name that covers the fix, the command to run it, and the expected output.
202
+ - If a finding is labeled `[product]`, change the implementation to address it.
203
+ - If a finding is labeled `[evidence]`, supply the missing evidence/proof; do not change product behavior unless the evidence exposes a real defect.
202
204
  - **Minor** → record in the todo list / ledger; the final acceptance review triages them. Do not dispatch per-Minor fix subagents.
203
205
  - **Plan-mandated behavior flagged as a defect** → the plan overrode a default. Do not auto-fix. Surface to your human partner for adjudication: "Reviewer flagged X, but the plan mandated Y. Which wins?"
204
206
  - **Final review findings** → dispatch ONE fix subagent carrying all findings, not one subagent per finding.
@@ -24,6 +24,16 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
24
24
 
25
25
  **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
26
26
 
27
+ ## When to Write a File-Backed Plan
28
+
29
+ Do not write a plan just because a task has more than one step. Use a file-backed plan only when the work is **relatively complex and has a clear purpose**, and after discovery still has unclear boundaries, dependencies, success criteria, or needs durable coordination across multiple tasks or agents. Examples: multi-file cross-module changes, novel behavior, security/perf/migration work, or any task where a downstream builder would need a durable artifact to stay aligned.
30
+
31
+ For work with clear boundaries and a single obvious path, a contextual lightweight plan in the notepad or todo list is enough. Do not escalate to a file-backed plan + plan-critic review for trivial or low-uncertainty work.
32
+
33
+ **Planner trigger summary:**
34
+ - Clear scope, single path, low coordination need → lightweight contextual plan.
35
+ - Complex, cross-cutting, ambiguous boundaries/dependencies/success criteria → file-backed plan using this skill, followed by plan-critic review.
36
+
27
37
  ## Scope Check
28
38
 
29
39
  If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.