ocmm 0.4.3 → 0.5.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 (80) 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 +1 -1
  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 +1 -1
  22. package/dist/codex/plugin-generator.js +51 -18
  23. package/dist/codex/plugin-generator.js.map +1 -1
  24. package/dist/hooks/config.js +127 -12
  25. package/dist/hooks/config.js.map +1 -1
  26. package/dist/intent/prompt-loader.d.ts +4 -2
  27. package/dist/intent/prompt-loader.js +8 -2
  28. package/dist/intent/prompt-loader.js.map +1 -1
  29. package/package.json +1 -1
  30. package/plugins/deepwork/.codex-plugin/plugin.json +1 -1
  31. package/plugins/deepwork/agents/dw-builder.toml +1 -1
  32. package/plugins/deepwork/agents/dw-clarifier.toml +1 -1
  33. package/plugins/deepwork/agents/dw-code-search.toml +1 -1
  34. package/plugins/deepwork/agents/dw-coding.toml +1 -1
  35. package/plugins/deepwork/agents/dw-complex.toml +1 -1
  36. package/plugins/deepwork/agents/dw-creative.toml +1 -1
  37. package/plugins/deepwork/agents/dw-deep.toml +1 -1
  38. package/plugins/deepwork/agents/dw-doc-search.toml +1 -1
  39. package/plugins/deepwork/agents/dw-documenting.toml +1 -1
  40. package/plugins/deepwork/agents/dw-explore.toml +1 -1
  41. package/plugins/deepwork/agents/dw-frontend.toml +1 -1
  42. package/plugins/deepwork/agents/dw-hard-reasoning.toml +1 -1
  43. package/plugins/deepwork/agents/dw-media-reader.toml +1 -1
  44. package/plugins/deepwork/agents/dw-normal-task.toml +1 -1
  45. package/plugins/deepwork/agents/dw-oracle.toml +1 -1
  46. package/plugins/deepwork/agents/dw-orchestrator.toml +1 -1
  47. package/plugins/deepwork/agents/dw-plan-critic.toml +1 -1
  48. package/plugins/deepwork/agents/dw-planner.toml +1 -1
  49. package/plugins/deepwork/agents/dw-quick.toml +1 -1
  50. package/plugins/deepwork/agents/dw-research.toml +1 -1
  51. package/plugins/deepwork/agents/dw-reviewer.toml +1 -1
  52. package/plugins/deepwork/package.json +1 -1
  53. package/plugins/deepwork/skills/ast-grep/SKILL.md +2 -1
  54. package/plugins/deepwork/skills/debugging/SKILL.md +2 -1
  55. package/plugins/deepwork/skills/deepwork/SKILL.md +54 -15
  56. package/plugins/deepwork/skills/deepwork-brainstorming/SKILL.md +2 -1
  57. package/plugins/deepwork/skills/deepwork-dispatching-parallel-agents/SKILL.md +2 -1
  58. package/plugins/deepwork/skills/deepwork-receiving-code-review/SKILL.md +2 -1
  59. package/plugins/deepwork/skills/deepwork-requesting-code-review/SKILL.md +4 -1
  60. package/plugins/deepwork/skills/deepwork-subagent-driven-development/SKILL.md +2 -1
  61. package/plugins/deepwork/skills/deepwork-writing-plans/SKILL.md +13 -8
  62. package/plugins/deepwork/skills/frontend/SKILL.md +3 -2
  63. package/plugins/deepwork/skills/frontend/references/design/README.md +8 -2
  64. package/plugins/deepwork/skills/frontend/references/design/design-system-architecture.md +35 -9
  65. package/plugins/deepwork/skills/git-master/SKILL.md +2 -1
  66. package/plugins/deepwork/skills/init-deep/SKILL.md +2 -1
  67. package/plugins/deepwork/skills/remove-ai-slops/SKILL.md +2 -1
  68. package/plugins/deepwork/skills/using-git-worktrees/SKILL.md +2 -1
  69. package/prompts/codex/agents/plan-critic.md +6 -0
  70. package/prompts/codex/agents/planner.md +3 -1
  71. package/prompts/codex/deepwork/gpt-5.6.md +27 -0
  72. package/prompts/omo/deepwork/gpt-5.6.md +23 -0
  73. package/prompts/v1/agents/plan-critic.md +6 -0
  74. package/prompts/v1/agents/planner.md +3 -1
  75. package/prompts/v1/deepwork/gpt-5.6.md +27 -0
  76. package/skills/frontend/SKILL.md +1 -1
  77. package/skills/frontend/references/design/README.md +8 -2
  78. package/skills/frontend/references/design/design-system-architecture.md +35 -9
  79. package/skills/v1/requesting-code-review/SKILL.md +2 -0
  80. package/skills/v1/writing-plans/SKILL.md +11 -7
@@ -131,5 +131,6 @@ git branch -d <branch> # if merged; -D if abandoned
131
131
  ## Codex Compatibility
132
132
 
133
133
  - When this skill mentions TodoWrite, use Codex `update_plan`.
134
- - When this skill mentions OpenCode `task(...)`, use Codex `multi_agent_v1.spawn_agent` when available.
134
+ - When this skill mentions OpenCode `task(...)`, use the current callable Codex subagent-dispatch tool and preserve the task contract. Treat an agent_type, agent_path, or agent_nickname field as an exact profile selector only when its current schema or documentation explicitly guarantees that behavior; otherwise prefer complete direct composition, then generic/flat dispatch.
135
+ - A generic/flat child message must be self-contained and labeled `TASK`, `ROLE`, `DELIVERABLE`, `SCOPE`, `VERIFY`, `REQUIRED SKILLS`, `CONTEXT`, and `CONSTRAINTS`; do not claim it loaded a `dw-*` profile.
135
136
  - When this skill mentions OpenCode-specific tool names, choose the nearest Codex tool with the same intent and preserve the workflow contract.
@@ -13,6 +13,12 @@ If the input contains exactly one markdown plan path, read the current on-disk f
13
13
 
14
14
  If a follow-up names the same plan path, re-read from disk. Previous verdicts are not trusted without reading the current file.
15
15
 
16
+ ## Receipt Contract
17
+
18
+ One review round covers one complete, current plan revision. Read the full current plan before issuing a verdict, and make the first line exactly one of `[REJECT]`, `[OKAY]`, or `[OKAY-UNAMBIGUOUS]`. That verdict is valid only for the revision you read; any later plan edit requires a fresh round.
19
+
20
+ If you cannot read the current complete plan, the plan is incomplete, or the evidence is insufficient, issue `[REJECT]` with the missing item. Never emit `[OKAY]` or `[OKAY-UNAMBIGUOUS]` for a path you did not read, an older revision, a partial result, or an acknowledgement.
21
+
16
22
  ## Purpose
17
23
 
18
24
  Answer one question: can a capable builder execute this plan without getting stuck?
@@ -75,6 +75,8 @@ When gathering context for a plan, emit all independent `multi_agent_v1.spawn_ag
75
75
 
76
76
  ## Handoff
77
77
 
78
- Report the plan path, the intended execution order, and any risks or assumptions that still matter.
78
+ Saving a plan is not permission to hand it off. Submit the complete current plan to `plan-critic` and report the current receipt verdict, or `waiting for receipt`. A dispatch acknowledgement, timeout, partial response, or an older-plan verdict is never a pass; plan edits require a fresh critic round.
79
+
80
+ Report the plan path, the intended execution order, the current receipt status, and any risks or assumptions that still matter.
79
81
 
80
82
  </agent-role>
@@ -0,0 +1,27 @@
1
+ <deepwork-mode>
2
+
3
+ # GPT-5.6 EXECUTION CALIBRATION
4
+
5
+ Apply this layer only when the selected model is in the GPT-5.6 family (`gpt-5.6`, Sol, Terra, or Luna). The role prompt, user authorization, Deepwork task tiers, embedded skills, and Codex tool-compatibility rules remain authoritative.
6
+
7
+ ## Outcome-first execution
8
+
9
+ - Start each non-trivial task by naming the concrete outcome being established, then take the smallest next action that proves or advances it.
10
+ - Use process only when it changes the result: do not narrate routine reads, repeat the request, or collect context after the decision is supported.
11
+ - Preserve complete deliverables. Concision means removing repetition and ceremony, never replacing a requested artifact, test, or explanation with a shorter substitute.
12
+
13
+ ## Retrieval and delegation thresholds
14
+
15
+ - Use a direct lookup when the caller gives the file, symbol, or one local question that decides the next action.
16
+ - Use direct and background tracks together only for independent unknowns, unfamiliar module layout, or a material external fact. Stop when the answer is concrete or two independent waves add no useful evidence.
17
+ - Every delegated task must state its outcome, relevant scope, expected deliverable, verification evidence, and non-goals. A timeout, acknowledgement, or partial report is not completion.
18
+
19
+ ## Evidence-first reporting
20
+
21
+ - For a multi-step update, report only a changed decision, meaningful discovery, blocker, or completed verification phase.
22
+ - Final responses lead with the outcome, then give the evidence that supports it (changed surface, tests or observable result), followed by any residual risk or unverified item.
23
+ - For review requests, lead with actionable findings ordered by severity and anchored to concrete evidence; if there are none, say so and name residual risks.
24
+
25
+ Do not infer permission to modify code from an explanation, research, diagnosis, review, or planning request. Do not convert Deepwork's tiered QA or approval rules into unconditional gates.
26
+
27
+ </deepwork-mode>
@@ -0,0 +1,23 @@
1
+ # GPT-5.6 EXECUTION CALIBRATION
2
+
3
+ Apply this layer only when the selected model is in the GPT-5.6 family (`gpt-5.6`, Sol, Terra, or Luna). The role prompt, user authorization, Deepwork task tiers, and local verification policy remain authoritative.
4
+
5
+ ## Outcome-first execution
6
+
7
+ - Start each non-trivial task by naming the concrete outcome being established, then take the smallest next action that proves or advances it.
8
+ - Use process only when it changes the result: do not narrate routine reads, repeat the request, or collect context after the decision is supported.
9
+ - Preserve complete deliverables. Concision means removing repetition and ceremony, never replacing a requested artifact, test, or explanation with a shorter substitute.
10
+
11
+ ## Retrieval and delegation thresholds
12
+
13
+ - Use a direct lookup when the caller gives the file, symbol, or one local question that decides the next action.
14
+ - Use direct and background tracks together only for independent unknowns, unfamiliar module layout, or a material external fact. Stop when the answer is concrete or two independent waves add no useful evidence.
15
+ - Every delegated task must state its outcome, relevant scope, expected deliverable, verification evidence, and non-goals. A timeout, acknowledgement, or partial report is not completion.
16
+
17
+ ## Evidence-first reporting
18
+
19
+ - For a multi-step update, report only a changed decision, meaningful discovery, blocker, or completed verification phase.
20
+ - Final responses lead with the outcome, then give the evidence that supports it (changed surface, tests or observable result), followed by any residual risk or unverified item.
21
+ - For review requests, lead with actionable findings ordered by severity and anchored to concrete evidence; if there are none, say so and name residual risks.
22
+
23
+ Do not infer permission to modify code from an explanation, research, diagnosis, review, or planning request. Do not convert Deepwork's tiered QA or approval rules into unconditional gates.
@@ -13,6 +13,12 @@ If the input contains exactly one markdown plan path, read the current on-disk f
13
13
 
14
14
  If a follow-up names the same plan path, re-read from disk. Previous verdicts are not trusted without reading the current file.
15
15
 
16
+ ## Receipt Contract
17
+
18
+ One review round covers one complete, current plan revision. Read the full current plan before issuing a verdict, and make the first line exactly one of `[REJECT]`, `[OKAY]`, or `[OKAY-UNAMBIGUOUS]`. That verdict is valid only for the revision you read; any later plan edit requires a fresh round.
19
+
20
+ If you cannot read the current complete plan, the plan is incomplete, or the evidence is insufficient, issue `[REJECT]` with the missing item. Never emit `[OKAY]` or `[OKAY-UNAMBIGUOUS]` for a path you did not read, an older revision, a partial result, or an acknowledgement.
21
+
16
22
  ## Purpose
17
23
 
18
24
  Answer one question: can a capable builder execute this plan without getting stuck?
@@ -75,6 +75,8 @@ When gathering context for a plan, emit all independent `task` tool calls (e.g.
75
75
 
76
76
  ## Handoff
77
77
 
78
- Report the plan path, the intended execution order, and any risks or assumptions that still matter.
78
+ Saving a plan is not permission to hand it off. Submit the complete current plan to `plan-critic` and report the current receipt verdict, or `waiting for receipt`. A dispatch acknowledgement, timeout, partial response, or an older-plan verdict is never a pass; plan edits require a fresh critic round.
79
+
80
+ Report the plan path, the intended execution order, the current receipt status, and any risks or assumptions that still matter.
79
81
 
80
82
  </agent-role>
@@ -0,0 +1,27 @@
1
+ <deepwork-mode>
2
+
3
+ # GPT-5.6 EXECUTION CALIBRATION
4
+
5
+ Apply this layer only when the selected model is in the GPT-5.6 family (`gpt-5.6`, Sol, Terra, or Luna). The role prompt, user authorization, Deepwork task tiers, injected skills, and local verification policy remain authoritative.
6
+
7
+ ## Outcome-first execution
8
+
9
+ - Start each non-trivial task by naming the concrete outcome being established, then take the smallest next action that proves or advances it.
10
+ - Use process only when it changes the result: do not narrate routine reads, repeat the request, or collect context after the decision is supported.
11
+ - Preserve complete deliverables. Concision means removing repetition and ceremony, never replacing a requested artifact, test, or explanation with a shorter substitute.
12
+
13
+ ## Retrieval and delegation thresholds
14
+
15
+ - Use a direct lookup when the caller gives the file, symbol, or one local question that decides the next action.
16
+ - Use direct and background tracks together only for independent unknowns, unfamiliar module layout, or a material external fact. Stop when the answer is concrete or two independent waves add no useful evidence.
17
+ - Every delegated task must state its outcome, relevant scope, expected deliverable, verification evidence, and non-goals. A timeout, acknowledgement, or partial report is not completion.
18
+
19
+ ## Evidence-first reporting
20
+
21
+ - For a multi-step update, report only a changed decision, meaningful discovery, blocker, or completed verification phase.
22
+ - Final responses lead with the outcome, then give the evidence that supports it (changed surface, tests or observable result), followed by any residual risk or unverified item.
23
+ - For review requests, lead with actionable findings ordered by severity and anchored to concrete evidence; if there are none, say so and name residual risks.
24
+
25
+ Do not infer permission to modify code from an explanation, research, diagnosis, review, or planning request. Do not convert Deepwork's tiered QA or approval rules into unconditional gates.
26
+
27
+ </deepwork-mode>
@@ -96,7 +96,7 @@ Domains: `product` `style` `typography` `color` `landing` `chart` `ux` `react` `
96
96
 
97
97
  ## Shared axioms (all three rulesets agree — apply always)
98
98
 
99
- - **No design system = no UI work.** `DESIGN.md` exists before components do; every color, font size, and spacing value traces back to a token in it.
99
+ - **No design system = no UI work.** `DESIGN.md` exists before components do; every color, font size, and spacing value traces back to a token in it. For greenfield UI, its `## 0. Research Log` records the local design candidates and selected direction before product screens are built.
100
100
  - **Never weaken UX to buy points.** No dropping animations, hiding content, or simplifying interactions for a score or a deadline.
101
101
  - **No emojis as icons.** SVG icon sets only (Lucide, Heroicons, Radix, Phosphor).
102
102
  - **GPU-composited animation only** — `transform`, `opacity`, `filter`; never animate layout properties.
@@ -34,8 +34,9 @@ Before touching any UI code, before routing to any reference, before even thinki
34
34
  2. Explore the project: what is the product domain? Who are the users? What feeling should it evoke?
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
- 5. Write `DESIGN.md` at project root following the 7-section structure from the reference.
38
- 6. **Do not proceed to any component implementation until `DESIGN.md` exists and is committed to context.**
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.
39
+ 7. **Do not proceed to any component implementation until `DESIGN.md` exists and is committed to context.**
39
40
 
40
41
  #### If YES design system exists → READ IT, FOLLOW IT
41
42
 
@@ -46,6 +47,10 @@ Before touching any UI code, before routing to any reference, before even thinki
46
47
 
47
48
  **This gate is non-negotiable. No design system = no UI work. Period.**
48
49
 
50
+ ### Primitive Showcase Gate (MANDATORY for greenfield product UI)
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.
53
+
49
54
 
50
55
  ## Phase 0.5 — React Dev Tooling Gate (MANDATORY for React projects)
51
56
 
@@ -181,6 +186,7 @@ Once references are loaded, before writing any UI code:
181
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*.
182
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.
183
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.
184
190
 
185
191
  ## Quick lookup table — most common requests
186
192
 
@@ -15,11 +15,19 @@ 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 7 sections. Every section is mandatory. Skip nothing.
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.
19
19
 
20
20
  ```markdown
21
21
  # [Project Name] Design System
22
22
 
23
+ ## 0. Research Log
24
+
25
+ For greenfield UI, record the design decision before writing product screens.
26
+
27
+ - **Candidates considered**: 2-3 relevant local Layer B/design references, with a short reason each fits or does not fit.
28
+ - **Selection**: the chosen Layer A execution skill and Layer B/design reference, with rationale tied to the product and audience.
29
+ - **Evidence (optional)**: a local `ui-ux-db` lookup, user-provided image, or local mockup. If a tool/source is unavailable or not relevant, record the reason instead of forcing network research.
30
+
23
31
  ## 1. Atmosphere & Identity
24
32
 
25
33
  One paragraph. What this product FEELS like. Not what it does — how it feels to use.
@@ -118,7 +126,7 @@ Document reusable patterns as they emerge. Format:
118
126
  - **Structure**: HTML/JSX outline
119
127
  - **Variants**: list
120
128
  - **Spacing**: which tokens
121
- - **States**: default, hover, active, focus, disabled, loading, error
129
+ - **States**: default, hover, active, focus, disabled, loading, empty, error
122
130
  - **Accessibility**: keyboard, ARIA, contrast
123
131
  - **Motion**: entry/exit animations
124
132
 
@@ -162,6 +170,20 @@ If borders:
162
170
 
163
171
  If tonal-shift:
164
172
  Surfaces use progressively lighter/darker shades. No borders, no shadows.
173
+
174
+ ## 8. Accessibility Constraints & Accepted Debt
175
+
176
+ ### Constraints
177
+
178
+ - **WCAG goal**: state the target level and the testable scope.
179
+ - **Contrast**: document text, control, and focus-indicator contrast requirements.
180
+ - **Keyboard and focus**: every interactive primitive has a keyboard path and visible focus treatment.
181
+ - **ARIA**: semantic HTML first; document required names, roles, and live-region behavior for custom controls.
182
+ - **Reduced motion**: respect `prefers-reduced-motion` and identify any essential motion.
183
+
184
+ ### Accepted Debt
185
+
186
+ Each exception records its location, reason, owner, and exit criteria. An agent may not accept accessibility debt or a constraint exception silently: it requires explicit user authorization.
165
187
  ```
166
188
 
167
189
  ## Creation Workflow
@@ -169,13 +191,15 @@ Surfaces use progressively lighter/darker shades. No borders, no shadows.
169
191
  ### For New Projects
170
192
 
171
193
  1. **Ask or infer the product domain** — SaaS dashboard? Marketing site? Dev tool?
172
- 2. **Write the Atmosphere paragraph** — one chance to establish identity.
173
- 3. **Define palette** — derive from atmosphere. Not random. Not generic.
174
- 4. **Set typography** — match the atmosphere. Editorial = serif. Technical = mono-heavy. Clean = geometric sans.
175
- 5. **Lock spacing** — base-4 system. Customize only the section-level values.
176
- 6. **Document initial components** — only those you are about to build.
177
- 7. **Choose depth strategy** — one. Not "a mix."
178
- 8. **Write it to `DESIGN.md`** at project root.
194
+ 2. **Write the Research Log** — consider 2-3 relevant local design candidates, select Layer A + Layer B, and record optional local evidence or why it was unavailable.
195
+ 3. **Write the Atmosphere paragraph** — one chance to establish identity.
196
+ 4. **Define palette** — derive from atmosphere. Not random. Not generic.
197
+ 5. **Set typography** — match the atmosphere. Editorial = serif. Technical = mono-heavy. Clean = geometric sans.
198
+ 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.
200
+ 8. **Choose depth strategy** — one. Not "a mix."
201
+ 9. **Set accessibility constraints and record no debt without user authorization.**
202
+ 10. **Write it to `DESIGN.md`** at project root.
179
203
 
180
204
  ### For Existing Projects (Extraction)
181
205
 
@@ -196,6 +220,8 @@ After every component implementation, check:
196
220
  - [ ] Depth treatment matches the chosen strategy from Section 7.
197
221
  - [ ] Component reused 2+ times? Documented in Section 5.
198
222
  - [ ] 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.
224
+ - [ ] Section 8 constraints were checked; any accepted debt has location, reason, owner, exit criteria, and explicit user authorization.
199
225
 
200
226
  ## Memory Management
201
227
 
@@ -77,6 +77,8 @@ Two reviewer agents are available, with distinct semantics:
77
77
 
78
78
  **Default:** `oracle` for simple tasks. Upgrade to both when the orchestrator judges the task complex or large.
79
79
 
80
+ `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
+
80
82
  ## Example
81
83
 
82
84
  ```
@@ -154,24 +154,26 @@ If you find issues, fix them inline. No need to re-review — just fix and move
154
154
 
155
155
  ## plan-critic Review Loop
156
156
 
157
- After self-review passes, submit the plan to the `plan-critic` agent for a mandatory review loop. The plan-critic agent reads the plan path or inline plan and returns a three-state verdict.
157
+ After self-review passes, submit the plan to the `plan-critic` agent for a mandatory review loop. A review round covers exactly one saved, complete, current plan revision. A current receipt is valid only when that round returns an explicit `[OKAY]` or `[OKAY-UNAMBIGUOUS]`; any plan edit invalidates every earlier receipt.
158
+
159
+ Timeouts, `WORKING`, acknowledgements, partial output, a missing verdict, or a review of an older/incomplete plan are not approval. Wait for a complete verdict, follow up, or re-dispatch the critic for the current full plan. Dispatch success is not a receipt.
158
160
 
159
161
  **Loop procedure:**
160
162
 
161
- 1. Submit the plan to the `plan-critic` agent (pass the plan file path, or the inline plan if not yet saved).
162
- 2. Dispatch the plan-critic agent and wait for its verdict.
163
+ 1. Save the complete plan, then submit that exact plan path to the `plan-critic` agent.
164
+ 2. Dispatch the plan-critic agent and wait for one explicit verdict for the current revision.
163
165
  3. Branch on the verdict:
164
166
 
165
167
  | Verdict | Meaning | Action |
166
168
  |---|---|---|
167
- | `[REJECT]` | Critical blockers exist; plan not executable as-is | Apply the blocker fixes (max 3), re-run self-review, resubmit. Loop. |
169
+ | `[REJECT]` | Critical blockers exist; plan not executable as-is | Apply the blocker fixes (max 3), re-run self-review, save the updated complete plan, then begin a fresh critic round. |
168
170
  | `[OKAY]` | Plan is executable; residual uncertainty/ambiguity remains | Exit the loop. Proceed to user approval (unless delegation applies). |
169
171
  | `[OKAY-UNAMBIGUOUS]` | Plan is executable AND logically clear with no ambiguity | Exit the loop. Skip user approval. Proceed to Execution Handoff. |
170
172
 
171
173
  **Loop cap (user delegation "review N 次就下一步"):**
172
174
 
173
175
  If the user has delegated with "review N 次就下一步" / "review N times then proceed", cap the loop at N iterations. After N iterations:
174
- - If still `[REJECT]`: record the unresolved blockers in the plan (as a "Known Unresolved Blockers" section) and proceed anyway. Do not block the workflow.
176
+ - If still `[REJECT]`, or no current receipt exists: record unresolved blockers in the plan (as a "Known Unresolved Blockers" section) and proceed only under the explicit status `delegated-without-plan-approval`. Do not call this approved, passed, or receipted.
175
177
  - If `[OKAY]` or `[OKAY-UNAMBIGUOUS]` reached before N: exit early.
176
178
 
177
179
  **Plan approval conditionality:**
@@ -185,11 +187,13 @@ After the loop exits, determine whether user approval is required:
185
187
 
186
188
  > "Plan written to `<path>`. plan-critic verdict: `[OKAY]` (executable, residual uncertainty). Please review and approve before execution, or delegate with '你自己决定' / '无需批准自行继续' to proceed."
187
189
 
188
- Wait for the user's response. If they request changes, make them, re-run self-review, and re-run the plan-critic loop. Only proceed once the user approves or delegates.
190
+ Wait for the user's response. If they request changes, make them, re-run self-review, and re-run the plan-critic loop for the changed plan. Only proceed once the user approves or delegates.
191
+
192
+ `oracle` may provide an optional, independent consultation for a high-risk plan, but it never replaces the current `plan-critic` receipt and does not create a mandatory dual-review gate.
189
193
 
190
194
  ## Execution Handoff
191
195
 
192
- After saving the plan, proceed to the subagent-driven-development skill to execute it.
196
+ Proceed to the subagent-driven-development skill only with a current plan-critic receipt, user approval where required, or an explicitly labeled `delegated-without-plan-approval` exception. Report the current receipt verdict or `waiting for receipt`; never treat a dispatch timeout or acknowledgement as pass.
193
197
 
194
198
  **Execution:**
195
199
  - Fresh subagent per task + completion/integration check after each returned agent + final acceptance review once after all tasks