Use the right model. Test before code. Read the domain. Orchestrate when it saves time.
npx draht-claude install Add GSD workflow, sub-agents, and TDD discipline to Claude Code. Also ships as a Codex plugin (npx draht-codex install).
bun add -g @draht/coding-agent Run the full agent across 42 providers. Claude is not required.
The router scores each task by reasoning, context, and latency. It sends simple work to cheap models. It saves Opus for hard architecture. You stop paying Opus rates for boilerplate.
The agent writes a failing test before code. It reads bounded contexts, aggregates, and the terms your team uses. It edits in that language. Red tests block commits.
Sub-agents run independent work in parallel; dependent work stays ordered. Checkpoints snapshot the repo before risky edits, and /rewind steps back when a turn goes wrong. The session log keeps every model call and its cost on disk.
A JSON config maps roles — architect, implement, boilerplate, quick, review, docs — to a primary model with ordered fallbacks. Direct API calls, no OpenRouter in the hot path. Override per project or globally.
Every run writes a tree to one JSONL file. Jump back. Fork a branch. Swap the routing profile. Return later. Token costs stay on disk.
Ten built-in specialists cover advice, architecture, implementation, investigation, review, spec review, security, verification, debugging, and git commits. You set the model for each one. Commits use red:/green:/refactor: discipline.
Interactive, print mode (text or JSON), RPC over stdin/stdout, or the SDK. The Slack bot (@draht/mom) runs on the SDK path; embed it the same way in your own app.
Codemode writes a script against the active tools instead of calling them one at a time, in a QuickJS sandbox. Nested calls and their results stay out of the model's context — only the script's own output comes back.
draht mcp add/list/login configures Model Context Protocol servers in .draht/mcp.json, OAuth included. No extension required, and MCP tools run through codemode by default.
draht CLI. Read/bash/edit/write tools, session management, sub-agents, checkpoints, and the GSD workflow (/new-project, /plan-phase, /execute-phase).draht is built on.npx draht-claude install.npx draht-codex install.No model fits every task. The router scores the work and picks the cheapest model that can do it. You pay for Opus when the job needs Opus.
The failing test is the spec. The agent must create a test, watch it fail, and make it pass before it commits code. If you skip TDD, skip draht.
Bounded contexts, aggregates, and your team's words guide edits. The agent reads that model first. Guessing costs money.
Run independent work in parallel sub-agents. Keep dependent work ordered. The orchestrator merges the results.
Every model call and its cost lands in the session's local JSONL file — your own record, not a compliance artifact. No install telemetry phones home.
Policies are files. State lives on disk. The harness is TypeScript. You can read it in an afternoon. If something surprises you, open the file.