@draht/coding-agent 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.
- package/CHANGELOG.md +241 -0
- package/README.md +47 -2
- package/agents/debugger.md +12 -1
- package/agents/git-committer.md +1 -0
- package/agents/implementer.md +20 -0
- package/agents/investigator.md +75 -0
- package/agents/reviewer.md +7 -0
- package/agents/spec-reviewer.md +66 -0
- package/agents/verifier.md +4 -3
- package/bin/draht-tools.cjs +472 -41
- package/dist/agents/debugger.md +12 -1
- package/dist/agents/git-committer.md +1 -0
- package/dist/agents/implementer.md +20 -0
- package/dist/agents/investigator.md +75 -0
- package/dist/agents/reviewer.md +7 -0
- package/dist/agents/spec-reviewer.md +66 -0
- package/dist/agents/verifier.md +4 -3
- package/dist/bun/cli.js +2 -0
- package/dist/bun/cli.js.map +1 -1
- package/dist/cli/args.d.ts +10 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +80 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/attach-mode.d.ts +61 -0
- package/dist/cli/attach-mode.d.ts.map +1 -1
- package/dist/cli/attach-mode.js +243 -5
- package/dist/cli/attach-mode.js.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +23 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +117 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/cli/list-models.d.ts +2 -2
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/startup-ui.js +1 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +31 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +17 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +90 -30
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +4 -7
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +24 -9
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +87 -27
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +337 -154
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +20 -104
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +104 -260
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/builtins/checkpoints.d.ts +20 -0
- package/dist/core/builtins/checkpoints.d.ts.map +1 -0
- package/dist/core/builtins/checkpoints.js +161 -0
- package/dist/core/builtins/checkpoints.js.map +1 -0
- package/dist/core/builtins/duet.d.ts +26 -0
- package/dist/core/builtins/duet.d.ts.map +1 -0
- package/dist/core/builtins/duet.js +660 -0
- package/dist/core/builtins/duet.js.map +1 -0
- package/dist/core/builtins/index.d.ts.map +1 -1
- package/dist/core/builtins/index.js +7 -1
- package/dist/core/builtins/index.js.map +1 -1
- package/dist/core/builtins/subagent.d.ts +24 -4
- package/dist/core/builtins/subagent.d.ts.map +1 -1
- package/dist/core/builtins/subagent.js +278 -35
- package/dist/core/builtins/subagent.js.map +1 -1
- package/dist/core/cache-stats.d.ts +2 -2
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js +1 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/checkpoints/checkpoint-cli.d.ts +17 -0
- package/dist/core/checkpoints/checkpoint-cli.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-cli.js +78 -0
- package/dist/core/checkpoints/checkpoint-cli.js.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts +294 -0
- package/dist/core/checkpoints/checkpoint-manager.d.ts.map +1 -0
- package/dist/core/checkpoints/checkpoint-manager.js +865 -0
- package/dist/core/checkpoints/checkpoint-manager.js.map +1 -0
- package/dist/core/checkpoints/rewind.d.ts +141 -0
- package/dist/core/checkpoints/rewind.d.ts.map +1 -0
- package/dist/core/checkpoints/rewind.js +246 -0
- package/dist/core/checkpoints/rewind.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +9 -3
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +16 -14
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +24 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +96 -30
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +6 -17
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/context-windows.d.ts +7 -0
- package/dist/core/context-windows.d.ts.map +1 -0
- package/dist/core/context-windows.js +35 -0
- package/dist/core/context-windows.js.map +1 -0
- 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 +101 -23
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +19 -3
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +117 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +236 -9
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +22 -3
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +10 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +7 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +18 -3
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +12 -3
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +542 -0
- package/dist/core/model-config.d.ts.map +1 -0
- package/dist/core/model-config.js +247 -0
- package/dist/core/model-config.js.map +1 -0
- package/dist/core/model-registry.d.ts +19 -124
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +56 -727
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +7 -6
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +74 -27
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +89 -0
- package/dist/core/model-runtime.d.ts.map +1 -0
- package/dist/core/model-runtime.js +451 -0
- package/dist/core/model-runtime.js.map +1 -0
- package/dist/core/models-store.d.ts +17 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +46 -0
- package/dist/core/models-store.js.map +1 -0
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +4 -3
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/multi-agent/worktree.d.ts +2 -0
- package/dist/core/multi-agent/worktree.d.ts.map +1 -1
- package/dist/core/multi-agent/worktree.js +2 -2
- package/dist/core/multi-agent/worktree.js.map +1 -1
- package/dist/core/package-manager.d.ts +7 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +41 -45
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/permission-relay/index.d.ts +19 -0
- package/dist/core/permission-relay/index.d.ts.map +1 -0
- package/dist/core/permission-relay/index.js +49 -0
- package/dist/core/permission-relay/index.js.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts +39 -0
- package/dist/core/permission-relay/relay-ui-context.d.ts.map +1 -0
- package/dist/core/permission-relay/relay-ui-context.js +788 -0
- package/dist/core/permission-relay/relay-ui-context.js.map +1 -0
- package/dist/core/permission-relay/types.d.ts +222 -0
- package/dist/core/permission-relay/types.d.ts.map +1 -0
- package/dist/core/permission-relay/types.js +15 -0
- package/dist/core/permission-relay/types.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +14 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +35 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +4 -4
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-composer.d.ts +55 -0
- package/dist/core/provider-composer.d.ts.map +1 -0
- package/dist/core/provider-composer.js +375 -0
- package/dist/core/provider-composer.js.map +1 -0
- package/dist/core/radius.d.ts +2 -0
- package/dist/core/radius.d.ts.map +1 -0
- package/dist/core/radius.js +2 -0
- package/dist/core/radius.js.map +1 -0
- package/dist/core/remote-catalog-provider.d.ts +5 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -0
- package/dist/core/remote-catalog-provider.js +115 -0
- package/dist/core/remote-catalog-provider.js.map +1 -0
- package/dist/core/resource-loader.d.ts +36 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +159 -27
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +15 -0
- package/dist/core/runtime-credentials.d.ts.map +1 -0
- package/dist/core/runtime-credentials.js +35 -0
- package/dist/core/runtime-credentials.js.map +1 -0
- package/dist/core/sandbox/bash-operations.d.ts +149 -0
- package/dist/core/sandbox/bash-operations.d.ts.map +1 -0
- package/dist/core/sandbox/bash-operations.js +163 -0
- package/dist/core/sandbox/bash-operations.js.map +1 -0
- package/dist/core/sandbox/env.d.ts +83 -0
- package/dist/core/sandbox/env.d.ts.map +1 -0
- package/dist/core/sandbox/env.js +123 -0
- package/dist/core/sandbox/env.js.map +1 -0
- package/dist/core/sandbox/executor.d.ts +104 -0
- package/dist/core/sandbox/executor.d.ts.map +1 -0
- package/dist/core/sandbox/executor.js +92 -0
- package/dist/core/sandbox/executor.js.map +1 -0
- package/dist/core/sandbox/index.d.ts +36 -0
- package/dist/core/sandbox/index.d.ts.map +1 -0
- package/dist/core/sandbox/index.js +36 -0
- package/dist/core/sandbox/index.js.map +1 -0
- package/dist/core/sandbox/linux.d.ts +121 -0
- package/dist/core/sandbox/linux.d.ts.map +1 -0
- package/dist/core/sandbox/linux.js +260 -0
- package/dist/core/sandbox/linux.js.map +1 -0
- package/dist/core/sandbox/policy.d.ts +142 -0
- package/dist/core/sandbox/policy.d.ts.map +1 -0
- package/dist/core/sandbox/policy.js +297 -0
- package/dist/core/sandbox/policy.js.map +1 -0
- package/dist/core/sandbox/real-path.d.ts +112 -0
- package/dist/core/sandbox/real-path.d.ts.map +1 -0
- package/dist/core/sandbox/real-path.js +158 -0
- package/dist/core/sandbox/real-path.js.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts +95 -0
- package/dist/core/sandbox/seatbelt-profile.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt-profile.js +239 -0
- package/dist/core/sandbox/seatbelt-profile.js.map +1 -0
- package/dist/core/sandbox/seatbelt.d.ts +95 -0
- package/dist/core/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/core/sandbox/seatbelt.js +154 -0
- package/dist/core/sandbox/seatbelt.js.map +1 -0
- package/dist/core/sandbox/self-test.d.ts +109 -0
- package/dist/core/sandbox/self-test.d.ts.map +1 -0
- package/dist/core/sandbox/self-test.js +369 -0
- package/dist/core/sandbox/self-test.js.map +1 -0
- package/dist/core/sandbox/spawn.d.ts +33 -0
- package/dist/core/sandbox/spawn.d.ts.map +1 -0
- package/dist/core/sandbox/spawn.js +87 -0
- package/dist/core/sandbox/spawn.js.map +1 -0
- package/dist/core/sdk.d.ts +3 -6
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +25 -22
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +74 -7
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +169 -34
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +22 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +36 -16
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +3 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +19 -6
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/soak/soak-log.d.ts +298 -0
- package/dist/core/soak/soak-log.d.ts.map +1 -0
- package/dist/core/soak/soak-log.js +660 -0
- package/dist/core/soak/soak-log.js.map +1 -0
- package/dist/core/soak/soak-reader.d.ts +60 -0
- package/dist/core/soak/soak-reader.d.ts.map +1 -0
- package/dist/core/soak/soak-reader.js +106 -0
- package/dist/core/soak/soak-reader.js.map +1 -0
- package/dist/core/socket-server/discovery.d.ts +78 -1
- package/dist/core/socket-server/discovery.d.ts.map +1 -1
- package/dist/core/socket-server/discovery.js +356 -37
- package/dist/core/socket-server/discovery.js.map +1 -1
- package/dist/core/socket-server/index.d.ts +10 -4
- package/dist/core/socket-server/index.d.ts.map +1 -1
- package/dist/core/socket-server/index.js +6 -3
- package/dist/core/socket-server/index.js.map +1 -1
- package/dist/core/socket-server/permission-delivery.d.ts +125 -0
- package/dist/core/socket-server/permission-delivery.d.ts.map +1 -0
- package/dist/core/socket-server/permission-delivery.js +152 -0
- package/dist/core/socket-server/permission-delivery.js.map +1 -0
- package/dist/core/socket-server/permission-registry.d.ts +301 -0
- package/dist/core/socket-server/permission-registry.d.ts.map +1 -0
- package/dist/core/socket-server/permission-registry.js +410 -0
- package/dist/core/socket-server/permission-registry.js.map +1 -0
- package/dist/core/socket-server/permission-relay.d.ts +81 -0
- package/dist/core/socket-server/permission-relay.d.ts.map +1 -0
- package/dist/core/socket-server/permission-relay.js +528 -0
- package/dist/core/socket-server/permission-relay.js.map +1 -0
- package/dist/core/socket-server/safe-text.d.ts +83 -0
- package/dist/core/socket-server/safe-text.d.ts.map +1 -0
- package/dist/core/socket-server/safe-text.js +277 -0
- package/dist/core/socket-server/safe-text.js.map +1 -0
- package/dist/core/socket-server/session-integration.d.ts +65 -2
- package/dist/core/socket-server/session-integration.d.ts.map +1 -1
- package/dist/core/socket-server/session-integration.js +434 -32
- package/dist/core/socket-server/session-integration.js.map +1 -1
- package/dist/core/socket-server/socket-client.d.ts +21 -2
- package/dist/core/socket-server/socket-client.d.ts.map +1 -1
- package/dist/core/socket-server/socket-client.js +52 -1
- package/dist/core/socket-server/socket-client.js.map +1 -1
- package/dist/core/socket-server/socket-server.d.ts +152 -1
- package/dist/core/socket-server/socket-server.d.ts.map +1 -1
- package/dist/core/socket-server/socket-server.js +775 -26
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts +106 -2
- package/dist/core/socket-server/types.d.ts.map +1 -1
- package/dist/core/socket-server/types.js +13 -1
- package/dist/core/socket-server/types.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +10 -21
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +3 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +39 -7
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +17 -2
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +3 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +11 -18
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/trust-manager.d.ts +6 -4
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +55 -21
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts +19 -0
- package/dist/core/usage-totals.d.ts.map +1 -0
- package/dist/core/usage-totals.js +52 -0
- package/dist/core/usage-totals.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +7 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/llama/client.d.ts +61 -0
- package/dist/extensions/llama/client.d.ts.map +1 -0
- package/dist/extensions/llama/client.js +300 -0
- package/dist/extensions/llama/client.js.map +1 -0
- package/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/llama/huggingface.d.ts.map +1 -0
- package/dist/extensions/llama/huggingface.js +139 -0
- package/dist/extensions/llama/huggingface.js.map +1 -0
- package/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/llama/index.d.ts.map +1 -0
- package/dist/extensions/llama/index.js +208 -0
- package/dist/extensions/llama/index.js.map +1 -0
- package/dist/extensions/llama/provider.d.ts +10 -0
- package/dist/extensions/llama/provider.d.ts.map +1 -0
- package/dist/extensions/llama/provider.js +111 -0
- package/dist/extensions/llama/provider.js.map +1 -0
- package/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/llama/ui.d.ts.map +1 -0
- package/dist/extensions/llama/ui.js +400 -0
- package/dist/extensions/llama/ui.js.map +1 -0
- package/dist/extensions/stub-provider/index.d.ts +9 -0
- package/dist/extensions/stub-provider/index.d.ts.map +1 -0
- package/dist/extensions/stub-provider/index.js +13 -0
- package/dist/extensions/stub-provider/index.js.map +1 -0
- package/dist/extensions/stub-provider/provider.d.ts +77 -0
- package/dist/extensions/stub-provider/provider.d.ts.map +1 -0
- package/dist/extensions/stub-provider/provider.js +193 -0
- package/dist/extensions/stub-provider/provider.js.map +1 -0
- package/dist/hooks/gsd/draht-quality-gate.js +3 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +305 -61
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +22 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +3 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +3 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +9 -2
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -2
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +16 -46
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +49 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +202 -5
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +24 -23
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -5
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +17 -8
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +11 -4
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +74 -41
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +4 -4
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +14 -25
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +22 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +10 -2
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +10 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +25 -2
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +68 -17
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +12 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -0
- package/dist/modes/interactive/external-editor.js +37 -0
- package/dist/modes/interactive/external-editor.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +107 -10
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +763 -285
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +4 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +185 -9
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +79 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +67 -5
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/prompts/commands/atomic-commit.md +1 -12
- package/dist/prompts/commands/brainstorm.md +12 -15
- package/dist/prompts/commands/create-verification-skill.md +108 -0
- package/dist/prompts/commands/discuss-phase.md +3 -14
- package/dist/prompts/commands/execute-phase.md +3 -11
- package/dist/prompts/commands/fix.md +41 -18
- package/dist/prompts/commands/grill.md +66 -0
- package/dist/prompts/commands/init-project.md +5 -15
- package/dist/prompts/commands/map-codebase.md +1 -13
- package/dist/prompts/commands/new-project.md +5 -15
- package/dist/prompts/commands/next-milestone.md +1 -13
- package/dist/prompts/commands/orchestrate.md +1 -1
- package/dist/prompts/commands/pause-work.md +1 -13
- package/dist/prompts/commands/plan-phase.md +2 -11
- package/dist/prompts/commands/progress.md +0 -13
- package/dist/prompts/commands/quick.md +3 -11
- package/dist/prompts/commands/resolve-conflicts.md +71 -0
- package/dist/prompts/commands/resume-work.md +0 -13
- package/dist/prompts/commands/review.md +4 -13
- package/dist/prompts/commands/triage.md +159 -0
- package/dist/prompts/commands/verify-work.md +4 -14
- package/dist/prompts/commands/why.md +135 -0
- package/dist/skills/atomic-reasoning/SKILL.md +115 -0
- package/dist/skills/blast-radius/SKILL.md +55 -0
- package/dist/skills/epistemics/SKILL.md +99 -0
- package/dist/skills/hexagon-animation/SKILL.md +49 -0
- package/dist/skills/hexagon-animation/generate.mjs +81 -0
- package/dist/skills/hexagon-animation/template.html +361 -0
- package/dist/skills/typescript-discipline/SKILL.md +50 -0
- package/dist/skills/typescript-discipline/references/patterns.md +294 -0
- package/dist/skills/unslop/SKILL.md +101 -0
- package/dist/utils/canonical-path.d.ts +28 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +90 -0
- package/dist/utils/canonical-path.js.map +1 -0
- package/dist/utils/child-process.d.ts +12 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +25 -8
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +1 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +53 -9
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +2 -3
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -7
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +13 -15
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +6 -4
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +3 -5
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +3 -1
- package/dist/utils/version-check.js.map +1 -1
- package/docs/attachable-sessions.md +79 -0
- package/docs/compaction.md +29 -24
- package/docs/containerization.md +23 -23
- package/docs/custom-provider.md +66 -32
- package/docs/development.md +9 -9
- package/docs/docs.json +6 -2
- package/docs/duet.md +42 -0
- package/docs/environment-variables.md +88 -0
- package/docs/extensions.md +278 -65
- package/docs/index.md +12 -10
- package/docs/json.md +12 -8
- package/docs/keybindings.md +8 -5
- package/docs/llama-cpp.md +99 -0
- package/docs/models.md +19 -8
- package/docs/packages.md +43 -42
- package/docs/prompt-templates.md +5 -4
- package/docs/providers.md +45 -11
- package/docs/quickstart.md +33 -33
- package/docs/rpc.md +190 -19
- package/docs/sdk.md +18 -15
- package/docs/security.md +18 -18
- package/docs/session-format.md +53 -15
- package/docs/sessions.md +17 -14
- package/docs/settings.md +26 -19
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +12 -11
- package/docs/terminal-setup.md +12 -12
- package/docs/termux.md +6 -6
- package/docs/themes.md +11 -11
- package/docs/tmux.md +4 -4
- package/docs/tui.md +46 -31
- package/docs/usage.md +53 -63
- package/docs/windows.md +2 -2
- package/examples/extensions/custom-compaction.ts +4 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +9 -3
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/gondolin/package.json +2 -2
- package/examples/extensions/handoff.ts +9 -1
- package/examples/extensions/kimi-deferred-tools.ts +61 -0
- package/examples/extensions/message-renderer.ts +2 -2
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/summarize.ts +3 -0
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/02-custom-model.ts +5 -8
- package/examples/sdk/09-api-keys-and-oauth.ts +15 -31
- package/examples/sdk/12-full-control.ts +9 -12
- package/hooks/gsd/draht-quality-gate.js +3 -3
- package/package.json +14 -11
- package/prompts/commands/atomic-commit.md +1 -12
- package/prompts/commands/brainstorm.md +12 -15
- package/prompts/commands/create-verification-skill.md +108 -0
- package/prompts/commands/discuss-phase.md +3 -14
- package/prompts/commands/execute-phase.md +3 -11
- package/prompts/commands/fix.md +41 -18
- package/prompts/commands/grill.md +66 -0
- package/prompts/commands/init-project.md +5 -15
- package/prompts/commands/map-codebase.md +1 -13
- package/prompts/commands/new-project.md +5 -15
- package/prompts/commands/next-milestone.md +1 -13
- package/prompts/commands/orchestrate.md +1 -1
- package/prompts/commands/pause-work.md +1 -13
- package/prompts/commands/plan-phase.md +2 -11
- package/prompts/commands/progress.md +0 -13
- package/prompts/commands/quick.md +3 -11
- package/prompts/commands/resolve-conflicts.md +71 -0
- package/prompts/commands/resume-work.md +0 -13
- package/prompts/commands/review.md +4 -13
- package/prompts/commands/triage.md +159 -0
- package/prompts/commands/verify-work.md +4 -14
- package/prompts/commands/why.md +135 -0
- package/skills/atomic-reasoning/SKILL.md +115 -0
- package/skills/blast-radius/SKILL.md +55 -0
- package/skills/epistemics/SKILL.md +99 -0
- package/skills/hexagon-animation/SKILL.md +49 -0
- package/skills/hexagon-animation/generate.mjs +81 -0
- package/skills/hexagon-animation/template.html +361 -0
- package/skills/typescript-discipline/SKILL.md +50 -0
- package/skills/typescript-discipline/references/patterns.md +294 -0
- package/skills/unslop/SKILL.md +101 -0
- package/dist/core/provider-display-names.d.ts +0 -2
- package/dist/core/provider-display-names.d.ts.map +0 -1
- package/dist/core/provider-display-names.js +0 -36
- package/dist/core/provider-display-names.js.map +0 -1
- package/dist/prompts/agents/build.md +0 -86
- package/dist/prompts/agents/plan.md +0 -79
- package/dist/prompts/agents/verify.md +0 -69
- package/prompts/agents/build.md +0 -86
- package/prompts/agents/plan.md +0 -79
- package/prompts/agents/verify.md +0 -69
|
@@ -35,18 +35,9 @@ A plan's YAML frontmatter may declare `rlm: true` (alongside `phase`, `plan`, `d
|
|
|
35
35
|
|
|
36
36
|
## Atomic Reasoning
|
|
37
37
|
|
|
38
|
-
|
|
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
39
|
|
|
40
|
-
|
|
41
|
-
1. **State the logical component** — What is this plan's singular purpose? What observable outcome does it produce?
|
|
42
|
-
2. **Validate independence** — Can this plan execute in parallel with others, or does it depend on their outputs? Which files does it touch?
|
|
43
|
-
3. **Verify correctness** — What tests will prove this plan works? What failure modes exist?
|
|
44
|
-
|
|
45
|
-
**Synthesize execution strategy:**
|
|
46
|
-
- Identify parallel execution groups (plans with no shared files/dependencies)
|
|
47
|
-
- Order dependent plans (plan B depends on plan A's outputs)
|
|
48
|
-
- Within each group, 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
|
|
49
|
-
- Map each plan to a subagent task with clear success criteria
|
|
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.
|
|
50
41
|
|
|
51
42
|
## Steps
|
|
52
43
|
1. Run `draht-tools discover-plans $1` to find and order plans
|
|
@@ -94,6 +85,7 @@ For each <task> in the plan, follow this TDD cycle:
|
|
|
94
85
|
4. VERIFY — Run the <verify> step, confirm <done> criteria are met.
|
|
95
86
|
|
|
96
87
|
Domain rules: Use ubiquitous language from .planning/DOMAIN.md (read it). Do not import across bounded context boundaries.
|
|
88
|
+
Comment discipline: 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.
|
|
97
89
|
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.
|
|
98
90
|
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).
|
|
99
91
|
|
package/prompts/commands/fix.md
CHANGED
|
@@ -4,7 +4,7 @@ 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 →
|
|
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
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
```
|
|
@@ -21,12 +21,14 @@ Symptom fixes are failure. If you find yourself proposing a "quick fix for now,
|
|
|
21
21
|
|
|
22
22
|
## The Report Is a Symptom, Not a Diagnosis
|
|
23
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 Phase 3 like any other hypothesis and does not skip Phase 1.
|
|
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
25
|
|
|
26
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
27
|
|
|
28
28
|
**Prevents:** shipping a correct fix to the wrong component.
|
|
29
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
|
+
|
|
30
32
|
## Red Flags — STOP
|
|
31
33
|
|
|
32
34
|
Stop immediately if you catch yourself:
|
|
@@ -34,6 +36,7 @@ Stop immediately if you catch yourself:
|
|
|
34
36
|
- Attempting multiple changes simultaneously
|
|
35
37
|
- Skipping a reproducing test before fixing
|
|
36
38
|
- Proposing solutions before understanding data flow
|
|
39
|
+
- Reading code to build a causal theory before a red-capable reproduction command exists
|
|
37
40
|
- Making "one more fix attempt" after already trying 2+
|
|
38
41
|
- Watching each fix reveal new problems elsewhere
|
|
39
42
|
|
|
@@ -41,9 +44,7 @@ After **3 failed fix attempts**, STOP. This is a **hard cap**, not advice — an
|
|
|
41
44
|
|
|
42
45
|
## Atomic Reasoning
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
2. **Validate independence** — Which components/files are involved? Can we isolate the failure? Are there related bugs that should be fixed separately?
|
|
46
|
-
3. **Verify correctness** — What test will reproduce this bug reliably? What would prove it's fixed? What regressions could the fix introduce?
|
|
47
|
+
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.
|
|
47
48
|
|
|
48
49
|
## The Four Phases
|
|
49
50
|
|
|
@@ -58,7 +59,21 @@ Issue: $ARGUMENTS
|
|
|
58
59
|
|
|
59
60
|
Walk through these steps and report on each:
|
|
60
61
|
1. Read the error message / stack trace carefully — exact line numbers, exact file paths.
|
|
61
|
-
2.
|
|
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.
|
|
62
77
|
3. Check recent changes — `git log --oneline -20` and `git diff HEAD~5` against affected files.
|
|
63
78
|
4. Trace data flow upward until you find the source. Fix at source, not at symptom.
|
|
64
79
|
5. State the root cause as one sentence: "X happens because Y at <file:line>."
|
|
@@ -79,31 +94,38 @@ If `BLOCKED` or `NEEDS_CONTEXT`: provide the missing info and re-dispatch.
|
|
|
79
94
|
|
|
80
95
|
If Phase 2 reveals a different root cause, go back to Phase 1.
|
|
81
96
|
|
|
82
|
-
### Phase 3 —
|
|
97
|
+
### Phase 3 — Ranked Hypotheses
|
|
83
98
|
|
|
84
|
-
1.
|
|
85
|
-
2.
|
|
86
|
-
3.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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.
|
|
90
108
|
|
|
91
109
|
### Phase 4 — Implementation
|
|
92
110
|
|
|
93
|
-
|
|
94
|
-
|
|
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>"`
|
|
95
115
|
|
|
96
116
|
2. **Apply the single fix** from Phase 3. No other changes.
|
|
97
117
|
- Failing test now PASSES.
|
|
98
118
|
- Full test suite — no regressions.
|
|
99
|
-
- Commit: `
|
|
119
|
+
- Commit: `git add <files> && git commit -m "green: fix <bug>"`
|
|
100
120
|
|
|
101
121
|
3. **Refactor (optional)** — only if clear improvement, no behaviour change. Tests stay green.
|
|
102
|
-
- Commit: `
|
|
122
|
+
- Commit: `git add <files> && git commit -m "refactor: <description>"`
|
|
103
123
|
|
|
104
124
|
4. **Verify the original symptom is gone** — run the user-level reproduction.
|
|
105
125
|
|
|
106
|
-
5. **
|
|
126
|
+
5. **Sweep instrumentation** — grep your `[DEBUG-` prefix across the tree; the fix is not done until the grep returns nothing. Tagged probes die here; untagged probes survive to pollute production.
|
|
127
|
+
|
|
128
|
+
6. **Update state**: `draht-tools update-state`
|
|
107
129
|
|
|
108
130
|
## Rationalization Table
|
|
109
131
|
|
|
@@ -116,6 +138,7 @@ If Phase 2 reveals a different root cause, go back to Phase 1.
|
|
|
116
138
|
| "I already manually tested it" | A reproducing test is the only durable proof. |
|
|
117
139
|
| "The user already told me the cause" | The reporter saw the symptom. Their diagnosis is Hypothesis #0, not a finding. |
|
|
118
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. |
|
|
119
142
|
|
|
120
143
|
## Rules
|
|
121
144
|
- Always reproduce before fixing
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Grill any subject in whole-frontier question rounds — output form chosen at the end, not presumed"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /grill
|
|
6
|
+
|
|
7
|
+
Interrogate the subject relentlessly until you reach a shared understanding. A grill has no fixed outcome: it can end in a refined spec, a ticket list, a decision record, plain notes, or nothing but the conversation. The output form is chosen at the end, never presumed at the start.
|
|
8
|
+
|
|
9
|
+
`/brainstorm` remains the project-creation entry (hard gate → spec → `/new-project` or `/init-project`); `/grill` presumes nothing about where the conversation lands.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
```
|
|
13
|
+
/grill [subject]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Subject: $ARGUMENTS
|
|
17
|
+
|
|
18
|
+
> **Tool note**: For environment facts, use the `subagent` tool with the `architect` agent — read-only fact-finding; never block the current round on it.
|
|
19
|
+
|
|
20
|
+
## The Design Tree
|
|
21
|
+
|
|
22
|
+
Map the subject as a **design tree**: every decision branches into the decisions that hang off it. The **frontier** is every decision whose prerequisites are already settled — the questions you can ask now without guessing at answers you haven't heard yet.
|
|
23
|
+
|
|
24
|
+
## Rounds
|
|
25
|
+
|
|
26
|
+
1. **Orient without blocking.** Skim what the subject names before round 1: files mentioned in it, `.planning/` if present, recent git history. Dispatch fact-finders for anything deeper — do not hold the first round for them.
|
|
27
|
+
2. **Ask the WHOLE frontier in one message.** Number every question, foundational → detailed, and give each one a recommended answer:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
**Q1 — <title>**: <body; may offer options>
|
|
31
|
+
*Recommended:* <your recommended answer>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
**Q2 — <title>**: <body>
|
|
36
|
+
*Recommended:* <your recommended answer>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Defer dependent questions.** A question whose answer depends on another question still open this round belongs to a later round — asking it now means guessing at an answer you haven't heard.
|
|
40
|
+
4. **Let the user answer by number.** "1 yes, 2: B, 4 later" is a complete reply. Anything accepted by number or answered explicitly is **decided**. A recommendation acted on without confirmation is **assumed** and stays flagged until the user confirms it.
|
|
41
|
+
5. **Recompute and repeat.** Every answer reshapes the tree: settled decisions push the frontier outward and unblock the questions that hung off them. Recompute the frontier and ask the next round.
|
|
42
|
+
|
|
43
|
+
## Facts Are Your Job
|
|
44
|
+
|
|
45
|
+
Finding facts is your job, never the user's. When a frontier question needs an environment fact — filesystem, git history, code structure, existing docs — dispatch a fact-finder instead of asking. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait; ask the rest of the frontier now. Decisions belong to the user: put each one to them and wait.
|
|
46
|
+
|
|
47
|
+
## Done
|
|
48
|
+
|
|
49
|
+
The grill is done when the frontier is empty: every branch of the tree visited, nothing left silently assumed. Present the decided-vs-assumed summary, then — and only then — ask which artifact to produce:
|
|
50
|
+
|
|
51
|
+
1. **Refined spec** → `.planning/specs/YYYY-MM-DD-<slug>-design.md`. When it describes a project to build, offer to hand off to `/new-project` or `/init-project`.
|
|
52
|
+
2. **Ticket list** → `.planning/tickets/YYYY-MM-DD-<slug>.md`
|
|
53
|
+
3. **Decision record** → `.planning/decisions/YYYY-MM-DD-<slug>.md`
|
|
54
|
+
4. **Plain notes** → a file the user names
|
|
55
|
+
|
|
56
|
+
Whatever form is chosen, write the artifact through the `unslop` skill; the user's own words in quoted decisions stay verbatim.
|
|
57
|
+
|
|
58
|
+
When no `.planning/` directory exists, every mode becomes a standalone file the user names. "No artifact" is a valid answer — sometimes the conversation was the point. Never start implementing or invoke a planning command without the user's explicit go-ahead.
|
|
59
|
+
|
|
60
|
+
## Anti-Patterns — STOP
|
|
61
|
+
|
|
62
|
+
- **Dribbling questions one at a time** — a serial interview hides the decision tree and wastes rounds; ask the whole frontier, numbered, with recommended answers
|
|
63
|
+
- **Asking the user for facts the environment can answer** — filesystem, git history, and code structure are yours to look up
|
|
64
|
+
- **Blocking a whole round on a running fact-finder** — only the questions downstream of it wait; ask the rest now
|
|
65
|
+
- **Presuming the outcome at round 1** — deciding early that this "is" a spec narrows the questioning to spec-shaped answers
|
|
66
|
+
- **Acting on the result before the user confirms shared understanding** — an empty frontier ends the questioning; only the user's confirmation ends the grill
|
|
@@ -18,25 +18,13 @@ For greenfield projects, use `/new-project` instead.
|
|
|
18
18
|
|
|
19
19
|
## Atomic Reasoning
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**For each aspect of the existing project:**
|
|
24
|
-
1. **State the logical component** — What does this project do? Who are the users? What problems does it solve?
|
|
25
|
-
2. **Validate independence** — What bounded contexts exist in the code? What domain concepts are already present? Can they be separated cleanly?
|
|
26
|
-
3. **Verify correctness** — What works well that we must preserve? What pain points exist? What constraints limit changes?
|
|
27
|
-
|
|
28
|
-
**Synthesize initialization strategy:**
|
|
29
|
-
- Map existing architecture and conventions
|
|
30
|
-
- Extract domain model from code (bounded contexts, aggregates, ubiquitous language)
|
|
31
|
-
- Identify test strategy and coverage
|
|
32
|
-
- Define requirements that align with existing structure
|
|
33
|
-
- Create roadmap that respects what already works
|
|
21
|
+
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.
|
|
34
22
|
|
|
35
23
|
## Steps
|
|
36
24
|
1. Run `draht-tools init` to check preconditions (git repo, etc.)
|
|
37
25
|
2. Run `draht-tools map-codebase` to build a structural map of the existing code
|
|
38
26
|
3. Analyze the codebase map to understand architecture, tech stack, and conventions
|
|
39
|
-
4. Deep questioning phase (3-7 rounds
|
|
27
|
+
4. Deep questioning phase (3-7 rounds — each round asks the whole frontier: settled-prerequisite questions only, numbered, each with a recommended answer):
|
|
40
28
|
- What is this project? Who uses it?
|
|
41
29
|
- What are the current pain points or goals?
|
|
42
30
|
- What is MVP vs aspirational scope?
|
|
@@ -74,7 +62,9 @@ After project initialization, phases are executed one at a time in new sessions:
|
|
|
74
62
|
Each step runs in its own session (`/new` between steps). Do NOT suggest `/next-milestone` until every phase in the milestone is verified.
|
|
75
63
|
|
|
76
64
|
## Rules
|
|
77
|
-
- Ask
|
|
65
|
+
- Ask the whole frontier per round — numbered, each with a recommended answer; the user replies by number, and accepted-by-number counts as decided
|
|
66
|
+
- Questions that depend on still-open answers wait for a later round
|
|
67
|
+
- Finding facts is your job, never the user's — dispatch a subagent for anything the environment can answer and keep asking the rest of the frontier while it runs
|
|
78
68
|
- Follow threads based on answers
|
|
79
69
|
- Use examples ("Like Stripe Checkout, or custom?")
|
|
80
70
|
- Confirm, don't assume
|
|
@@ -15,19 +15,7 @@ Directory: $1
|
|
|
15
15
|
|
|
16
16
|
## Atomic Reasoning
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**For each architectural layer:**
|
|
21
|
-
1. **State the logical component** — What is this directory/module's responsibility? What concepts does it encapsulate?
|
|
22
|
-
2. **Validate independence** — Is this a bounded context? What are its dependencies? Does it leak abstractions across boundaries?
|
|
23
|
-
3. **Verify correctness** — What domain terms appear in code? What aggregates exist? What test infrastructure is present?
|
|
24
|
-
|
|
25
|
-
**Synthesize analysis strategy:**
|
|
26
|
-
- Map directory structure to bounded contexts
|
|
27
|
-
- Extract domain language from identifiers (classes, functions, types)
|
|
28
|
-
- Identify context relationships (upstream/downstream, shared kernel)
|
|
29
|
-
- Document test strategy and coverage
|
|
30
|
-
- Note architectural concerns and patterns
|
|
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.
|
|
31
19
|
|
|
32
20
|
## Steps
|
|
33
21
|
1. Run `draht-tools map-codebase $1` (graph artifacts are always whole-repo — see below)
|
|
@@ -15,24 +15,12 @@ Description: $ARGUMENTS
|
|
|
15
15
|
|
|
16
16
|
## Atomic Reasoning
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**For each aspect of the new project:**
|
|
21
|
-
1. **State the logical component** — What problem does this solve? Who are the users? What is core vs peripheral?
|
|
22
|
-
2. **Validate independence** — What bounded contexts will exist? What domain concepts are central? Can features be built independently?
|
|
23
|
-
3. **Verify correctness** — What defines MVP success? What constraints exist (time, tech, team)? What is explicitly out of scope?
|
|
24
|
-
|
|
25
|
-
**Synthesize project strategy:**
|
|
26
|
-
- Define bounded contexts and ubiquitous language upfront
|
|
27
|
-
- Establish test strategy before writing code
|
|
28
|
-
- Create requirements mapped to domain contexts
|
|
29
|
-
- Build roadmap with testable phase goals
|
|
30
|
-
- Ensure each phase delivers verifiable user value
|
|
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.
|
|
31
19
|
|
|
32
20
|
## Steps
|
|
33
21
|
1. Run `draht-tools init` to check preconditions
|
|
34
22
|
2. If existing code detected, run `draht-tools map-codebase` first
|
|
35
|
-
3. Deep questioning phase (3-7 rounds,
|
|
23
|
+
3. Deep questioning phase (3-7 rounds — each round asks the whole frontier: every question whose prerequisites are settled, numbered, each with a recommended answer)
|
|
36
24
|
4. Run `draht-tools create-project` with gathered info
|
|
37
25
|
5. Run `draht-tools create-domain-model` to define bounded contexts, entities, and ubiquitous language
|
|
38
26
|
6. Create `.planning/DOMAIN.md` with:
|
|
@@ -66,7 +54,9 @@ After project initialization, phases are executed one at a time in new sessions:
|
|
|
66
54
|
Each step runs in its own session (`/new` between steps). Do NOT suggest `/next-milestone` until every phase in the milestone is verified.
|
|
67
55
|
|
|
68
56
|
## Rules
|
|
69
|
-
- Ask
|
|
57
|
+
- Ask the whole frontier per round — numbered, each with a recommended answer; the user replies by number, and accepted-by-number counts as decided
|
|
58
|
+
- Questions that depend on still-open answers wait for a later round
|
|
59
|
+
- Finding facts is your job, never the user's — dispatch a subagent for anything the environment can answer and keep asking the rest of the frontier while it runs
|
|
70
60
|
- Follow threads based on answers
|
|
71
61
|
- Use examples ("Like Stripe Checkout, or custom?")
|
|
72
62
|
- Confirm, don't assume
|
|
@@ -13,19 +13,7 @@ Plan the next milestone after ALL phases in the current one are complete.
|
|
|
13
13
|
|
|
14
14
|
## Atomic Reasoning
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
**For each completed phase:**
|
|
19
|
-
1. **State the logical component** — What was built? What user value was delivered? What requirements were satisfied?
|
|
20
|
-
2. **Validate independence** — What worked well? What had issues? What assumptions proved wrong?
|
|
21
|
-
3. **Verify correctness** — What tests passed? What domain model evolved? What new knowledge emerged?
|
|
22
|
-
|
|
23
|
-
**Synthesize next milestone:**
|
|
24
|
-
- Assess which v1 requirements remain vs are complete
|
|
25
|
-
- Identify requirements that should be promoted or descoped based on learning
|
|
26
|
-
- Define 3-5 new phases with clear, testable goals
|
|
27
|
-
- Order phases by dependency and risk
|
|
28
|
-
- Map each phase to specific requirements and domain contexts
|
|
16
|
+
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.
|
|
29
17
|
|
|
30
18
|
## Prerequisites
|
|
31
19
|
- `.planning/ROADMAP.md` must exist
|
|
@@ -13,7 +13,7 @@ Task: $ARGUMENTS
|
|
|
13
13
|
|
|
14
14
|
## Atomic Reasoning
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
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.
|
|
17
17
|
|
|
18
18
|
1. **State the logical components** — What sub-tasks make up this work? Which are independent? A sub-task is well-cut only if its success can be checked without reference to the others.
|
|
19
19
|
2. **Match agents to work** — Which specialist is right for each sub-task?
|
|
@@ -11,20 +11,8 @@ Create a handoff document for session continuity.
|
|
|
11
11
|
/pause-work
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Atomic Reasoning
|
|
15
|
-
|
|
16
|
-
Before pausing, decompose session state into atomic reasoning units:
|
|
17
|
-
|
|
18
|
-
1. **State the logical component** — What was accomplished this session? What is in-progress? What is the current phase/task?
|
|
19
|
-
2. **Validate independence** — Are there uncommitted changes? Are there blockers? What decisions were made?
|
|
20
|
-
3. **Verify correctness** — Is the current state stable? Can work resume cleanly? What context needs to be captured?
|
|
21
|
-
|
|
22
|
-
**Synthesize handoff document:**
|
|
23
|
-
- Capture current phase and status
|
|
24
|
-
- Document decisions and blockers
|
|
25
|
-
- Note next steps for resumption
|
|
26
|
-
|
|
27
14
|
## Steps
|
|
28
15
|
1. Run `draht-tools pause` — creates CONTINUE-HERE.md
|
|
29
16
|
2. **Distill lessons before the context is lost**: for anything this session tried that failed, or an approach that worked against expectations, append one dated bullet to `.planning/STATE.md` under `## Lessons` (create the section before `## Blockers` if missing). Lessons name what to do differently — "runner hits TLS issue in PowerShell, use bash", not "had problems with tests".
|
|
17
|
+
- Handoff and lesson prose follows the `unslop` skill — plain words, no filler, specifics over vibes; commands, paths, and quoted output stay verbatim.
|
|
30
18
|
3. Commit: `draht-tools commit-docs "pause work"`
|
|
@@ -29,21 +29,12 @@ Run `draht-tools validate-plans $1` after saving. Fix any issues it reports befo
|
|
|
29
29
|
|
|
30
30
|
## Atomic Reasoning
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
**For each observable truth (user-visible outcome):**
|
|
35
|
-
1. **State the logical component** — What must be true for the user? What can they do/see/verify?
|
|
36
|
-
2. **Validate independence** — Which artifacts (files, endpoints, schemas) prove this truth exists? Can it be built independently?
|
|
37
|
-
3. **Verify correctness** — What test scenarios would prove this observable truth? What are the specific inputs → expected outputs?
|
|
32
|
+
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.
|
|
38
33
|
|
|
39
34
|
**Atomicity test:** a task is atomic only if its `<verify>` can fail while every other task passes. If two tasks can only be checked together, they are one task.
|
|
40
35
|
|
|
41
|
-
**Synthesize planning strategy:**
|
|
42
|
-
- Group related observable truths into cohesive plans (2-5 tasks each)
|
|
43
|
-
- Identify which plans can be created in parallel vs sequentially
|
|
44
|
-
- Map each plan to specific bounded contexts and domain concepts
|
|
45
|
-
- Ensure each plan produces testable, verifiable outcomes
|
|
46
36
|
- **Order risk-first**: score each truth by uncertainty (has this codebase done it before?) × blast radius (how much becomes invalid if it's wrong?). The plan proving the highest-scoring truth executes first; boilerplate goes last. Boilerplate never invalidates a phase — the risky part regularly does.
|
|
37
|
+
|
|
47
38
|
- Write every assumption a plan rests on as an explicit `Assumes:` line (with how to confirm it) in the plan header. Unwritten assumptions become the executor's bugs.
|
|
48
39
|
|
|
49
40
|
## Steps
|
|
@@ -11,19 +11,6 @@ Show current project status.
|
|
|
11
11
|
/progress
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Atomic Reasoning
|
|
15
|
-
|
|
16
|
-
Before checking progress, decompose project state into atomic reasoning units:
|
|
17
|
-
|
|
18
|
-
1. **State the logical component** — What milestone are we in? What phase is active? What work is complete vs in-progress?
|
|
19
|
-
2. **Validate independence** — Are there blockers? Are phases in the correct sequence? Is anything waiting on external input?
|
|
20
|
-
3. **Verify correctness** — Does the reported state match reality? Are all verified phases truly complete? Are there unreported issues?
|
|
21
|
-
|
|
22
|
-
**Synthesize status understanding:**
|
|
23
|
-
- Identify where we are in the roadmap
|
|
24
|
-
- Assess momentum and blockers
|
|
25
|
-
- Determine next action
|
|
26
|
-
|
|
27
14
|
## Steps
|
|
28
15
|
1. Run `draht-tools progress` — outputs formatted status
|
|
29
16
|
2. Display the result as-is
|
|
@@ -19,17 +19,7 @@ Before planning, verify the task is actually quick: grep the blast radius (calle
|
|
|
19
19
|
|
|
20
20
|
## Atomic Reasoning
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
1. **State the logical component** — What is the single, concrete outcome? What files need to change? What behavior needs to work?
|
|
25
|
-
2. **Validate independence** — Can this be done without touching other features? What dependencies exist? What could break?
|
|
26
|
-
3. **Verify correctness** — What test proves this works? What edge cases matter? Is this testable behavior or pure config?
|
|
27
|
-
|
|
28
|
-
**Synthesize execution plan:**
|
|
29
|
-
- Define specific files to modify
|
|
30
|
-
- Write failing test (if testable behavior)
|
|
31
|
-
- Implement minimal solution
|
|
32
|
-
- Verify and document
|
|
22
|
+
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.
|
|
33
23
|
|
|
34
24
|
## Steps
|
|
35
25
|
1. Run `draht-tools next-quick-number` to get task number
|
|
@@ -49,6 +39,8 @@ Before executing, decompose this task into atomic reasoning units:
|
|
|
49
39
|
- REFACTOR — Clean up while keeping the test green
|
|
50
40
|
Exception: skip the TDD cycle only for pure config or documentation-only tasks that have no testable behaviour.
|
|
51
41
|
|
|
42
|
+
Comment discipline: 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.
|
|
43
|
+
|
|
52
44
|
After completion, report: files changed, tests written, and verification results.
|
|
53
45
|
|
|
54
46
|
End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED` per the agent contract.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Resolve an in-progress git merge or rebase conflict by reconstructing both sides' intent"
|
|
3
|
+
argument-hint: "[branch or context, e.g. agent/<taskId>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /resolve-conflicts
|
|
7
|
+
|
|
8
|
+
Resolve an in-progress git merge, rebase, or cherry-pick conflict by reconstructing the intent of both sides — never by picking a side blind.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/resolve-conflicts [branch or context]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Context: $ARGUMENTS
|
|
16
|
+
|
|
17
|
+
## When This Applies
|
|
18
|
+
|
|
19
|
+
- `git status` reports unmerged paths — a merge, rebase, or cherry-pick is mid-flight.
|
|
20
|
+
- The `subagent` tool reported a failed worktree merge-back (its failure notice points here): the agent's work sits on an unmerged `agent/<taskId>` branch. Run `git merge agent/<taskId>` first to enter the conflict, then continue here.
|
|
21
|
+
|
|
22
|
+
## The Iron Law
|
|
23
|
+
|
|
24
|
+
> **EVERY HUNK RESOLUTION MUST BE JUSTIFIED BY THE RECOVERED INTENT OF BOTH SIDES. NO INTENT, NO RESOLUTION.**
|
|
25
|
+
|
|
26
|
+
A conflict is two changes with a reason each. Until you can state both reasons, you are not resolving — you are guessing.
|
|
27
|
+
|
|
28
|
+
## Phase 1 — Map the Conflict
|
|
29
|
+
|
|
30
|
+
1. `git status` — list every conflicted file.
|
|
31
|
+
2. Classify the operation: merge, rebase, or cherry-pick. Identify which ref is "ours" and which is "theirs" — a rebase swaps the intuitive meaning.
|
|
32
|
+
3. State the operation's goal in one sentence: what is this merge or rebase trying to bring in?
|
|
33
|
+
4. Read every conflict marker in full — all of them — before resolving any.
|
|
34
|
+
|
|
35
|
+
## Phase 2 — Intent Archaeology
|
|
36
|
+
|
|
37
|
+
For each side of each conflicted area, recover why the change was made:
|
|
38
|
+
|
|
39
|
+
- Commit messages: `git log --merge -p -- <file>` shows the commits touching the conflicted file from both sides.
|
|
40
|
+
- Each side's diff against the merge base: `git diff <base> <side> -- <file>`.
|
|
41
|
+
- PRs, issues, or tickets referenced in those commit messages.
|
|
42
|
+
- Planning documents (for example under `.planning/`) when the project keeps them.
|
|
43
|
+
|
|
44
|
+
Exit criterion: a one-sentence intent statement per side, per conflicted area. If an intent cannot be determined, STOP and ask the user — do not guess.
|
|
45
|
+
|
|
46
|
+
## Phase 3 — Resolve Hunk by Hunk
|
|
47
|
+
|
|
48
|
+
- Preserve both intents wherever they are compatible.
|
|
49
|
+
- Where they are incompatible, pick the side that matches the operation's stated goal and RECORD the trade-off — every recorded trade-off must appear in the merge commit message in Phase 5.
|
|
50
|
+
- Never invent behaviour that exists on neither side.
|
|
51
|
+
- If no stated goal decides an incompatibility, STOP and ask the user.
|
|
52
|
+
- Do not run `--abort` on your own. Aborting can be the right escape hatch — draht's own worktree isolator aborts failed merge-backs to keep the base branch clean — but it discards resolution work, so it is the user's call. Stop and ask instead.
|
|
53
|
+
|
|
54
|
+
## Phase 4 — Run the Project's Checks
|
|
55
|
+
|
|
56
|
+
Discover the project's own gates — package scripts, Makefile, CI config — and run them in order: typecheck, then tests, then lint/format. Fix what the merge broke, under the same rule: no invented behaviour.
|
|
57
|
+
|
|
58
|
+
## Phase 5 — Finish the Operation
|
|
59
|
+
|
|
60
|
+
- Merge: stage the resolved files and commit. The merge commit message names each recorded trade-off — which intent won where, and why.
|
|
61
|
+
- Rebase or cherry-pick: `git rebase --continue` / `git cherry-pick --continue` until every commit is replayed.
|
|
62
|
+
- Never `--no-verify`.
|
|
63
|
+
|
|
64
|
+
## Red Flags — STOP
|
|
65
|
+
|
|
66
|
+
Stop immediately if you catch yourself:
|
|
67
|
+
- Resolving a hunk whose "why" you cannot state for both sides
|
|
68
|
+
- Taking one side wholesale because it is newer, bigger, or yours
|
|
69
|
+
- Introducing behaviour that exists on neither side
|
|
70
|
+
- Finishing with failing checks, or reaching for `--no-verify`
|
|
71
|
+
- Running `--abort` without explicit user sign-off
|
|
@@ -11,19 +11,6 @@ Resume from last session state.
|
|
|
11
11
|
/resume-work
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Atomic Reasoning
|
|
15
|
-
|
|
16
|
-
Before resuming, decompose handoff context into atomic reasoning units:
|
|
17
|
-
|
|
18
|
-
1. **State the logical component** — What phase/task was active? What was the last accomplishment? What decisions were made?
|
|
19
|
-
2. **Validate independence** — Are there blockers? What changed since the pause? Is the codebase in the expected state?
|
|
20
|
-
3. **Verify correctness** — Is the handoff document complete? Does the current state match what was documented? Can work continue safely?
|
|
21
|
-
|
|
22
|
-
**Synthesize resumption plan:**
|
|
23
|
-
- Understand current context
|
|
24
|
-
- Identify next action
|
|
25
|
-
- Confirm no conflicts or state drift
|
|
26
|
-
|
|
27
14
|
## Steps
|
|
28
15
|
1. Run `draht-tools resume` — loads CONTINUE-HERE.md or STATE.md
|
|
29
16
|
2. Display context and ask to continue
|
|
@@ -17,18 +17,9 @@ If no scope given, reviews all recent uncommitted changes.
|
|
|
17
17
|
|
|
18
18
|
## Atomic Reasoning
|
|
19
19
|
|
|
20
|
-
|
|
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
21
|
|
|
22
|
-
|
|
23
|
-
1. **State the logical component** — What does this change do? What problem does it solve? What behavior does it add/modify?
|
|
24
|
-
2. **Validate independence** — Does this change have side effects? Does it affect other modules? Are there hidden dependencies?
|
|
25
|
-
3. **Verify correctness** — Is this change correct? Type-safe? Secure? Does it follow conventions? What could go wrong?
|
|
26
|
-
|
|
27
|
-
**Synthesize review strategy:**
|
|
28
|
-
- Group changes by concern (correctness, security, style, spec compliance)
|
|
29
|
-
- Prioritize findings (critical, important, minor)
|
|
30
|
-
- Identify patterns across multiple files
|
|
31
|
-
- Check domain language compliance and bounded context boundaries
|
|
22
|
+
Check domain language compliance and bounded context boundaries.
|
|
32
23
|
|
|
33
24
|
## Steps
|
|
34
25
|
1. Identify the scope:
|
|
@@ -41,13 +32,13 @@ Before reviewing, decompose code changes into atomic reasoning units:
|
|
|
41
32
|
- If no plan applies → spec-reviewer is skipped
|
|
42
33
|
4. **Delegate to subagents in parallel:**
|
|
43
34
|
Use the `subagent` tool in **parallel mode** with these tasks:
|
|
44
|
-
- `reviewer` agent: "Review the following code changes for correctness, type safety, conventions, and potential issues. Scope: <scope summary and file list>. Read each changed file. For each finding: cite the exact file and line, explain the issue, suggest the fix. Prioritize: Critical / Important / Minor. End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Do NOT run draht, draht-tools, or pi commands."
|
|
35
|
+
- `reviewer` agent: "Review the following code changes for correctness, type safety, conventions, and potential issues. Scope: <scope summary and file list>. Read each changed file. For each finding: cite the exact file and line, explain the issue, suggest the fix. Prioritize: Critical / Important / Minor. Treat comment-heavy new code as a design defect, not a style nit: comments exist only for constraints the code cannot express — if new code needed narration to be understood (step-by-step comments, diff restatements, 'removed X' / 'this handles Y' breadcrumbs), report the finding as 'code needed narration' at Important or higher; the fix is rewriting the code until the comments are unnecessary, not deleting the comments. End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Do NOT run draht, draht-tools, or pi commands."
|
|
45
36
|
- `security-auditor` agent: "Audit the following code changes for security vulnerabilities. Scope: <scope summary and file list>. Check injection, auth bypass, secrets, unsafe deserialization, path traversal, prototype pollution. Report severity / file / line / fix. End with `STATUS: ...`. Do NOT run draht, draht-tools, or pi commands."
|
|
46
37
|
- **(If spec context exists)** `spec-reviewer` agent: "Review the diff against plan at <plan file path>. ONLY spec compliance — does the diff implement exactly what the <test>/<action>/<done> sections asked? Flag omissions and over-builds. End with `STATUS: ...`."
|
|
47
38
|
|
|
48
39
|
5. Read each subagent's final `STATUS:` line.
|
|
49
40
|
6. Collect and merge results.
|
|
50
|
-
7. **Refute before reporting.** For each Critical or Important finding, attempt to kill it yourself before it reaches the report: read the code path that would make it a false positive — an upstream guard clause, a type constraint, an existing test that covers the case. A finding that survives an honest refutation attempt is **confirmed** (you traced the failing path); one you couldn't confirm is downgraded and labeled **suspected**. Reporting unattacked findings trains readers to ignore the report.
|
|
41
|
+
7. **Refute before reporting.** For each Critical or Important finding, attempt to kill it yourself before it reaches the report: read the code path that would make it a false positive — an upstream guard clause, a type constraint, an existing test that covers the case. A finding that survives an honest refutation attempt is **confirmed** (you traced the failing path); one you couldn't confirm is downgraded and labeled **suspected**. Reporting unattacked findings trains readers to ignore the report. A Critical finding whose refutation hinges on library or runtime behavior gets a rung-4 script, not an argument: write and run a small script or test against the real code yourself — this proof stays with the orchestrator; the review subagents are scoped to reading the diff — per the `blast-radius` skill.
|
|
51
42
|
8. Produce a unified, prioritized findings report. Verdict first: one line — mergeable or not, and why. Then findings:
|
|
52
43
|
- **Critical** — must fix before merge (security `BLOCKED`, spec gaps for required deliverables, correctness issues that cause data loss / crashes)
|
|
53
44
|
- **Important** — should fix (bugs, type issues, spec over-builds, missing error handling)
|