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.
Files changed (109) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +74 -0
  3. package/README.md +56 -6
  4. package/agents/debugger.md +12 -1
  5. package/agents/git-committer.md +1 -0
  6. package/agents/implementer.md +11 -2
  7. package/agents/investigator.md +75 -0
  8. package/agents/reviewer.md +7 -0
  9. package/agents/speaker.md +44 -0
  10. package/agents/verifier.md +4 -3
  11. package/bin/draht-tools.cjs +472 -41
  12. package/bin/judge +613 -0
  13. package/cli.mjs +769 -46
  14. package/commands/atomic-commit.md +1 -12
  15. package/commands/create-verification-skill.md +105 -0
  16. package/commands/discuss-phase.md +3 -14
  17. package/commands/execute-phase.md +7 -14
  18. package/commands/fix.md +38 -17
  19. package/commands/grill.md +66 -0
  20. package/commands/init-project.md +5 -15
  21. package/commands/map-codebase.md +1 -13
  22. package/commands/new-project.md +5 -15
  23. package/commands/next-milestone.md +2 -13
  24. package/commands/orchestrate.md +1 -1
  25. package/commands/pause-work.md +1 -8
  26. package/commands/plan-phase.md +2 -11
  27. package/commands/progress.md +0 -8
  28. package/commands/quick.md +3 -11
  29. package/commands/resolve-conflicts.md +72 -0
  30. package/commands/resume-work.md +0 -8
  31. package/commands/review.md +4 -13
  32. package/commands/speak.md +45 -0
  33. package/commands/triage.md +161 -0
  34. package/commands/verify-work.md +5 -13
  35. package/commands/why.md +137 -0
  36. package/graph-archive.mjs +125 -0
  37. package/graph-manifest.mjs +97 -0
  38. package/hooks/hooks.json +39 -0
  39. package/package.json +5 -3
  40. package/scripts/gsd-quality-gate.cjs +3 -3
  41. package/scripts/judge-hook.cjs +42 -0
  42. package/scripts/judge-hook.py +391 -0
  43. package/scripts/judgegates.py +673 -0
  44. package/scripts/judgelib.py +382 -0
  45. package/scripts/speak.cjs +202 -0
  46. package/skills/atomic-commit/SKILL.md +1 -1
  47. package/skills/atomic-commit/command.md +62 -0
  48. package/skills/blast-radius/SKILL.md +55 -0
  49. package/skills/brainstorming/SKILL.md +11 -4
  50. package/skills/cinematic-continuation/SKILL.md +111 -0
  51. package/skills/cinematic-continuation/references/continuity-schema.md +75 -0
  52. package/skills/cinematic-continuation/references/seedance-adapter.md +44 -0
  53. package/skills/cinematic-continuation/references/style-bible.md +223 -0
  54. package/skills/cinematic-continuation/scripts/compile-continuation.mjs +173 -0
  55. package/skills/cinematic-continuation/templates/continuation-spec.json +50 -0
  56. package/skills/create-verification-skill/SKILL.md +14 -0
  57. package/skills/create-verification-skill/command.md +105 -0
  58. package/skills/debugging-workflow/SKILL.md +38 -10
  59. package/skills/discuss-phase/SKILL.md +1 -1
  60. package/skills/discuss-phase/command.md +44 -0
  61. package/skills/draht/SKILL.md +118 -0
  62. package/skills/epistemics/SKILL.md +99 -0
  63. package/skills/execute-phase/SKILL.md +1 -1
  64. package/skills/execute-phase/command.md +170 -0
  65. package/skills/fix/SKILL.md +1 -1
  66. package/skills/fix/command.md +154 -0
  67. package/skills/grill/SKILL.md +14 -0
  68. package/skills/grill/command.md +66 -0
  69. package/skills/gsd-workflow/SKILL.md +2 -0
  70. package/skills/init-project/SKILL.md +1 -1
  71. package/skills/init-project/command.md +57 -0
  72. package/skills/judge/SKILL.md +57 -0
  73. package/skills/map-codebase/SKILL.md +1 -1
  74. package/skills/map-codebase/command.md +61 -0
  75. package/skills/new-project/SKILL.md +1 -1
  76. package/skills/new-project/command.md +64 -0
  77. package/skills/next-milestone/SKILL.md +1 -1
  78. package/skills/next-milestone/command.md +42 -0
  79. package/skills/orchestrate/SKILL.md +1 -1
  80. package/skills/orchestrate/command.md +106 -0
  81. package/skills/orchestrate-loop/SKILL.md +1 -1
  82. package/skills/orchestrate-loop/command.md +100 -0
  83. package/skills/pause-work/SKILL.md +1 -1
  84. package/skills/pause-work/command.md +32 -0
  85. package/skills/plan-phase/SKILL.md +1 -1
  86. package/skills/plan-phase/command.md +139 -0
  87. package/skills/progress/SKILL.md +1 -1
  88. package/skills/progress/command.md +22 -0
  89. package/skills/quick/SKILL.md +1 -1
  90. package/skills/quick/command.md +91 -0
  91. package/skills/resolve-conflicts/SKILL.md +14 -0
  92. package/skills/resolve-conflicts/command.md +72 -0
  93. package/skills/resume-work/SKILL.md +1 -1
  94. package/skills/resume-work/command.md +27 -0
  95. package/skills/review/SKILL.md +1 -1
  96. package/skills/review/command.md +81 -0
  97. package/skills/saga-spawner/SKILL.md +131 -0
  98. package/skills/speak/SKILL.md +14 -0
  99. package/skills/speak/command.md +45 -0
  100. package/skills/tdd-workflow/SKILL.md +2 -0
  101. package/skills/triage/SKILL.md +14 -0
  102. package/skills/triage/command.md +161 -0
  103. package/skills/typescript-discipline/SKILL.md +50 -0
  104. package/skills/typescript-discipline/references/patterns.md +294 -0
  105. package/skills/unslop/SKILL.md +101 -0
  106. package/skills/verify-work/SKILL.md +1 -1
  107. package/skills/verify-work/command.md +116 -0
  108. package/skills/why/SKILL.md +14 -0
  109. package/skills/why/command.md +137 -0
@@ -0,0 +1,173 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFileSync, writeFileSync } from "node:fs";
4
+ import { resolve } from "node:path";
5
+ import process from "node:process";
6
+
7
+ const EPSILON = 1e-9;
8
+ const REQUIRED_SPEC_FIELDS = [
9
+ "schema_version",
10
+ "style_id",
11
+ "sequence_id",
12
+ "intent",
13
+ "duration_seconds",
14
+ "aspect_ratio",
15
+ "resolution",
16
+ "continuity_anchor",
17
+ "shots",
18
+ ];
19
+ const REQUIRED_SHOT_FIELDS = ["start", "end", "shot_size", "subject", "action", "camera", "lighting", "audio", "transition"];
20
+
21
+ function fail(message) {
22
+ throw new Error(message);
23
+ }
24
+
25
+ function requireObject(value, label) {
26
+ if (!value || typeof value !== "object" || Array.isArray(value)) fail(`${label} must be an object`);
27
+ }
28
+
29
+ function requireText(value, label) {
30
+ if (typeof value !== "string" || value.trim() === "") fail(`${label} must be a non-empty string`);
31
+ }
32
+
33
+ function requireFiniteNumber(value, label) {
34
+ if (typeof value !== "number" || !Number.isFinite(value)) fail(`${label} must be a finite number`);
35
+ }
36
+
37
+ function formatNumber(value) {
38
+ return Number.isInteger(value) ? String(value) : String(value);
39
+ }
40
+
41
+ export function validateSpec(spec) {
42
+ requireObject(spec, "spec");
43
+ for (const field of REQUIRED_SPEC_FIELDS) {
44
+ if (!(field in spec)) fail(`missing required field: ${field}`);
45
+ }
46
+ for (const field of ["schema_version", "style_id", "sequence_id", "intent", "aspect_ratio", "resolution"]) {
47
+ requireText(spec[field], field);
48
+ }
49
+ requireFiniteNumber(spec.duration_seconds, "duration_seconds");
50
+ if (spec.duration_seconds <= 0) fail("duration_seconds must be greater than zero");
51
+ requireObject(spec.continuity_anchor, "continuity_anchor");
52
+ if (!Array.isArray(spec.shots) || spec.shots.length === 0) fail("shots must contain at least one shot");
53
+
54
+ let cursor = 0;
55
+ for (const [index, shot] of spec.shots.entries()) {
56
+ requireObject(shot, `shot ${index}`);
57
+ for (const field of REQUIRED_SHOT_FIELDS) {
58
+ if (!(field in shot)) fail(`shot ${index} is missing required field: ${field}`);
59
+ }
60
+ requireFiniteNumber(shot.start, `shot ${index}.start`);
61
+ requireFiniteNumber(shot.end, `shot ${index}.end`);
62
+ if (Math.abs(shot.start - cursor) > EPSILON) {
63
+ fail(`shot ${index} must start at ${formatNumber(cursor)}; got ${formatNumber(shot.start)}`);
64
+ }
65
+ if (shot.end <= shot.start) fail(`shot ${index} must end after it starts`);
66
+ for (const field of REQUIRED_SHOT_FIELDS.filter((field) => field !== "start" && field !== "end")) {
67
+ requireText(shot[field], `shot ${index}.${field}`);
68
+ }
69
+ if ("dialogue" in shot && typeof shot.dialogue !== "string") fail(`shot ${index}.dialogue must be a string`);
70
+ cursor = shot.end;
71
+ }
72
+ if (Math.abs(cursor - spec.duration_seconds) > EPSILON) {
73
+ fail(`shots must end at duration_seconds ${formatNumber(spec.duration_seconds)}; got ${formatNumber(cursor)}`);
74
+ }
75
+ if (spec.negative_constraints !== undefined && !Array.isArray(spec.negative_constraints)) {
76
+ fail("negative_constraints must be an array");
77
+ }
78
+ if (spec.provider_adapters !== undefined) requireObject(spec.provider_adapters, "provider_adapters");
79
+ return spec;
80
+ }
81
+
82
+ function promptFor(spec) {
83
+ const anchor = spec.continuity_anchor;
84
+ const lines = [
85
+ `Create a ${formatNumber(spec.duration_seconds)}-second provider-neutral cinematic continuation in ${spec.aspect_ratio} at ${spec.resolution}.`,
86
+ `Creative intent: ${spec.intent}`,
87
+ "Continuity anchor:",
88
+ ];
89
+ for (const [key, value] of Object.entries(anchor)) {
90
+ if (key === "reference_images" || key === "reference_videos" || value === null || value === "") continue;
91
+ if (Array.isArray(value) && value.length === 0) continue;
92
+ lines.push(`- ${key.replaceAll("_", " ")}: ${Array.isArray(value) ? value.join(", ") : value}`);
93
+ }
94
+ lines.push("Timed shot plan:");
95
+ for (const shot of spec.shots) {
96
+ lines.push(
97
+ `- ${shot.start.toFixed(2)}-${shot.end.toFixed(2)}s | ${shot.shot_size} | subject: ${shot.subject} | action: ${shot.action} | camera: ${shot.camera} | lighting: ${shot.lighting} | audio: ${shot.audio} | dialogue: ${shot.dialogue ?? ""} | transition: ${shot.transition}`,
98
+ );
99
+ }
100
+ if (spec.negative_constraints?.length) lines.push(`Hard negative constraints: ${spec.negative_constraints.join("; ")}.`);
101
+ return lines.join("\n");
102
+ }
103
+
104
+ function compileSeedanceAdapter(spec, masterPrompt) {
105
+ const requested = spec.provider_adapters?.seedance_2_5;
106
+ if (!requested) return undefined;
107
+ requireObject(requested, "provider_adapters.seedance_2_5");
108
+ const referenceImages = requested.image_urls?.length
109
+ ? requested.image_urls
110
+ : (spec.continuity_anchor.reference_images ?? []);
111
+ return {
112
+ boundary_status: "Adapter assumptions only; validate the selected provider endpoint before submission.",
113
+ prompt: masterPrompt,
114
+ duration_seconds: spec.duration_seconds,
115
+ aspect_ratio: spec.aspect_ratio,
116
+ resolution: spec.resolution,
117
+ model_hint: requested.model ?? null,
118
+ reference_images: referenceImages,
119
+ extra_options: requested.extra_options ?? {},
120
+ };
121
+ }
122
+
123
+ export function compileSpec(input) {
124
+ const spec = validateSpec(input);
125
+ const masterPrompt = promptFor(spec);
126
+ const providerAdapters = {};
127
+ const seedance = compileSeedanceAdapter(spec, masterPrompt);
128
+ if (seedance) providerAdapters.seedance_2_5 = seedance;
129
+ return {
130
+ schema_version: spec.schema_version,
131
+ style_id: spec.style_id,
132
+ sequence_id: spec.sequence_id,
133
+ master_prompt: masterPrompt,
134
+ provider_adapters: providerAdapters,
135
+ };
136
+ }
137
+
138
+ function parseArgs(argv) {
139
+ const args = argv.slice(2);
140
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
141
+ return { help: true };
142
+ }
143
+ const spec = args[0];
144
+ let output = null;
145
+ for (let index = 1; index < args.length; index++) {
146
+ if (args[index] === "--output" || args[index] === "-o") {
147
+ output = args[++index];
148
+ if (!output) fail("--output requires a path");
149
+ } else {
150
+ fail(`unknown argument: ${args[index]}`);
151
+ }
152
+ }
153
+ return { help: false, spec, output };
154
+ }
155
+
156
+ function main() {
157
+ try {
158
+ const args = parseArgs(process.argv);
159
+ if (args.help) {
160
+ process.stdout.write("Usage: node compile-continuation.mjs <sequence.json> [--output <compiled.json>]\n");
161
+ return;
162
+ }
163
+ const input = JSON.parse(readFileSync(resolve(args.spec), "utf8"));
164
+ const encoded = `${JSON.stringify(compileSpec(input), null, 2)}\n`;
165
+ if (args.output) writeFileSync(resolve(args.output), encoded);
166
+ else process.stdout.write(encoded);
167
+ } catch (error) {
168
+ process.stderr.write(`error: ${error.message}\n`);
169
+ process.exitCode = 1;
170
+ }
171
+ }
172
+
173
+ if (import.meta.url === `file://${process.argv[1]}`) main();
@@ -0,0 +1,50 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "style_id": "draht-cinematic-continuation",
4
+ "sequence_id": "draht-next-sequence-001",
5
+ "intent": "Describe the new dramatic beat without reanalyzing source footage.",
6
+ "duration_seconds": 8,
7
+ "aspect_ratio": "16:9",
8
+ "resolution": "1080p",
9
+ "continuity_anchor": {
10
+ "reference_images": [],
11
+ "reference_videos": [],
12
+ "character_state": "Appearance-only description; no real-person identity claim.",
13
+ "wardrobe": "Preserve the selected subject's established wardrobe unless an intentional change is named.",
14
+ "vehicle_and_props": "Preserve silhouettes, materials, rigid geometry, ownership, and contact points.",
15
+ "environment": "Preserve place, weather, surfaces, screen direction, spatial anchors, and background topology.",
16
+ "camera_geometry": "Preserve mount, viewpoint, lens family, relative velocity, and framing drift.",
17
+ "emotional_state": "Continue from the selected causal beat while retaining visible emotional and material history."
18
+ },
19
+ "shots": [
20
+ {
21
+ "start": 0,
22
+ "end": 8,
23
+ "shot_size": "medium tracking shot",
24
+ "subject": "Describe the visible subject without naming or inferring a real identity.",
25
+ "action": "Describe one physically coherent setup-contact-consequence-recovery arc.",
26
+ "camera": "Specify mount, relative velocity, lens family, shake, pan or tilt, and framing drift.",
27
+ "lighting": "Specify motivated source direction, contrast, material response, and exposure behavior.",
28
+ "audio": "Specify ambience, physical sound effects, score contour, and only approved exact dialogue.",
29
+ "dialogue": "",
30
+ "transition": "seamless continuation"
31
+ }
32
+ ],
33
+ "negative_constraints": [
34
+ "no identity drift",
35
+ "no wardrobe, prop, or vehicle mutation",
36
+ "no screen-direction reversal",
37
+ "no impossible wheel, board, hand, contact, limb, or gravity behavior",
38
+ "no unexplained camera teleport or lens-family mixing",
39
+ "no duplicate subjects",
40
+ "no generated text, logos, subtitles, UI, promotional overlays, or watermarks",
41
+ "no over-smoothed skin, synthetic gloss, or reset material history"
42
+ ],
43
+ "provider_adapters": {
44
+ "seedance_2_5": {
45
+ "model": null,
46
+ "image_urls": [],
47
+ "extra_options": {}
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: create-verification-skill
3
+ description: Draht command prompt wrapper for create-verification-skill. Use when a project has no scripted way to prove UI/CLI/service behaviour and the user wants a committed project-local verify-<app> skill that launches the real app, drives a feature the way a user does, and captures proof artifacts. Triggers on "create a verification skill", "make a control skill for this repo", "how do we prove the app actually works", "drive the app like a user".
4
+ ---
5
+
6
+ # Draht Command: create-verification-skill
7
+
8
+ This skill exposes the Draht prompt command template to Codex's `$draht` and `/skills` surfaces.
9
+
10
+ When invoked:
11
+ 1. Read `./command.md` in this skill's directory.
12
+ 2. Treat the user's text after the skill mention as `$ARGUMENTS`. If the template uses `$1`, use the first positional argument.
13
+ 3. Follow that command template as the active workflow.
14
+ 4. Use Draht support skills such as `atomic-reasoning` or `verification-gate` when the command template calls for that discipline.
@@ -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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: debugging-workflow
3
- description: Four-phase systematic debugging — root cause investigation → pattern analysis → single-hypothesis testing → reproducing-test-first implementation. Use whenever investigating a bug, test failure, error, stack trace, regression, build break, or unexpected behaviour. Auto-triggers on phrases like "broken", "doesn't work", "failing", "error", "bug", "regression", "why is X", "what's wrong with". The same protocol that `/fix` enforces, available transversally.
3
+ description: Four-phase systematic debugging — reproduction-loop root cause investigation → pattern analysis → ranked falsifiable hypotheses → reproducing-test-first implementation. Use whenever investigating a bug, test failure, error, stack trace, regression, build break, or unexpected behaviour. Auto-triggers on phrases like "broken", "doesn't work", "failing", "error", "bug", "regression", "why is X", "what's wrong with". The same protocol that `/fix` enforces, available transversally.
4
4
  ---
5
5
 
6
6
  # Debugging Workflow
@@ -35,7 +35,25 @@ Any time you encounter:
35
35
  ## Phase 1 — Root Cause Investigation (before ANY fix)
36
36
 
37
37
  1. **Read error messages carefully.** Don't skip past the trace — read line numbers and file paths. Stack traces often contain the exact answer.
38
- 2. **Reproduce consistently.** What are the exact steps? If you can't reproduce, gather more data — do not guess.
38
+ 2. **Build a reproduction loop.** This step is the phase — a tight pass/fail signal that goes red on *this* bug is what bisection, hypothesis-testing, and instrumentation all consume. Spend disproportionate effort here. Work down the ladder and take the first rung that reaches the bug:
39
+ - failing test at whatever seam reaches the bug (unit, integration, e2e)
40
+ - HTTP request script against a running dev server
41
+ - CLI invocation on a fixture input, output diffed against a known-good snapshot
42
+ - headless browser script asserting on DOM / console / network
43
+ - replay of a captured payload, trace, or event log through the code path in isolation
44
+ - throwaway harness: a minimal subset of the system (mocked deps) exercising the bug path in one call
45
+ - property/fuzz loop: hundreds of random inputs when the output is only sometimes wrong
46
+ - bisection harness: automate "checkout state X, run the check" so `git bisect run` can drive it
47
+ - differential loop: the same input through old vs new version (or two configs), outputs diffed
48
+ - last resort, human-in-the-loop: exact numbered steps for the user to run by hand, output pasted back
49
+
50
+ 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.
51
+
52
+ **Exit checklist — all four before steps 4-6:** (a) ONE named command; (b) already run at least once; (c) invocation and output shown (secrets redacted); (d) it asserts the exact reported symptom — able to go red on this bug and green once fixed, not merely "runs without erroring".
53
+
54
+ **Self-interrupt:** reading code to build a causal theory before this command exists is the anchoring failure this protocol prevents. No red-capable command, no steps 4-6.
55
+
56
+ **If you genuinely cannot build a loop:** stop and say so — list what you tried, then ask for environment access, a captured artifact (log dump, recording, saved payload), or permission to add temporary instrumentation. Do not hypothesise without a loop.
39
57
  3. **Check recent changes.** `git log --oneline -20`, `git diff HEAD~N` on the affected paths. What was the last thing that touched this?
40
58
  4. **Trace data flow.** Where does the bad value originate? What called the function with that value? Keep tracing **upward** until you find the source. Fix at source, not at the symptom site.
41
59
  5. **State the root cause in one sentence:** "X happens because Y at <file:line>."
@@ -56,18 +74,21 @@ Before walking the tree, orient via the living map. Run `draht-tools graph-conte
56
74
 
57
75
  If Phase 2 contradicts Phase 1, go back to Phase 1. Don't paper over disagreement.
58
76
 
59
- ## Phase 3 — Single Hypothesis Test
77
+ ## Phase 3 — Ranked Hypotheses
60
78
 
61
- 1. State ONE hypothesis: "I think X is the root cause because Y."
62
- 2. Design the **smallest possible change** to test it — one variable, ideally one line. Before applying, run `draht-tools graph-impact <file-to-change>` to scope the blast radius (reverse-dependents, affected entry points, crossed boundaries) and avoid regressions.
63
- 3. Apply it. Did it fix the issue?
64
- - Yes → proceed to Phase 4.
65
- - No → form a NEW hypothesis. Revert. Do not pile changes on top.
66
- 4. **After 3 failed hypotheses, STOP.** This is an architectural problem, not a hypothesis problem. Discuss before continuing.
79
+ 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.
80
+ 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.
81
+ 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.
82
+ 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.
83
+ 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. Before applying, run `draht-tools graph-impact <file-to-change>` to scope the blast radius (reverse-dependents, affected entry points, crossed boundaries) and avoid regressions. Re-run the Phase 1 reproduction command to read the verdict.
84
+ - **Prediction confirmed** → proceed to Phase 4 with this cause.
85
+ - **Falsified** → revert the probe, record which prediction failed, move to the next hypothesis. Do not pile changes on top.
86
+ 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".
87
+ 7. **After 3 falsified hypotheses, STOP.** This is an architectural problem, not a ranking problem. Discuss before continuing.
67
88
 
68
89
  ## Phase 4 — Implementation
69
90
 
70
- 1. **Write the reproducing test FIRST.** Confirm it FAILS for the right reason (not syntax, not missing import).
91
+ 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. Confirm it FAILS for the right reason (not syntax, not missing import).
71
92
  - Commit: `red: reproduce <bug>`
72
93
  2. **Apply the single fix** from Phase 3. No other changes.
73
94
  - Failing test now PASSES.
@@ -76,6 +97,7 @@ If Phase 2 contradicts Phase 1, go back to Phase 1. Don't paper over disagreemen
76
97
  3. **Refactor (optional)** — only if clear improvement. Tests stay green.
77
98
  - Commit: `refactor: <description>`
78
99
  4. **Verify the original symptom is gone** — run the user-level reproduction, not just the unit test.
100
+ 5. **Sweep instrumentation.** Grep your `[DEBUG-` prefix — done means the grep returns nothing. Tagged probes die here; untagged probes survive to pollute production.
79
101
 
80
102
  ## Red Flags — STOP
81
103
 
@@ -84,6 +106,7 @@ Stop immediately if you catch yourself:
84
106
  - Multiple changes simultaneously
85
107
  - Skipping the reproducing test
86
108
  - Proposing solutions before understanding data flow
109
+ - Reading code to build a causal theory before a red-capable reproduction command exists
87
110
  - "One more attempt" after 2+ failures
88
111
  - Each fix revealing new problems elsewhere
89
112
  - Proposing solutions before you can state the root cause in one sentence
@@ -100,11 +123,16 @@ Stop immediately if you catch yourself:
100
123
  | "I can see what's wrong, I don't need Phase 1" | "See" is not "understand". Trace it. |
101
124
  | "The user already told me the cause" | The reporter saw the symptom. Their diagnosis is Hypothesis #0, not a finding. |
102
125
  | "The fix passed, so my diagnosis was right" | Fixes can mask. Verify the causal chain, not just the symptom's absence. |
126
+ | "I can't build a repro, I'll reason it out" | No red-capable command, no diagnosis. Ask for access, an artifact, or permission to instrument. |
103
127
 
104
128
  ## Relationship to /fix
105
129
 
106
130
  This skill is the *protocol*. `/fix` is the *command* that runs it with subagent delegation, commit conventions, and state updates. Use the skill transversally; use `/fix` when you want the full workflow with tracking.
107
131
 
132
+ ## Relationship to /why
133
+
134
+ This protocol answers "why is X doing the wrong thing right now" — a live defect with a reproduction loop. The `why` command answers "why is X built this way" — intent, history, and rejected alternatives reconstructed from git, the review record, and `.planning/`, with `epistemics`-calibrated confidence. If the investigation shows the surprising behaviour is a recorded decision, not a defect, stop debugging and route to `/why`; if a `/why` investigation surfaces a live defect, hand it to `/fix`.
135
+
108
136
  ## Relationship to verification-gate
109
137
 
110
138
  After Phase 4, verification-gate kicks in: don't claim "bug fixed" without running the proving command and seeing the output.
@@ -8,7 +8,7 @@ description: Draht command prompt wrapper for discuss-phase. Use when the user s
8
8
  This skill exposes the Draht prompt command template to Codex's `$draht` and `/skills` surfaces.
9
9
 
10
10
  When invoked:
11
- 1. Read `../../commands/discuss-phase.md` relative to this `SKILL.md`.
11
+ 1. Read `./command.md` in this skill's directory.
12
12
  2. Treat the user's text after the skill mention as `$ARGUMENTS`. If the template uses `$1`, use the first positional argument.
13
13
  3. Follow that command template as the active workflow.
14
14
  4. Use Draht support skills such as `atomic-reasoning`, `tdd-workflow`, `verification-gate`, or `debugging-workflow` when the command template calls for that discipline.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Capture implementation decisions before planning a phase
3
+ argument-hint: "<phase-number>"
4
+ allowed-tools: Bash, Read, Write, Edit
5
+ ---
6
+
7
+ # /discuss-phase
8
+
9
+ Capture implementation decisions before planning a phase.
10
+
11
+ Phase: $1
12
+
13
+ > **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.
14
+
15
+ ## Atomic Reasoning
16
+
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
+
19
+ ## Steps
20
+ 1. Run `draht-tools phase-info $1` to load phase context
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>`.
22
+ 3. Identify gray areas based on what's being built
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.
24
+ 5. If `.planning/DOMAIN.md` exists, load it and validate discovered terms against the glossary. Add any new domain terms found during discussion.
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.
26
+ 7. Commit: `draht-tools commit-docs "capture phase $1 context"`
27
+
28
+ ## Workflow
29
+ This is one step in the per-phase cycle. Use fresh sessions (`/clear`) between steps:
30
+
31
+ ```
32
+ /discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N → /discuss-phase N+1 → ...
33
+ ```
34
+
35
+ After completing this command, tell the user to start a fresh session and run `/plan-phase $1`. Do NOT suggest `/next-milestone` — that is only after ALL phases in the milestone are verified.
36
+
37
+ ## Gray Area Categories
38
+ - **Visual features** → Layout, density, interactions, empty states
39
+ - **APIs/CLIs** → Response format, error handling, auth
40
+ - **Data models** → Schema, relationships, validation
41
+ - **Content** → Structure, tone, depth, flow
42
+ - **Refactoring** → Grouping, naming, migration strategy
43
+ - **Testability** → What needs testing, test framework preference, coverage goals, integration vs unit boundaries
44
+ - **Domain boundaries** → What are the bounded contexts in play? Are there existing domain terms to respect? What aggregates/entities are involved?
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: draht
3
+ description: Router and catalog for the draht skill family — what draht is, the .planning/ state model, a situation-to-skill map covering every sibling skill, host-invocation guidance, and install/upgrade pointers. Use when the user asks what draht is, which draht skill fits their situation, how to invoke a draht skill on the current host, or how to install or upgrade the draht skill bundle.
4
+ ---
5
+
6
+ # Draht
7
+
8
+ Draht is a methodology for running agentic coding work through a milestone → phase → plan → task hierarchy, backed by strict TDD/DDD discipline, a living codebase knowledge graph, and evidence-before-claims verification at every step. A project's state lives on disk in its `.planning/` directory rather than in any one conversation: `PROJECT.md` and `REQUIREMENTS.md` capture what is being built and its v1/v2 scope, `ROADMAP.md` groups phases into milestones, `DOMAIN.md` holds the bounded contexts and ubiquitous language, `STATE.md` and `CONTINUE-HERE.md` track current position and handoffs, `codebase/MAP.json` is the queryable knowledge graph, and `phases/NN-slug/` holds the plan and summary files for each phase — so progress, decisions, and domain model all survive across sessions, context resets, and even different agents. This skill is pure navigation: it does not restate any workflow's content, it routes to the sibling skill that owns it — see `gsd-workflow` for the full cycle mechanics and the complete `.planning/` schema.
9
+
10
+ ## Two Kinds of Sibling Skills
11
+
12
+ - **15 discipline skills** — transversal habits that apply regardless of which command is running: `atomic-reasoning`, `blast-radius`, `brainstorming`, `ddd-workflow`, `debugging-workflow`, `epistemics`, `gsd-workflow`, `judge`, `loop-workflow`, `model-tiering`, `saga-spawner`, `tdd-workflow`, `typescript-discipline`, `unslop`, `verification-gate`.
13
+ - **23 command skills** — one per stage of the GSD lifecycle, from greenfield questioning through milestone completion: `new-project`, `init-project`, `map-codebase`, `discuss-phase`, `plan-phase`, `execute-phase`, `verify-work`, `next-milestone`, `pause-work`, `resume-work`, `progress`, `quick`, `fix`, `review`, `atomic-commit`, `orchestrate`, `orchestrate-loop`, `resolve-conflicts`, `grill`, `why`, `create-verification-skill`, `triage`, `speak`.
14
+
15
+ Every skill's frontmatter `name` matches its directory name, so `skills/<name>/` and the name you invoke are always the same string.
16
+
17
+ ## Repository Layout
18
+
19
+ - `skills/<name>/SKILL.md` — every skill has one; frontmatter (`name`, `description`) plus instructions.
20
+ - `skills/<name>/command.md` — the 23 command skills only. This is the full prompt template; the command skill's `SKILL.md` is a thin wrapper that reads it.
21
+ - The 15 discipline skills have no `command.md` — their `SKILL.md` is self-contained.
22
+ - This file, `skills/draht/SKILL.md`, is itself a plain skill (no `command.md`) — it is discovered and loaded the same way any discipline skill is.
23
+
24
+ ## How the Catalog Composes
25
+
26
+ Command skills and discipline skills are not independent choices — most command skills lean on two or three disciplines while they run. `plan-phase` and `execute-phase` both assume `atomic-reasoning` and `tdd-workflow`; every command that ends with a completion claim assumes `verification-gate`; `fix` is a tracked wrapper around the `debugging-workflow` protocol; `orchestrate-loop` is `loop-workflow` applied to one goal; `why` leans on `epistemics` for every claim it reports; `triage` borrows `debugging-workflow`'s cause-first discipline for its bounded trace and `epistemics` for labeling what it carries into a ticket; `create-verification-skill` generates the project-local harness whose evidence `verification-gate` demands and `verify-work`'s verifier drives; `review`'s refutation step escalates to `blast-radius`'s rung-4 script when a Critical finding hinges on library or runtime behavior. When in doubt about which disciplines a command skill pulls in, open that command skill's `command.md` — the disciplines it expects are named in its own text.
27
+
28
+ ## Situation → Skill
29
+
30
+ ### Project lifecycle and phase cycle
31
+
32
+ | Situation | Skill |
33
+ |---|---|
34
+ | Fuzzy idea, "what should I build" — before any planning starts | `brainstorming` |
35
+ | Starting a greenfield project from questioning through roadmap | `new-project` |
36
+ | Bringing draht's GSD workflow onto an existing codebase | `init-project` |
37
+ | Standalone architecture / domain / test-strategy extraction | `map-codebase` |
38
+ | Understanding the whole milestone → phase → plan → task cycle | `gsd-workflow` |
39
+ | Capturing decisions and gray areas before planning a phase | `discuss-phase` |
40
+ | Turning discussed decisions into atomic execution plans | `plan-phase` |
41
+ | Executing a planned phase, task by task, with TDD and review gates | `execute-phase` |
42
+ | Phase-level UAT: verifier + security-auditor + reviewer + spec-reviewer | `verify-work` |
43
+ | Planning the next milestone once the current one is fully verified | `next-milestone` |
44
+
45
+ ### Session continuity and ad-hoc work
46
+
47
+ | Situation | Skill |
48
+ |---|---|
49
+ | Pausing work and writing a handoff document | `pause-work` |
50
+ | Resuming a paused project from its handoff document | `resume-work` |
51
+ | Checking current position in the roadmap | `progress` |
52
+ | A small ad-hoc tracked task, lighter than a full phase | `quick` |
53
+ | Diagnosing and fixing one specific bug end to end | `fix` |
54
+ | Code review and security audit of recent changes | `review` |
55
+ | Splitting a diff into atomic conventional commits | `atomic-commit` |
56
+ | Decomposing a task and dispatching the right mix of specialists | `orchestrate` |
57
+ | Running one goal in a deterministic-check-gated loop until it passes | `orchestrate-loop` |
58
+ | Resolving an in-progress merge/rebase conflict — including a failed `agent/<taskId>` worktree merge-back | `resolve-conflicts` |
59
+ | Stress-testing any subject — an idea, a spec, tickets, a decision — in whole-frontier question rounds | `grill` |
60
+ | Recovering why code is the way it is — design rationale, decision history, rejected alternatives | `why` |
61
+ | Generating a committed project-local `verify-<app>` skill that drives the real app as a user and captures proof artifacts | `create-verification-skill` |
62
+ | Classifying an external issue report — dedupe, file, reroute, or answer — without fixing it | `triage` |
63
+
64
+ ### Transversal disciplines
65
+
66
+ | Situation | Skill |
67
+ |---|---|
68
+ | Decomposing work into atomic, independently-verifiable units | `atomic-reasoning` |
69
+ | Finding what a change breaks beyond the diff and proving the one fact it's safe because of | `blast-radius` |
70
+ | Domain modelling — bounded contexts, ubiquitous language, naming | `ddd-workflow` |
71
+ | Investigating any failure transversally (the protocol behind `fix`) | `debugging-workflow` |
72
+ | Calibrating confidence, citations, and gaps when reporting investigation findings | `epistemics` |
73
+ | Designing or reasoning about iterate-until-a-check-passes loops | `loop-workflow` |
74
+ | Choosing which model tier should run a session vs its subagents | `model-tiering` |
75
+ | Putting a human in the loop — permission prompts and finished turns queued as cards to swipe through | `judge` |
76
+ | Advancing a repo unattended — saga graph, beats, scheduled or cloud routines | `saga-spawner` |
77
+ | Writing testable code — the red → green → refactor cycle | `tdd-workflow` |
78
+ | Writing or editing TypeScript — modelling state, narrowing, casts, exhaustiveness | `typescript-discipline` |
79
+ | Editing prose deliverables — cutting AI tells from docs, reports, handoffs, commit bodies | `unslop` |
80
+ | About to claim "done", "fixed", "passing", "ready", or "complete" | `verification-gate` |
81
+
82
+ ## Disambiguation
83
+
84
+ A few sibling pairs are easy to reach for incorrectly:
85
+
86
+ - `fix` vs `debugging-workflow` — `fix` is the tracked command (creates a plan entry, stops after 3 failed attempts, commits the result); `debugging-workflow` is the four-phase protocol it runs internally, usable on its own mid-conversation without any tracking.
87
+ - `quick` vs `execute-phase` — `quick` is for a task with no roadmap phase behind it; `execute-phase` assumes a phase was already planned by `plan-phase` and has plan files to execute.
88
+ - `orchestrate` vs `orchestrate-loop` — `orchestrate` fans a task out to specialists once; `orchestrate-loop` re-runs one worker against a deterministic check until it passes or a bound is hit.
89
+ - `review` vs `verify-work` — `review` is ad hoc, any time; `verify-work` is the phase-level acceptance gate and additionally checks the diff against the phase's plan files.
90
+ - `grill` vs `brainstorming` — `brainstorming` is the project-creation gate: it ends in a written spec and a handoff to `/new-project` or `/init-project`; `grill` interrogates any subject with no presumed outcome — the artifact (spec, tickets, decision record, notes, or nothing) is chosen only when the frontier is empty.
91
+ - `why` vs `fix`/`debugging-workflow` — `why` reconstructs intent and history when nothing is misbehaving ("why is it built this way"); `fix` and the debugging protocol answer defects ("why is it doing the wrong thing right now"). A `why` run that uncovers a live defect hands off to `fix`; a `fix` that needs design intent consults `why`.
92
+ - `blast-radius` vs `review` — `review` audits a diff for defects across the board and merges subagent findings; `blast-radius` investigates one change's impact beyond the diff, reducing its safety to a single fact proven by running real code. `review`'s refutation step borrows blast-radius's rung-4 bar for Critical findings; the phrase "uncertainty × blast radius" in the planning commands is a risk-ordering heuristic, not this skill.
93
+ - `create-verification-skill` vs `verify-work` — `verify-work` is the recurring phase acceptance gate; `create-verification-skill` is the one-time generator of the committed `verify-<app>` skill that `verify-work`'s verifier then drives. Generate once, drive every phase.
94
+ - `triage` vs `fix` — `fix` starts from a bug you already own and ends in a landed fix; `triage` starts from someone else's report and ends in one verdict: a classification, a typed dedupe outcome, and at most one tracker issue. A `[triage:bug]` marker with its tracker link is a ready entry into `fix`; `triage` never fixes, and `fix` never files tickets.
95
+
96
+ ## Host Invocation
97
+
98
+ | Host | How to invoke a draht skill |
99
+ |---|---|
100
+ | Claude Code | `/draht:<command>` slash commands for the 23 command skills (for example `/draht:plan-phase`); the 15 discipline skills load automatically by description match or on request |
101
+ | Codex | `$draht:<command>` prompts, or `/skills` and pick the wrapper, for the 23 command skills; discipline skills load automatically or by name |
102
+ | Any Agent-Skills-compatible host | invoke the sibling skill directly by name — every `SKILL.md` in this tree is self-contained and portable |
103
+ | draht CLI (`@draht/coding-agent`) | runs the GSD workflow natively; no skill indirection needed |
104
+
105
+ Once loaded, a skill behaves the same regardless of host — only the invocation surface differs. Skill bodies never hardcode a host name or a plugin-root path for this reason: the same `skills/` tree renders into both plugin packages, and could render into a future host's package the same way.
106
+
107
+ ## Install and Upgrade
108
+
109
+ - `npx skills add draht-dev/draht` — generic Agent Skills install, works on any compatible host
110
+ - `npx draht-claude install` / `npx draht-claude update` — installs the command skills, specialist subagents, hooks, and discipline skills as a native plugin (see the Host Invocation table above)
111
+ - `npx draht-codex install` / `npx draht-codex update` — installs the command-wrapper skills, agent prompts, hooks, and discipline skills as a native plugin (see the Host Invocation table above)
112
+ - `npx draht-claude status` / `npx draht-codex status` — check what is currently installed
113
+ - `npx draht-claude configure --list` / `npx draht-codex configure --list` — inspect or override subagent model assignments
114
+ - `npx draht-claude uninstall` / `npx draht-codex uninstall` — remove a plugin install
115
+
116
+ ## See Also
117
+
118
+ For the workflow content itself, do not read this file further — load the sibling skill named in the tables above. `gsd-workflow` is the best starting point for anyone who has not used draht before; it explains the full cycle that the command skills in this catalog each implement one step of.