draht-codex
v2026.11.27
Published
Draht GSD, multi-agent, TDD and DDD workflows as a Codex plugin. Install with `npx draht-codex install`.
Maintainers
Readme
draht-codex
Draht's GSD workflow, multi-agent orchestration prompts, TDD discipline, DDD guidance, and planning framework as a Codex plugin.
Install:
npx draht-codex installThis creates a local Codex marketplace at ~/.draht/codex-marketplace, installs the draht plugin, and bundles Draht command prompt wrappers, reference prompt templates, specialist agent prompts, support skills, hooks, scripts, and draht-tools.
What you get
Reference prompt templates
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.
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.
Project lifecycle:
commands/new-project.md- greenfield questioning, domain model, requirements, roadmapcommands/init-project.md- existing codebase mapping, domain extraction, roadmapcommands/map-codebase.md- standalone codebase mapcommands/next-milestone.md- plan the next milestone after current phases are verified
Per-phase cycle:
commands/discuss-phase.mdcommands/plan-phase.mdcommands/execute-phase.mdcommands/verify-work.md
Session continuity:
commands/pause-work.mdcommands/resume-work.mdcommands/progress.md
Ad-hoc:
commands/budget.md- guided configuration of this repository's token budgetscommands/quick.mdcommands/fix.mdcommands/review.mdcommands/atomic-commit.mdcommands/orchestrate.mdcommands/orchestrate-loop.mdcommands/resolve-conflicts.mdcommands/grill.md- whole-frontier interrogation of any subject; output form chosen at the endcommands/why.md- code archaeology: design rationale and history via parallel evidence investigators, synthesized with confidence tiers and citationscommands/triage.md- external issue-report triage: classify, bounded cause trace, dedupe against GitHub Issues, fail-closed ticket creationcommands/questionnaire.md- turn a decision you can't answer alone into a questionnaire for someone else to fill in asynccommands/create-verification-skill.md- generate a committed project-localverify-<app>skill that drives the real app and captures proof artifactscommands/speak.md- speak text aloud via the ElevenLabs text-to-speech helper
Use the wrappers for picker-driven invocation, and keep the commands/*.md files as the source prompt templates.
Specialist agent prompts
The plugin ships 11 reference prompts in agents/:
advisorarchitectimplementerreviewerdebuggerverifierinvestigatorgit-committersecurity-auditorspec-reviewerspeaker
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.
Each prompt's frontmatter model: names a default GPT-6 model by price tier:
| Agent | Default |
|---|---|
| advisor | gpt-6-astra |
| architect | gpt-6.1-sol |
| reviewer | gpt-6.1-sol |
| security-auditor | gpt-6.1-sol |
| spec-reviewer | gpt-6.1-sol |
| implementer | gpt-6.1-sol |
| investigator | gpt-6.1-sol |
| verifier | gpt-6.1-sol |
| speaker | gpt-6-luna |
| debugger | inherit |
| git-committer | inherit |
Codex treats agent model: as reference metadata — configure --list shows it, but Codex does not read it to route a subagent to that model unless you wire the role yourself in ~/.codex/config.toml.
Command prompt wrappers
The plugin ships a command prompt wrapper for each commands/*.md template:
budgetnew-projectinit-projectmap-codebasenext-milestonediscuss-phaseplan-phaseexecute-phaseverify-workpause-workresume-workprogressquickfixreviewatomic-commitorchestrateorchestrate-loopresolve-conflictsgrillwhytriagequestionnairecreate-verification-skillspeak
Support skills
The GSD workflow templates live in commands/. Alongside the command wrappers above, support skills load by description match or by name.
Router:
draht— catalog of the whole draht skill family: what draht is, the.planning/state model, a situation→skill map, host invocation, and install pointers
Disciplines:
atomic-reasoning— decompose work into atomic, independently-verifiable units before actingbrainstorming— Socratic ideation gate that runs before any project work beginsddd-workflow— bounded contexts, ubiquitous language, aggregates, domain eventsdebugging-workflow— four-phase systematic debugging, the protocol behind$draht:fixgsd-workflow— complete GSD methodology reference (directory structure, cycle, hooks, config)loop-workflow— iterate-until-a-deterministic-check-passes loops and their stop conditionsmodel-tiering— advisor and orchestrator patterns for cost-efficient model selectionsaga-spawner— saga-graph reconciliation loop for unattended repo advancement as a cloud routinetdd-workflow— red→green→refactor discipline, commit conventions, cycle violationstest-audit— authoring gates, evidence-led test audits, and subsystem campaigns that preserve owner-boundary contractsverification-gate— evidence before claims: run the command that proves it before saying "done"
Creative:
draht— router and catalog for the skill familygsd-workflowtdd-workflowddd-workflowverification-gatebrainstormingdebugging-workflowatomic-reasoningloop-workflowmodel-tieringsaga-spawnerunslop— cut AI tells from prose deliverables, then add voice back; includes an STE-lite register for procedureswriting-for-agents— writing skills, prompts, and AGENTS.md for agents: context pointers, information hierarchy, completion criteria, leading words, pruningexplainers— evidence-built Mermaid diagrams and HTML explainers for graph-shaped reportsepistemics— confidence calibration for investigation findingstypescript-discipline— make illegal states unrepresentableblast-radius— impact analysis beyond the diff on the evidence laddercinematic-continuation— provider-neutral, time-coded video continuation from bundled distilled style and continuity referencesjudge— 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
Hooks and scripts
The plugin includes hooks/hooks.json plus these scripts:
gsd-pre-execute.cjsgsd-post-task.cjsgsd-post-phase.cjsgsd-quality-gate.cjssession-start.cjs(SessionStart)prompt-context.cjs(UserPromptSubmit)post-edit-check.cjs(PostToolUse onEdit/Write/MultiEdit)stop-quality-gate.cjs(Stop)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 thejudgeTUI inbin/judgeis running
Codex loads plugin-bundled hooks only after the user reviews and trusts them.
Token budgets
Opt-in per-file token limits encourage readable, cohesive code and concise documentation. $draht:budget, or budget in /skills, 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.
Installation
# Install
npx draht-codex install
# Reinstall or refresh
npx draht-codex update
# Install to a custom local marketplace
npx draht-codex install --path /path/to/codex-marketplace
# Status
npx draht-codex status
# Remove
npx draht-codex uninstallAfter installation, restart Codex and check:
codex plugin listdraht-tools
The plugin bundles draht-tools at bin/draht-tools.cjs. You can also run it through the package CLI:
npx draht-codex draht-tools helpReference prompt templates prefer the installed plugin path:
node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.draht/codex-marketplace/plugins/draht}}/bin/draht-tools.cjs" helpPLUGIN_ROOT is the Codex plugin root when available. CLAUDE_PLUGIN_ROOT is kept as a compatibility fallback. The default installer path is used as the last fallback.
Configuration
Reference agent model metadata can be edited in the installed plugin copy:
npx draht-codex configure --agent architect --model gpt-6-astra
npx draht-codex configure --list
npx draht-codex configure --agent architect --reset
npx draht-codex configure --resetThis updates the bundled Markdown frontmatter. --reset removes the model: line, so --list then shows inherit; draht-codex update restores the shipped defaults. Codex-native custom agent routing may require user-level ~/.codex/config.toml agent role configuration.
Relationship to draht-claude
draht-codex is the Codex plugin sibling of draht-claude. The workflow content is intentionally close, but the package uses Codex plugin metadata, marketplace layout, hooks behavior, and install commands.
Use draht-codex when you want Draht inside Codex. Use draht-claude when you want the same workflows inside Claude Code.
License
MIT. See LICENSE.
