draht-codex 2026.7.30 → 2026.9.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.
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +74 -0
- package/README.md +56 -6
- package/agents/debugger.md +12 -1
- package/agents/git-committer.md +1 -0
- package/agents/implementer.md +11 -2
- package/agents/investigator.md +75 -0
- package/agents/reviewer.md +7 -0
- package/agents/speaker.md +44 -0
- package/agents/verifier.md +4 -3
- package/bin/draht-tools.cjs +472 -41
- package/bin/judge +613 -0
- package/cli.mjs +769 -46
- package/commands/atomic-commit.md +1 -12
- package/commands/create-verification-skill.md +105 -0
- package/commands/discuss-phase.md +3 -14
- package/commands/execute-phase.md +7 -14
- package/commands/fix.md +38 -17
- package/commands/grill.md +66 -0
- package/commands/init-project.md +5 -15
- package/commands/map-codebase.md +1 -13
- package/commands/new-project.md +5 -15
- package/commands/next-milestone.md +2 -13
- package/commands/orchestrate.md +1 -1
- package/commands/pause-work.md +1 -8
- package/commands/plan-phase.md +2 -11
- package/commands/progress.md +0 -8
- package/commands/quick.md +3 -11
- package/commands/resolve-conflicts.md +72 -0
- package/commands/resume-work.md +0 -8
- package/commands/review.md +4 -13
- package/commands/speak.md +45 -0
- package/commands/triage.md +161 -0
- package/commands/verify-work.md +5 -13
- package/commands/why.md +137 -0
- package/graph-archive.mjs +125 -0
- package/graph-manifest.mjs +97 -0
- package/hooks/hooks.json +39 -0
- package/package.json +5 -3
- package/scripts/gsd-quality-gate.cjs +3 -3
- package/scripts/judge-hook.cjs +42 -0
- package/scripts/judge-hook.py +391 -0
- package/scripts/judgegates.py +673 -0
- package/scripts/judgelib.py +382 -0
- package/scripts/speak.cjs +202 -0
- package/skills/atomic-commit/SKILL.md +1 -1
- package/skills/atomic-commit/command.md +62 -0
- package/skills/blast-radius/SKILL.md +55 -0
- package/skills/brainstorming/SKILL.md +11 -4
- package/skills/cinematic-continuation/SKILL.md +111 -0
- package/skills/cinematic-continuation/references/continuity-schema.md +75 -0
- package/skills/cinematic-continuation/references/seedance-adapter.md +44 -0
- package/skills/cinematic-continuation/references/style-bible.md +223 -0
- package/skills/cinematic-continuation/scripts/compile-continuation.mjs +173 -0
- package/skills/cinematic-continuation/templates/continuation-spec.json +50 -0
- package/skills/create-verification-skill/SKILL.md +14 -0
- package/skills/create-verification-skill/command.md +105 -0
- package/skills/debugging-workflow/SKILL.md +38 -10
- package/skills/discuss-phase/SKILL.md +1 -1
- package/skills/discuss-phase/command.md +44 -0
- package/skills/draht/SKILL.md +118 -0
- package/skills/epistemics/SKILL.md +99 -0
- package/skills/execute-phase/SKILL.md +1 -1
- package/skills/execute-phase/command.md +170 -0
- package/skills/fix/SKILL.md +1 -1
- package/skills/fix/command.md +154 -0
- package/skills/grill/SKILL.md +14 -0
- package/skills/grill/command.md +66 -0
- package/skills/gsd-workflow/SKILL.md +2 -0
- package/skills/init-project/SKILL.md +1 -1
- package/skills/init-project/command.md +57 -0
- package/skills/judge/SKILL.md +57 -0
- package/skills/map-codebase/SKILL.md +1 -1
- package/skills/map-codebase/command.md +61 -0
- package/skills/new-project/SKILL.md +1 -1
- package/skills/new-project/command.md +64 -0
- package/skills/next-milestone/SKILL.md +1 -1
- package/skills/next-milestone/command.md +42 -0
- package/skills/orchestrate/SKILL.md +1 -1
- package/skills/orchestrate/command.md +106 -0
- package/skills/orchestrate-loop/SKILL.md +1 -1
- package/skills/orchestrate-loop/command.md +100 -0
- package/skills/pause-work/SKILL.md +1 -1
- package/skills/pause-work/command.md +32 -0
- package/skills/plan-phase/SKILL.md +1 -1
- package/skills/plan-phase/command.md +139 -0
- package/skills/progress/SKILL.md +1 -1
- package/skills/progress/command.md +22 -0
- package/skills/quick/SKILL.md +1 -1
- package/skills/quick/command.md +91 -0
- package/skills/resolve-conflicts/SKILL.md +14 -0
- package/skills/resolve-conflicts/command.md +72 -0
- package/skills/resume-work/SKILL.md +1 -1
- package/skills/resume-work/command.md +27 -0
- package/skills/review/SKILL.md +1 -1
- package/skills/review/command.md +81 -0
- package/skills/saga-spawner/SKILL.md +131 -0
- package/skills/speak/SKILL.md +14 -0
- package/skills/speak/command.md +45 -0
- package/skills/tdd-workflow/SKILL.md +2 -0
- package/skills/triage/SKILL.md +14 -0
- package/skills/triage/command.md +161 -0
- package/skills/typescript-discipline/SKILL.md +50 -0
- package/skills/typescript-discipline/references/patterns.md +294 -0
- package/skills/unslop/SKILL.md +101 -0
- package/skills/verify-work/SKILL.md +1 -1
- package/skills/verify-work/command.md +116 -0
- package/skills/why/SKILL.md +14 -0
- package/skills/why/command.md +137 -0
|
@@ -21,18 +21,7 @@ If any of these triggers, surface the issue to the user and split the change set
|
|
|
21
21
|
|
|
22
22
|
## Atomic Reasoning
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**For each file change:**
|
|
27
|
-
1. **State the logical component** — What does this change do? What is its purpose? Does it complete a thought?
|
|
28
|
-
2. **Validate independence** — Can this change be applied independently? Does it depend on other changes? Does it break the build alone?
|
|
29
|
-
3. **Verify correctness** — Is this change logically complete? Does it mix concerns? Should it be split further?
|
|
30
|
-
|
|
31
|
-
**Synthesize commit strategy:**
|
|
32
|
-
- Group changes by logical concern (one commit = one idea)
|
|
33
|
-
- Order commits so each builds successfully
|
|
34
|
-
- Write clear commit messages that explain WHY, not just WHAT
|
|
35
|
-
- Ensure each commit is self-contained and reviewable
|
|
24
|
+
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.
|
|
36
25
|
|
|
37
26
|
## Gathering Current State
|
|
38
27
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a committed project-local verify-<app> skill that drives the real app the way a user does and captures proof artifacts — proven end to end once before handover
|
|
3
|
+
argument-hint: "[app or surface]"
|
|
4
|
+
allowed-tools: Bash, Read, Write, Edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /create-verification-skill
|
|
8
|
+
|
|
9
|
+
Every serious project needs a scripted way to drive the real app and prove behaviour: launch it, exercise a feature the way a user would, and capture evidence. This command generates that as a committed project-local skill — `.draht/skills/verify-<app>/` — tailored to the repo, so verification is a versioned repo asset instead of per-session improvisation.
|
|
10
|
+
|
|
11
|
+
Target: $ARGUMENTS (optional — when empty, the interview below picks the primary user-facing surface)
|
|
12
|
+
|
|
13
|
+
Write the generated skill for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
### 1 — Interview the repo, not the user
|
|
18
|
+
|
|
19
|
+
Answer these from the codebase and only ask the user what you cannot observe:
|
|
20
|
+
|
|
21
|
+
- **Surface:** what does a user actually touch? A web UI, a CLI/TUI, a desktop app, an API, a mobile app, a library? A repo can have several; pick the primary one and note the rest.
|
|
22
|
+
- **Run:** how does the app start locally? Prefer the repo's own documented dev command (package scripts, Makefile, README quickstart). Note ports, env vars, seed data, auth.
|
|
23
|
+
- **Drive:** how can an agent interact with it programmatically? Existing harnesses first — Playwright/Cypress specs, expect scripts, PTY helpers, curl-able endpoints, a debug port. Only then pick a generic recipe: a browser debug port (CDP) for web and Electron, a tmux/PTY harness for CLI and TUI, plain HTTP for services. Every recipe must run through plain shell commands — assume the runtime ships no browser-automation or app-control tooling of its own.
|
|
24
|
+
- **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
|
|
25
|
+
- **Isolate:** can two instances run side by side (ports, data dirs, profiles)? If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
|
|
26
|
+
|
|
27
|
+
If the checkout doesn't build or start as-is, fix that first (or report it precisely) before generating; a skill written against a broken base teaches wrong steps. When an irrelevant missing asset blocks startup (a static dir the API never serves, a sample config), the generated skill may create it, clearly marked as verification scaffolding, and remove it in cleanup.
|
|
28
|
+
|
|
29
|
+
### 2 — Generate the skill
|
|
30
|
+
|
|
31
|
+
Write `.draht/skills/verify-<app>/SKILL.md`. `.draht/skills/` is the project-level skills directory, and project skills win name collisions against installed or shipped skills — the generated skill is authoritative for its repo. (If the target project's agents discover project skills at a different path, write the identical content there instead; the skill body is host-neutral.)
|
|
32
|
+
|
|
33
|
+
Frontmatter is `name: verify-<app>` plus a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers. Then these six sections, each grounded in what the interview actually found (no placeholders left):
|
|
34
|
+
|
|
35
|
+
- **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a port answering, a prompt). Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
|
|
36
|
+
- **Doctor:** one read-only check that answers "is this instance worth driving?" — process up, right version/build, port owned by us, auth valid. Run it before the first drive and again whenever anything looks off.
|
|
37
|
+
- **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
|
|
38
|
+
- **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
|
|
39
|
+
- **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
|
|
40
|
+
- **Helpers:** any script the skill ships is executable and its invocation is shown in the skill body. A helper the reader has to reverse-engineer is not a helper.
|
|
41
|
+
|
|
42
|
+
### 3 — Seed the feature map
|
|
43
|
+
|
|
44
|
+
Create a `features/` directory inside the generated skill dir, holding `features/README.md` plus one file per user-facing feature you can identify (aim for the top 3-5 to start, from routes, commands, menus, or docs). The README carries the baseline preconditions (launch target, disposable data location, seed data, the Doctor requirement), the driving conventions (stable handles over positions, commands taken literally, restore mutated fixtures, never remove proof artifacts), the proof and skip-reporting rules (record the feature ID and entry point with every artifact; report an unreachable path with the attempted command and the unmet precondition; never report a skipped entry point as verified through a different path), and an index linking every feature file.
|
|
45
|
+
|
|
46
|
+
Each feature file starts with an H1 title and one paragraph of user-visible behaviour, then exactly four H2 sections in this order:
|
|
47
|
+
|
|
48
|
+
1. `Sub-features` — short IDs with one line per behaviour.
|
|
49
|
+
2. `How to get to it (user POV)` — every user entry point.
|
|
50
|
+
3. `Driving it with <harness>` — starts with `Preconditions:`, then labelled bullets pairing each user action with an exact command and its observable result.
|
|
51
|
+
4. `Gotchas` — traps that can waste or invalidate a verification run.
|
|
52
|
+
|
|
53
|
+
Keep implementation details out of the map: name only user paths, stable handles, required state, commands, and observable proof. A condensed example entry:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
# Create a note
|
|
57
|
+
|
|
58
|
+
Create note lets a user save a titled note and confirm it from a second view.
|
|
59
|
+
|
|
60
|
+
## Sub-features
|
|
61
|
+
|
|
62
|
+
- `create-save` persists a title and body.
|
|
63
|
+
|
|
64
|
+
## How to get to it (user POV)
|
|
65
|
+
|
|
66
|
+
- Choose the `New note` button in the browser toolbar.
|
|
67
|
+
|
|
68
|
+
## Driving it with the CDP harness
|
|
69
|
+
|
|
70
|
+
Preconditions:
|
|
71
|
+
|
|
72
|
+
- Notes is healthy at `http://127.0.0.1:4173` and no note is titled `Release checklist`.
|
|
73
|
+
|
|
74
|
+
- **Open editor.** Choose `New note`. Click the button with accessible name `New note`. A form named `Note editor` appears.
|
|
75
|
+
- **Save note.** Fill `Title` with `Release checklist`, choose `Save note`. A status named `Note saved` appears.
|
|
76
|
+
- **Proof.** Reopen the note from `All notes`; screenshot to `artifacts/create-note/list.png`. The list shows `Release checklist`.
|
|
77
|
+
|
|
78
|
+
## Gotchas
|
|
79
|
+
|
|
80
|
+
- A save status alone is insufficient proof. Reopen the note from the list.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The map is the repo's maintained verification source; a proof that drives one convenient entry point is incomplete when the map lists others.
|
|
84
|
+
|
|
85
|
+
### 4 — Prove the generated skill before handing it over
|
|
86
|
+
|
|
87
|
+
Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough — the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location — a cleanup that eats the proof fails this step. Fix what fails, and run the generated cleanup after every failed iteration too, so broken attempts don't strand processes and ports. A generated skill that was never executed is a draft, not a deliverable.
|
|
88
|
+
|
|
89
|
+
### 5 — Commit and hand over
|
|
90
|
+
|
|
91
|
+
The generated skill versions with the app it verifies: commit `.draht/skills/verify-<app>/` (skill, feature map, helpers) to the target repo. Then tell the user two things:
|
|
92
|
+
|
|
93
|
+
- `/verify-work` picks it up: when a `verify-<app>` skill exists, the phase verifier drives one mapped feature and captures its evidence instead of stopping at the test suite.
|
|
94
|
+
- The map stays honest only if it changes with the app: a change that adds or reshapes a user-facing feature updates the matching feature file in the same change. A map entry the app has outgrown is worse than none — it teaches wrong steps with confidence.
|
|
95
|
+
|
|
96
|
+
## Failure Modes — STOP
|
|
97
|
+
|
|
98
|
+
Stop immediately if you catch yourself:
|
|
99
|
+
|
|
100
|
+
- Writing recipes against an app you never started — generate from observed behaviour, not from reading the code
|
|
101
|
+
- Trusting a dry-run or test mode by its name instead of observing what it actually skips
|
|
102
|
+
- Proving a feature through a test-only endpoint or internal setter instead of the real user path
|
|
103
|
+
- Driving an instance this run did not start
|
|
104
|
+
- Writing a cleanup that deletes the proof artifacts
|
|
105
|
+
- Handing over a skill whose own instructions were never executed end to end
|
|
@@ -14,26 +14,15 @@ Phase: $1
|
|
|
14
14
|
|
|
15
15
|
## Atomic Reasoning
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**For each implementation decision:**
|
|
20
|
-
1. **State the logical component** — What gray area exists? What choice needs to be made? Why does this matter?
|
|
21
|
-
2. **Validate independence** — Can this decision be made independently, or does it depend on other choices? What downstream impacts does it have?
|
|
22
|
-
3. **Verify correctness** — What criteria determine the right answer? What trade-offs exist? What domain terms need clarification?
|
|
23
|
-
|
|
24
|
-
**Synthesize discussion strategy:**
|
|
25
|
-
- Identify critical decisions that block planning
|
|
26
|
-
- Group related decisions (e.g., all API decisions together)
|
|
27
|
-
- Sequence questions from foundational to detailed
|
|
28
|
-
- Ensure domain language is established first
|
|
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.
|
|
29
18
|
|
|
30
19
|
## Steps
|
|
31
20
|
1. Run `draht-tools phase-info $1` to load phase context
|
|
32
21
|
2. Ground the discussion in current structure: run `draht-tools graph-context <area>` and `draht-tools graph-clusters` on the area being discussed, and cross-check discovered domain terms with `draht-tools graph-query <term>`.
|
|
33
22
|
3. Identify gray areas based on what's being built
|
|
34
|
-
4. Present
|
|
23
|
+
4. Present the whole frontier of open decisions in one numbered round — every question whose prerequisites are settled, each with a recommended answer the user can accept by number; defer questions that depend on still-open answers to the next round. Environment facts are your job, never the user's — dispatch a subagent and only hold back the questions downstream of it.
|
|
35
24
|
5. If `.planning/DOMAIN.md` exists, load it and validate discovered terms against the glossary. Add any new domain terms found during discussion.
|
|
36
|
-
6. Record decisions with `draht-tools save-context $1` — label each entry **decided** (the user explicitly chose) or **assumed** (you inferred from context). Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
|
|
25
|
+
6. Record decisions with `draht-tools save-context $1` — label each entry **decided** (the user explicitly chose) or **assumed** (you inferred from context). An answer accepted by number counts as decided. Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
|
|
37
26
|
7. Commit: `draht-tools commit-docs "capture phase $1 context"`
|
|
38
27
|
|
|
39
28
|
## Workflow
|
|
@@ -26,18 +26,9 @@ STOP and report to the user instead of proceeding if **any** of these is true:
|
|
|
26
26
|
|
|
27
27
|
## Atomic Reasoning
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
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.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
1. **State the logical component** — What is this plan's singular purpose? What observable outcome does it produce?
|
|
33
|
-
2. **Validate independence** — Can this plan execute in parallel with others, or does it depend on their outputs? Which files does it touch?
|
|
34
|
-
3. **Verify correctness** — What tests will prove this plan works? What failure modes exist?
|
|
35
|
-
|
|
36
|
-
**Synthesize execution strategy:**
|
|
37
|
-
- Identify parallel execution groups (plans with no shared files/dependencies)
|
|
38
|
-
- Order dependent plans (plan B depends on plan A's outputs)
|
|
39
|
-
- Within each group, dispatch the riskiest plan first (highest uncertainty × blast radius) — its failure invalidates the rest of the phase most cheaply, before effort has been sunk into work it would obsolete
|
|
40
|
-
- Map each plan to a subagent task with clear success criteria
|
|
31
|
+
Within each group of independent plans, dispatch the riskiest plan first (highest uncertainty × blast radius) — its failure invalidates the rest of the phase most cheaply, before effort has been sunk into work it would obsolete.
|
|
41
32
|
|
|
42
33
|
## Steps
|
|
43
34
|
|
|
@@ -70,10 +61,10 @@ Before executing, decompose this phase execution into atomic reasoning units:
|
|
|
70
61
|
Once the implementer is DONE, dispatch a Codex subagent using the `spec-reviewer` agent prompt and a prompt of the form:
|
|
71
62
|
```
|
|
72
63
|
Review the diff for task <task-name> in plan <plan-file> against the spec below. ONLY check spec compliance — does the diff implement exactly what the spec asked for, no more, no less?
|
|
73
|
-
|
|
64
|
+
|
|
74
65
|
Task spec:
|
|
75
66
|
<paste the <task>...</task> XML>
|
|
76
|
-
|
|
67
|
+
|
|
77
68
|
Diff to review:
|
|
78
69
|
<run `git diff <range>` and paste, or instruct the agent to run it>
|
|
79
70
|
```
|
|
@@ -85,7 +76,7 @@ Before executing, decompose this phase execution into atomic reasoning units:
|
|
|
85
76
|
Once spec compliance is ✅, dispatch a Codex subagent using the `reviewer` agent prompt and a prompt of the form:
|
|
86
77
|
```
|
|
87
78
|
Code-quality review of the diff for task <task-name>. Focus on correctness, type safety, conventions, maintainability, and domain language compliance. Spec compliance has already been confirmed — do NOT re-check spec.
|
|
88
|
-
|
|
79
|
+
|
|
89
80
|
Diff to review:
|
|
90
81
|
<run `git diff <range>` and paste, or instruct the agent to run it>
|
|
91
82
|
```
|
|
@@ -126,6 +117,8 @@ For each <task> in the plan, follow this TDD cycle:
|
|
|
126
117
|
|
|
127
118
|
Domain rules: Use ubiquitous language from .planning/DOMAIN.md (read it). Do not import across bounded context boundaries.
|
|
128
119
|
|
|
120
|
+
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.
|
|
121
|
+
|
|
129
122
|
Checkpoint handling:
|
|
130
123
|
- type="auto" → execute silently.
|
|
131
124
|
- type="checkpoint:human-verify" → stop and report back what was built.
|
package/commands/fix.md
CHANGED
|
@@ -6,7 +6,7 @@ allowed-tools: Bash, Read, Write, Edit, Task
|
|
|
6
6
|
|
|
7
7
|
# /fix
|
|
8
8
|
|
|
9
|
-
Diagnose and fix a bug using the **four-phase systematic debugging protocol**: root cause investigation → pattern analysis →
|
|
9
|
+
Diagnose and fix a bug using the **four-phase systematic debugging protocol**: root cause investigation → pattern analysis → ranked hypotheses & testing → implementation with a reproducing test.
|
|
10
10
|
|
|
11
11
|
Issue: $ARGUMENTS
|
|
12
12
|
|
|
@@ -20,12 +20,14 @@ Symptom fixes are failure — they create new bugs in different places. If you f
|
|
|
20
20
|
|
|
21
21
|
## The Report Is a Symptom, Not a Diagnosis
|
|
22
22
|
|
|
23
|
-
**Procedure:** Restate the failure as observable behavior — "X happens when Y; expected Z" — before touching anything. If the user names a cause ("the cache is stale"), treat it as Hypothesis #0: it enters Phase 3 like any other hypothesis and does not skip Phase 1.
|
|
23
|
+
**Procedure:** Restate the failure as observable behavior — "X happens when Y; expected Z" — before touching anything. If the user names a cause ("the cache is stale"), treat it as Hypothesis #0: it enters the Phase 3 ranking like any other hypothesis and does not skip Phase 1.
|
|
24
24
|
|
|
25
25
|
**Example:** "fix the stale cache bug" — Phase 1 traces the data flow and finds the cache is fine; the query behind it silently drops a filter. The fix lands in the query.
|
|
26
26
|
|
|
27
27
|
**Prevents:** shipping a correct fix to the wrong component.
|
|
28
28
|
|
|
29
|
+
Not every why is a bug: if the user is asking why the code is *shaped* the way it is — intent, history, design rationale — and nothing is misbehaving, route to `/why` instead. `/fix` answers defects; `/why` answers intent. When Phase 1 needs design intent (is this behaviour a decision or an accident?), consult `/why` and feed its Preserve/Avoid constraints into the hypothesis ranking. A `/triage` verdict ending in `[triage:bug]` or `[triage:performance]` is a ready entry here: take the linked tracker issue as the report and treat triage's cause-trace findings as ranked-hypothesis material — labeled hypotheses, not a diagnosis.
|
|
30
|
+
|
|
29
31
|
## Red Flags — STOP
|
|
30
32
|
|
|
31
33
|
Stop immediately if you catch yourself:
|
|
@@ -33,6 +35,7 @@ Stop immediately if you catch yourself:
|
|
|
33
35
|
- Attempting multiple changes simultaneously
|
|
34
36
|
- Skipping a reproducing test before fixing
|
|
35
37
|
- Proposing solutions before understanding data flow
|
|
38
|
+
- Reading code to build a causal theory before a red-capable reproduction command exists
|
|
36
39
|
- Making "one more fix attempt" after already trying 2+
|
|
37
40
|
- Watching each fix reveal new problems elsewhere
|
|
38
41
|
- Implementing before a failing test exists for the bug
|
|
@@ -41,11 +44,7 @@ When you've tried **3 fix attempts and still failing**, STOP. This is a **hard c
|
|
|
41
44
|
|
|
42
45
|
## Atomic Reasoning
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
1. **State the logical component** — What is the observed failure? What should happen vs what actually happens?
|
|
47
|
-
2. **Validate independence** — Which components/files are involved? Can we isolate the failure? Are there related bugs that should be fixed separately?
|
|
48
|
-
3. **Verify correctness** — What test will reproduce this bug reliably? What would prove it's fixed? What regressions could the fix introduce?
|
|
47
|
+
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.
|
|
49
48
|
|
|
50
49
|
## The Four Phases
|
|
51
50
|
|
|
@@ -62,7 +61,21 @@ Issue: $ARGUMENTS
|
|
|
62
61
|
|
|
63
62
|
Walk through these steps and report on each:
|
|
64
63
|
1. Read the error message / stack trace carefully — exact line numbers, exact file paths.
|
|
65
|
-
2.
|
|
64
|
+
2. Build a reproduction loop — ONE command that goes red on this bug. This step is the heart of the diagnosis; spend disproportionate effort here. Work down the ladder and take the first rung that reaches the bug:
|
|
65
|
+
- failing test at whatever seam reaches the bug (unit, integration, e2e)
|
|
66
|
+
- HTTP request script against a running dev server
|
|
67
|
+
- CLI invocation on a fixture input, output diffed against a known-good snapshot
|
|
68
|
+
- headless browser script asserting on DOM / console / network
|
|
69
|
+
- replay of a captured payload, trace, or event log through the code path in isolation
|
|
70
|
+
- throwaway harness: a minimal subset of the system (mocked deps) exercising the bug path in one call
|
|
71
|
+
- property/fuzz loop: hundreds of random inputs when the output is only sometimes wrong
|
|
72
|
+
- bisection harness: automate "checkout state X, run the check" so `git bisect run` can drive it
|
|
73
|
+
- differential loop: the same input through old vs new version (or two configs), outputs diffed
|
|
74
|
+
- last resort, human-in-the-loop: exact numbered steps for the user to run by hand, output pasted back
|
|
75
|
+
Flaky bugs: the goal is a HIGHER reproduction rate, not a clean repro — loop the trigger 100x, add stress, narrow timing windows until it fails often enough to debug against.
|
|
76
|
+
Exit checklist — all four must hold before you continue: (a) ONE named command (a test invocation, a script path, a curl); (b) you have ALREADY RUN it at least once; (c) your report shows the invocation AND its output (secrets redacted); (d) it asserts the user's EXACT symptom — able to go red on this bug and green once fixed, not merely "runs without erroring".
|
|
77
|
+
Self-interrupt: if you catch yourself reading code to build a causal theory before this command exists, STOP — anchoring on the first plausible idea is the exact failure this protocol prevents. No red-capable command, no steps 4-6.
|
|
78
|
+
If you genuinely cannot build a loop: list what you tried, name what you need (environment access, a captured artifact such as a log dump or recording, or permission to add temporary instrumentation), and end with STATUS: NEEDS_CONTEXT rather than guessing.
|
|
66
79
|
3. Check recent changes — `git log --oneline -20` and `git diff HEAD~5` against the affected files. What changed?
|
|
67
80
|
4. For multi-component flows: trace data flow. Where does the bad value originate? What called this with that value? Keep tracing UPWARD until you find the source. Fix at source, not at symptom.
|
|
68
81
|
5. State the root cause as one sentence: "X happens because Y at <file:line>."
|
|
@@ -84,20 +97,25 @@ Read the root cause from Phase 1. Then:
|
|
|
84
97
|
|
|
85
98
|
If Phase 2 reveals a different root cause than Phase 1, go back to Phase 1 and re-investigate. Do not paper over the disagreement.
|
|
86
99
|
|
|
87
|
-
### Phase 3 —
|
|
100
|
+
### Phase 3 — Ranked Hypotheses
|
|
88
101
|
|
|
89
|
-
1.
|
|
90
|
-
2.
|
|
91
|
-
3.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
1. Generate **3-5 ranked falsifiable hypotheses** before testing any of them. A single hypothesis anchors you to the first plausible idea — ranking forces the alternatives into view.
|
|
103
|
+
2. Each hypothesis must state its prediction: "If X is the cause, then changing Y will make the bug disappear / changing Z will make it worse." If you cannot state the prediction, it is a vibe — discard it or sharpen it.
|
|
104
|
+
3. If the user named a cause, it is **Hypothesis #0** and enters the ranking with the others — ranked on evidence, not privileged for being first.
|
|
105
|
+
4. Show the ranked list to the user before testing. Domain knowledge re-ranks instantly ("we just deployed a change to #3") and rules hypotheses out for free. Do not block waiting for a reply — proceed in ranked order if none comes.
|
|
106
|
+
5. Test in rank order, one hypothesis at a time. Design the **smallest possible change** that would prove or falsify the prediction — one variable, one line if possible — and re-run the Phase 1 reproduction command to read the verdict.
|
|
107
|
+
- **Prediction confirmed** → proceed to Phase 4 with this cause.
|
|
108
|
+
- **Falsified** → revert the probe, record which prediction failed, move to the next hypothesis. Do not pile changes on top.
|
|
109
|
+
6. When a probe needs logging, prefer one debugger/REPL inspection over ten log lines; if you must log, tag every line with one unique session prefix, e.g. `[DEBUG-a4f2]`, and never "log everything and grep".
|
|
110
|
+
7. If after 3 falsified hypotheses you are still failing, STOP. Question the architecture, not the ranking. Report to the user.
|
|
95
111
|
|
|
96
112
|
You may also say "I don't understand X" rather than pretend. That is the correct answer when it's true.
|
|
97
113
|
|
|
98
114
|
### Phase 4 — Implementation
|
|
99
115
|
|
|
100
|
-
|
|
116
|
+
Comment discipline: the fix ships no narration — 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.
|
|
117
|
+
|
|
118
|
+
1. **Write the reproducing test FIRST.** Seed it from the Phase 1 reproduction command — the loop that already goes red is the test's skeleton; port its scenario and its symptom assertion to the right test seam. Smallest possible test that demonstrates the bug. Run it — confirm it FAILS for the right reason (not for a syntax error, not for a missing import).
|
|
101
119
|
- Commit: `git add <test-files> && git commit -m "red: reproduce <bug>"`
|
|
102
120
|
|
|
103
121
|
2. **Apply the single fix** identified in Phase 3. No other changes — no opportunistic refactor, no "while I'm here".
|
|
@@ -110,7 +128,9 @@ You may also say "I don't understand X" rather than pretend. That is the correct
|
|
|
110
128
|
|
|
111
129
|
4. **Verify the fix solved the original symptom**, not just the unit test. Run the user-level reproduction one more time.
|
|
112
130
|
|
|
113
|
-
5. **
|
|
131
|
+
5. **Sweep instrumentation** — grep your `[DEBUG-` prefix across the tree; the fix is not done until the grep returns nothing. Tagged probes die here; untagged probes survive to pollute production.
|
|
132
|
+
|
|
133
|
+
6. **Update state**: `draht-tools update-state`
|
|
114
134
|
|
|
115
135
|
## Rationalization Table
|
|
116
136
|
|
|
@@ -123,6 +143,7 @@ You may also say "I don't understand X" rather than pretend. That is the correct
|
|
|
123
143
|
| "I already manually tested it" | A reproducing test is the only durable proof. |
|
|
124
144
|
| "The user already told me the cause" | The reporter saw the symptom. Their diagnosis is Hypothesis #0, not a finding. |
|
|
125
145
|
| "The fix passed, so my diagnosis was right" | Fixes can mask. Verify the causal chain, not just the symptom's absence. |
|
|
146
|
+
| "I can't reproduce it, but the cause is obvious from the code" | Reading code yields theories, not verdicts. No red-capable command, no diagnosis — report NEEDS_CONTEXT and name what's missing. |
|
|
126
147
|
|
|
127
148
|
## Rules
|
|
128
149
|
- Always reproduce before fixing — a fix without a test is a guess
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Grill any subject in whole-frontier question rounds — an idea, a spec, raw tickets, an architecture decision, or an open discussion; the output form is chosen at the end, not presumed at the start
|
|
3
|
+
argument-hint: "[subject]"
|
|
4
|
+
allowed-tools: Bash, Read, Write, Edit, Task
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /grill
|
|
8
|
+
|
|
9
|
+
Interrogate the subject relentlessly until you reach a shared understanding. A grill has no fixed outcome: it can end in a refined spec, a ticket list, a decision record, plain notes, or nothing but the conversation. The output form is chosen at the end, never presumed at the start.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
```
|
|
13
|
+
/grill [subject]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Subject: $ARGUMENTS
|
|
17
|
+
|
|
18
|
+
> **Tool note**: For environment facts, spawn a Codex subagent using the `architect` agent prompt — read-only fact-finding; never block the current round on it.
|
|
19
|
+
|
|
20
|
+
## The Design Tree
|
|
21
|
+
|
|
22
|
+
Map the subject as a **design tree**: every decision branches into the decisions that hang off it. The **frontier** is every decision whose prerequisites are already settled — the questions you can ask now without guessing at answers you haven't heard yet.
|
|
23
|
+
|
|
24
|
+
## Rounds
|
|
25
|
+
|
|
26
|
+
1. **Orient without blocking.** Skim what the subject names before round 1: files mentioned in it, `.planning/` if present, recent git history. Dispatch fact-finders for anything deeper — do not hold the first round for them.
|
|
27
|
+
2. **Ask the WHOLE frontier in one message.** Number every question, foundational → detailed, and give each one a recommended answer:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
**Q1 — <title>**: <body; may offer options>
|
|
31
|
+
*Recommended:* <your recommended answer>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
**Q2 — <title>**: <body>
|
|
36
|
+
*Recommended:* <your recommended answer>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Defer dependent questions.** A question whose answer depends on another question still open this round belongs to a later round — asking it now means guessing at an answer you haven't heard.
|
|
40
|
+
4. **Let the user answer by number.** "1 yes, 2: B, 4 later" is a complete reply. Anything accepted by number or answered explicitly is **decided**. A recommendation acted on without confirmation is **assumed** and stays flagged until the user confirms it.
|
|
41
|
+
5. **Recompute and repeat.** Every answer reshapes the tree: settled decisions push the frontier outward and unblock the questions that hung off them. Recompute the frontier and ask the next round.
|
|
42
|
+
|
|
43
|
+
## Facts Are Your Job
|
|
44
|
+
|
|
45
|
+
Finding facts is your job, never the user's. When a frontier question needs an environment fact — filesystem, git history, code structure, existing docs — dispatch a fact-finder instead of asking. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait; ask the rest of the frontier now. Decisions belong to the user: put each one to them and wait.
|
|
46
|
+
|
|
47
|
+
## Done
|
|
48
|
+
|
|
49
|
+
The grill is done when the frontier is empty: every branch of the tree visited, nothing left silently assumed. Present the decided-vs-assumed summary, then — and only then — ask which artifact to produce:
|
|
50
|
+
|
|
51
|
+
1. **Refined spec** → `.planning/specs/YYYY-MM-DD-<slug>-design.md`. When it describes a project to build, offer to hand off to `/new-project` or `/init-project`.
|
|
52
|
+
2. **Ticket list** → `.planning/tickets/YYYY-MM-DD-<slug>.md`
|
|
53
|
+
3. **Decision record** → `.planning/decisions/YYYY-MM-DD-<slug>.md`
|
|
54
|
+
4. **Plain notes** → a file the user names
|
|
55
|
+
|
|
56
|
+
Whatever form is chosen, write the artifact through the `unslop` skill; the user's own words in quoted decisions stay verbatim.
|
|
57
|
+
|
|
58
|
+
When no `.planning/` directory exists, every mode becomes a standalone file the user names. "No artifact" is a valid answer — sometimes the conversation was the point. Never start implementing or invoke a planning command without the user's explicit go-ahead.
|
|
59
|
+
|
|
60
|
+
## Anti-Patterns — STOP
|
|
61
|
+
|
|
62
|
+
- **Dribbling questions one at a time** — a serial interview hides the decision tree and wastes rounds; ask the whole frontier, numbered, with recommended answers
|
|
63
|
+
- **Asking the user for facts the environment can answer** — filesystem, git history, and code structure are yours to look up
|
|
64
|
+
- **Blocking a whole round on a running fact-finder** — only the questions downstream of it wait; ask the rest now
|
|
65
|
+
- **Presuming the outcome at round 1** — deciding early that this "is" a spec narrows the questioning to spec-shaped answers
|
|
66
|
+
- **Acting on the result before the user confirms shared understanding** — an empty frontier ends the questioning; only the user's confirmation ends the grill
|
package/commands/init-project.md
CHANGED
|
@@ -16,25 +16,13 @@ Use this when you have an existing codebase and want to add structured planning.
|
|
|
16
16
|
|
|
17
17
|
## Atomic Reasoning
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**For each aspect of the existing project:**
|
|
22
|
-
1. **State the logical component** — What does this project do? Who are the users? What problems does it solve?
|
|
23
|
-
2. **Validate independence** — What bounded contexts exist in the code? What domain concepts are already present? Can they be separated cleanly?
|
|
24
|
-
3. **Verify correctness** — What works well that we must preserve? What pain points exist? What constraints limit changes?
|
|
25
|
-
|
|
26
|
-
**Synthesize initialization strategy:**
|
|
27
|
-
- Map existing architecture and conventions
|
|
28
|
-
- Extract domain model from code (bounded contexts, aggregates, ubiquitous language)
|
|
29
|
-
- Identify test strategy and coverage
|
|
30
|
-
- Define requirements that align with existing structure
|
|
31
|
-
- Create roadmap that respects what already works
|
|
19
|
+
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
20
|
|
|
33
21
|
## Steps
|
|
34
22
|
1. Run `draht-tools init` to check preconditions (git repo, etc.)
|
|
35
23
|
2. Run `draht-tools map-codebase` to build a structural map of the existing code, then `draht-tools map-graph` to produce `.planning/codebase/MAP.json` + `GRAPH_REPORT.md` (map-codebase alone does NOT emit MAP.json)
|
|
36
24
|
3. Analyze the codebase map to understand architecture, tech stack, and conventions: read `.planning/codebase/MAP.json` and run `draht-tools graph-hotspots` + `draht-tools graph-clusters` to surface high-traffic and cohesive modules
|
|
37
|
-
4. Deep questioning phase (3-7 rounds
|
|
25
|
+
4. Deep questioning phase (3-7 rounds — each round asks the whole frontier: settled-prerequisite questions only, numbered, each with a recommended answer):
|
|
38
26
|
- What is this project? Who uses it?
|
|
39
27
|
- What are the current pain points or goals?
|
|
40
28
|
- What is MVP vs aspirational scope?
|
|
@@ -61,7 +49,9 @@ After project initialization, phases are executed one at a time in fresh session
|
|
|
61
49
|
```
|
|
62
50
|
|
|
63
51
|
## Rules
|
|
64
|
-
- Ask
|
|
52
|
+
- Ask the whole frontier per round — numbered, each with a recommended answer; the user replies by number, and accepted-by-number counts as decided
|
|
53
|
+
- Questions that depend on still-open answers wait for a later round
|
|
54
|
+
- Finding facts is your job, never the user's — dispatch a subagent for anything the environment can answer and keep asking the rest of the frontier while it runs
|
|
65
55
|
- When the focus names a solution ("migrate to X"), ask what problem it solves — the existing code may admit a smaller answer
|
|
66
56
|
- Respect what already exists — do not propose rewriting working code
|
|
67
57
|
- Stop when you have: current state, goals, MVP scope, constraints, success criteria
|
package/commands/map-codebase.md
CHANGED
|
@@ -14,19 +14,7 @@ Directory: $1
|
|
|
14
14
|
|
|
15
15
|
## Atomic Reasoning
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**For each architectural layer:**
|
|
20
|
-
1. **State the logical component** — What is this directory/module's responsibility? What concepts does it encapsulate?
|
|
21
|
-
2. **Validate independence** — Is this a bounded context? What are its dependencies? Does it leak abstractions across boundaries?
|
|
22
|
-
3. **Verify correctness** — What domain terms appear in code? What aggregates exist? What test infrastructure is present?
|
|
23
|
-
|
|
24
|
-
**Synthesize analysis strategy:**
|
|
25
|
-
- Map directory structure to bounded contexts
|
|
26
|
-
- Extract domain language from identifiers (classes, functions, types)
|
|
27
|
-
- Identify context relationships (upstream/downstream, shared kernel)
|
|
28
|
-
- Document test strategy and coverage
|
|
29
|
-
- Note architectural concerns and patterns
|
|
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.
|
|
30
18
|
|
|
31
19
|
## Steps
|
|
32
20
|
1. Run `draht-tools map-codebase $1`
|
package/commands/new-project.md
CHANGED
|
@@ -14,24 +14,12 @@ Description: $ARGUMENTS
|
|
|
14
14
|
|
|
15
15
|
## Atomic Reasoning
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**For each aspect of the new project:**
|
|
20
|
-
1. **State the logical component** — What problem does this solve? Who are the users? What is core vs peripheral?
|
|
21
|
-
2. **Validate independence** — What bounded contexts will exist? What domain concepts are central? Can features be built independently?
|
|
22
|
-
3. **Verify correctness** — What defines MVP success? What constraints exist (time, tech, team)? What is explicitly out of scope?
|
|
23
|
-
|
|
24
|
-
**Synthesize project strategy:**
|
|
25
|
-
- Define bounded contexts and ubiquitous language upfront
|
|
26
|
-
- Establish test strategy before writing code
|
|
27
|
-
- Create requirements mapped to domain contexts
|
|
28
|
-
- Build roadmap with testable phase goals
|
|
29
|
-
- Ensure each phase delivers verifiable user value
|
|
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.
|
|
30
18
|
|
|
31
19
|
## Steps
|
|
32
20
|
1. Run `draht-tools init` to check preconditions
|
|
33
21
|
2. If existing code detected, run `draht-tools map-codebase` first
|
|
34
|
-
3. Deep questioning phase (3-7 rounds,
|
|
22
|
+
3. Deep questioning phase (3-7 rounds — each round asks the whole frontier: every question whose prerequisites are settled, numbered, each with a recommended answer)
|
|
35
23
|
4. Run `draht-tools create-project` with gathered info
|
|
36
24
|
5. Run `draht-tools create-domain-model` to define bounded contexts, entities, and ubiquitous language
|
|
37
25
|
6. Create `.planning/DOMAIN.md` with:
|
|
@@ -65,7 +53,9 @@ After project initialization, phases are executed one at a time in fresh session
|
|
|
65
53
|
Start a fresh session (`/clear`) between steps. Do NOT suggest `/next-milestone` until every phase in the milestone is verified.
|
|
66
54
|
|
|
67
55
|
## Rules
|
|
68
|
-
- Ask
|
|
56
|
+
- Ask the whole frontier per round — numbered, each with a recommended answer; the user replies by number, and accepted-by-number counts as decided
|
|
57
|
+
- Questions that depend on still-open answers wait for a later round
|
|
58
|
+
- Finding facts is your job, never the user's — dispatch a subagent for anything the environment can answer and keep asking the rest of the frontier while it runs
|
|
69
59
|
- Follow threads based on answers
|
|
70
60
|
- Use examples ("Like Stripe Checkout, or custom?")
|
|
71
61
|
- Confirm, don't assume
|
|
@@ -11,18 +11,7 @@ Plan the next milestone after ALL phases in the current one are complete.
|
|
|
11
11
|
|
|
12
12
|
## Atomic Reasoning
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**For each completed phase:**
|
|
17
|
-
1. **State the logical component** — What was built? What user value was delivered? What requirements were satisfied?
|
|
18
|
-
2. **Validate independence** — What worked well? What had issues? What assumptions proved wrong?
|
|
19
|
-
3. **Verify correctness** — Is every phase truly complete? Are there lingering fix plans? Is the codebase healthy?
|
|
20
|
-
|
|
21
|
-
**Synthesize milestone strategy:**
|
|
22
|
-
- Identify gaps from the current milestone
|
|
23
|
-
- Derive new requirements from lessons learned
|
|
24
|
-
- Group into a coherent next milestone with testable phase goals
|
|
25
|
-
- Ensure domain model and test strategy still reflect reality
|
|
14
|
+
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.
|
|
26
15
|
|
|
27
16
|
## Steps
|
|
28
17
|
1. Run `draht-tools verify-milestone` to ensure every phase in the current milestone is `complete`
|
|
@@ -33,7 +22,7 @@ Before planning the next milestone, decompose progress into atomic reasoning uni
|
|
|
33
22
|
5. Refresh the living map if stale: `draht-tools map-graph --quiet` (guarded — skip if the post-phase hook already refreshed), then `draht-tools graph-clusters --surprising`. Compare clusters / bounded contexts / entry points against the milestone start to surface architectural drift before planning the next milestone
|
|
34
23
|
6. Review `.planning/DOMAIN.md` — is it still accurate? Any terms to add/revise (esp. drift flagged in step 5)?
|
|
35
24
|
7. Review `.planning/TEST-STRATEGY.md` — any updates needed?
|
|
36
|
-
8. Questioning phase (
|
|
25
|
+
8. Questioning phase (whole frontier per round — numbered, each with a recommended answer):
|
|
37
26
|
- What is the next milestone's goal?
|
|
38
27
|
- What user-visible outcomes must be true by the end?
|
|
39
28
|
- What is in vs out of scope?
|
package/commands/orchestrate.md
CHANGED
|
@@ -14,7 +14,7 @@ Task: $ARGUMENTS
|
|
|
14
14
|
|
|
15
15
|
## Atomic Reasoning
|
|
16
16
|
|
|
17
|
-
|
|
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
18
|
|
|
19
19
|
1. **State the logical components** — What sub-tasks make up this work? Which are independent? A sub-task is well-cut only if its success can be checked without reference to the others.
|
|
20
20
|
2. **Match agents to work** — Which specialist is right for each sub-task?
|
package/commands/pause-work.md
CHANGED
|
@@ -9,14 +9,6 @@ Create a handoff document for session continuity.
|
|
|
9
9
|
|
|
10
10
|
> **Tool note**: Invoke `draht-tools <subcommand>` as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>` via the Bash tool.
|
|
11
11
|
|
|
12
|
-
## Atomic Reasoning
|
|
13
|
-
|
|
14
|
-
Before pausing, decompose session state into atomic reasoning units:
|
|
15
|
-
|
|
16
|
-
1. **State the logical component** — What was accomplished this session? What is in-progress? What is the current phase/task?
|
|
17
|
-
2. **Validate independence** — Are there uncommitted changes? Are there blockers? What decisions were made?
|
|
18
|
-
3. **Verify correctness** — Is the current state stable? Can work resume cleanly? What context needs to be captured?
|
|
19
|
-
|
|
20
12
|
## Steps
|
|
21
13
|
1. Run `git status` and `git diff --stat` to see uncommitted changes
|
|
22
14
|
2. Read `.planning/STATE.md` for current phase/status
|
|
@@ -37,3 +29,4 @@ Before pausing, decompose session state into atomic reasoning units:
|
|
|
37
29
|
- Be specific — "fix bug in auth" is useless; "null check in src/auth/session.ts:42, test reproducing in test/auth-null.test.ts" is useful
|
|
38
30
|
- Include exact commands, not vague directions
|
|
39
31
|
- Capture any in-flight decisions or trade-offs being weighed
|
|
32
|
+
- Handoff and lesson prose follows the `unslop` skill — plain words, no filler, specifics over vibes; commands, paths, and quoted output stay verbatim.
|
package/commands/plan-phase.md
CHANGED
|
@@ -28,21 +28,12 @@ Run `draht-tools validate-plans $1` after saving. If it reports issues, fix them
|
|
|
28
28
|
|
|
29
29
|
## Atomic Reasoning
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**For each observable truth (user-visible outcome):**
|
|
34
|
-
1. **State the logical component** — What must be true for the user? What can they do/see/verify?
|
|
35
|
-
2. **Validate independence** — Which artifacts (files, endpoints, schemas) prove this truth exists? Can it be built independently?
|
|
36
|
-
3. **Verify correctness** — What test scenarios would prove this observable truth? What are the specific inputs → expected outputs?
|
|
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.
|
|
37
32
|
|
|
38
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.
|
|
39
34
|
|
|
40
|
-
**Synthesize planning strategy:**
|
|
41
|
-
- Group related observable truths into cohesive plans (2-5 tasks each)
|
|
42
|
-
- Identify which plans can be created in parallel vs sequentially
|
|
43
|
-
- Map each plan to specific bounded contexts and domain concepts
|
|
44
|
-
- Ensure each plan produces testable, verifiable outcomes
|
|
45
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
|
+
|
|
46
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.
|
|
47
38
|
|
|
48
39
|
## Steps
|
package/commands/progress.md
CHANGED
|
@@ -9,14 +9,6 @@ Show current project status.
|
|
|
9
9
|
|
|
10
10
|
> **Tool note**: Invoke `draht-tools <subcommand>` as `node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" <subcommand>` via the Bash tool.
|
|
11
11
|
|
|
12
|
-
## Atomic Reasoning
|
|
13
|
-
|
|
14
|
-
Before checking progress, decompose project state into atomic reasoning units:
|
|
15
|
-
|
|
16
|
-
1. **State the logical component** — What milestone are we in? What phase is active? What work is complete vs in-progress?
|
|
17
|
-
2. **Validate independence** — Are there blockers? Are phases in the correct sequence? Is anything waiting on external input?
|
|
18
|
-
3. **Verify correctness** — Does the reported state match reality? Are all verified phases truly complete? Are there unreported issues?
|
|
19
|
-
|
|
20
12
|
## Steps
|
|
21
13
|
1. Read `.planning/STATE.md` for current phase and status
|
|
22
14
|
2. Read `.planning/ROADMAP.md` and extract all phases with their status
|