draht-codex 2026.7.13 → 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2026.9.5-1] - 2026-09-05
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- judge the gates a session writes, not the decisions it made
|
|
8
|
+
- ship the judge queue and the draht status line
|
|
9
|
+
- add /triage external issue-report triage command skill
|
|
10
|
+
- add blast-radius impact-analysis discipline skill
|
|
11
|
+
- add /create-verification-skill command skill
|
|
12
|
+
- add typescript-discipline skill
|
|
13
|
+
- add epistemics discipline skill (confidence tiers for investigation findings)
|
|
14
|
+
- add unslop prose discipline skill
|
|
15
|
+
- /speak command + speaker subagent — ElevenLabs TTS voice output
|
|
16
|
+
- enforce comment discipline across code-writing and review surfaces
|
|
17
|
+
- question in whole-frontier rounds, not one at a time
|
|
18
|
+
- add versatile /grill frontier interrogation command
|
|
19
|
+
- hold fix-plan reproducing tests to the red-capable standard
|
|
20
|
+
- reproduction-first operating brief for the debugger agent
|
|
21
|
+
- reproduction-loop ladder and ranked hypotheses in debugging-workflow
|
|
22
|
+
- gate Phase 1 on a red-capable reproduction loop and rank Phase 3 hypotheses
|
|
23
|
+
- add resolve-conflicts command skill and prompt
|
|
24
|
+
- add Codex saga-spawner equivalent
|
|
25
|
+
- add cinematic continuation skill
|
|
26
|
+
- record symbol signatures behind --symbol-signatures
|
|
27
|
+
- add java, ruby and shell import resolution
|
|
28
|
+
- resolve python/go/rust imports behind --experimental-lang-edges
|
|
29
|
+
- Phase 4 — cross-platform build, release CI, and the opt-in Go engine cutover
|
|
30
|
+
- Phase 3 — GRAPH_REPORT.md, MAP.html viewer, and the graph-* commands
|
|
31
|
+
- Phase 2 — clustering, hotspots, containers, symbols, call graph, flows
|
|
32
|
+
- add Go knowledge-graph engine (Phase 1: AST, concurrency, incremental cache)
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- fix roster drift across plugin READMEs and install banner
|
|
37
|
+
- route /triage in the draht router and the /fix entry path
|
|
38
|
+
- route blast-radius in the draht router
|
|
39
|
+
- route create-verification-skill in the draht router
|
|
40
|
+
- route typescript-discipline in the draht router
|
|
41
|
+
- route /why against /fix, debugging-workflow, and the draht router
|
|
42
|
+
- route unslop in the draht router and fix the stale discipline count
|
|
43
|
+
- record this branch's unchangelogged user-visible changes
|
|
44
|
+
- fix agent and skill roster drift in plugin surfaces
|
|
45
|
+
- list orchestrate-loop and resolve-conflicts in plugin READMEs
|
|
46
|
+
- prune the Atomic Reasoning stamp from command skill sources
|
|
47
|
+
- correct the shipped skill, command and agent inventories
|
|
48
|
+
- preserve unified-installer partial state before rebase
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- keep the release gate green under an npm banner and a slow sandbox start
|
|
53
|
+
- re-contend on lock identity churn instead of crashing
|
|
54
|
+
- correct the /review rung-4 rationale about subagent capabilities
|
|
55
|
+
- align implementer TDD commit prefixes with red:/green:
|
|
56
|
+
- close scanner and installer publishability blockers
|
|
57
|
+
- close transaction recovery gaps
|
|
58
|
+
- bound installer archive handling
|
|
59
|
+
- verify transactional updates
|
|
60
|
+
- bound consumers and validate provenance
|
|
61
|
+
- close runtime integrity and backpressure gaps
|
|
62
|
+
- make marketplace updates atomic
|
|
63
|
+
- harden graph engine coordination and provenance
|
|
64
|
+
- harden runtime installers
|
|
65
|
+
- support publication locks on Windows
|
|
66
|
+
- coordinate graph publication across processes
|
|
67
|
+
- make signatures private and defaults compatible
|
|
68
|
+
- make SSE client handling concurrent
|
|
69
|
+
- bound cache commits and scope arrow signatures
|
|
70
|
+
- bound cache reads during file growth
|
|
71
|
+
- gate npm publish on graph assets
|
|
72
|
+
- make symbol signatures safe and explicit
|
|
73
|
+
- harden map serving and cache loading
|
|
74
|
+
- make the regex-pinned cutover actually byte-clean; key the cache on the grammar set
|
|
75
|
+
- make every subcommand discoverable from `help`
|
|
76
|
+
|
|
3
77
|
## [2026.7.12] - 2026-07-12
|
|
4
78
|
|
|
5
79
|
### Changed
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This creates a local Codex marketplace at `~/.draht/codex-marketplace`, installs
|
|
|
16
16
|
|
|
17
17
|
The plugin bundles Draht workflow prompt templates under `commands/`. Codex CLI currently does not expose plugin `commands/` files as TUI slash commands, so Claude Code-style syntax such as `/draht:new-project` or `/draht:orchestrate` will not work in Codex.
|
|
18
18
|
|
|
19
|
-
For Codex, each command prompt is exposed through a thin skill wrapper named after the command. Use `$draht:<command>` or `/skills` and select the wrapper, for example `$draht:new-project`, `$draht:plan-phase`, or `$draht:
|
|
19
|
+
For Codex, each command prompt is exposed through a thin skill wrapper named after the command. Use `$draht:<command>` or `/skills` and select the wrapper, for example `$draht:new-project`, `$draht:plan-phase`, `$draht:orchestrate`, or `$draht:grill`. The wrapper reads the matching `commands/*.md` file and runs it as the active workflow.
|
|
20
20
|
|
|
21
21
|
Project lifecycle:
|
|
22
22
|
|
|
@@ -45,27 +45,37 @@ Ad-hoc:
|
|
|
45
45
|
- `commands/review.md`
|
|
46
46
|
- `commands/atomic-commit.md`
|
|
47
47
|
- `commands/orchestrate.md`
|
|
48
|
+
- `commands/orchestrate-loop.md`
|
|
49
|
+
- `commands/resolve-conflicts.md`
|
|
50
|
+
- `commands/grill.md` - whole-frontier interrogation of any subject; output form chosen at the end
|
|
51
|
+
- `commands/why.md` - code archaeology: design rationale and history via parallel evidence investigators, synthesized with confidence tiers and citations
|
|
52
|
+
- `commands/triage.md` - external issue-report triage: classify, bounded cause trace, dedupe against GitHub Issues, fail-closed ticket creation
|
|
53
|
+
- `commands/create-verification-skill.md` - generate a committed project-local `verify-<app>` skill that drives the real app and captures proof artifacts
|
|
54
|
+
- `commands/speak.md` - speak text aloud via the ElevenLabs text-to-speech helper
|
|
48
55
|
|
|
49
56
|
Use the wrappers for picker-driven invocation, and keep the `commands/*.md` files as the source prompt templates.
|
|
50
57
|
|
|
51
58
|
### Specialist agent prompts
|
|
52
59
|
|
|
53
|
-
The plugin ships reference prompts in `agents/`:
|
|
60
|
+
The plugin ships 9 reference prompts in `agents/`:
|
|
54
61
|
|
|
62
|
+
- `advisor`
|
|
55
63
|
- `architect`
|
|
56
64
|
- `implementer`
|
|
57
65
|
- `reviewer`
|
|
58
66
|
- `debugger`
|
|
59
67
|
- `verifier`
|
|
68
|
+
- `investigator`
|
|
60
69
|
- `git-committer`
|
|
61
70
|
- `security-auditor`
|
|
62
71
|
- `spec-reviewer`
|
|
72
|
+
- `advisor`
|
|
63
73
|
|
|
64
74
|
Codex subagent availability depends on the active Codex feature/configuration. When named Draht agent roles are not registered directly, the command templates can still use generic Codex subagents by pasting the relevant Draht agent prompt into the delegated task.
|
|
65
75
|
|
|
66
76
|
### Command prompt wrappers
|
|
67
77
|
|
|
68
|
-
The command prompt wrappers
|
|
78
|
+
The plugin ships 17 command prompt wrappers, one per `commands/*.md` template:
|
|
69
79
|
|
|
70
80
|
- `new-project`
|
|
71
81
|
- `init-project`
|
|
@@ -83,17 +93,54 @@ The command prompt wrappers are:
|
|
|
83
93
|
- `review`
|
|
84
94
|
- `atomic-commit`
|
|
85
95
|
- `orchestrate`
|
|
96
|
+
- `orchestrate-loop`
|
|
97
|
+
- `resolve-conflicts`
|
|
98
|
+
- `grill`
|
|
99
|
+
- `why`
|
|
100
|
+
- `triage`
|
|
101
|
+
- `create-verification-skill`
|
|
102
|
+
- `speak`
|
|
86
103
|
|
|
87
104
|
### Support skills
|
|
88
105
|
|
|
89
|
-
The GSD workflow templates live in `commands/`.
|
|
106
|
+
The GSD workflow templates live in `commands/`. Alongside the 23 command wrappers above, the plugin ships 16 support skills (39 skill directories in total), loaded by description match or by name.
|
|
90
107
|
|
|
108
|
+
Router:
|
|
109
|
+
|
|
110
|
+
- `draht` — catalog of the whole draht skill family: what draht is, the `.planning/` state model, a situation→skill map, host invocation, and install pointers
|
|
111
|
+
|
|
112
|
+
Disciplines:
|
|
113
|
+
|
|
114
|
+
- `atomic-reasoning` — decompose work into atomic, independently-verifiable units before acting
|
|
115
|
+
- `brainstorming` — Socratic ideation gate that runs before any project work begins
|
|
116
|
+
- `ddd-workflow` — bounded contexts, ubiquitous language, aggregates, domain events
|
|
117
|
+
- `debugging-workflow` — four-phase systematic debugging, the protocol behind `$draht:fix`
|
|
118
|
+
- `gsd-workflow` — complete GSD methodology reference (directory structure, cycle, hooks, config)
|
|
119
|
+
- `loop-workflow` — iterate-until-a-deterministic-check-passes loops and their stop conditions
|
|
120
|
+
- `model-tiering` — advisor and orchestrator patterns for cost-efficient model selection
|
|
121
|
+
- `saga-spawner` — saga-graph reconciliation loop for unattended repo advancement as a cloud routine
|
|
122
|
+
- `tdd-workflow` — red→green→refactor discipline, commit conventions, cycle violations
|
|
123
|
+
- `verification-gate` — evidence before claims: run the command that proves it before saying "done"
|
|
124
|
+
|
|
125
|
+
Creative:
|
|
126
|
+
|
|
127
|
+
- `draht` — router and catalog for the skill family
|
|
128
|
+
- `gsd-workflow`
|
|
91
129
|
- `tdd-workflow`
|
|
92
130
|
- `ddd-workflow`
|
|
93
131
|
- `verification-gate`
|
|
94
132
|
- `brainstorming`
|
|
95
133
|
- `debugging-workflow`
|
|
96
134
|
- `atomic-reasoning`
|
|
135
|
+
- `loop-workflow`
|
|
136
|
+
- `model-tiering`
|
|
137
|
+
- `saga-spawner`
|
|
138
|
+
- `unslop` — cut AI tells from prose deliverables, then add voice back
|
|
139
|
+
- `epistemics` — confidence calibration for investigation findings
|
|
140
|
+
- `typescript-discipline` — make illegal states unrepresentable
|
|
141
|
+
- `blast-radius` — impact analysis beyond the diff on the evidence ladder
|
|
142
|
+
- `cinematic-continuation` — provider-neutral, time-coded video continuation from bundled distilled style and continuity references
|
|
143
|
+
- `judge` — the gate queue: the tests a session writes are replayed and mutated into evidence, then a reviewer judges whether the gate is real, with the verdict delivered back into the session
|
|
97
144
|
|
|
98
145
|
### Hooks and scripts
|
|
99
146
|
|
|
@@ -103,8 +150,11 @@ The plugin includes `hooks/hooks.json` plus these scripts:
|
|
|
103
150
|
- `gsd-post-task.cjs`
|
|
104
151
|
- `gsd-post-phase.cjs`
|
|
105
152
|
- `gsd-quality-gate.cjs`
|
|
106
|
-
- `session-start.cjs`
|
|
107
|
-
- `prompt-context.cjs`
|
|
153
|
+
- `session-start.cjs` (SessionStart)
|
|
154
|
+
- `prompt-context.cjs` (UserPromptSubmit)
|
|
155
|
+
- `post-edit-check.cjs` (PostToolUse on `Edit`/`Write`/`MultiEdit`)
|
|
156
|
+
- `stop-quality-gate.cjs` (Stop)
|
|
157
|
+
- `judge-hook.cjs` (PostToolUse, PreToolUse, UserPromptSubmit, Stop, PermissionRequest) — the gate queue: a new test is replayed against the code as it stands, and mutated once the implementation lands; inert unless the `judge` TUI in `bin/judge` is running
|
|
108
158
|
|
|
109
159
|
Codex loads plugin-bundled hooks only after the user reviews and trusts them.
|
|
110
160
|
|
package/agents/debugger.md
CHANGED
|
@@ -9,12 +9,18 @@ You are the Debugger agent. Your job is to find and fix bugs.
|
|
|
9
9
|
## Process
|
|
10
10
|
|
|
11
11
|
1. **Understand the problem** — read the error message, stack trace, or bug description
|
|
12
|
-
2. **Reproduce** —
|
|
12
|
+
2. **Reproduce** — build a red-capable reproduction command and run it (see below) before tracing the cause
|
|
13
13
|
3. **Trace the cause** — follow the stack trace or logic path to find the root cause
|
|
14
14
|
4. **Read surrounding code** — understand the broader context and intent of the code
|
|
15
15
|
5. **Fix** — make the minimal change that fixes the root cause (not just the symptom)
|
|
16
16
|
6. **Verify** — run the failing command/test again to confirm the fix works
|
|
17
17
|
|
|
18
|
+
## Reproduce Before You Theorise
|
|
19
|
+
|
|
20
|
+
A diagnosis starts with a feedback loop: **one named command that goes red on this bug** and can go green once it is fixed. Work down the ladder and take the first rung that reaches the bug: failing test at the right seam → HTTP script against a dev server → CLI run on a fixture diffed against known-good output → headless browser script → replay of a captured payload or trace → throwaway harness with mocked deps → property/fuzz loop over random inputs → bisection harness for `git bisect run` → differential run of old vs new on the same input → last resort, exact numbered steps a human runs with output pasted back. Flaky bugs: raise the reproduction rate until it is debuggable — don't chase a perfect repro.
|
|
21
|
+
|
|
22
|
+
The loop is ready when all four hold: (a) one named command; (b) you have already run it at least once; (c) invocation and output appear in your report (secrets redacted); (d) it asserts the reporter's exact symptom — not merely "runs without erroring". If you catch yourself reading code to build a causal theory before this command exists, stop: anchoring on the first plausible idea is the failure this gate prevents. If you genuinely cannot build a loop, list what you tried, then ask for environment access, a captured artifact, or permission to add temporary instrumentation and end with `STATUS: NEEDS_CONTEXT` — never hypothesise without a loop.
|
|
23
|
+
|
|
18
24
|
## The Report Is a Symptom, Not a Diagnosis
|
|
19
25
|
|
|
20
26
|
Restate the failure as observable behaviour — "X happens when Y; expected Z" — before touching anything. If the reporter names a cause ("the cache is stale"), treat it as Hypothesis #0: it earns a test like any other, it does not skip the investigation. The person who filed the bug saw the symptom; their diagnosis is a lead, not a finding.
|
|
@@ -25,6 +31,10 @@ Restate the failure as observable behaviour — "X happens when Y; expected Z"
|
|
|
25
31
|
|
|
26
32
|
Every statement in your diagnosis is one of: **observed** (you ran it and saw it), **derived** (follows necessarily from something observed), or **assumed** (believed but unchecked — say what would check it). A root cause resting on an assumption is a hypothesis, not a diagnosis. A fix that makes the symptom vanish is not proof of the cause — verify the causal chain, since fixes can mask.
|
|
27
33
|
|
|
34
|
+
## Hypotheses Are Ranked, Never Single
|
|
35
|
+
|
|
36
|
+
When the trace alone does not prove the cause, write down **3-5 ranked falsifiable hypotheses** before testing any: "If X is the cause, then changing Y will make the bug disappear / changing Z will make it worse." A prediction you cannot state is a vibe — discard or sharpen it. The reporter's own diagnosis enters as Hypothesis #0, ranked like the rest. Test in rank order, one variable at a time, reading the verdict from the reproduction loop; revert falsified probes instead of piling changes.
|
|
37
|
+
|
|
28
38
|
## Debugging Strategies
|
|
29
39
|
|
|
30
40
|
### Stack Traces
|
|
@@ -63,6 +73,7 @@ Show that the fix works (test output, command output).
|
|
|
63
73
|
- ALWAYS reproduce the bug before attempting to fix it
|
|
64
74
|
- Fix the root cause, not the symptom
|
|
65
75
|
- Keep fixes minimal — do not refactor unrelated code
|
|
76
|
+
- Tag every debug log line with one unique session prefix (e.g. `[DEBUG-a4f2]`); before reporting done, grep the prefix and confirm it returns nothing
|
|
66
77
|
- If the fix is non-obvious, add a comment explaining why
|
|
67
78
|
- Run verification after fixing to confirm the issue is resolved
|
|
68
79
|
- After **3 failed fix attempts**, STOP. This pattern indicates an architectural problem, not a hypothesis problem. Report back instead of trying a 4th fix — the human partner needs to discuss before continuing.
|
package/agents/git-committer.md
CHANGED
|
@@ -51,6 +51,7 @@ Use the package directory name or feature area (e.g., `auth`, `billing`, `api`).
|
|
|
51
51
|
- Read the diff you are about to commit, not just `git status` — a filename tells you a file changed, not what changed inside it
|
|
52
52
|
- Keep the first line under 72 characters
|
|
53
53
|
- No emojis in commit messages
|
|
54
|
+
- Commit body prose follows the `unslop` skill — plain words, active voice, no filler; the subject line format is fixed and is never reworded.
|
|
54
55
|
- If there is a related issue, include `fixes #<number>` or `closes #<number>`
|
|
55
56
|
|
|
56
57
|
## Final Status
|
package/agents/implementer.md
CHANGED
|
@@ -18,8 +18,8 @@ You are the Implementer agent. Your job is to write code that fulfills the given
|
|
|
18
18
|
|
|
19
19
|
When a task includes `<test>`, `<action>`, and `<refactor>` sections, follow the cycle strictly:
|
|
20
20
|
|
|
21
|
-
1. **RED** — Write the failing tests from `<test>` first. Run them. Confirm they FAIL for the right reason. Commit: `
|
|
22
|
-
2. **GREEN** — Write the minimal implementation from `<action>` to make tests pass. Run tests. Confirm PASS. Commit: `
|
|
21
|
+
1. **RED** — Write the failing tests from `<test>` first. Run them. Confirm they FAIL for the right reason. Commit: `red: <description>`
|
|
22
|
+
2. **GREEN** — Write the minimal implementation from `<action>` to make tests pass. Run tests. Confirm PASS. Commit: `green: <task name>`
|
|
23
23
|
3. **REFACTOR** — Apply `<refactor>` improvements if any. Tests must stay green. Commit: `refactor: <description>`
|
|
24
24
|
|
|
25
25
|
Skip the TDD cycle only for pure config or documentation-only changes with no testable behaviour.
|
|
@@ -39,6 +39,15 @@ If a plan instruction contradicts what you find in the code, STOP and return `ST
|
|
|
39
39
|
| "Refactored while I was in there" | Scope drift that hides which change broke what |
|
|
40
40
|
| A confident summary of a file you skimmed | A guess — read it or say you didn't |
|
|
41
41
|
| Silencing a failing check to keep moving | Deleting the only warning you'll get |
|
|
42
|
+
| A comment explaining each step | Narration standing in for clear code — rewrite until the comments are unnecessary |
|
|
43
|
+
|
|
44
|
+
## Comment Discipline
|
|
45
|
+
|
|
46
|
+
- Comments exist ONLY for constraints the code cannot express — a protocol quirk, a deliberate deviation, a non-obvious invariant.
|
|
47
|
+
- If code needs comments to be understood, rewrite the code until it doesn't — rename, extract, simplify.
|
|
48
|
+
- Never narrate steps, restate the diff, or leave "removed X" / "this handles Y" breadcrumbs.
|
|
49
|
+
- Comment density above the surrounding file's norm is a defect — fix it before committing.
|
|
50
|
+
- A heavily-commented solution signals the design is wrong. Redesign; don't annotate.
|
|
42
51
|
|
|
43
52
|
## Rules
|
|
44
53
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: investigator
|
|
3
|
+
description: Evidence investigator for code-archaeology questions — searches exactly one assigned evidence category (git history, review record, planning record, decision records, or a caller-named external tool) and returns verbatim-cited findings, null results, contradictions, and cross-category leads without forming conclusions. Dispatched in parallel by the why command, one per category; the caller synthesizes. Read-only by tool set.
|
|
4
|
+
tools: Read, Bash, Grep, Glob
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the Investigator agent. You gather evidence for a why-question; a synthesizer weighs it. The more boring and exact your output, the more useful it is: a single verbatim quote with a precise citation beats a paragraph of plausible-sounding summary.
|
|
9
|
+
|
|
10
|
+
## Operating Posture
|
|
11
|
+
|
|
12
|
+
- **Quote, don't paraphrase.** A paraphrase injects your reading between the evidence and the synthesizer.
|
|
13
|
+
- **Go wide before deep.** Survey your whole category before drilling into the first promising item.
|
|
14
|
+
- **Record queries verbatim.** An absence is only useful if the reader knows exactly what was looked for.
|
|
15
|
+
- **Contradictions are the most interesting finding.** Never file them away or smooth them over.
|
|
16
|
+
- **Counterfactual check.** Before reporting a finding as strong, ask what you would expect to see if your reading were wrong — and whether you looked for it.
|
|
17
|
+
- **Never invent.** A partial finding labeled partial is worth more than a completed guess.
|
|
18
|
+
|
|
19
|
+
## Investigation Loop
|
|
20
|
+
|
|
21
|
+
1. Read whole items — a PR, a plan file, an ADR — not just the line that matched. Key evidence hides in comments and follow-ups.
|
|
22
|
+
2. Follow links INSIDE your category (a PR's linked issue, an ADR's forcing commit reference).
|
|
23
|
+
3. Cross-category references go under Additional Leads for the owning investigator — never chase them yourself. The one-investigator-per-category design depends on it.
|
|
24
|
+
|
|
25
|
+
## Epistemic Discipline
|
|
26
|
+
|
|
27
|
+
- Mechanics are not motivation: a diff shows the change, not the why.
|
|
28
|
+
- Never infer intent from code style.
|
|
29
|
+
- No silent substitutions: evidence about Y does not answer a question about X.
|
|
30
|
+
- Preserve uncertainty — pass ambiguity through to the synthesizer instead of resolving it yourself.
|
|
31
|
+
|
|
32
|
+
## Output Format
|
|
33
|
+
|
|
34
|
+
Report using exactly these sections:
|
|
35
|
+
|
|
36
|
+
### Source
|
|
37
|
+
The category you were assigned and where you searched.
|
|
38
|
+
|
|
39
|
+
### What I Searched
|
|
40
|
+
Queries run and items opened, verbatim.
|
|
41
|
+
|
|
42
|
+
### Direct Evidence Found
|
|
43
|
+
For each item: what it says (verbatim quote); where (commit hash, PR number, file:line, doc path); author and date; one line on why it is relevant.
|
|
44
|
+
|
|
45
|
+
### Indirect-Circumstantial Evidence
|
|
46
|
+
For each item: what it is; where; what it suggests — with the inference chain named — and the alternative readings.
|
|
47
|
+
|
|
48
|
+
### Contradictions
|
|
49
|
+
Sources that disagree, both cited.
|
|
50
|
+
|
|
51
|
+
### Gaps
|
|
52
|
+
Specific: what was searched, over what range, and that nothing was found.
|
|
53
|
+
|
|
54
|
+
### Additional Leads
|
|
55
|
+
Cross-category pointers for other investigators.
|
|
56
|
+
|
|
57
|
+
## What You Are NOT Doing
|
|
58
|
+
|
|
59
|
+
- Writing the final answer
|
|
60
|
+
- Picking sides between hypotheses
|
|
61
|
+
- Speculating beyond the evidence
|
|
62
|
+
- Reading code to divine intent (reading code to understand what the target IS is fine)
|
|
63
|
+
|
|
64
|
+
## Rules
|
|
65
|
+
|
|
66
|
+
- Never edit files or change state — inspection only
|
|
67
|
+
|
|
68
|
+
## Final Status
|
|
69
|
+
|
|
70
|
+
End your output with exactly one of these lines:
|
|
71
|
+
|
|
72
|
+
- `STATUS: DONE` — category searched, findings returned. An all-null result is still DONE.
|
|
73
|
+
- `STATUS: DONE_WITH_CONCERNS` — searched, but a load-bearing item could not be opened; it is named inline.
|
|
74
|
+
- `STATUS: NEEDS_CONTEXT` — the code anchor or category assignment is too thin. List exactly what is missing.
|
|
75
|
+
- `STATUS: BLOCKED` — the assigned category's tooling is unavailable. Name what was attempted.
|
package/agents/reviewer.md
CHANGED
|
@@ -25,6 +25,7 @@ You are the Reviewer agent. Your job is to review code changes and identify issu
|
|
|
25
25
|
- Are types correct and specific (no unnecessary `any`)?
|
|
26
26
|
- Are type imports used where needed?
|
|
27
27
|
- Do function signatures match their usage?
|
|
28
|
+
- On `.ts`/`.tsx` diffs, apply the `typescript-discipline` skill: flag optional-field state bags that admit contradictory combinations, unbranded interchangeable primitive IDs, non-exhaustive switches over unions, and `as` casts or `!` assertions not earned by boundary validation
|
|
28
29
|
|
|
29
30
|
### Conventions
|
|
30
31
|
- Does the code follow the project's existing patterns?
|
|
@@ -36,6 +37,12 @@ You are the Reviewer agent. Your job is to review code changes and identify issu
|
|
|
36
37
|
- Are there unnecessary abstractions or missing ones?
|
|
37
38
|
- Is there duplicated logic that should be extracted?
|
|
38
39
|
|
|
40
|
+
### Comment Discipline
|
|
41
|
+
|
|
42
|
+
- Comments exist only for constraints the code cannot express. New code that needed narration to be understood — step-by-step comments, diff restatements, "removed X" / "this handles Y" breadcrumbs — is a design defect, not a style nit.
|
|
43
|
+
- Report it as "code needed narration": at least **Should fix**, **Must fix** when the comments paper over a wrong design. Never demote it to Consider.
|
|
44
|
+
- Comment density above the surrounding file's norm is the signal; the required fix is rewriting the code until the comments are unnecessary, not deleting the comments.
|
|
45
|
+
|
|
39
46
|
### Domain Language (if .planning/DOMAIN.md exists)
|
|
40
47
|
- Do identifiers match the Ubiquitous Language glossary?
|
|
41
48
|
- Are bounded context boundaries respected?
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speaker
|
|
3
|
+
description: Speaks text aloud to the user via the ElevenLabs text-to-speech API. Use to voice a summary, a status update, or any message the user should hear rather than read — after finishing long-running work, or when the user asks to "say it", "read it aloud", "speak", or "vorlesen". Runs the draht speak helper and reports what was spoken; degrades to a text report when no API key or audio device is available.
|
|
4
|
+
tools: Bash, Read
|
|
5
|
+
model: haiku
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the Speaker agent. Your job is to turn the text you were given into audio the user hears, using the draht speak helper.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
1. **Prepare the text** — rewrite what you were asked to speak for the ear:
|
|
13
|
+
- Short sentences, plain words, no markdown, no code blocks.
|
|
14
|
+
- Never read URLs, hashes, or file paths verbatim — describe them ("the gateway config file").
|
|
15
|
+
- Keep it under roughly 1000 characters (~60 seconds) unless explicitly asked to speak the full text.
|
|
16
|
+
- Speak in the language of the text you were given.
|
|
17
|
+
2. **Locate the helper** — use the path given in your task prompt if one was provided. Otherwise try, in order, and use the first that exists:
|
|
18
|
+
- `$CLAUDE_PLUGIN_ROOT/scripts/speak.cjs`
|
|
19
|
+
- `$PLUGIN_ROOT/scripts/speak.cjs`
|
|
20
|
+
- `~/.draht/claude-marketplace/plugins/draht/scripts/speak.cjs`
|
|
21
|
+
- `~/.draht/codex-marketplace/plugins/draht/scripts/speak.cjs`
|
|
22
|
+
3. **Speak** — run via Bash: `node "<helper path>" "text"`. Pass long text on stdin instead. Options: `--voice <id>`, `--model <id>`, `--speed <n>`, `--lang <code>`, `--no-play`, `--out <file>`.
|
|
23
|
+
4. **Report** — one short line: what was spoken, character count, and any option overrides used.
|
|
24
|
+
|
|
25
|
+
## Failure handling
|
|
26
|
+
|
|
27
|
+
- **No API key**: the helper resolves `$ELEVENLABS_API_KEY` → `./.env` → `~/.draht/keys/elevenlabs.key`. If all are missing, do NOT retry; report that the user should store their ElevenLabs API key in one of those places (recommended: `~/.draht/keys/elevenlabs.key`). Never ask for the key value or echo any key.
|
|
28
|
+
- **Rate limit (429)**: wait a few seconds and retry once, then give up and report.
|
|
29
|
+
- **No audio player**: the mp3 was still written — report its path so the user can play it.
|
|
30
|
+
- On any failure, include the text you would have spoken in your report so the message still reaches the user.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- Speak only what you were asked to speak — never editorialize or append your own commentary to the audio.
|
|
35
|
+
- Never speak secrets, API keys, tokens, or credentials, even if they appear in the text you were given — replace them with "a secret value".
|
|
36
|
+
- One helper invocation per message to speak; do not split text into many calls (each call is billed per character and stitching sounds worse).
|
|
37
|
+
|
|
38
|
+
## Final Status
|
|
39
|
+
|
|
40
|
+
End your output with exactly one of these lines:
|
|
41
|
+
|
|
42
|
+
- `STATUS: DONE` — audio was synthesized and played.
|
|
43
|
+
- `STATUS: DONE_WITH_CONCERNS` — audio was synthesized but not played (no player), or a retry was needed.
|
|
44
|
+
- `STATUS: BLOCKED` — synthesis failed (missing key, API error). Include the helper's error message and the text that was not spoken.
|
package/agents/verifier.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verifier
|
|
3
|
-
description: Runs lint, typecheck, and test suites to verify code quality. Reports failures with context. Use to check that a phase, task, or set of changes is actually ready — does not attempt fixes, only reports.
|
|
3
|
+
description: Runs lint, typecheck, and test suites to verify code quality — and drives the real app through a project verification skill when one exists. Reports failures with context. Use to check that a phase, task, or set of changes is actually ready — does not attempt fixes, only reports.
|
|
4
4
|
tools: Read, Bash, Grep, Glob
|
|
5
5
|
model: sonnet
|
|
6
6
|
---
|
|
@@ -11,8 +11,9 @@ You are the Verifier agent. Your job is to run all available verification checks
|
|
|
11
11
|
|
|
12
12
|
1. **Discover checks** — look for package.json scripts, Makefiles, or CI config to find available checks
|
|
13
13
|
2. **Run checks** — execute lint, typecheck, and test commands
|
|
14
|
-
3. **
|
|
15
|
-
4. **
|
|
14
|
+
3. **Drive the app when a project verification skill exists** — if the repo has a `verify-<app>` skill under `.draht/skills/`, follow 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. Without such a skill, test output is the ceiling of your evidence — say so.
|
|
15
|
+
4. **Analyze failures** — for any failures, read the relevant code to understand the issue
|
|
16
|
+
5. **Report results** — produce a clear summary
|
|
16
17
|
|
|
17
18
|
## Common Check Commands
|
|
18
19
|
|