draht-codex 2026.10.20 → 2026.10.23

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 (107) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +16 -0
  3. package/agents/advisor.md +2 -2
  4. package/agents/architect.md +10 -71
  5. package/agents/debugger.md +12 -82
  6. package/agents/git-committer.md +10 -52
  7. package/agents/implementer.md +15 -63
  8. package/agents/investigator.md +11 -63
  9. package/agents/reviewer.md +15 -65
  10. package/agents/security-auditor.md +12 -105
  11. package/agents/spec-reviewer.md +12 -53
  12. package/agents/verifier.md +13 -54
  13. package/commands/atomic-commit.md +9 -9
  14. package/commands/create-verification-skill.md +8 -48
  15. package/commands/discuss-phase.md +5 -9
  16. package/commands/execute-phase.md +17 -47
  17. package/commands/fix.md +16 -130
  18. package/commands/grill.md +6 -51
  19. package/commands/init-project.md +10 -14
  20. package/commands/map-codebase.md +2 -2
  21. package/commands/new-project.md +9 -14
  22. package/commands/next-milestone.md +3 -7
  23. package/commands/orchestrate-loop.md +12 -12
  24. package/commands/orchestrate.md +12 -11
  25. package/commands/pause-work.md +1 -1
  26. package/commands/plan-phase.md +16 -38
  27. package/commands/quick.md +9 -78
  28. package/commands/resolve-conflicts.md +2 -15
  29. package/commands/triage.md +3 -14
  30. package/commands/verify-work.md +17 -106
  31. package/commands/why.md +18 -118
  32. package/hooks/hooks.json +10 -0
  33. package/package.json +4 -4
  34. package/scripts/checks-runtime.cjs +215 -0
  35. package/scripts/git-safety-hook.cjs +21 -0
  36. package/scripts/git-safety.cjs +198 -0
  37. package/scripts/gsd-post-task.cjs +78 -39
  38. package/scripts/gsd-quality-gate.cjs +206 -120
  39. package/scripts/prompt-context.cjs +40 -6
  40. package/scripts/session-start.cjs +6 -4
  41. package/scripts/stop-quality-gate.cjs +55 -25
  42. package/skills/atomic-commit/command.md +9 -9
  43. package/skills/atomic-reasoning/SKILL.md +6 -105
  44. package/skills/blast-radius/SKILL.md +1 -1
  45. package/skills/brainstorming/SKILL.md +8 -126
  46. package/skills/create-verification-skill/SKILL.md +1 -1
  47. package/skills/create-verification-skill/command.md +8 -48
  48. package/skills/ddd-workflow/SKILL.md +8 -101
  49. package/skills/debugging-workflow/SKILL.md +12 -122
  50. package/skills/discuss-phase/SKILL.md +1 -0
  51. package/skills/discuss-phase/agents/openai.yaml +2 -0
  52. package/skills/discuss-phase/command.md +5 -9
  53. package/skills/draht/SKILL.md +18 -14
  54. package/skills/epistemics/SKILL.md +12 -87
  55. package/skills/execute-phase/SKILL.md +1 -0
  56. package/skills/execute-phase/agents/openai.yaml +2 -0
  57. package/skills/execute-phase/command.md +17 -47
  58. package/skills/explainers/SKILL.md +1 -1
  59. package/skills/fix/SKILL.md +2 -1
  60. package/skills/fix/agents/openai.yaml +2 -0
  61. package/skills/fix/command.md +16 -130
  62. package/skills/grill/SKILL.md +1 -1
  63. package/skills/grill/command.md +6 -51
  64. package/skills/gsd-workflow/SKILL.md +37 -21
  65. package/skills/gsd-workflow/agents/openai.yaml +2 -0
  66. package/skills/init-project/SKILL.md +1 -0
  67. package/skills/init-project/agents/openai.yaml +2 -0
  68. package/skills/init-project/command.md +10 -14
  69. package/skills/loop-workflow/SKILL.md +7 -41
  70. package/skills/map-codebase/command.md +2 -2
  71. package/skills/model-tiering/SKILL.md +7 -7
  72. package/skills/new-project/SKILL.md +1 -0
  73. package/skills/new-project/agents/openai.yaml +2 -0
  74. package/skills/new-project/command.md +9 -14
  75. package/skills/next-milestone/SKILL.md +1 -0
  76. package/skills/next-milestone/agents/openai.yaml +2 -0
  77. package/skills/next-milestone/command.md +3 -7
  78. package/skills/orchestrate/command.md +12 -11
  79. package/skills/orchestrate-loop/command.md +12 -12
  80. package/skills/pause-work/SKILL.md +1 -0
  81. package/skills/pause-work/agents/openai.yaml +2 -0
  82. package/skills/pause-work/command.md +1 -1
  83. package/skills/plan-phase/SKILL.md +1 -0
  84. package/skills/plan-phase/agents/openai.yaml +2 -0
  85. package/skills/plan-phase/command.md +16 -38
  86. package/skills/progress/SKILL.md +1 -0
  87. package/skills/progress/agents/openai.yaml +2 -0
  88. package/skills/quick/SKILL.md +2 -1
  89. package/skills/quick/agents/openai.yaml +2 -0
  90. package/skills/quick/command.md +9 -78
  91. package/skills/resolve-conflicts/command.md +2 -15
  92. package/skills/resume-work/SKILL.md +1 -0
  93. package/skills/resume-work/agents/openai.yaml +2 -0
  94. package/skills/saga-spawner/SKILL.md +1 -1
  95. package/skills/tdd-workflow/SKILL.md +15 -104
  96. package/skills/triage/SKILL.md +2 -1
  97. package/skills/triage/agents/openai.yaml +2 -0
  98. package/skills/triage/command.md +3 -14
  99. package/skills/typescript-discipline/SKILL.md +12 -42
  100. package/skills/typescript-discipline/references/patterns.md +25 -266
  101. package/skills/unslop/SKILL.md +14 -105
  102. package/skills/verification-gate/SKILL.md +16 -76
  103. package/skills/verify-work/SKILL.md +1 -0
  104. package/skills/verify-work/agents/openai.yaml +2 -0
  105. package/skills/verify-work/command.md +17 -106
  106. package/skills/why/SKILL.md +1 -1
  107. package/skills/why/command.md +18 -118
@@ -10,7 +10,7 @@ Run fresh-context worker iterations against a fixed goal until an independent ch
10
10
 
11
11
  Goal: $ARGUMENTS
12
12
 
13
- > **Tool note**: Spawn Codex subagents using the matching Draht agent prompts. Workers are `implementer` (or `debugger` for pure-diagnosis goals); the final gate is `spec-reviewer`. One worker per iteration — never parallel workers inside the loop.
13
+ > **Tool note**: Dispatch subagents using the matching Draht agent role. Workers are `implementer` (or `debugger` for pure-diagnosis goals); use `spec-reviewer` for acceptance criteria the check cannot establish. One worker per iteration — never parallel workers inside the loop.
14
14
 
15
15
  ## When to Loop vs Orchestrate
16
16
 
@@ -59,17 +59,17 @@ Each iteration dispatches ONE fresh worker whose prompt contains, in full (worke
59
59
  2. The last 3 entries of `PROGRESS.md` and the last 5 `git log --oneline` lines — the recoverable state
60
60
  3. The previous iteration's failure evidence, terse: the failing assertions or error lines, not full output
61
61
  4. Standing orders:
62
- - **Startup ritual** — read the progress log, run the CHECK first, observe the current failure before changing anything
62
+ - **Orient** — read the progress log and current check evidence; rerun if the evidence is missing or its inputs changed
63
63
  - **One increment** — the smallest change that moves the check toward passing; do not batch
64
- - **Commit the increment** even if the check still fails — state must survive context death
64
+ - **Preserve the increment** in the working tree and progress log; commit only when authorized
65
65
  - **Append one `PROGRESS.md` entry** — what changed / check result observed / suggested next step
66
66
  - Never edit or delete tests or the check to make it pass; never claim completion without quoting check output
67
67
 
68
68
  ## Independent Verification — the gate
69
69
 
70
- After EVERY iteration, re-run the CHECK yourself and read exit code and output. Completion is decided by this re-run, never by the worker's report — worker claims are inputs, not verdicts.
70
+ After each iteration, inspect the CHECK’s exit status, output, and input state. Reuse auditable successful evidence when the inputs are unchanged; otherwise run the CHECK. A worker’s unsupported completion claim is insufficient.
71
71
 
72
- - **Check passes** → dispatch `spec-reviewer` once over the full loop diff (contract vs everything changed since the loop started). Only a clean spec review ends the loop as DONE; concerns trigger one more targeted iteration.
72
+ - **Check passes** → compare the full diff with the contract. Use `spec-reviewer` when semantic acceptance criteria remain outside the check. Required findings trigger a targeted iteration within the existing cap.
73
73
  - **Check fails** → extract the terse failure evidence and feed it into the next iteration's prompt as guidance.
74
74
 
75
75
  ## Stall Detection
@@ -77,7 +77,7 @@ After EVERY iteration, re-run the CHECK yourself and read exit code and output.
77
77
  Stop early when the loop is running but not progressing:
78
78
 
79
79
  - Two consecutive iterations with the identical failure signature, or
80
- - An iteration that produced no commit
80
+ - An iteration that produced no relevant change or new diagnostic evidence
81
81
 
82
82
  On stall, do not dispatch the same input again — change something: decompose the goal, add context the workers were missing, switch worker (`implementer` → `debugger`), consult `advisor` for a course correction, or surface to the user with the evidence so far.
83
83
 
@@ -85,16 +85,16 @@ On stall, do not dispatch the same input again — change something: decompose t
85
85
 
86
86
  1. Parse `$ARGUMENTS` into GOAL and flags; derive the CHECK; refuse to loop without one
87
87
  2. Write `.planning/loop/LOOP.md` and `.planning/loop/PROGRESS.md`
88
- 3. Iterate: dispatch worker → re-run CHECK yourself → branch (pass → gate, fail → next iteration, stall / max / BLOCKED → hard stop)
89
- 4. On success: spec-review the full diff, then report — outcome first, check output quoted, iterations used
88
+ 3. Iterate: dispatch worker → validate current CHECK evidence → branch (pass → gate, fail → next iteration, stall / max / BLOCKED → hard stop)
89
+ 4. On success: resolve any required spec review, then report — outcome first, check output quoted, iterations used
90
90
  5. On any hard stop: append a handoff entry to `PROGRESS.md` (state observed, failure evidence, recommended next step) and report with observed / derived / assumed labels
91
91
  6. Leave `.planning/loop/` in place as the loop's record
92
92
 
93
93
  ## Rules
94
94
 
95
- - One worker, one increment, at least one commit per iteration
96
- - Loops are volume work — run workers on the executor tier and keep steering (this context, `advisor`, `spec-reviewer`) on the strongest tier
97
- - The worker never grades its own work — your re-run of the check plus a fresh-context spec review decide completion
95
+ - One worker and one verifiable increment per iteration; commits require authorization
96
+ - Choose available worker models that meet the task’s checks; change tiers only when evidence supports the tradeoff
97
+ - Completion requires current passing check evidence and any required review; an agent’s confidence is not a check
98
98
  - Never raise max iterations mid-loop without asking the user
99
- - Tests and the check are immutable inside the loop; tampering means revert and hard stop
99
+ - Tests and the check are immutable inside the loop; tampering means stop and report the affected changes; do not discard unrelated work
100
100
  - Evidence discipline applies to the loop verdict: label results observed / derived / assumed
@@ -35,7 +35,7 @@ Decompose the work into independently verifiable units before acting; the `atomi
35
35
  | Create atomic commits | `git-committer` |
36
36
  | Strategic steer at a decision point — rare, high-leverage | `advisor` |
37
37
 
38
- `spec-reviewer` and `reviewer` are distinct on purpose. Spec-reviewer ONLY checks "did the diff implement what the spec asked, no more no less". Reviewer evaluates quality (naming, structure, type safety). For any task with a written spec, run spec-reviewer **before** reviewer — accepting "close enough" on spec is a known failure mode.
38
+ `spec-reviewer` and `reviewer` are distinct on purpose. Spec-reviewer ONLY checks "did the diff implement what the spec asked, no more no less". Reviewer evaluates quality (naming, structure, type safety). When both reviews are required, run spec-reviewer before reviewer. Select reviews for the task’s risk and acceptance criteria.
39
39
 
40
40
  ## Effort Scaling
41
41
 
@@ -44,16 +44,16 @@ Match orchestration weight to the task — over-orchestration burns tokens witho
44
44
  | Task shape | Dispatch |
45
45
  |---|---|
46
46
  | Single question or trivial fix | One agent, or handle it directly — no orchestration |
47
- | One change set to evaluate | 2–4 parallel evaluators (reviewer, security-auditor, verifier) |
47
+ | One change set to evaluate | Only the reviewers needed to resolve material risks or acceptance gaps |
48
48
  | Multi-part feature with known decomposition | Fan-out / fan-in |
49
49
  | Goal needing iteration until a measurable criterion holds | `/orchestrate-loop` |
50
50
 
51
51
  ## Model Tiering
52
52
 
53
- Bill volume tokens at the cheaper rate — see the `model-tiering` skill:
53
+ Choose available models from the current provider catalog and measure quality, latency, and cost on the workload — see the `model-tiering` skill:
54
54
 
55
- - **Orchestrator pattern** — run this command on the strongest tier (e.g. GPT-6 Astra) and let workers execute on the executor tier (e.g. GPT-6.1 Sol): planning quality where it matters, volume tokens at worker rates.
56
- - **Advisor pattern** — when the session runs on the executor tier, dispatch `advisor` sparingly: once after orientation before committing to an approach, again when stuck or before declaring a hard task done. ~1–3 consults per task; treat its guidance with serious weight.
55
+ - **Orchestrator pattern** — use a capable model for decomposition and assign bounded worker tasks to models that pass the relevant checks. Keep the same model when a cheaper or faster worker has not demonstrated acceptable results.
56
+ - **Advisor pattern** — consult `advisor` when a concrete unresolved decision benefits from another model. Provide the question and evidence; no fixed consultation count is required.
57
57
 
58
58
  ## Orchestration Modes
59
59
 
@@ -64,10 +64,10 @@ Dispatch several Codex subagent calls in a single assistant turn when the sub-ta
64
64
  Dispatch Codex subagent calls sequentially when later work depends on earlier output. Example: architect produces plan → implementer executes plan → verifier runs tests → reviewer audits the diff.
65
65
 
66
66
  ### Fan-out / Fan-in
67
- Architect decomposes into N independent plans → dispatch N implementers in parallel → collect all outputs → single verifier run → single reviewer audit. This is the standard pattern for `/execute-phase` work.
67
+ Architect decomposes independent work → dispatch implementers in parallel → collect results for verification and review. When both reviews are selected, spec review precedes quality review; `/execute-phase` keeps its explicit per-task sequence.
68
68
 
69
69
  ### Two-Stage Review (spec → quality)
70
- For any task that has a written spec, follow implementer with **spec-reviewer first, then reviewer**:
70
+ When the requested workflow needs separate spec and quality review, use this order:
71
71
 
72
72
  ```
73
73
  implementer → spec-reviewer → reviewer
@@ -82,12 +82,13 @@ When the work cannot land in one dispatch but success is provable by a determini
82
82
 
83
83
  ## Reading Subagent Status
84
84
 
85
- Every draht agent ends its response with one of four status lines. Branch on it:
85
+ Require each dispatched agent to end its response with exactly one of these status lines, then branch on it:
86
86
 
87
87
  - `STATUS: DONE` — check the evidence before proceeding: a `DONE` that quotes no verification output (test counts, command results) is treated as `DONE_WITH_CONCERNS` — re-run the decisive check yourself. Subagent claims are inputs, not verdicts.
88
88
  - `STATUS: DONE_WITH_CONCERNS` — note the concerns. If they're correctness-related, address before moving on; otherwise log and continue.
89
89
  - `STATUS: NEEDS_CONTEXT` — provide the missing information and re-dispatch the same agent. Do NOT skip ahead with a guess.
90
- - `STATUS: BLOCKED` — STOP. Report the blocker to the user. Do not retry the same agent on the same input — adjust the inputs (provide more context, decompose further, pick a different agent) or surface the problem.
90
+ - `STATUS: BLOCKED` from a review agent (`spec-reviewer`, `reviewer`, or `security-auditor`) — send actionable required fixes to the implementer, then repeat the required reviews. Allow at most 3 implementer re-dispatches per task across review stages, or the active workflow's stricter cap. At the cap, stop and report the unresolved findings.
91
+ - `STATUS: BLOCKED` from an implementer or another non-review agent — stop and report the blocker to the user. Do not retry unchanged inputs.
91
92
 
92
93
  ## Steps
93
94
  1. Read the task description and identify sub-tasks
@@ -102,5 +103,5 @@ Every draht agent ends its response with one of four status lines. Branch on it:
102
103
  - Every dispatch is a complete brief: objective, expected output format, tool guidance, and task boundaries — subagents cannot see the main conversation
103
104
  - Do not nest delegations deeply — one level is usually enough
104
105
  - Never retry the same agent on the same input after `BLOCKED` — change something
105
- - For any spec-driven work, spec-reviewer runs before quality reviewer
106
- - The agent that produced work never evaluates it — completion verdicts come from a fresh-context evaluator plus your own re-run of the decisive check
106
+ - If both spec and quality review are required, spec-reviewer runs first
107
+ - Use a fresh reviewer for unresolved semantic risks. Reuse auditable check results for unchanged inputs; rerun when state changed or evidence cannot be verified. Required failed checks block completion.
@@ -22,7 +22,7 @@ Create a handoff document for session continuity.
22
22
  - `## Blockers` — anything waiting on external input or clarification
23
23
  4. **Distill lessons before the context is lost**: for anything this session tried that failed, or an approach that worked against expectations, append one dated bullet to `.planning/STATE.md` under `## Lessons` (create the section before `## Blockers` if missing). Lessons name what to do differently — "runner hits TLS issue in PowerShell, use bash", not "had problems with tests".
24
24
  5. Update `.planning/STATE.md` last activity timestamp via `draht-tools update-state`
25
- 6. Commit: `draht-tools commit-docs "pause work — handoff"`
25
+ 6. If committing is authorized: `draht-tools commit-docs "pause work — handoff"`
26
26
  7. Tell the user: "Resume with `/resume-work` in a fresh session."
27
27
 
28
28
  ## Rules
@@ -10,31 +10,13 @@ Create atomic execution plans for a roadmap phase, using subagents for parallel
10
10
 
11
11
  Phase: $1
12
12
 
13
- ## Red Flags — STOP
13
+ > Invoke noninteractive Draht tooling as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>`.
14
14
 
15
- A plan is only as good as the tasks inside it. STOP and revise instead of saving if **any** of these is true:
15
+ ## Planning constraints
16
16
 
17
- - Any task contains placeholder text: `[TBD]`, `[files]`, `[description]`, "appropriate error handling", "similar to Task N", or `...` in code positions
18
- - A task's `<test>` section names no concrete test cases (e.g., "test the function" with no inputs/outputs)
19
- - A task's `<files>` section lists no concrete file paths
20
- - A task takes more than ~5 minutes of focused work — break it down further
21
- - The plan introduces new domain terms that are NOT in `.planning/DOMAIN.md` — update DOMAIN.md first
22
- - A plan touches more than one bounded context without explicit ACL — split per context
23
- - The first plan is scaffolding/boilerplate while an unproven risk (new integration, unfamiliar API, untested pattern) sits in a later plan — reorder so the risk is proven first
17
+ Use coherent tasks with concrete files, behavior, and verification. Group dependent changes that need to land together; split unrelated outcomes. Task size follows the behavior and dependency structure, not a time limit or fixed count. Resolve uncertainty that could invalidate later work early, and state material assumptions and how to check them.
24
18
 
25
- Run `draht-tools validate-plans $1` after saving. If it reports issues, fix them before commit.
26
-
27
- > **Tool note**: Invoke `draht-tools <subcommand>` as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>`. For subagents, spawn a Codex subagent using the `architect` agent prompt. Dispatch multiple parallel tasks in a single assistant turn by making multiple Codex subagent calls at once.
28
-
29
- ## Atomic Reasoning
30
-
31
- Decompose the work into independently verifiable units before acting; the `atomic-reasoning` skill holds the full discipline — load it when the decomposition is not obvious.
32
-
33
- **Atomicity test:** a task is atomic only if its `<verify>` can fail while every other task passes. If two tasks can only be checked together, they are one task.
34
-
35
- - **Order risk-first**: score each truth by uncertainty (has this codebase done it before?) × blast radius (how much becomes invalid if it's wrong?). The plan proving the highest-scoring truth executes first; boilerplate goes last. Boilerplate never invalidates a phase — the risky part regularly does.
36
-
37
- - Write every assumption a plan rests on as an explicit `Assumes:` line (with how to confirm it) in the plan header. Unwritten assumptions become the executor's bugs.
19
+ The `atomic-reasoning` skill can help with difficult decomposition. Respect existing domain vocabulary and architecture; do not require new DDD layers or events solely because a plan crosses directories. Validate the saved plan with `draht-tools validate-plans $1` and resolve its errors before execution.
38
20
 
39
21
  ## Steps
40
22
  1. Run `draht-tools load-phase-context $1` to gather all context
@@ -42,13 +24,13 @@ Decompose the work into independently verifiable units before acting; the `atomi
42
24
  2. Optional: `draht-tools research-phase $1` for domain research
43
25
  3. Goal-backward planning:
44
26
  a. State the goal (outcome, not activity)
45
- b. Derive observable truths (3-7 from user perspective)
27
+ b. Derive the observable outcomes required by the user
46
28
  c. From each observable truth, derive the test scenarios that would prove it (specific inputs → expected outputs or state changes)
47
29
  d. Map to required artifacts (files, endpoints, schemas)
48
- - GRAPH-ORIENT: read `.planning/codebase/MAP.json` (regenerate with `draht-tools map-graph` if absent), then run `draht-tools graph-context <target-files>` for pkg/layer/importers and `draht-tools graph-query <term...>` to locate the code instead of grepping.
49
- e. Break into plan groups of 2-5 tasks each
30
+ - GRAPH-ORIENT: read `.planning/codebase/GRAPH_REPORT.md` (regenerate with `draht-tools map-graph` if absent), then run `draht-tools graph-context <target-files>` for pkg/layer/importers and `draht-tools graph-query <term...>` to locate the code. Load relevant results rather than the full MAP.json.
31
+ e. Group tasks according to dependencies and coherent outcomes
50
32
  4. Identify which plans are independent (no shared files, no dependency edges)
51
- - GRAPH-IMPACT: run `draht-tools graph-impact <plan-files>` per plan; plans with disjoint impact sets (reverse-dependents, entry points, sinks) are safe to parallelize — overlapping blast radius means a dependency edge.
33
+ - GRAPH-IMPACT: run `draht-tools graph-impact <plan-files>` per plan; use affected entry points and dependencies to assess shared risks; serialize conflicting changes. Disjoint file sets alone do not prove independence.
52
34
 
53
35
  5. **Delegate plan creation to subagents via Codex subagents:**
54
36
  - For **independent plans**: dispatch multiple `spawn_agent` calls in parallel (single assistant turn), each using the `architect` agent prompt, one per plan.
@@ -87,7 +69,7 @@ Decompose the work into independently verifiable units before acting; the `atomi
87
69
  The content must contain real task details (files, actions, tests) — NOT placeholder brackets. If `create-plan` is called without stdin, it writes a useless template.
88
70
 
89
71
  8. Validate: `draht-tools validate-plans $1` — if it exits non-zero, fix the offending plan before commit.
90
- 9. Commit: `draht-tools commit-docs "create phase $1 plans"`
72
+ 9. If committing is authorized: `draht-tools commit-docs "create phase $1 plans"`
91
73
  10. Show the user the execution order as a Mermaid `flowchart TD` per the `explainers` skill: one `subgraph` per wave, one node per plan, edges for the dependencies the saved plans declare. Draw it from the saved plan files, not from memory. It goes in your reply, not into the plan files.
92
74
 
93
75
  ## Plan Format
@@ -95,8 +77,8 @@ Plans use XML task format:
95
77
  ```xml
96
78
  <task type="auto">
97
79
  <n>Task name</n>
98
- <context>Bounded context this task belongs to</context>
99
- <domain>Aggregates, entities, value objects, or events touched</domain>
80
+ <context>Relevant project context or module boundary</context>
81
+ <domain>Existing domain concepts affected, if applicable</domain>
100
82
  <files>affected files</files>
101
83
  <test>
102
84
  RED phase: Write failing tests FIRST.
@@ -113,9 +95,7 @@ Plans use XML task format:
113
95
  </action>
114
96
  <refactor>
115
97
  REFACTOR phase: Improve structure while keeping tests green.
116
- - Extract value objects, push logic into domain layer
117
- - Ensure naming matches ubiquitous language
118
- - Remove duplication across bounded contexts (or make shared kernel explicit)
98
+ - Apply useful structural improvements within scope; preserve behavior
119
99
  </refactor>
120
100
  <verify>How to verify (tests pass + manual check if needed)</verify>
121
101
  <done>What "done" looks like — expressed as passing test assertions</done>
@@ -131,10 +111,8 @@ This is one step in the per-phase cycle:
131
111
  /discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N
132
112
  ```
133
113
 
134
- After completing this command, tell the user to start a fresh session (`/clear`) and run `/execute-phase $1`. Do NOT suggest `/next-milestone`.
114
+ After completing this command, identify `/execute-phase $1` as the next step; a fresh session is optional. Do NOT suggest `/next-milestone`.
115
+
116
+ ## Domain context
135
117
 
136
- ## Domain Rules for Plans
137
- - File/module structure should mirror bounded contexts (e.g., `src/billing/`, `src/catalog/`)
138
- - Never scatter one aggregate's logic across multiple contexts without an explicit ACL
139
- - If a plan introduces a new domain term, update `.planning/DOMAIN.md` first
140
- - Cross-context communication should use domain events, not direct imports
118
+ Use established project terms and boundaries. Update an existing domain document when the plan changes the model; do not introduce DDD ceremony for unrelated work.
package/commands/quick.md CHANGED
@@ -1,91 +1,22 @@
1
1
  ---
2
- description: Execute a small ad-hoc task with tracking (implementer subagent + TDD cycle + optional spec-reviewer pass)
2
+ description: Complete an ad-hoc task directly with relevant verification and optional specialist help
3
3
  argument-hint: "<description>"
4
4
  allowed-tools: Bash, Read, Write, Edit, Task
5
5
  ---
6
6
 
7
7
  # /quick
8
8
 
9
- Execute a small ad-hoc task with tracking.
10
-
11
9
  Task: $ARGUMENTS
12
10
 
13
- > **Tool note**: Invoke `draht-tools <subcommand>` as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>`. For subagents, spawn Codex subagents using the `implementer`, `spec-reviewer`, or `reviewer` agent prompts.
14
-
15
- ## "Small" Is a Claim, Not a Fact
16
-
17
- Before planning, verify the task is actually quick: grep the blast radius (callers, imports, tests touching the target). If the change reaches further than the description implies, say so and recommend `/plan-phase`-level treatment instead of forcing it through. And if the description names a solution ("add a flag"), confirm the problem it solves — a smaller fix may exist. A "quick task" that silently grows is how untracked complexity enters a codebase.
18
-
19
- ## Atomic Reasoning
20
-
21
- Decompose the work into independently verifiable units before acting; the `atomic-reasoning` skill holds the full discipline — load it when the decomposition is not obvious.
22
-
23
- ## Steps
24
- 1. Run `draht-tools next-quick-number` to get task number
25
- 2. Analyze the task and write a concrete plan with actual task details (files, actions, verification). Pipe it into `draht-tools create-quick-plan`:
26
- ```bash
27
- echo 'plan content here' | node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" create-quick-plan NNN "$ARGUMENTS"
28
- ```
29
- The plan content must include: a `# Quick Task NNN: title` heading, a `## Tasks` section with one or more `<task>` XML blocks containing real file paths, real actions, and real verification steps — NOT placeholders like `[files]`.
30
-
31
- 3. **Stage 1 — Implementer.** _Optional scoping (multi-file tasks):_ run `draht-tools graph-context <files>` and paste the pkg/layer/importers summary into the Codex subagent prompt. Then dispatch a Codex subagent using the `implementer` agent prompt:
32
- ```
33
- Execute this task: $ARGUMENTS
34
-
35
- Follow the TDD cycle:
36
- - RED — Write a failing test that describes the desired behaviour
37
- - GREEN — Write the minimum implementation to make it pass
38
- - REFACTOR — Clean up while keeping the test green
39
-
40
- Exception: skip the TDD cycle only for pure config or documentation-only tasks that have no testable behaviour.
41
-
42
- Comment discipline: comments exist ONLY for constraints the code cannot express — a protocol quirk, a deliberate deviation, a non-obvious invariant. If code needs comments to be understood, rewrite the code until it doesn't. Never narrate steps, restate the diff, or leave "removed X" / "this handles Y" breadcrumbs. Comment density above the surrounding file's norm is a defect — fix it before committing. A heavily-commented solution signals the design is wrong: redesign, don't annotate.
43
-
44
- After completion, report: files changed, tests written, and verification results.
45
-
46
- End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED` per the agent contract.
47
- ```
48
-
49
- Read the final `STATUS:` line:
50
- - `DONE` → go to Stage 2 (or skip Stage 2 for pure-config / pure-docs tasks).
51
- - `DONE_WITH_CONCERNS` → log concerns; correctness issues → re-dispatch; otherwise continue.
52
- - `NEEDS_CONTEXT` → provide missing info and re-dispatch.
53
- - `BLOCKED` → STOP, report to user.
54
-
55
- 4. **Stage 2 — Spec-reviewer (skip for pure-config / pure-docs).** Dispatch a Codex subagent using the `spec-reviewer` agent prompt and prompt:
56
- ```
57
- Review the diff for this quick task against the plan written in `.planning/quick/NNN-*-PLAN.md`. ONLY check spec compliance — does the diff implement exactly what the plan's <test>/<action>/<done> sections asked, no more, no less?
58
-
59
- Plan path: <plan file>
60
- Diff: <run `git diff` on the commits since plan creation, or instruct the agent to>
61
-
62
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
63
- ```
64
-
65
- - `DONE` → go to Stage 3.
66
- - `BLOCKED` → re-dispatch implementer with the "Required Fixes" list. Repeat Stage 1+2 until `DONE`. **Hard cap: 3 implementer re-dispatches total (across Stage 2 and Stage 3).** At the cap, STOP and report the disagreement to the user.
67
-
68
- 5. **Stage 3 — Reviewer (optional code-quality pass).** For non-trivial quick tasks (touches more than one file or modifies domain code), _optionally_ run `draht-tools graph-impact <changed files>` and paste its reverse-dependents + boundary warnings into the Codex subagent prompt. Then dispatch a Codex subagent using the `reviewer` agent prompt:
69
- ```
70
- Code-quality review of the diff for quick task NNN. Spec compliance already confirmed — focus on correctness, type safety, conventions, domain language. Report Must fix / Should fix / Consider.
71
-
72
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
73
- ```
74
-
75
- - `DONE` → quick task complete.
76
- - `BLOCKED` → re-dispatch implementer with the Must-fix list — subject to the same **hard cap of 3 re-dispatches**; at the cap, STOP and report.
11
+ Complete the requested task directly, using an approach proportionate to its scope. Follow repository and user instructions. Ordinary work needs no numbered plan, XML, `.planning/` state, phase command, or session reset.
77
12
 
78
- 6. Write summary: `draht-tools write-quick-summary NNN`
79
- 7. Update state: `draht-tools update-state`
13
+ 1. Inspect the relevant code, callers, and tests; identify the observable result the user needs.
14
+ 2. Make the smallest complete change and preserve unrelated behavior. For behavior changes, add or update focused tests. Reproduce a bug before fixing it and demonstrate that the regression test detects it; skip tests for pure documentation or configuration changes with no testable behavior.
15
+ 3. Run the relevant project checks and any tests you created or changed, following repository command restrictions. A failed command, timeout, or unavailable required check is not a pass; do not weaken checks to obtain one.
16
+ 4. Report the result, changed files, and observed verification with decisive output. State what remains unverified. Do not commit unless requested.
80
17
 
81
- ## When to skip Stage 3
18
+ ## Optional delegation
82
19
 
83
- Stage 3 (quality review) is optional for `/quick` since these are by definition small tasks. Run it when:
84
- - The diff touches more than one file
85
- - The diff modifies code in `.planning/DOMAIN.md`'s bounded contexts
86
- - The task is non-trivial behaviour, not pure mechanical change
20
+ Delegate when independent investigation, implementation, or fresh review materially helps. Give each agent the task, relevant context, scope, and expected evidence. Use the `implementer` agent for changes, the `spec-reviewer` agent for an explicit spec, and the `reviewer` agent for code quality; when both reviews are needed, check spec compliance first.
87
21
 
88
- Skip it when:
89
- - Pure config (tsconfig, biome, formatter changes)
90
- - Docs-only edits
91
- - Single-line, obvious changes (typo fix, version bump)
22
+ Require delegated reports to end with one `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Check evidence before accepting `DONE`; resolve correctness concerns before completion. Supply missing context for `NEEDS_CONTEXT`. An implementer blocker stops the task; a review blocker returns its required fixes for implementation and re-review. Allow at most **3 implementer re-dispatches total across review stages**, then report unresolved findings. Never claim completion while required checks or review findings remain unresolved.
@@ -20,11 +20,7 @@ Context: $ARGUMENTS
20
20
  - `git status` reports unmerged paths — a merge, rebase, or cherry-pick is mid-flight.
21
21
  - A draht subagent run reported a failed worktree merge-back: the agent's work sits on an unmerged `agent/<taskId>` branch. Run `git merge agent/<taskId>` first to enter the conflict, then continue here.
22
22
 
23
- ## The Iron Law
24
-
25
- > **EVERY HUNK RESOLUTION MUST BE JUSTIFIED BY THE RECOVERED INTENT OF BOTH SIDES. NO INTENT, NO RESOLUTION.**
26
-
27
- A conflict is two changes with a reason each. Until you can state both reasons, you are not resolving — you are guessing.
23
+ Resolve conflicts from both sides' intended behavior and the operation's goal. Preserve compatible changes; clarify an unresolved semantic conflict instead of choosing a side blindly.
28
24
 
29
25
  ## Phase 1 — Map the Conflict
30
26
 
@@ -54,19 +50,10 @@ Exit criterion: a one-sentence intent statement per side, per conflicted area. I
54
50
 
55
51
  ## Phase 4 — Run the Project's Checks
56
52
 
57
- Discover the project's own gates — package scripts, Makefile, CI config — and run them in order: typecheck, then tests, then lint/format. Fix what the merge broke, under the same rule: no invented behaviour.
53
+ Discover the project's own gates — package scripts, Makefile, CI config — and run the required checks for the merged state, respecting repository command restrictions. Fix what the merge broke, under the same rule: no invented behaviour.
58
54
 
59
55
  ## Phase 5 — Finish the Operation
60
56
 
61
57
  - Merge: stage the resolved files and commit. The merge commit message names each recorded trade-off — which intent won where, and why.
62
58
  - Rebase or cherry-pick: `git rebase --continue` / `git cherry-pick --continue` until every commit is replayed.
63
59
  - Never `--no-verify`.
64
-
65
- ## Red Flags — STOP
66
-
67
- Stop immediately if you catch yourself:
68
- - Resolving a hunk whose "why" you cannot state for both sides
69
- - Taking one side wholesale because it is newer, bigger, or yours
70
- - Introducing behaviour that exists on neither side
71
- - Finishing with failing checks, or reaching for `--no-verify`
72
- - Running `--abort` without explicit user sign-off
@@ -61,11 +61,11 @@ Bounded pass — report on each step:
61
61
  2. Check whether the visible symptom belongs to that code path or to a dependency below it.
62
62
  3. If the report looks like a regression: `git log --oneline -20` and recent diffs on the affected files — name candidate commits.
63
63
  4. Check whether a merged commit or open PR already addresses the same symptom.
64
- 5. Separate confirmed facts from hypotheses — label every statement observed, derived, or assumed.
64
+ 5. Separate confirmed facts from hypotheses — label the confidence of material findings as observed, derived, or assumed.
65
65
 
66
- Stop at diagnosis strength sufficient for routing — a complete root cause is /fix's job, not yours. Do not build a reproduction unless one command is already obvious from the report itself.
66
+ Stop at diagnosis strength sufficient for routing — a complete root cause is /fix's job, not yours. Do not build a reproduction unless one command is already obvious from the report itself; labeled hypotheses without a reproduction are a complete answer for this pass.
67
67
 
68
- End with STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
68
+ End with STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED. DONE means the routing-strength diagnosis is done — no fix is expected.
69
69
  ```
70
70
 
71
71
  The pass does not need a complete root cause — it must be strong enough to avoid routing a visible symptom to the wrong component. A keyword match between the report and a module name is not a trace; a visible symptom alone is not enough when cause tracing points to a dependency below it. When the report smells like a regression and design intent matters ("was this behaviour a decision or an accident?"), a bounded `/why` consult can supplement the trace — not a full archaeology run.
@@ -148,14 +148,3 @@ End the report with exactly one marker line, the last line of the response:
148
148
  ```
149
149
 
150
150
  `bug` and `performance` carry `tracker=` only when this run matched or created a live issue. Everything else — feature request, question, feedback, reroute, unclear — closes with `[triage:other]`. Never emit two markers; never bury the marker mid-report. A follow-up `/fix` run takes the marker plus its tracker link as the issue input.
151
-
152
- ## Rationalization Table
153
-
154
- | Excuse | Reality |
155
- |---|---|
156
- | "The report names the component, route it there" | A keyword match is not a trace. Route on a confirmed code path or signature, or say the owner is unclear. |
157
- | "Probably a duplicate of #123" | Probably means possibly related: link it as uncertain and create nothing. |
158
- | "Filing a ticket is harmless" | A guessed or duplicate ticket costs a maintainer two triages. Prefer no ticket. |
159
- | "The old closed issue matches, done" | A long-closed issue is a regression lead — trace what re-broke it. |
160
- | "No repo access, but the cause is obvious" | Reading a report yields hypotheses. Classify conservatively and say the trace was unavailable. |
161
- | "I'll fix it while I'm here" | Triage ends at the verdict. Hand `[triage:bug]` to `/fix`. |
@@ -6,112 +6,23 @@ allowed-tools: Bash, Read, Write, Edit, Task
6
6
 
7
7
  # /verify-work
8
8
 
9
- Walk through acceptance testing of completed phase work, using subagents for parallel verification — including a spec-compliance pass against the phase's plan files.
9
+ Verify the selected GSD phase against its acceptance criteria.
10
10
 
11
11
  Phase: $1
12
12
 
13
- > **Tool note**: Invoke `draht-tools <subcommand>` as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>`. For subagents, spawn Codex subagents and dispatch multiple in parallel (single assistant turn = multiple Codex subagent calls).
14
-
15
- ## Atomic Reasoning
16
-
17
- Decompose the work into independently verifiable units before acting; the `atomic-reasoning` skill holds the full discipline — load it when the decomposition is not obvious.
18
-
19
- ## Steps
20
- 0. **Refresh the living map (guarded).** If `.planning/codebase/MAP.json` is older than HEAD, run `draht-tools map-graph --quiet` (skip if the post-phase hook already refreshed). This keeps the graph boundary check below accurate.
21
- 1. Run `draht-tools extract-deliverables $1` to get testable items
22
- 2. Discover the phase's plan files (`.planning/phases/<N>-*/<N>-NN-PLAN.md`). Each plan is the spec a spec-reviewer evaluates the diff against.
23
-
24
- 3. **Run parallel verification via Codex subagents.** Dispatch four subagents in parallel (single assistant turn, four Codex subagent calls):
25
-
26
- - **Codex subagent** with ``verifier` agent prompt` and prompt:
27
- ```
28
- Run the full test suite for this project. Check package.json for the test command. Record pass/fail counts. Then run any available lint and typecheck commands (e.g. npm run check, npm run lint, npx tsc --noEmit). Report all results with error details.
29
-
30
- If a project verification skill exists (a `verify-<app>` skill under `.draht/skills/`, generated by /create-verification-skill), drive the app with it: launch, run its Doctor check, drive ONE mapped feature from its feature map the way a user would, capture the evidence artifacts it names, and clean up per its Cleanup section — cleanup never removes the evidence. Report which feature you drove and where the evidence lives; this is observed evidence of user-visible behaviour. If no such skill exists, say so: test output is then the ceiling of the evidence.
31
-
32
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
33
- ```
34
-
35
- - **Codex subagent** with ``security-auditor` agent prompt` and prompt:
36
- ```
37
- Audit the recent code changes (use git log and git diff to find them, limited to this phase's commit range). Check for injection risks, auth bypasses, secrets in code, unsafe patterns. Report findings by severity.
38
-
39
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
40
- ```
41
-
42
- Before dispatching, the orchestrator runs `draht-tools graph-impact <changed-files>` and pastes the crossed-context / boundary-violation summary below as evidence for the DOMAIN.md boundary check.
43
-
44
- - **Codex subagent** with ``reviewer` agent prompt` and prompt:
45
- ```
46
- Review the recent code changes for this phase (use git log and git diff to find them). Check domain language compliance against `.planning/DOMAIN.md` if it exists — scan for identifiers not in the glossary and cross-context boundary violations. Use the pasted graph-impact summary (crossed bounded contexts, boundary violations) as evidence for that boundary check. Report findings as Must fix / Should fix / Consider.
47
-
48
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
49
- ```
50
-
51
- - **Codex subagent** with ``spec-reviewer` agent prompt` and prompt:
52
- ```
53
- Phase-level spec compliance check for phase $1. The phase has these plan files (each is a spec):
54
- <list of .planning/phases/<N>-*/<N>-NN-PLAN.md paths>
55
-
56
- For each plan, evaluate whether the phase's commits implement exactly what the plan's <task> elements asked — no missing tasks, no over-builds beyond what the spec called for. Use `git log --oneline <phase commit range>` and `git diff` to gather the implementation.
57
-
58
- Output a per-plan compliance verdict (✅ COMPLIANT / ❌ NON-COMPLIANT) with omissions and over-builds listed for each.
59
-
60
- End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
61
- ```
62
-
63
- 4. Run the quality gate check:
64
- ```bash
65
- node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/scripts/gsd-quality-gate.cjs"
66
- ```
67
-
68
- 5. **Spot-check before aggregating.** Subagent claims are inputs, not verdicts. Before accepting the verifier's `DONE`, re-run the test suite headline yourself and read the counts. Before accepting the spec-reviewer's compliance verdict, read one plan's diff yourself. A pass you only heard about is an "assumed pass" — and an assumed pass is not a pass. This costs two commands and catches the most expensive failure mode this command has: trust laundered into evidence.
69
-
70
- 6. **Read each subagent's `STATUS:` line and the quality gate exit code.** Treat the phase as failed if **any** of these is true:
71
- - `verifier` returns `STATUS: BLOCKED` (tests / lint / typecheck failed)
72
- - `security-auditor` returns `STATUS: BLOCKED` (Critical or High findings)
73
- - `spec-reviewer` returns `STATUS: BLOCKED` (any plan is non-compliant)
74
- - `reviewer` returns `STATUS: BLOCKED` (Must-fix correctness issues)
75
- - Quality gate exits non-zero
76
-
77
- 7. Walk the user through each deliverable one at a time, incorporating findings from all four subagents.
78
-
79
- 8. Record results (pass/fail/partially/skip). Label each: **observed** (you or a subagent ran it and quoted output), **derived** (follows necessarily from something observed), or **assumed** (unchecked). Verdicts inherit the weakest label they rest on.
80
-
81
- 9. For failures: diagnose and create fix plans via `draht-tools create-fix-plan $1 P`
82
- - Fix plans MUST include a reproducing test that demonstrates the failure before any implementation — held to the /fix Phase 1 red-capable standard: one named command, already run once, invocation and output shown, asserting the exact failing symptom (red now, green once fixed)
83
- - Spec-reviewer omissions become explicit fix-plan tasks (one task per omission)
84
-
85
- 10. Write UAT report: `draht-tools write-uat $1`
86
- - Order: **verdict first** (phase pass/fail, X/Y deliverables, in the first line), **evidence second** (test health summary with pass/fail/coverage, security audit results, spec compliance summary per plan, domain model status, deliverable results with labels), **risk last** (what was NOT tested and how it could bite). Never bury a failure under passes.
87
- - Report prose follows the `unslop` skill — plain words, active voice, no filler; quoted command output and the verdict-first ordering stay untouched.
88
- - When the user asks, also write an HTML explainer of the UAT report per the `explainers` skill, with the deliverable results and their observed/derived/assumed labels as its data block. The UAT report stays the source of truth.
89
-
90
- 11. If all passed: mark phase complete.
91
- - If more phases remain in the milestone: tell the user to start a fresh session and run `/discuss-phase N+1`.
92
- - If ALL phases in the milestone are complete: tell the user to start a fresh session and run `/next-milestone`.
93
-
94
- 12. If failures: route to `/execute-phase $1 --gaps-only`
95
-
96
- ## Why a phase-level spec-reviewer
97
-
98
- `/execute-phase` already runs spec-reviewer **per task** before the next task starts. The phase-level pass here catches things the per-task loop can miss:
99
-
100
- - A whole plan was skipped (no implementer ever ran on it)
101
- - A task's commit was reverted or rebased away
102
- - An out-of-scope drift that accumulated across multiple tasks
103
-
104
- Cheap insurance — the diff already exists and the plans already exist; the agent just maps one to the other.
105
-
106
- ## Workflow
107
- This is the last step in the per-phase cycle:
108
-
109
- ```
110
- /discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N
111
- ```
112
-
113
- After verify-work passes:
114
- - More phases remaining → `/discuss-phase N+1`
115
- - ALL phases in milestone verified → `/next-milestone`
116
-
117
- `/next-milestone` is ONLY for generating new phases after every phase in the current milestone is complete.
13
+ Invoke Draht tooling as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>`. Run `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/scripts/gsd-quality-gate.cjs" --checks-only` for the plugin's deterministic gate and honor its exit status.
14
+
15
+ 1. Run `draht-tools extract-deliverables $1` and read the phase's plans. Identify the exact commit range and any uncommitted work being verified; retain the baseline and relevant configuration.
16
+ 2. Collect verification evidence and focused reviews. Parallelize independent roles where useful:
17
+ - Dispatch `verifier` with the deliverables, changed scope, required commands, and any existing check records. It must inspect actual command outcomes and run missing, stale, or insufficient checks. Use a relevant project `verify-<app>` skill for user-visible behavior when available; preserve its artifacts and cleanup rules. Without such a skill, other direct behavior checks remain possible.
18
+ - Dispatch `security-auditor` with the phase diff and relevant deployment/threat context. Request confirmed findings and actionable suspected risks with severity and evidence.
19
+ - Dispatch `reviewer` with the phase diff and established project conventions. Existing domain documentation and graph impact can inform the review; an unknown glossary word or cross-directory import alone is not a defect.
20
+ - Dispatch `spec-reviewer` with the plan paths, phase diff, and acceptance criteria. Request per-plan compliance, omissions, and over-builds, including work lost or reverted since task reviews.
21
+
22
+ Require every role to finish with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Supply missing available context; stop a blocked required review rather than treating it as a pass. At most 3 re-dispatches for missing context or correction; preserve the execution workflow's combined repair cap.
23
+ 3. Inspect the evidence and load-bearing review findings. Reuse a check only when its source, tests, configuration, dependencies, and execution environment are unchanged and its scope covers the claim. A status line alone is not evidence. Rerun missing, stale, or unverifiable checks; do not repeat a suite merely because an agent ran it.
24
+ 4. Honor the project's required deterministic quality checks. A failed process, signal, timeout, required unavailable check, non-compliant plan, Must-fix review issue, or confirmed Critical/High security issue prevents a passing phase verdict. Review remaining concerns explicitly.
25
+ 5. Record each deliverable as pass/fail/partial/skip with evidence. Preserve the labels **observed** (executed behavior with output), **derived** (conclusion supported by observations), and **assumed** (unchecked). Ask for human verification only where automation and available evidence cannot resolve the acceptance criterion.
26
+ 6. For failures, use `draht-tools create-fix-plan $1 P`. Include a reproduction with observed output where feasible, or the exact missing evidence/access needed to construct one. Group corrections by coherent behavior; no implementation starts on an invented diagnosis.
27
+ 7. Write the UAT report with `draht-tools write-uat $1`: **verdict first**, **evidence second**, **risk last**. Include deliverable outcomes, commands/checked state, review findings, and material gaps. Follow `unslop` for prose and `explainers` when a diagram or requested HTML report helps.
28
+ 8. Mark the phase complete only when acceptance and required checks pass. Otherwise route to `/execute-phase $1 --gaps-only`. More phases lead to `/discuss-phase N+1`; `/next-milestone` is only for when all phases are verified. A fresh session is optional.