@draht/coding-agent 2026.10.20 → 2026.10.23-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/CHANGELOG.md +138 -0
- package/agents/advisor.md +2 -2
- package/agents/architect.md +11 -33
- package/agents/debugger.md +13 -54
- package/agents/git-committer.md +18 -42
- package/agents/implementer.md +14 -36
- package/agents/investigator.md +12 -63
- package/agents/reviewer.md +16 -44
- package/agents/security-auditor.md +22 -56
- package/agents/spec-reviewer.md +13 -53
- package/agents/verifier.md +14 -33
- package/bin/drahtbank.mjs +4 -0
- package/dist/agents/advisor.md +2 -2
- package/dist/agents/architect.md +11 -33
- package/dist/agents/debugger.md +13 -54
- package/dist/agents/git-committer.md +18 -42
- package/dist/agents/implementer.md +14 -36
- package/dist/agents/investigator.md +12 -63
- package/dist/agents/reviewer.md +16 -44
- package/dist/agents/security-auditor.md +22 -56
- package/dist/agents/spec-reviewer.md +13 -53
- package/dist/agents/verifier.md +14 -33
- package/dist/bundle/chunks/anthropic-messages-G57VPNTF.js +6 -0
- package/dist/bundle/chunks/anthropic.js +1 -1
- package/dist/bundle/chunks/azure-openai-responses-AYUCZ5WN.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +31 -28
- package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
- package/dist/bundle/chunks/chunk-3GDEPGTR.js +16 -0
- package/dist/bundle/chunks/chunk-5JW3NSTV.js +2 -0
- package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
- package/dist/bundle/chunks/chunk-76YNMQ57.js +2 -0
- package/dist/bundle/chunks/chunk-AC3MSTC6.js +2 -0
- package/dist/bundle/chunks/chunk-ACLWH5WQ.js +2 -0
- package/dist/bundle/chunks/chunk-BL72B6LV.js +82 -0
- package/dist/bundle/chunks/chunk-CLKG6K6Z.js +7 -0
- package/dist/bundle/chunks/chunk-DN7SM3LX.js +479 -0
- package/dist/bundle/chunks/{chunk-D6TMD5Q2.js → chunk-DOUMZTXH.js} +10 -10
- package/dist/bundle/chunks/chunk-DQ4G4IS4.js +20 -0
- package/dist/bundle/chunks/chunk-E4VZJRJ2.js +9 -0
- package/dist/bundle/chunks/chunk-FOYIPAAD.js +6 -0
- package/dist/bundle/chunks/chunk-FXCTQRNN.js +2 -0
- package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
- package/dist/bundle/chunks/chunk-GQXRTK54.js +20 -0
- package/dist/bundle/chunks/chunk-IGO52ZOY.js +132 -0
- package/dist/bundle/chunks/chunk-IT4RIOZD.js +2 -0
- package/dist/bundle/chunks/chunk-JJKPUMH2.js +1424 -0
- package/dist/bundle/chunks/chunk-JNWRE5F4.js +2 -0
- package/dist/bundle/chunks/chunk-KSGHCBHT.js +2 -0
- package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
- package/dist/bundle/chunks/chunk-MBFTIGLS.js +2 -0
- package/dist/bundle/chunks/chunk-N26RGV3K.js +11 -0
- package/dist/bundle/chunks/{chunk-KPO5375S.js → chunk-RCRGGYLW.js} +1 -1
- package/dist/bundle/chunks/chunk-UCJ7FLSO.js +166 -0
- package/dist/bundle/chunks/chunk-USCN7R2E.js +2 -0
- package/dist/bundle/chunks/chunk-WFHH5SX6.js +4 -0
- package/dist/bundle/chunks/chunk-WYWBXNDO.js +6 -0
- package/dist/bundle/chunks/chunk-ZRPAOMVB.js +2 -0
- package/dist/bundle/chunks/{cli-PYJB6AQ3.js → cli-HTUB6WOG.js} +6 -6
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-RRSO6OXX.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +188 -21
- package/dist/bundle/chunks/execute-UUPNZJJG.js +31 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-VJSS5EBX.js +2 -0
- package/dist/bundle/chunks/google-vertex-K23DBWTT.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
- package/dist/bundle/chunks/{llama-cpp-classify-EJ5XMSQL.js → llama-cpp-classify-3VDXTYVJ.js} +3 -3
- package/dist/bundle/chunks/mistral-conversations-SKVQJGFZ.js +5 -0
- package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
- package/dist/bundle/chunks/node-DXZFQBEO.js +16 -0
- package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/openai-codex-responses-LV4RIZL3.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +1 -1
- package/dist/bundle/chunks/openai-completions-PUIR2V25.js +7 -0
- package/dist/bundle/chunks/openai-decisions-2DJLSYQF.js +5 -0
- package/dist/bundle/chunks/openai-responses-6ESQOXAF.js +4 -0
- package/dist/bundle/chunks/opencode-go.js +1 -1
- package/dist/bundle/chunks/openrouter-images-TVXBMY3V.js +2 -0
- package/dist/bundle/chunks/pi-messages-XS7FDWQI.js +8 -0
- package/dist/bundle/chunks/runtime-IB3XQ7E3.js +2 -0
- package/dist/bundle/chunks/runtime-LB35PK4J.js +3 -0
- package/dist/bundle/chunks/settings-manager-YNY5F4RU.js +2 -0
- package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
- package/dist/bundle/chunks/typesafe-system-one-67GAWZXE.js +2 -0
- package/dist/bundle/chunks/virtual-modules-U4CBGVMI.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +2 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +30 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +4 -4
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/config.d.ts +18 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +44 -6
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +65 -8
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +240 -102
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +20 -13
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +42 -52
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bug-report.d.ts +9 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/builtins/completion-checks.d.ts +3 -0
- package/dist/core/builtins/completion-checks.d.ts.map +1 -0
- package/dist/core/builtins/completion-checks.js +142 -0
- package/dist/core/builtins/completion-checks.js.map +1 -0
- package/dist/core/builtins/duet.d.ts.map +1 -1
- package/dist/core/builtins/duet.js +7 -5
- package/dist/core/builtins/duet.js.map +1 -1
- package/dist/core/builtins/git-safety.d.ts +3 -0
- package/dist/core/builtins/git-safety.d.ts.map +1 -0
- package/dist/core/builtins/git-safety.js +34 -0
- package/dist/core/builtins/git-safety.js.map +1 -0
- package/dist/core/builtins/index.d.ts.map +1 -1
- package/dist/core/builtins/index.js +4 -0
- package/dist/core/builtins/index.js.map +1 -1
- package/dist/core/client-identity.d.ts +8 -0
- package/dist/core/client-identity.d.ts.map +1 -0
- package/dist/core/client-identity.js +15 -0
- package/dist/core/client-identity.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +20 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +6 -0
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +7 -8
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +2 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.html +1 -0
- package/dist/core/export-html/template.js +23 -17
- package/dist/core/export-html/tool-renderer.d.ts +3 -3
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +5 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +30 -29
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +7 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +6 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +16 -4
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +61 -7
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +2 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/key-id-schema.d.ts +6 -0
- package/dist/core/key-id-schema.d.ts.map +1 -0
- package/dist/core/key-id-schema.js +16 -0
- package/dist/core/key-id-schema.js.map +1 -0
- package/dist/core/keybindings-schema.d.ts +4 -0
- package/dist/core/keybindings-schema.d.ts.map +1 -0
- package/dist/core/keybindings-schema.js +16 -0
- package/dist/core/keybindings-schema.js.map +1 -0
- package/dist/core/keybindings.d.ts +242 -75
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +30 -23
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +22 -0
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +72 -11
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1623 -74
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +70 -184
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +4 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +56 -43
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +253 -358
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +19 -10
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +1 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -1
- package/dist/core/nested-tool-calls.js +1 -0
- package/dist/core/nested-tool-calls.js.map +1 -1
- package/dist/core/package-manager.js +3 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/polyphase/keyword.js +1 -1
- package/dist/core/polyphase/keyword.js.map +1 -1
- package/dist/core/polyphase/model-selection.d.ts.map +1 -1
- package/dist/core/polyphase/model-selection.js +15 -7
- package/dist/core/polyphase/model-selection.js.map +1 -1
- package/dist/core/polyphase/workflow/prelude.d.ts +2 -0
- package/dist/core/polyphase/workflow/prelude.d.ts.map +1 -1
- package/dist/core/polyphase/workflow/prelude.js +12 -16
- package/dist/core/polyphase/workflow/prelude.js.map +1 -1
- package/dist/core/polyphase/workflow/runtime.d.ts.map +1 -1
- package/dist/core/polyphase/workflow/runtime.js +2 -1
- package/dist/core/polyphase/workflow/runtime.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +7 -2
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-composer.d.ts +2 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +13 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts +2 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +2 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +12 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +84 -24
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +3 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +7 -4
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +13 -4
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +27 -15
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +65 -0
- package/dist/core/settings-defaults.d.ts.map +1 -0
- package/dist/core/settings-defaults.js +66 -0
- package/dist/core/settings-defaults.js.map +1 -0
- package/dist/core/settings-manager.d.ts +17 -178
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +86 -57
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +269 -0
- package/dist/core/settings-schema.d.ts.map +1 -0
- package/dist/core/settings-schema.js +318 -0
- package/dist/core/settings-schema.js.map +1 -0
- package/dist/core/skills.d.ts +4 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +10 -5
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/grep.d.ts +8 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +19 -7
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +2 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +2 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +4 -10
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js +6 -6
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts +13 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +32 -2
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +20 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +67 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +7 -35
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/dist/core/tools/renderers/edit.js +5 -4
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/core/tools/renderers/index.d.ts +2 -2
- package/dist/core/tools/renderers/index.d.ts.map +1 -1
- package/dist/core/tools/renderers/index.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +7 -11
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +391 -80
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/index.d.ts.map +1 -1
- package/dist/extensions/codemode/index.js +3 -1
- package/dist/extensions/codemode/index.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts +2 -2
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +9 -3
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +22 -21
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +96 -123
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +34 -11
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +27 -33
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts +15 -3
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +49 -12
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts +4 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +279 -129
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +21 -11
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +166 -45
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +3 -10
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +4 -5
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +7 -7
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +31 -45
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +7 -5
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +87 -29
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +3 -3
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +18 -6
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +0 -2
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +2 -4
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/hooks/checks/checks-runtime.cjs +215 -0
- package/dist/hooks/checks/git-safety.cjs +198 -0
- package/dist/hooks/checks/git-safety.d.cts +1 -0
- package/dist/hooks/gsd/draht-post-task.js +78 -39
- package/dist/hooks/gsd/draht-quality-gate.js +210 -122
- package/dist/hooks/gsd/package.json +3 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +11 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/auth-url.d.ts +14 -0
- package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
- package/dist/modes/interactive/components/auth-url.js +37 -0
- package/dist/modes/interactive/components/auth-url.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +5 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +17 -14
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +5 -2
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +5 -2
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +3 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +8 -2
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +3 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +38 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +8 -2
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +24 -21
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.d.ts +15 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.js +85 -0
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +9 -8
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +5 -2
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +2 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +12 -13
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +32 -45
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +2 -9
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +5 -4
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +43 -48
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +362 -278
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +34 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
- package/dist/modes/interactive/program-status-reporter.js +110 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/system-theme.d.ts +2 -1
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/system-theme.js +16 -5
- package/dist/modes/interactive/theme/system-theme.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +13 -16
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +22 -29
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +4 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +26 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/prompts/commands/atomic-commit.md +8 -6
- package/dist/prompts/commands/brainstorm.md +5 -149
- package/dist/prompts/commands/create-verification-skill.md +8 -48
- package/dist/prompts/commands/discuss-phase.md +6 -10
- package/dist/prompts/commands/execute-phase.md +18 -45
- package/dist/prompts/commands/fix.md +16 -128
- package/dist/prompts/commands/grill.md +6 -53
- package/dist/prompts/commands/init-project.md +13 -18
- package/dist/prompts/commands/map-codebase.md +3 -3
- package/dist/prompts/commands/new-project.md +12 -17
- package/dist/prompts/commands/next-milestone.md +4 -8
- package/dist/prompts/commands/orchestrate-loop.md +12 -12
- package/dist/prompts/commands/orchestrate.md +12 -11
- package/dist/prompts/commands/pause-work.md +1 -1
- package/dist/prompts/commands/plan-phase.md +15 -37
- package/dist/prompts/commands/quick.md +11 -64
- package/dist/prompts/commands/resolve-conflicts.md +2 -15
- package/dist/prompts/commands/triage.md +3 -14
- package/dist/prompts/commands/verify-work.md +15 -63
- package/dist/prompts/commands/why.md +18 -118
- package/dist/skills/atomic-reasoning/SKILL.md +6 -105
- package/dist/skills/blast-radius/SKILL.md +1 -1
- package/dist/skills/epistemics/SKILL.md +12 -87
- package/dist/skills/explainers/SKILL.md +1 -1
- package/dist/skills/typescript-discipline/SKILL.md +12 -42
- package/dist/skills/typescript-discipline/references/patterns.md +25 -266
- package/dist/skills/unslop/SKILL.md +14 -105
- package/dist/utils/ansi.d.ts +8 -0
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +30 -11
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +3 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +18 -12
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/draht-user-agent.d.ts +1 -0
- package/dist/utils/draht-user-agent.d.ts.map +1 -1
- package/dist/utils/draht-user-agent.js +3 -2
- package/dist/utils/draht-user-agent.js.map +1 -1
- package/dist/utils/image-convert.d.ts +12 -0
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js +45 -6
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts +12 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.js +3 -2
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js +9 -10
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/output-files.d.ts +15 -0
- package/dist/utils/output-files.d.ts.map +1 -0
- package/dist/utils/output-files.js +30 -0
- package/dist/utils/output-files.js.map +1 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +43 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +6 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +4 -3
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli-integration.md +1 -1
- package/docs/cli.md +30 -26
- package/docs/codemode.md +230 -0
- package/docs/compaction.md +5 -5
- package/docs/containerization.md +1 -1
- package/docs/custom-provider.md +53 -1
- package/docs/docs.json +17 -1
- package/docs/drahtbank.md +163 -0
- package/docs/environment-variables.md +5 -2
- package/docs/extensions.md +143 -13
- package/docs/index.md +1 -1
- package/docs/json.md +3 -3
- package/docs/keybindings.md +9 -5
- package/docs/llama-cpp.md +9 -2
- package/docs/mcp.md +59 -3
- package/docs/message-types.md +22 -4
- package/docs/models-configuration.md +187 -0
- package/docs/models.md +67 -4
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/providers.md +70 -5
- package/docs/sdk.md +1 -1
- package/docs/settings.md +10 -8
- package/docs/terminal-setup.md +14 -0
- package/docs/themes.md +4 -2
- package/docs/tui.md +71 -1
- package/docs/usage.md +1 -1
- package/docs/windows.md +16 -2
- package/eval/drahtbank/adapters.d.mts +35 -0
- package/eval/drahtbank/adapters.mjs +192 -0
- package/eval/drahtbank/bank.d.mts +141 -0
- package/eval/drahtbank/bank.mjs +515 -0
- package/eval/drahtbank/cases-v2.d.mts +28 -0
- package/eval/drahtbank/cases-v2.mjs +164 -0
- package/eval/drahtbank/cases.d.mts +17 -0
- package/eval/drahtbank/cases.mjs +198 -0
- package/eval/drahtbank/cli.mjs +120 -0
- package/eval/drahtbank/grading-v2.d.mts +26 -0
- package/eval/drahtbank/grading-v2.mjs +227 -0
- package/eval/drahtbank/isolated-tools.ts +223 -0
- package/eval/drahtbank/isolation-worker.mjs +53 -0
- package/eval/drahtbank/isolation.d.mts +52 -0
- package/eval/drahtbank/isolation.mjs +345 -0
- package/eval/drahtbank/runtime-checks.d.mts +15 -0
- package/eval/drahtbank/runtime-checks.mjs +187 -0
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/minimal-mode.ts +4 -5
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/plan-mode/index.ts +6 -2
- package/examples/extensions/subagent/index.ts +4 -6
- package/hooks/checks/checks-runtime.cjs +215 -0
- package/hooks/checks/git-safety.cjs +198 -0
- package/hooks/checks/git-safety.d.cts +1 -0
- package/hooks/gsd/draht-post-task.js +78 -39
- package/hooks/gsd/draht-quality-gate.js +210 -122
- package/hooks/gsd/package.json +3 -0
- package/package.json +21 -16
- package/prompts/commands/atomic-commit.md +8 -6
- package/prompts/commands/brainstorm.md +5 -149
- package/prompts/commands/create-verification-skill.md +8 -48
- package/prompts/commands/discuss-phase.md +6 -10
- package/prompts/commands/execute-phase.md +18 -45
- package/prompts/commands/fix.md +16 -128
- package/prompts/commands/grill.md +6 -53
- package/prompts/commands/init-project.md +13 -18
- package/prompts/commands/map-codebase.md +3 -3
- package/prompts/commands/new-project.md +12 -17
- package/prompts/commands/next-milestone.md +4 -8
- package/prompts/commands/orchestrate-loop.md +12 -12
- package/prompts/commands/orchestrate.md +12 -11
- package/prompts/commands/pause-work.md +1 -1
- package/prompts/commands/plan-phase.md +15 -37
- package/prompts/commands/quick.md +11 -64
- package/prompts/commands/resolve-conflicts.md +2 -15
- package/prompts/commands/triage.md +3 -14
- package/prompts/commands/verify-work.md +15 -63
- package/prompts/commands/why.md +18 -118
- package/schemas/keybindings.schema.json +433 -0
- package/schemas/models.schema.json +1190 -0
- package/schemas/settings.schema.json +849 -0
- package/schemas/theme.schema.json +365 -0
- package/skills/atomic-reasoning/SKILL.md +6 -105
- package/skills/blast-radius/SKILL.md +1 -1
- package/skills/epistemics/SKILL.md +12 -87
- package/skills/explainers/SKILL.md +1 -1
- package/skills/typescript-discipline/SKILL.md +12 -42
- package/skills/typescript-discipline/references/patterns.md +25 -266
- package/skills/unslop/SKILL.md +14 -105
- package/dist/bundle/chunks/anthropic-messages-GAKYXF65.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-ZIXMK6JO.js +0 -2
- package/dist/bundle/chunks/chunk-2E5VODES.js +0 -2
- package/dist/bundle/chunks/chunk-2VAF4XJI.js +0 -146
- package/dist/bundle/chunks/chunk-4TVQYRQY.js +0 -2
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
- package/dist/bundle/chunks/chunk-6ZJKIMU7.js +0 -2
- package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
- package/dist/bundle/chunks/chunk-7TYCZN4Z.js +0 -137
- package/dist/bundle/chunks/chunk-BXSHCX3G.js +0 -11
- package/dist/bundle/chunks/chunk-GVXA72ZA.js +0 -2
- package/dist/bundle/chunks/chunk-I5OKY6RH.js +0 -11
- package/dist/bundle/chunks/chunk-IWTUBX6V.js +0 -4
- package/dist/bundle/chunks/chunk-KU5HAKZL.js +0 -4
- package/dist/bundle/chunks/chunk-MO3SCGBN.js +0 -18
- package/dist/bundle/chunks/chunk-N2QZNJT6.js +0 -65
- package/dist/bundle/chunks/chunk-PGJAHC3R.js +0 -107
- package/dist/bundle/chunks/chunk-QVFELZW2.js +0 -312
- package/dist/bundle/chunks/chunk-RZKPFWMH.js +0 -42
- package/dist/bundle/chunks/chunk-SDRCE6OP.js +0 -2
- package/dist/bundle/chunks/chunk-SVNWI7EV.js +0 -8
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
- package/dist/bundle/chunks/chunk-TOWVIJ2O.js +0 -1623
- package/dist/bundle/chunks/chunk-XBUEMKIY.js +0 -2
- package/dist/bundle/chunks/chunk-ZA4QNPJY.js +0 -82
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MJKOAE5S.js +0 -2
- package/dist/bundle/chunks/execute-6N7T7VLY.js +0 -18
- package/dist/bundle/chunks/google-generative-ai-RPUPQ6PM.js +0 -2
- package/dist/bundle/chunks/google-vertex-EZES5QVQ.js +0 -2
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
- package/dist/bundle/chunks/mistral-conversations-AOYGU43Y.js +0 -5
- package/dist/bundle/chunks/node-LQ52KV6B.js +0 -16
- package/dist/bundle/chunks/openai-codex-responses-M2Y77JEQ.js +0 -10
- package/dist/bundle/chunks/openai-completions-A4OKYOYV.js +0 -7
- package/dist/bundle/chunks/openai-responses-6IXV53T3.js +0 -3
- package/dist/bundle/chunks/openrouter-images-LYV4NKFM.js +0 -2
- package/dist/bundle/chunks/pi-messages-KKMEUT3Z.js +0 -8
- package/dist/bundle/chunks/runtime-363BOYEO.js +0 -3
- package/dist/bundle/chunks/runtime-D3KV73AE.js +0 -2
- package/dist/bundle/chunks/settings-manager-GEOZJXFQ.js +0 -2
- package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
- package/dist/bundle/chunks/typesafe-system-one-YBEEY5XU.js +0 -2
- package/dist/bundle/chunks/virtual-modules-RLC4Y5MX.js +0 -2
- package/dist/core/provider-attribution.d.ts +0 -4
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js +0 -72
- package/dist/core/provider-attribution.js.map +0 -1
- package/dist/experimental/micro/api.d.ts +0 -81
- package/dist/experimental/micro/api.d.ts.map +0 -1
- package/dist/experimental/micro/api.js +0 -2
- package/dist/experimental/micro/api.js.map +0 -1
- package/dist/experimental/micro/main.d.ts +0 -3
- package/dist/experimental/micro/main.d.ts.map +0 -1
- package/dist/experimental/micro/main.js +0 -21
- package/dist/experimental/micro/main.js.map +0 -1
- package/dist/experimental/micro/models.d.ts +0 -11
- package/dist/experimental/micro/models.d.ts.map +0 -1
- package/dist/experimental/micro/models.js +0 -95
- package/dist/experimental/micro/models.js.map +0 -1
- package/dist/experimental/micro/runtime.d.ts +0 -12
- package/dist/experimental/micro/runtime.d.ts.map +0 -1
- package/dist/experimental/micro/runtime.js +0 -465
- package/dist/experimental/micro/runtime.js.map +0 -1
- package/dist/experimental/micro/sessions.d.ts +0 -10
- package/dist/experimental/micro/sessions.d.ts.map +0 -1
- package/dist/experimental/micro/sessions.js +0 -41
- package/dist/experimental/micro/sessions.js.map +0 -1
- package/dist/experimental/micro/tools.d.ts +0 -10
- package/dist/experimental/micro/tools.d.ts.map +0 -1
- package/dist/experimental/micro/tools.js +0 -96
- package/dist/experimental/micro/tools.js.map +0 -1
- package/dist/experimental/micro/tui.d.ts +0 -3
- package/dist/experimental/micro/tui.d.ts.map +0 -1
- package/dist/experimental/micro/tui.js +0 -510
- package/dist/experimental/micro/tui.js.map +0 -1
- package/dist/experimental/mini/main.d.ts +0 -7
- package/dist/experimental/mini/main.d.ts.map +0 -1
- package/dist/experimental/mini/main.js +0 -21
- package/dist/experimental/mini/main.js.map +0 -1
- package/dist/experimental/mini/server/entry.d.ts +0 -3
- package/dist/experimental/mini/server/entry.d.ts.map +0 -1
- package/dist/experimental/mini/server/entry.js +0 -11
- package/dist/experimental/mini/server/entry.js.map +0 -1
- package/dist/experimental/mini/server/run.d.ts +0 -13
- package/dist/experimental/mini/server/run.d.ts.map +0 -1
- package/dist/experimental/mini/server/run.js +0 -150
- package/dist/experimental/mini/server/run.js.map +0 -1
- package/dist/experimental/mini/shared/protocol.d.ts +0 -127
- package/dist/experimental/mini/shared/protocol.d.ts.map +0 -1
- package/dist/experimental/mini/shared/protocol.js +0 -13
- package/dist/experimental/mini/shared/protocol.js.map +0 -1
- package/dist/experimental/mini/shared/rpc.d.ts +0 -49
- package/dist/experimental/mini/shared/rpc.d.ts.map +0 -1
- package/dist/experimental/mini/shared/rpc.js +0 -171
- package/dist/experimental/mini/shared/rpc.js.map +0 -1
- package/dist/experimental/mini/shared/transport.d.ts +0 -35
- package/dist/experimental/mini/shared/transport.d.ts.map +0 -1
- package/dist/experimental/mini/shared/transport.js +0 -94
- package/dist/experimental/mini/shared/transport.js.map +0 -1
- package/dist/experimental/mini/tui/run.d.ts +0 -9
- package/dist/experimental/mini/tui/run.d.ts.map +0 -1
- package/dist/experimental/mini/tui/run.js +0 -62
- package/dist/experimental/mini/tui/run.js.map +0 -1
- package/dist/experimental/mini/tui/session.d.ts +0 -26
- package/dist/experimental/mini/tui/session.d.ts.map +0 -1
- package/dist/experimental/mini/tui/session.js +0 -94
- package/dist/experimental/mini/tui/session.js.map +0 -1
- package/dist/experimental/mini/tui/view.d.ts +0 -10
- package/dist/experimental/mini/tui/view.d.ts.map +0 -1
- package/dist/experimental/mini/tui/view.js +0 -461
- package/dist/experimental/mini/tui/view.js.map +0 -1
- package/dist/experimental/mini/worker/entry.d.ts +0 -3
- package/dist/experimental/mini/worker/entry.d.ts.map +0 -1
- package/dist/experimental/mini/worker/entry.js +0 -10
- package/dist/experimental/mini/worker/entry.js.map +0 -1
- package/dist/experimental/mini/worker/lane-service.d.ts +0 -44
- package/dist/experimental/mini/worker/lane-service.d.ts.map +0 -1
- package/dist/experimental/mini/worker/lane-service.js +0 -97
- package/dist/experimental/mini/worker/lane-service.js.map +0 -1
- package/dist/experimental/mini/worker/models-service.d.ts +0 -19
- package/dist/experimental/mini/worker/models-service.d.ts.map +0 -1
- package/dist/experimental/mini/worker/models-service.js +0 -136
- package/dist/experimental/mini/worker/models-service.js.map +0 -1
- package/dist/experimental/mini/worker/run.d.ts +0 -14
- package/dist/experimental/mini/worker/run.d.ts.map +0 -1
- package/dist/experimental/mini/worker/run.js +0 -88
- package/dist/experimental/mini/worker/run.js.map +0 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -85
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -132
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/theme/theme-schema.json +0 -361
- /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
|
@@ -1,159 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Explore an idea, compare approaches, and resolve unclear goals or scope"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# /brainstorm
|
|
6
6
|
|
|
7
|
-
The pre-planning gate. Before draht's GSD cycle runs, before code is scaffolded, before `/new-project` or `/init-project`, converge on the idea through dialogue and write it to `.planning/specs/`. This command enforces design-first discipline.
|
|
8
|
-
|
|
9
|
-
For subject-agnostic interrogation that does not presume a project — a spec, raw tickets, an architecture decision, an open discussion — use `/grill`; `/brainstorm` stays the project-creation entry and questions with the same whole-frontier protocol.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
```
|
|
13
|
-
/brainstorm [idea or topic]
|
|
14
|
-
```
|
|
15
|
-
|
|
16
7
|
Topic: $ARGUMENTS
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
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.
|
|
21
|
-
|
|
22
|
-
## Hear the Problem Beneath the Ask
|
|
23
|
-
|
|
24
|
-
The user's words describe an artifact; the design must serve a need. They are rarely the same thing.
|
|
25
|
-
|
|
26
|
-
**Procedure:**
|
|
27
|
-
1. Separate the stated artifact ("a dashboard") from the underlying need — what decision, pain, or moment does it serve?
|
|
28
|
-
2. When the user names a solution, ask what it solves before refining it. Solutions stay candidates until the need is confirmed.
|
|
29
|
-
3. State the need back in one sentence ("so the real problem is X — right?") and get an explicit yes before proposing any approach.
|
|
30
|
-
|
|
31
|
-
**Example:** "I want an admin dashboard" → questioning reveals they check one number, once a week → a scheduled email beats the dashboard by a month of build time.
|
|
32
|
-
|
|
33
|
-
**Prevents:** a polished spec for the wrong artifact.
|
|
34
|
-
|
|
35
|
-
## The Hard Gate
|
|
36
|
-
|
|
37
|
-
> Do NOT invoke any planning command, write any code, scaffold any project, or take any implementation action until you have:
|
|
38
|
-
> 1. Worked the question frontier in rounds until it was empty
|
|
39
|
-
> 2. Proposed 2–3 approaches with trade-offs
|
|
40
|
-
> 3. Presented a structured design and the user has approved it
|
|
41
|
-
> 4. Written the design to `.planning/specs/YYYY-MM-DD-<slug>-design.md`
|
|
42
|
-
|
|
43
|
-
If the user pushes to skip ("just build it"), surface the trade-off: "I can scaffold something now, but skipping brainstorming usually means we throw out the first version. Are you sure?" If yes, proceed but make the assumption explicit in the spec.
|
|
44
|
-
|
|
45
|
-
## The Process
|
|
46
|
-
|
|
47
|
-
### 1. Explore Context
|
|
48
|
-
|
|
49
|
-
Before asking anything, read what's already on disk:
|
|
50
|
-
- `git log --oneline -30` — what has the user been working on recently?
|
|
51
|
-
- `ls -la` — what's in the project root?
|
|
52
|
-
- `.planning/` if it exists — is there an active project?
|
|
53
|
-
- `README.md`, `package.json`, any `*.md` in root — what does this codebase claim to do?
|
|
54
|
-
|
|
55
|
-
If an existing codebase is in play (extending a real project), run `draht-tools map-codebase` + `draht-tools graph-hotspots` first to ground ideation in the real structure — so brainstormed ideas don't contradict existing architecture.
|
|
56
|
-
|
|
57
|
-
Use this to ground questions in reality instead of asking things the user has already told you.
|
|
58
|
-
|
|
59
|
-
### 2. Question in Rounds — Ask the Whole Frontier
|
|
60
|
-
|
|
61
|
-
Most failed projects come from rushing past ambiguity. Map the open decisions as a design tree — every decision branches into the decisions that hang off it. The **frontier** is every question whose prerequisites are already settled. Each round, ask the WHOLE frontier in one message: numbered, foundational → detailed, each question with a *Recommended:* answer line so the user can accept by number ("1 yes, 2: B, 3 later"). A question accepted by number or answered explicitly is **decided**; a recommendation acted on without confirmation is **assumed** and stays flagged. Questions that depend on still-open answers wait for a later round. Environment facts (files, git history, code structure) are your job, never the user's — dispatch a subagent non-blockingly; only the questions downstream of it wait.
|
|
62
|
-
|
|
63
|
-
Question categories (sequence from foundational → detailed):
|
|
64
|
-
- **Goal** — who is this for? what changes for them when it ships?
|
|
65
|
-
- **Constraints** — deadline? budget? team size? language/stack preferences?
|
|
66
|
-
- **Scope** — what's in v1? what's explicitly NOT in v1?
|
|
67
|
-
- **Success criteria** — how do we know it works? what's the demoable outcome?
|
|
68
|
-
- **Domain** — what are the key nouns and verbs in this space? any existing glossary?
|
|
69
|
-
- **Risks** — what's the scariest part of this? what would make it fail?
|
|
70
|
-
|
|
71
|
-
If the project is obviously oversized for one cycle (e.g., "I want to build a social network"), flag it explicitly and propose decomposition into a v1 / v2 / out-of-scope split.
|
|
72
|
-
|
|
73
|
-
### 3. Propose 2–3 Approaches With Trade-offs
|
|
74
|
-
|
|
75
|
-
Once you have enough context, propose multiple approaches:
|
|
76
|
-
- Approach A: the simplest path. What it sacrifices.
|
|
77
|
-
- Approach B: the most flexible. What it costs.
|
|
78
|
-
- (Optional) Approach C: the most ambitious. Why it's tempting and why it might be too much.
|
|
79
|
-
|
|
80
|
-
For each: list trade-offs in plain language (time, complexity, future flexibility, lock-in). Let the user pick — don't pre-pick for them.
|
|
81
|
-
|
|
82
|
-
### 4. Present the Design in Sections, Each With an Approval Gate
|
|
83
|
-
|
|
84
|
-
Once an approach is chosen, present the design **section by section**, not all at once:
|
|
85
|
-
1. Goal & non-goals
|
|
86
|
-
2. User stories / observable truths
|
|
87
|
-
3. Domain model (bounded contexts, key nouns)
|
|
88
|
-
4. Architecture sketch (components, data flow)
|
|
89
|
-
5. v1 scope (what ships) vs v2/out-of-scope (what doesn't)
|
|
90
|
-
6. Open questions / risks
|
|
91
|
-
|
|
92
|
-
After each section, ask: "Does this match what you want, or should we adjust?" Only move to the next section once the current one is approved.
|
|
93
|
-
|
|
94
|
-
### 5. Write the Spec to `.planning/specs/`
|
|
95
|
-
|
|
96
|
-
Once all sections are approved:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
.planning/specs/YYYY-MM-DD-<topic-slug>-design.md
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Write spec prose through the `unslop` skill — name mechanisms, not feelings; the spec structure below stays as specified.
|
|
103
|
-
|
|
104
|
-
The file should include:
|
|
105
|
-
- Header with date and approver
|
|
106
|
-
- All approved sections
|
|
107
|
-
- Open questions section (the things you flagged but didn't resolve)
|
|
108
|
-
- Next step: which command picks this up (`/new-project` or `/init-project`)
|
|
109
|
-
|
|
110
|
-
### 6. Self-Review the Written Spec
|
|
111
|
-
|
|
112
|
-
Before handing off, attack the spec as if you were paid to kill it:
|
|
113
|
-
- Contradictions between sections (the goal says X, the architecture implies not-X)
|
|
114
|
-
- Gaps (a user story with no architectural support)
|
|
115
|
-
- Premature commitments (specific tech choices made before they were needed)
|
|
116
|
-
- Domain language drift (different names for the same thing)
|
|
117
|
-
- The strongest case the whole design is wrong — wrong scope, wrong user, or already exists as a simpler tool. Write that case and why the design survives it into the spec's Open Questions.
|
|
118
|
-
|
|
119
|
-
Report any findings to the user and update before proceeding. A spec that was never attacked has never been tested.
|
|
120
|
-
|
|
121
|
-
### 7. Hand Off
|
|
122
|
-
|
|
123
|
-
Direct the user to the next command:
|
|
124
|
-
- Greenfield with no codebase → `/new-project`
|
|
125
|
-
- Existing codebase → `/init-project`
|
|
126
|
-
|
|
127
|
-
The spec file becomes input to those commands.
|
|
128
|
-
|
|
129
|
-
## Workflow
|
|
130
|
-
|
|
131
|
-
`/brainstorm` runs before any project initialization. Each later step runs in its own session (`/new` between steps):
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
/brainstorm → /new → /new-project (or /init-project) → /new → /discuss-phase 1 → /new → /plan-phase 1 → ...
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Anti-Patterns — STOP
|
|
138
|
-
|
|
139
|
-
- **Dribbling questions one at a time** — a serial interview hides the decision tree and wastes rounds; ask the whole frontier, numbered, with recommended answers
|
|
140
|
-
- **Asking the user for facts you can look up** — filesystem, git history, and code structure are your job; dispatch a subagent and keep the round moving
|
|
141
|
-
- **Pre-deciding before they've answered** — "I'll just assume you mean X" is a failure mode
|
|
142
|
-
- **Skipping the alternatives** — proposing only one approach hides the trade-space
|
|
143
|
-
- **Writing the spec before approval** — the spec records *decisions*, not *proposals*. Get the decision first.
|
|
144
|
-
- **Brainstorming code** — this command is for the design, not the implementation. Resist the urge to start writing.
|
|
145
|
-
|
|
146
|
-
## Rationalization Table
|
|
9
|
+
Read relevant project context, then help the user choose an approach. Ask only questions that materially affect the result; group related questions and provide recommendations when useful. Distinguish accepted decisions from assumptions.
|
|
147
10
|
|
|
148
|
-
|
|
149
|
-
|--------|---------|
|
|
150
|
-
| "It's a simple project, no need to brainstorm" | Simple projects also have ambiguous scope. The gate is fast for simple ones. |
|
|
151
|
-
| "User said 'just build it'" | They'll be unhappier when the wrong thing gets built. Surface the trade-off. |
|
|
152
|
-
| "I already know what they want" | Verify by stating it back and getting confirmation. |
|
|
153
|
-
| "Let's iterate after a first draft" | A first draft in code is more expensive to throw away than a first draft on paper. |
|
|
154
|
-
| "Ten questions at once will overwhelm them" | Numbered questions with recommended answers are skimmable — the user replies "1 yes, 2: B, 3 later". Serial questioning is the slower burden. |
|
|
155
|
-
| "I'll just ask what's in the repo" | Finding facts is your job, never the user's. Dispatch a subagent. |
|
|
11
|
+
Compare alternatives where there is a real trade-off. Describe the intended outcome, scope, constraints, approach, risks, and observable success criteria at the depth the task needs. Do not impose a fixed number of rounds or section-by-section approvals.
|
|
156
12
|
|
|
157
|
-
|
|
13
|
+
A concise recommendation in chat is sufficient. Write a design document when requested or useful for substantial work, in the project's established location. Do not require `.planning/`, a new session, or a GSD command. Use those only when the user selected GSD.
|
|
158
14
|
|
|
159
|
-
|
|
15
|
+
When the user asks to implement, proceed within that authorization. Clarify only blocking decisions or actions that need additional permission. Brainstorming is not a gate on otherwise clear implementation requests.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Generate a
|
|
2
|
+
description: "Generate a 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
3
|
---
|
|
4
4
|
|
|
5
5
|
# /create-verification-skill
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Create a project-local `.draht/skills/verify-<app>/` skill that launches the real application, exercises user-visible behavior, and captures reusable evidence.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
```
|
|
@@ -23,11 +23,11 @@ Answer these from the codebase and only ask the user what you cannot observe:
|
|
|
23
23
|
|
|
24
24
|
- **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.
|
|
25
25
|
- **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.
|
|
26
|
-
- **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.
|
|
26
|
+
- **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. Use the host's supported automation tools or a repository harness; include a shell-based fallback only when needed. Respect repository command restrictions.
|
|
27
27
|
- **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
|
|
28
28
|
- **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.
|
|
29
29
|
|
|
30
|
-
If the checkout doesn't build or start as-is,
|
|
30
|
+
If the checkout doesn't build or start as-is, resolve in-scope prerequisites or report the blocker precisely before claiming the skill verified; 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.
|
|
31
31
|
|
|
32
32
|
### 2 — Generate the skill
|
|
33
33
|
|
|
@@ -44,7 +44,7 @@ Frontmatter is `name: verify-<app>` plus a `description` that names the app, the
|
|
|
44
44
|
|
|
45
45
|
### 3 — Seed the feature map
|
|
46
46
|
|
|
47
|
-
Create a `features/` directory inside the generated skill dir, holding `features/README.md` plus one file per user-facing feature you can identify (
|
|
47
|
+
Create a `features/` directory inside the generated skill dir, holding `features/README.md` plus one file per user-facing feature you can identify (start with the relevant user paths identified 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.
|
|
48
48
|
|
|
49
49
|
Each feature file starts with an H1 title and one paragraph of user-visible behaviour, then exactly four H2 sections in this order:
|
|
50
50
|
|
|
@@ -53,56 +53,16 @@ Each feature file starts with an H1 title and one paragraph of user-visible beha
|
|
|
53
53
|
3. `Driving it with <harness>` — starts with `Preconditions:`, then labelled bullets pairing each user action with an exact command and its observable result.
|
|
54
54
|
4. `Gotchas` — traps that can waste or invalidate a verification run.
|
|
55
55
|
|
|
56
|
-
Keep implementation details out of the map: name only user paths, stable handles, required state, commands, and observable proof.
|
|
57
|
-
|
|
58
|
-
```markdown
|
|
59
|
-
# Create a note
|
|
60
|
-
|
|
61
|
-
Create note lets a user save a titled note and confirm it from a second view.
|
|
62
|
-
|
|
63
|
-
## Sub-features
|
|
64
|
-
|
|
65
|
-
- `create-save` persists a title and body.
|
|
66
|
-
|
|
67
|
-
## How to get to it (user POV)
|
|
68
|
-
|
|
69
|
-
- Choose the `New note` button in the browser toolbar.
|
|
70
|
-
|
|
71
|
-
## Driving it with the CDP harness
|
|
72
|
-
|
|
73
|
-
Preconditions:
|
|
74
|
-
|
|
75
|
-
- Notes is healthy at `http://127.0.0.1:4173` and no note is titled `Release checklist`.
|
|
76
|
-
|
|
77
|
-
- **Open editor.** Choose `New note`. Click the button with accessible name `New note`. A form named `Note editor` appears.
|
|
78
|
-
- **Save note.** Fill `Title` with `Release checklist`, choose `Save note`. A status named `Note saved` appears.
|
|
79
|
-
- **Proof.** Reopen the note from `All notes`; screenshot to `artifacts/create-note/list.png`. The list shows `Release checklist`.
|
|
80
|
-
|
|
81
|
-
## Gotchas
|
|
82
|
-
|
|
83
|
-
- A save status alone is insufficient proof. Reopen the note from the list.
|
|
84
|
-
```
|
|
85
|
-
|
|
56
|
+
Keep implementation details out of the map: name only user paths, stable handles, required state, commands, and observable proof.
|
|
86
57
|
The map is the repo's maintained verification source; a proof that drives one convenient entry point is incomplete when the map lists others.
|
|
87
58
|
|
|
88
59
|
### 4 — Prove the generated skill before handing it over
|
|
89
60
|
|
|
90
61
|
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.
|
|
91
62
|
|
|
92
|
-
### 5 —
|
|
63
|
+
### 5 — Hand over
|
|
93
64
|
|
|
94
|
-
|
|
65
|
+
Keep the skill, feature map, and helpers with the application. Commit only when authorized. Report the verified feature and evidence location, plus these maintenance notes:
|
|
95
66
|
|
|
96
67
|
- `/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.
|
|
97
68
|
- 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.
|
|
98
|
-
|
|
99
|
-
## Failure Modes — STOP
|
|
100
|
-
|
|
101
|
-
Stop immediately if you catch yourself:
|
|
102
|
-
|
|
103
|
-
- Writing recipes against an app you never started — generate from observed behaviour, not from reading the code
|
|
104
|
-
- Trusting a dry-run or test mode by its name instead of observing what it actually skips
|
|
105
|
-
- Proving a feature through a test-only endpoint or internal setter instead of the real user path
|
|
106
|
-
- Driving an instance this run did not start
|
|
107
|
-
- Writing a cleanup that deletes the proof artifacts
|
|
108
|
-
- Handing over a skill whose own instructions were never executed end to end
|
|
@@ -13,26 +13,22 @@ Capture implementation decisions before planning a phase.
|
|
|
13
13
|
|
|
14
14
|
Phase: $1
|
|
15
15
|
|
|
16
|
-
## Atomic Reasoning
|
|
17
|
-
|
|
18
|
-
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.
|
|
19
|
-
|
|
20
16
|
## Steps
|
|
21
17
|
1. Run `draht-tools phase-info $1` to load phase context
|
|
22
18
|
2. Identify gray areas based on what's being built
|
|
23
|
-
3.
|
|
19
|
+
3. Ask about material unresolved decisions, grouping related questions and offering recommendations. Obtain repository facts directly; proceed with independent work while waiting.
|
|
24
20
|
4. If `.planning/DOMAIN.md` exists, load it and validate discovered terms against the glossary. Add any new domain terms found during discussion.
|
|
25
|
-
5. 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.
|
|
26
|
-
6.
|
|
21
|
+
5. 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. State material assumptions and clarify those that would change scope or correctness.
|
|
22
|
+
6. If committing is authorized: `draht-tools commit-docs "capture phase $1 context"`
|
|
27
23
|
|
|
28
24
|
## Workflow
|
|
29
|
-
This is one step in the per-phase cycle.
|
|
25
|
+
This is one step in the per-phase cycle. A fresh session between steps is optional:
|
|
30
26
|
|
|
31
27
|
```
|
|
32
|
-
/discuss-phase N → /
|
|
28
|
+
/discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N → /discuss-phase N+1 → ...
|
|
33
29
|
```
|
|
34
30
|
|
|
35
|
-
After completing this command,
|
|
31
|
+
After completing this command, identify `/plan-phase $1` as the next step.
|
|
36
32
|
Do NOT suggest `/next-milestone` — that is only after ALL phases in the milestone are verified.
|
|
37
33
|
|
|
38
34
|
## Gray Area Categories
|
|
@@ -14,15 +14,9 @@ Execute all plans in a phase with atomic commits, parallelizing independent plan
|
|
|
14
14
|
Phase: $1
|
|
15
15
|
Arguments: $ARGUMENTS
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Execution prerequisites
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- Any plan file contains placeholder text: `[TBD]`, `[files]`, `[description]`, "appropriate error handling", "similar to Task N", or empty `<test>` / `<action>` / `<verify>` / `<done>` sections
|
|
22
|
-
- A plan has zero `<task>` elements
|
|
23
|
-
- `.planning/DOMAIN.md` is absent on a non-greenfield project
|
|
24
|
-
- The working tree is dirty with changes unrelated to this phase
|
|
25
|
-
- A subagent returns `STATUS: BLOCKED` — never retry blindly; report and ask the user
|
|
19
|
+
Validate plans before execution and honor pre-execute hook failures. Preserve unrelated work. An implementation blocker stops that task; a review blocker follows the bounded correction loop below.
|
|
26
20
|
|
|
27
21
|
## RLM Routing for Oversize Inputs (`rlm: true`)
|
|
28
22
|
|
|
@@ -33,12 +27,6 @@ A plan's YAML frontmatter may declare `rlm: true` (alongside `phase`, `plan`, `d
|
|
|
33
27
|
- If `rlm_query` is unavailable in the session (the `@draht/rlm-agent` extension isn't installed for this project), fall back to reading the file directly and note this in the task's `STATUS` report rather than failing the task.
|
|
34
28
|
- When dispatching Stage 1 (Implementer) below for a plan with `rlm: true`, carry this instruction into the subagent's prompt so it actually reaches the agent doing the reading — the orchestrator itself does not read task input files.
|
|
35
29
|
|
|
36
|
-
## Atomic Reasoning
|
|
37
|
-
|
|
38
|
-
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.
|
|
39
|
-
|
|
40
|
-
Within each group of independent plans, dispatch the riskiest plan first (highest uncertainty × blast radius) — its failure invalidates the rest of the phase most cheaply, before effort has been sunk into work it would obsolete.
|
|
41
|
-
|
|
42
30
|
## Steps
|
|
43
31
|
1. Run `draht-tools discover-plans $1` to find and order plans
|
|
44
32
|
2. Run `draht-tools validate-plans $1` — if any plan has placeholders or missing sections, STOP and fix the plan first
|
|
@@ -46,8 +34,8 @@ Within each group of independent plans, dispatch the riskiest plan first (highes
|
|
|
46
34
|
4. **Per-plan execution loop.** For each plan (parallel where independent, sequential where dependent), iterate over its `<task>` elements with a **three-stage** dispatch:
|
|
47
35
|
|
|
48
36
|
### Stage 1 — Implementer
|
|
49
|
-
Use the `subagent` tool in **single mode** with the `implementer` agent. Prompt includes the full plan
|
|
50
|
-
- `DONE` →
|
|
37
|
+
Use the `subagent` tool in **single mode** with the `implementer` agent. Prompt identifies the current task and includes the full plan as context + the TDD cycle instructions (template below). Read the final `STATUS:` line:
|
|
38
|
+
- `DONE` → inspect the actual verification evidence and checked state. Reuse results only if the relevant inputs and environment are unchanged; run missing, stale, or insufficient verification before Stage 2.
|
|
51
39
|
- `DONE_WITH_CONCERNS` → if concerns are correctness-related, re-dispatch with a fix instruction; otherwise note and proceed.
|
|
52
40
|
- `NEEDS_CONTEXT` → provide the missing info and re-dispatch.
|
|
53
41
|
- `BLOCKED` → STOP, report to the user.
|
|
@@ -56,77 +44,62 @@ Within each group of independent plans, dispatch the riskiest plan first (highes
|
|
|
56
44
|
Use the `subagent` tool with the `spec-reviewer` agent. ONLY checks "does the diff cover exactly what the spec asked for". Prompt includes the task XML and the diff range.
|
|
57
45
|
- `DONE` → go to Stage 3.
|
|
58
46
|
- `DONE_WITH_CONCERNS` → note and proceed.
|
|
47
|
+
- `NEEDS_CONTEXT` → supply the missing spec, diff, or context and repeat this review; do not advance.
|
|
59
48
|
- `BLOCKED` → re-dispatch implementer with the "Required Fixes" list; repeat Stage 1+2 until `DONE`. Never proceed to Stage 3 with a non-compliant diff. **Hard cap: 3 implementer re-dispatches per task (across Stage 2 and Stage 3 combined)** — at the cap, record the task as failed and STOP; report the disagreement to the user.
|
|
60
49
|
|
|
61
50
|
### Stage 3 — Reviewer (code quality)
|
|
62
|
-
Use the `subagent` tool with the `reviewer` agent for code-quality review. Spec compliance is already
|
|
51
|
+
Use the `subagent` tool with the `reviewer` agent for code-quality review. Spec compliance is already confirmed; do not repeat the full spec audit, but escalate any discovered mismatch as `Must fix` for spec re-review.
|
|
63
52
|
- `DONE` → task complete; move to next task.
|
|
64
53
|
- `DONE_WITH_CONCERNS` → log `Should fix` items; if any are correctness-critical, re-dispatch implementer.
|
|
65
|
-
- `
|
|
54
|
+
- `NEEDS_CONTEXT` → supply the missing diff or context and repeat this review; do not advance.
|
|
55
|
+
- `BLOCKED` → `Must fix` issues exist; re-dispatch implementer with the issue list. Repeat all three stages until `DONE` — subject to the same **hard cap of 3 re-dispatches per task**; at the cap, record the task as failed and STOP.
|
|
66
56
|
|
|
67
57
|
5. After all plans complete, run `draht-tools verify-phase $1` yourself (not the subagent)
|
|
68
58
|
6. Run `draht-tools update-state` yourself
|
|
69
|
-
7.
|
|
70
|
-
8. After execution,
|
|
59
|
+
7. If committing is authorized, final documentation commit: `draht-tools commit-docs "complete phase $1 execution"`
|
|
60
|
+
8. After execution, identify `/verify-work $1` as the next step; a fresh session is optional.
|
|
71
61
|
|
|
72
62
|
## Subagent Task Template (Stage 1: implementer)
|
|
73
63
|
|
|
74
64
|
Each implementer subagent receives a task like:
|
|
75
65
|
|
|
76
66
|
```
|
|
77
|
-
Execute
|
|
67
|
+
Execute only task <task-name>. The full plan below is context; do not execute later tasks before the orchestrator completes this task's reviews:
|
|
78
68
|
|
|
79
69
|
<paste full plan XML here>
|
|
80
70
|
|
|
81
|
-
For
|
|
71
|
+
For the assigned <task>, follow its test requirements and this TDD cycle where applicable. Commit the phases only when the user has authorized commits:
|
|
82
72
|
1. RED — Write failing tests from <test>. Run the test runner, confirm they FAIL. Commit with: git add <test-files> && git commit -m "red: <description>"
|
|
83
73
|
2. GREEN — Write minimal implementation from <action> to make tests pass. Run tests, confirm PASS. Commit with: git add <files> && git commit -m "green: <task name>"
|
|
84
74
|
3. REFACTOR — Apply <refactor> improvements if any. Tests must stay green after each change. Commit with: git add <files> && git commit -m "refactor: <description>"
|
|
85
75
|
4. VERIFY — Run the <verify> step, confirm <done> criteria are met.
|
|
86
76
|
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
Use established project terms and documented boundaries; read relevant domain context when present.
|
|
78
|
+
Comments explain non-obvious constraints or rationale; avoid step narration and diff restatements.
|
|
89
79
|
Checkpoint handling: type="auto" → execute silently. type="checkpoint:human-verify" → stop and report back what was built. type="checkpoint:decision" → stop and report the options.
|
|
90
80
|
RLM routing: if this plan's frontmatter has `rlm: true`, use the `rlm_query` tool instead of reading directly any task input file at or above ~200KB (see "RLM Routing for Oversize Inputs" above for the full rule and fallback behavior).
|
|
91
81
|
|
|
92
|
-
Evidence rule:
|
|
82
|
+
Evidence rule: report decisive commands, working directories, outcomes, and the code/configuration state checked. A bare success status is insufficient; missing or stale evidence must be verified. If a plan instruction contradicts what you find in the code, stop and report NEEDS_CONTEXT — do not silently obey either side.
|
|
93
83
|
|
|
94
84
|
End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED` per the agent contract.
|
|
95
85
|
|
|
96
86
|
Important: Do NOT run draht, draht-tools, draht help, or pi commands. Use only standard tools (read, bash, edit, write, grep, find, ls).
|
|
97
87
|
```
|
|
98
88
|
|
|
99
|
-
## Two-Stage Review Rationale
|
|
100
|
-
|
|
101
|
-
- **Spec compliance prevents over/under-building.** The spec-reviewer catches drift before quality review masks it.
|
|
102
|
-
- **Code quality runs only after spec ✅.** Never accept "close enough" on spec compliance.
|
|
103
|
-
- **Tasks within a plan are sequential** — review loop completes before next task starts.
|
|
104
|
-
|
|
105
89
|
## Parallelization Rules
|
|
106
90
|
- Plans sharing no files and having no dependency edges can run in parallel
|
|
107
91
|
- Inside a plan, tasks run sequentially with the three-stage loop
|
|
108
92
|
- Maximum parallel subagents: follow the subagent tool limits (max 8 tasks, 4 concurrent)
|
|
109
93
|
- If a parallel subagent fails, report which plan failed and continue with independent plans
|
|
110
94
|
|
|
111
|
-
## TDD Rules
|
|
112
|
-
- Never write implementation before a failing test exists
|
|
113
|
-
- If a test passes immediately after being written, it is not testing the right thing — fix it
|
|
114
|
-
- Red → Green → Refactor is not optional; skipping steps invalidates the safety net
|
|
115
|
-
- Each TDD phase gets its own commit so the history is auditable
|
|
116
|
-
|
|
117
|
-
## Domain Rules
|
|
118
|
-
- All identifiers (class names, method names, variables) must use the ubiquitous language from `.planning/DOMAIN.md`
|
|
119
|
-
- Do not import across bounded context boundaries directly — use domain events or ACL adapters
|
|
120
|
-
- If implementation reveals a missing domain term, stop and update DOMAIN.md before continuing
|
|
121
|
-
|
|
122
95
|
## Workflow
|
|
123
|
-
This is one step in the per-phase cycle.
|
|
96
|
+
This is one step in the per-phase cycle. Start a fresh session when context limits make it useful:
|
|
124
97
|
|
|
125
98
|
```
|
|
126
|
-
/discuss-phase N → /
|
|
99
|
+
/discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N → /discuss-phase N+1 → ...
|
|
127
100
|
```
|
|
128
101
|
|
|
129
|
-
After completing this command,
|
|
102
|
+
After completing this command, identify `/verify-work $1` as the next step; a fresh session is optional.
|
|
130
103
|
Do NOT suggest `/next-milestone` — that is only after ALL phases in the milestone are verified.
|
|
131
104
|
|
|
132
105
|
## Flags
|
package/prompts/commands/fix.md
CHANGED
|
@@ -4,146 +4,34 @@ description: "Diagnose and fix a bug with a 4-phase systematic debugging protoco
|
|
|
4
4
|
|
|
5
5
|
# /fix
|
|
6
6
|
|
|
7
|
-
Diagnose and fix a bug using the **four-phase systematic debugging protocol**: root cause investigation → pattern analysis → ranked hypotheses & testing → implementation with a reproducing test.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
```
|
|
11
|
-
/fix [description of what's broken]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
7
|
Issue: $ARGUMENTS
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> **NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**
|
|
19
|
-
|
|
20
|
-
Symptom fixes are failure. If you find yourself proposing a "quick fix for now, investigate later", STOP and return to Phase 1.
|
|
21
|
-
|
|
22
|
-
## The Report Is a Symptom, Not a Diagnosis
|
|
23
|
-
|
|
24
|
-
**Procedure:** Restate the failure as observable behavior — "X happens when Y; expected Z" — before touching anything. If the user names a cause ("the cache is stale"), treat it as Hypothesis #0: it enters the Phase 3 ranking like any other hypothesis and does not skip Phase 1.
|
|
25
|
-
|
|
26
|
-
**Example:** "fix the stale cache bug" — Phase 1 traces the data flow and finds the cache is fine; the query behind it silently drops a filter. The fix lands in the query.
|
|
27
|
-
|
|
28
|
-
**Prevents:** shipping a correct fix to the wrong component.
|
|
29
|
-
|
|
30
|
-
Not every why is a bug: if the user is asking why the code is *shaped* the way it is — intent, history, design rationale — and nothing is misbehaving, route to `/why` instead. `/fix` answers defects; `/why` answers intent. When Phase 1 needs design intent (is this behaviour a decision or an accident?), consult `/why` and feed its Preserve/Avoid constraints into the hypothesis ranking. A `/triage` verdict ending in `[triage:bug]` or `[triage:performance]` is a ready entry here: take the linked tracker issue as the report and treat triage's cause-trace findings as ranked-hypothesis material — labeled hypotheses, not a diagnosis.
|
|
31
|
-
|
|
32
|
-
## Red Flags — STOP
|
|
33
|
-
|
|
34
|
-
Stop immediately if you catch yourself:
|
|
35
|
-
- Proposing "quick fixes for now, investigate later"
|
|
36
|
-
- Attempting multiple changes simultaneously
|
|
37
|
-
- Skipping a reproducing test before fixing
|
|
38
|
-
- Proposing solutions before understanding data flow
|
|
39
|
-
- Reading code to build a causal theory before a red-capable reproduction command exists
|
|
40
|
-
- Making "one more fix attempt" after already trying 2+
|
|
41
|
-
- Watching each fix reveal new problems elsewhere
|
|
42
|
-
|
|
43
|
-
After **3 failed fix attempts**, STOP. This is a **hard cap**, not advice — an architectural problem, not a hypothesis problem. Report back to the user — do not try a 4th fix. Before reporting, append one dated line to `.planning/STATE.md` under `## Lessons`: what was tried and why it failed, so the next session doesn't repeat the same three attempts.
|
|
44
|
-
|
|
45
|
-
## Atomic Reasoning
|
|
9
|
+
Investigate and repair the reported defect within the requested scope. Historical design questions belong in `/why`; a triage trace supplies hypotheses, not an already-confirmed diagnosis.
|
|
46
10
|
|
|
47
|
-
|
|
11
|
+
## Investigation
|
|
48
12
|
|
|
49
|
-
|
|
13
|
+
Read the relevant source, errors, configuration, and history. Restate observed versus expected behavior and identify a command that can expose the symptom. Code inspection and hypotheses may precede reproduction; distinguish a candidate cause from a demonstrated one.
|
|
50
14
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Use the `subagent` tool in **single mode** with the `debugger` agent. Prompt:
|
|
15
|
+
Use the `debugger` agent when a separate investigation is useful. Pass the issue, relevant code/context, and this scope:
|
|
54
16
|
|
|
55
17
|
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Walk through these steps and report on each:
|
|
61
|
-
1. Read the error message / stack trace carefully — exact line numbers, exact file paths.
|
|
62
|
-
2. Build a reproduction loop — ONE command that goes red on this bug. This step is the heart of the diagnosis; spend disproportionate effort here. Work down the ladder and take the first rung that reaches the bug:
|
|
63
|
-
- failing test at whatever seam reaches the bug (unit, integration, e2e)
|
|
64
|
-
- HTTP request script against a running dev server
|
|
65
|
-
- CLI invocation on a fixture input, output diffed against a known-good snapshot
|
|
66
|
-
- headless browser script asserting on DOM / console / network
|
|
67
|
-
- replay of a captured payload, trace, or event log through the code path in isolation
|
|
68
|
-
- throwaway harness: a minimal subset of the system (mocked deps) exercising the bug path in one call
|
|
69
|
-
- property/fuzz loop: hundreds of random inputs when the output is only sometimes wrong
|
|
70
|
-
- bisection harness: automate "checkout state X, run the check" so `git bisect run` can drive it
|
|
71
|
-
- differential loop: the same input through old vs new version (or two configs), outputs diffed
|
|
72
|
-
- last resort, human-in-the-loop: exact numbered steps for the user to run by hand, output pasted back
|
|
73
|
-
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.
|
|
74
|
-
Exit checklist — all four must hold before you continue: (a) ONE named command (a test invocation, a script path, a curl); (b) you have ALREADY RUN it at least once; (c) your report shows the invocation AND its output (secrets redacted); (d) it asserts the user's EXACT symptom — able to go red on this bug and green once fixed, not merely "runs without erroring".
|
|
75
|
-
Self-interrupt: if you catch yourself reading code to build a causal theory before this command exists, STOP — anchoring on the first plausible idea is the exact failure this protocol prevents. No red-capable command, no steps 4-6.
|
|
76
|
-
If you genuinely cannot build a loop: list what you tried, name what you need (environment access, a captured artifact such as a log dump or recording, or permission to add temporary instrumentation), and end with STATUS: NEEDS_CONTEXT rather than guessing.
|
|
77
|
-
3. Check recent changes — `git log --oneline -20` and `git diff HEAD~5` against affected files.
|
|
78
|
-
4. Trace data flow upward until you find the source. Fix at source, not at symptom.
|
|
79
|
-
5. State the root cause as one sentence: "X happens because Y at <file:line>."
|
|
80
|
-
6. Label every statement in your report: observed (you ran it and saw it), derived (follows necessarily from evidence), or assumed (unchecked — say what would check it). A root cause resting on an assumption is a hypothesis, not a diagnosis.
|
|
81
|
-
|
|
82
|
-
End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
|
|
83
|
-
Do NOT run draht, draht-tools, or pi commands.
|
|
18
|
+
Diagnose this issue; do not apply a production fix. Read the affected path and build a reproduction when feasible. Report the supported cause or labeled hypotheses, relevant files, reproduction command/output, and any missing evidence. Respect any read-only restriction, including on test or instrumentation edits.
|
|
19
|
+
Do not run interactive draht or pi sessions.
|
|
20
|
+
End with exactly one: STATUS: DONE, STATUS: DONE_WITH_CONCERNS, STATUS: NEEDS_CONTEXT, or STATUS: BLOCKED.
|
|
84
21
|
```
|
|
85
22
|
|
|
86
|
-
If `
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
1. Find working examples in the codebase that do the same kind of thing correctly
|
|
91
|
-
2. Read those references completely — not skimmed
|
|
92
|
-
3. List every difference between the working code and the broken code
|
|
93
|
-
4. Note dependencies the working version assumes
|
|
94
|
-
|
|
95
|
-
If Phase 2 reveals a different root cause, go back to Phase 1.
|
|
96
|
-
|
|
97
|
-
### Phase 3 — Ranked Hypotheses
|
|
98
|
-
|
|
99
|
-
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.
|
|
100
|
-
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.
|
|
101
|
-
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.
|
|
102
|
-
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.
|
|
103
|
-
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 — and re-run the Phase 1 reproduction command to read the verdict.
|
|
104
|
-
- **Prediction confirmed** → proceed to Phase 4 with this cause.
|
|
105
|
-
- **Falsified** → revert the probe, record which prediction failed, move to the next hypothesis. Do not pile changes on top.
|
|
106
|
-
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".
|
|
107
|
-
7. If after 3 falsified hypotheses you are still failing, STOP. Question the architecture, not the ranking. Report to the user.
|
|
108
|
-
|
|
109
|
-
### Phase 4 — Implementation
|
|
110
|
-
|
|
111
|
-
Comment discipline: the fix ships no narration — comments exist ONLY for constraints the code cannot express: a protocol quirk, a deliberate deviation, a non-obvious invariant. If code needs comments to be understood, rewrite the code until it doesn't. Never narrate steps, restate the diff, or leave "removed X" / "this handles Y" breadcrumbs. Comment density above the surrounding file's norm is a defect — fix it before committing. A heavily-commented solution signals the design is wrong: redesign, don't annotate.
|
|
112
|
-
|
|
113
|
-
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.
|
|
114
|
-
- Commit: `git add <test-files> && git commit -m "red: reproduce <bug>"`
|
|
115
|
-
|
|
116
|
-
2. **Apply the single fix** from Phase 3. No other changes.
|
|
117
|
-
- Failing test now PASSES.
|
|
118
|
-
- Full test suite — no regressions.
|
|
119
|
-
- Commit: `git add <files> && git commit -m "green: fix <bug>"`
|
|
120
|
-
|
|
121
|
-
3. **Refactor (optional)** — only if clear improvement, no behaviour change. Tests stay green.
|
|
122
|
-
- Commit: `git add <files> && git commit -m "refactor: <description>"`
|
|
23
|
+
- If `NEEDS_CONTEXT`, provide available missing information and retry within the budget.
|
|
24
|
+
- If `BLOCKED`, report the blocker and evidence; do not keep retrying.
|
|
25
|
+
- At most 3 re-dispatches or failed repair attempts; stop with a concise record when that bound is reached. It does not establish that the architecture is wrong.
|
|
123
26
|
|
|
124
|
-
|
|
27
|
+
Test plausible causes with discriminating observations or small experiments. Use the number of hypotheses the evidence warrants. Remove unsuccessful probes rather than layering speculative changes. When reproduction is unavailable, continue useful read-only investigation and identify what prevents confirmation.
|
|
125
28
|
|
|
126
|
-
|
|
29
|
+
## Repair
|
|
127
30
|
|
|
128
|
-
|
|
31
|
+
Apply a focused fix once the evidence supports it. Preserve a regression check: observe it fail for the intended reason before the repair, then pass afterward where a test seam exists. Explain any inability to establish that evidence. Run the original reproduction when available, relevant regression checks, and project-required validation; do not automatically run every available command.
|
|
129
32
|
|
|
130
|
-
|
|
33
|
+
Remove temporary instrumentation and avoid unrelated cleanup. Delegate the implementation to `implementer` only when useful, with the issue, scope, evidence, checks, and the same STATUS contract.
|
|
131
34
|
|
|
132
|
-
|
|
133
|
-
|--------|---------|
|
|
134
|
-
| "Simple bug, skip the process" | Simple bugs have root causes too. The process is fast. |
|
|
135
|
-
| "It's an emergency, no time" | Systematic debugging is *faster* than thrashing. |
|
|
136
|
-
| "I'll write the test after I confirm the fix" | Untested fixes don't stick. |
|
|
137
|
-
| "I'll just try things and see what works" | Can't isolate what worked. Creates new bugs. |
|
|
138
|
-
| "I already manually tested it" | A reproducing test is the only durable proof. |
|
|
139
|
-
| "The user already told me the cause" | The reporter saw the symptom. Their diagnosis is Hypothesis #0, not a finding. |
|
|
140
|
-
| "The fix passed, so my diagnosis was right" | Fixes can mask. Verify the causal chain, not just the symptom's absence. |
|
|
141
|
-
| "I can't reproduce it, but the cause is obvious from the code" | Reading code yields theories, not verdicts. No red-capable command, no diagnosis — report NEEDS_CONTEXT and name what's missing. |
|
|
35
|
+
Commit only when authorized. For recorded TDD phases use plain Git with explicit paths and `red:`, `green:`, `refactor:` subjects; never route source commits through docs-only tooling. Update GSD state only for an active GSD task.
|
|
142
36
|
|
|
143
|
-
|
|
144
|
-
- Always reproduce before fixing
|
|
145
|
-
- One bug, one fix, one commit series
|
|
146
|
-
- Fix at source, not symptom
|
|
147
|
-
- 3 failed attempts ⇒ architecture problem, stop and discuss
|
|
148
|
-
- If the root cause spans multiple files, explain the chain in the commit message
|
|
149
|
-
- Final report order: verdict first (fixed / not fixed, root cause in one sentence), then evidence (reproducing test red→green, suite results), then risk (what the fix could regress, what stays assumed)
|
|
37
|
+
Report the verdict and supported cause first, decisive commands/results next, then residual risk and missing evidence. A completion claim requires checks that cover the current state; reuse recorded results only when their inputs and environment remain unchanged.
|