draht-claude
v2026.11.22-1
Published
Draht GSD, multi-agent, TDD and DDD workflows as a Claude Code plugin. Install with `npx draht-claude install`.
Maintainers
Readme
draht-claude
Draht's GSD (Get Shit Done) workflow, multi-agent orchestration, and TDD/DDD discipline as a Claude Code plugin.
One package, one install command:
npx draht-claude installThis bundles everything draht gives its own CLI — slash commands, specialist subagents, workflow hooks, and the planning framework — so you can run the same flows inside Claude Code.
What you get
Slash commands
Project lifecycle
/new-project— greenfield: questioning → domain model → requirements → roadmap/init-project— existing codebase: map → extract domain → roadmap/map-codebase— standalone codebase analysis (parallel architect + verifier subagents)/next-milestone— plan the next milestone after all current phases are verified
Per-phase cycle
/discuss-phase N— capture decisions and gray areas/plan-phase N— atomic execution plans (parallel architect subagents)/execute-phase N— TDD red→green→refactor (parallel implementer subagents)/verify-work N— parallel verifier + security-auditor + reviewer + quality gate
Session continuity
/pause-work— create handoff document/resume-work— read handoff, verify state, continue/progress— show current position in the roadmap
Ad-hoc
/draht:budget [configure|status|new]— configure this repository's token budgets, inspect usage, or start a new task/quick <task>— small tracked task with TDD cycle/fix <bug>— diagnose → reproducing test → minimal fix (debugger + implementer subagents)/review [scope]— parallel code review + security audit/atomic-commit— analyze diff, split into atomic conventional commits/orchestrate <task>— decompose work and dispatch the right mix of specialist subagents/orchestrate-loop <goal>— verification-gated loop of fresh worker iterations until a deterministic check passes/resolve-conflicts— resolve an in-progress merge/rebase by reconstructing both sides' intent/grill <subject>— whole-frontier interrogation of any idea, spec, ticket list, or decision; output form chosen at the end/why <question>— code archaeology: parallelinvestigatorsubagents gather evidence per category, synthesized into a confidence-tiered, citation-backed answer/triage <report>— classify an external issue report after a bounded cause trace, dedupe against GitHub Issues, create a ticket only behind a fail-closed gate/create-verification-skill [app]— generate a committed project-localverify-<app>skill that drives the real app the way a user does and captures proof artifacts/speak [text]— speak text aloud via the ElevenLabs text-to-speech helper; with no text, voices a short summary of the latest result
11 specialist subagents
All usable via Claude Code's Task tool (subagent_type: <name>):
| Agent | Use |
|---|---|
| advisor | Strategic guidance on the strongest tier — consulted rarely, steers, never implements |
| architect | Reads codebase, produces structured implementation plans |
| implementer | Writes code following TDD cycle from plan tasks |
| reviewer | Reviews changes for correctness, types, conventions, domain language |
| spec-reviewer | Checks a completed task's diff against its spec — no more, no less |
| debugger | Reproduces and diagnoses bugs to root cause |
| verifier | Runs lint + typecheck + tests, reports results without fixing |
| investigator | Searches one assigned evidence category (git history, review/planning/decision records) and returns verbatim-cited findings for /why |
| speaker | Voices a summary or message aloud via the ElevenLabs helper; degrades to a text report without an API key or audio device |
| git-committer | Stages and commits with conventional commit messages |
| security-auditor | Scans for injection, auth, secrets, unsafe patterns |
| advisor | Strongest-tier strategic steer, consulted rarely when stuck or before committing to an approach |
19 bundled skills
draht— router and catalog for the skill family: what draht is, which skill fits which situationgsd-workflow— complete GSD methodology reference (directory structure, cycle, hooks, config)tdd-workflow— red→green→refactor discipline, commit conventions, cycle violationstest-audit— authoring gates, evidence-led test audits, and subsystem campaigns that preserve owner-boundary contractsddd-workflow— bounded contexts, ubiquitous language, aggregates, domain eventsdebugging-workflow— the four-phase systematic debugging protocol/fixenforces, available transversallyatomic-reasoning— decompose work into independently verifiable units before actingbrainstorming— Socratic ideation gate before any project work beginsloop-workflow— cycles of work gated by deterministic checks until a stop condition holdsmodel-tiering— advisor and orchestrator patterns for cost-efficient model selectionverification-gate— evidence before claims: run the proving command before saying "done"saga-spawner— unattended repo advancement as a cloud routine reconciling a saga graph of beatscinematic-continuation— provider-neutral, time-coded video continuation from bundled distilled style and continuity referencesunslop— cut AI tells from prose deliverables, then add voice back so the result is neither slop nor sterile; includes an STE-lite register (after ASD-STE100) for proceduresexplainers— evidence-built Mermaid diagrams and self-contained HTML explainers when a report's content is a graphepistemics— confidence calibration for investigation findings: five tiers, cite-or-label-as-inference, null results as evidencetypescript-discipline— make illegal states unrepresentable: discriminated unions, branded primitives, boundary parsing, exhaustivenessblast-radius— impact analysis beyond the diff: reduce the safety argument to one falsifiable fact and prove it on the evidence ladderjudge— the human-judgment queue: how a new test is replayed and mutated into evidence, what a red or green gate card means, and how a reviewer's verdict comes back into the session
4 workflow hook scripts
Invoked from inside commands (not Claude Code lifecycle hooks):
gsd-pre-execute.cjs <phase>— preconditions before executiongsd-post-task.cjs <phase> <plan> <task> <status> [commit]— record result + verify TDD cyclegsd-post-phase.cjs <phase>— generate phase report, update ROADMAP statusgsd-quality-gate.cjs [--strict]— lint + typecheck + test + coverage enforcement
6 Claude Code lifecycle hooks
- SessionStart — surfaces current phase, status, and CONTINUE-HERE marker when a session opens in a draht project (
session-start.cjs) - UserPromptSubmit — prepends a tiny
[draht]reminder of phase/status before each prompt (prompt-context.cjs), then delivers any pending judge feedback (judge-hook.cjs) - PostToolUse — after
Edit/Write/MultiEdit, runs a fast check over the touched files (post-edit-check.cjs) and records which test files the session touched (judge-hook.cjs) - PreToolUse — the red gate: an edit to source that follows a test edit is held while the test is replayed against the code as it stands (
judge-hook.cjs) - Stop — runs the quality gate when a session ends (
stop-quality-gate.cjs), then runs the mutation pass on a gate whose implementation has landed and files the finished turn as a review card (judge-hook.cjs) - PermissionRequest — while the judge TUI is running, parks the prompt as a card and waits for the human swipe (
judge-hook.cjs)
The judge hooks are inert unless you run the TUI, and inert again where no Python interpreter is available — edits proceed and the normal permission dialog appears exactly as before.
Token budgets
Opt-in per-file token limits encourage readable, cohesive code and concise documentation. /draht:budget guides you through writing the repository's .draht/budgets.json; repositories without that file are not measured. The defaults are 5,000 tokens per code file and 1,500 per documentation file. Lockfiles, changelogs, and generated files are skipped, and task totals are optional. Trusted plugin hooks enforce the same offline accounting as native draht, shared by subagents and linked worktrees. Chat responses have no budget.
Add status to inspect limits and usage. Only the user starts a new task, by submitting /draht:budget new as the whole prompt. See the budget guide.
The judge queue — reviewing gates, not decisions
A test the agent wrote is a claim, not evidence: the same probabilistic process that gets code wrong also wrote the check meant to catch it. judge is a TUI over those claims, and it turns each one into evidence before asking you anything.
RED — a test was written and the session reaches for the implementation. The test is replayed in a throwaway worktree against the code as it stands:
| result | meaning | |---|---| | fails on an assertion | a real red — the test knows what wrong behaviour looks like | | fails on an import/compile error | a weak red — proves a module is missing, not that behaviour is checked | | passes without the implementation | not a gate; denied without asking anyone | | passes with nothing to revert | already-green — a test for behaviour that already exists; carded at the end of the turn, never held |
GREEN — the implementation landed and the test passes. Single-token mutations are applied to the source lines the change touched and the test is re-run against each; survivors are the mutations your test does not notice. Mutants that fail to compile are discarded rather than counted as kills.
Both stages carry static smells no run can excuse: mock-only assertions, snapshot-only, no assertion, tautologies, .skip/.only, private-internal access, swallowed exceptions.
→ real gate lets the edit through; ← weak gate denies it and hands the session the evidence plus your comment, so the test gets strengthened before the implementation is written. Permission prompts and finished turns still queue as their own card kinds.
npx draht-claude install-judge # symlink into ~/.local/bin
judge # or: judge open, to pop a cmux split
judge gates # the ledger: kill rates and recurring smellsState lives in ~/.claude/judge/. Per-repo settings go under "gates" in .planning/config.json (enabled, testCommand with {file}, timeout, mutants, budget); JUDGE_GATES=0 disables it outright.
The draht status line
statusline/statusline.py renders dir · model · context% · 5h · 7d · token burn · judge queue in the draht foundry palette, sheds detail rather than letting the terminal chop it, and aggregates token burn incrementally from the transcripts under ~/.claude/projects/:
npx draht-claude install-statusline # writes settings.json (previous line saved)
npx draht-claude uninstall-statusline # and restores itBundled draht-tools CLI
All GSD file operations (init, create-project, create-domain-model, create-plan, verify-phase, commit-docs, ...) ship as a standalone Node CJS binary at ${CLAUDE_PLUGIN_ROOT}/bin/draht-tools.cjs. No separate install required.
Installation
The easiest way is the one-shot installer:
npx draht-claude installThat copies the plugin into a local marketplace at ~/.draht/claude-marketplace/ (plugin files under plugins/draht/), then registers and enables it with claude plugin marketplace add and claude plugin install. Restart Claude Code and the commands appear in the slash command picker.
Other install options:
# Reinstall or refresh to latest
npx draht-claude update
# Use a custom local marketplace directory
npx draht-claude install --path /path/to/claude-marketplace
# Check install status
npx draht-claude status
# Opt into the status line and the judge TUI (also available as install flags:
# npx draht-claude install --statusline --judge)
npx draht-claude install-statusline
npx draht-claude install-judge
# Configure subagent models
npx draht-claude configure --agent architect --model opus
npx draht-claude configure --agent implementer --model sonnet
npx draht-claude configure --list
# Remove
npx draht-claude uninstallOr load it for a single session without installing:
mkdir -p /tmp/draht-claude && cd /tmp/draht-claude
npm pack draht-claude
tar -xzf draht-claude-*.tgz --strip-components=1
claude --plugin-dir /tmp/draht-claudeQuick Start
Greenfield project
/new-project a team calendar with slot-based bookingClaude Code will question you through problem, audience, MVP scope, then generate .planning/PROJECT.md, .planning/DOMAIN.md, .planning/TEST-STRATEGY.md, .planning/REQUIREMENTS.md, .planning/ROADMAP.md, and .planning/STATE.md.
Existing project
/init-project refactor the billing moduleClaude Code will map the codebase, extract the current domain model, and propose a roadmap that respects what already works.
Per-phase cycle
/discuss-phase 1 # capture decisions
/clear # fresh session
/plan-phase 1 # parallel architect subagents produce atomic plans
/clear
/execute-phase 1 # parallel implementer subagents run TDD cycles
/clear
/verify-work 1 # parallel verifier + security + reviewer + quality gateBetween every step, run /clear to start a fresh session. This is a feature — each cycle step is designed to run in a clean context.
Pause and resume
/pause-work # creates .planning/CONTINUE-HERE.md
# ... close laptop, go do other things ...
/resume-work # reads handoff, checks state, continuesConfiguration
Subagent models
Each specialist subagent ships with a default model tuned to its workload:
| Agent | Default | Used by |
|---|---|---|
| advisor | fable | any command — rare, high-leverage course correction |
| architect | opus | /plan-phase — deep reasoning for architectural plans |
| implementer | sonnet | /execute-phase — fast, reliable code changes |
| verifier | sonnet | /verify-work — lint, typecheck, test runs |
| security-auditor | opus | /verify-work — security audit and CVE analysis |
| reviewer | opus | /verify-work, /review — code review |
| spec-reviewer | opus | /execute-phase, /verify-work, /review, /quick — spec compliance |
| debugger | inherit | /fix — bug diagnosis |
| investigator | sonnet | /why — parallel single-category evidence gathering |
| speaker | haiku | /speak — voice output via ElevenLabs |
| git-committer | inherit | /atomic-commit — commit staging |
You can override any agent with the configure command:
# Set architect (planning) to Opus and implementer to Sonnet
npx draht-claude configure --agent architect --model opus
npx draht-claude configure --agent implementer --model sonnet
# Use a full model ID
npx draht-claude configure --agent verifier --model claude-opus-5-5
# List current assignments
npx draht-claude configure --list
# Reset a single agent to default
npx draht-claude configure --agent architect --reset
# Reset all agents to defaults
npx draht-claude configure --resetSupported values: fable, opus, sonnet, haiku, a full model ID (e.g. claude-sonnet-5), or inherit.
Hooks
Create .planning/config.json in your project to tune the hooks:
{
"hooks": {
"coverageThreshold": 80,
"tddMode": "advisory",
"qualityGateStrict": false
}
}tddMode:"strict"aborts ongreen:commits without a precedingred:;"advisory"logs a warningqualityGateStrict:truefails the gate on any lint/type/test/coverage misscoverageThreshold: minimum coverage percent required by the quality gate
How It Differs From @draht/coding-agent
This package is a subset of draht packaged for Claude Code:
| Feature | @draht/coding-agent | draht-claude |
|---|---|---|
| Full TUI runtime | ✅ | — (runs inside Claude Code) |
| GSD slash commands | ✅ | ✅ |
| Specialist subagents | ✅ | ✅ |
| TDD / DDD hooks | ✅ | ✅ |
| draht-tools CLI | ✅ | ✅ (bundled) |
| Extensions / Skills / Themes | ✅ | Skills only |
| Multi-agent orchestration | ✅ (built-in subagent tool) | ✅ (via Claude Code Task tool) |
| MCP, custom providers | ✅ | — (use Claude Code's native support) |
| Self-installing CLI | — | ✅ (npx draht-claude install) |
Use draht-claude when you want draht's methodology inside Claude Code. Use @draht/coding-agent when you want draht as a standalone harness with your own providers, extensions, and TUI.
License
MIT. See LICENSE.
Part of the draht project.
