@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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal Kimi deferred-tool loading demo.
|
|
3
|
+
*
|
|
4
|
+
* pi -e ./kimi-deferred-tools.ts
|
|
5
|
+
* example prompt: Use the available tools to calculate 100 + 500. Do not calculate it yourself.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ExtensionAPI } from "@draht/coding-agent";
|
|
9
|
+
import { Type } from "typebox";
|
|
10
|
+
|
|
11
|
+
function calculate(_expr: string): string {
|
|
12
|
+
return "42";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default function (pi: ExtensionAPI): void {
|
|
16
|
+
pi.registerTool({
|
|
17
|
+
name: "Calculator",
|
|
18
|
+
label: "Calculator",
|
|
19
|
+
description: "Evaluate a simple arithmetic expression.",
|
|
20
|
+
parameters: Type.Object({
|
|
21
|
+
expr: Type.String({ description: "An expression such as 100 + 500" }),
|
|
22
|
+
}),
|
|
23
|
+
async execute(_toolCallId, params) {
|
|
24
|
+
return {
|
|
25
|
+
content: [{ type: "text", text: calculate(params.expr) }],
|
|
26
|
+
details: {},
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
pi.registerTool({
|
|
32
|
+
name: "tool_search",
|
|
33
|
+
label: "Tool Search",
|
|
34
|
+
description: "Find and activate tools for a capability.",
|
|
35
|
+
promptSnippet: "Search for additional tools when the active tools cannot perform the task",
|
|
36
|
+
parameters: Type.Object({
|
|
37
|
+
query: Type.String({ description: "Capability to search for" }),
|
|
38
|
+
}),
|
|
39
|
+
async execute(_toolCallId, params) {
|
|
40
|
+
if (!params.query.toLowerCase().includes("calc")) {
|
|
41
|
+
return {
|
|
42
|
+
content: [{ type: "text", text: "The relevant tools do not exist." }],
|
|
43
|
+
details: { matches: [], added: [] },
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const active = pi.getActiveTools();
|
|
48
|
+
const added = active.includes("Calculator") ? [] : ["Calculator"];
|
|
49
|
+
if (added.length > 0) pi.setActiveTools([...active, ...added]);
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
content: [{ type: "text", text: "Success. Found 1 matching tool(s)" }],
|
|
53
|
+
details: { matches: ["Calculator"], added },
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
pi.on("session_start", () => {
|
|
59
|
+
pi.setActiveTools(["tool_search"]);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -12,7 +12,7 @@ import { Box, Text } from "@draht/tui";
|
|
|
12
12
|
|
|
13
13
|
export default function (pi: ExtensionAPI) {
|
|
14
14
|
// Register custom renderer for "status-update" messages
|
|
15
|
-
pi.registerMessageRenderer("status-update", (message, { expanded }, theme) => {
|
|
15
|
+
pi.registerMessageRenderer("status-update", (message, { expanded, outputPad }, theme) => {
|
|
16
16
|
const details = message.details as { level: string; timestamp: number } | undefined;
|
|
17
17
|
const level = details?.level ?? "info";
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// Use Box with customMessageBg for consistent styling
|
|
32
|
-
const box = new Box(
|
|
32
|
+
const box = new Box(outputPad, 1, (t) => theme.bg("customMessageBg", t));
|
|
33
33
|
box.addChild(new Text(text, 0, 0));
|
|
34
34
|
return box;
|
|
35
35
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Overlay QA Tests - comprehensive overlay positioning and edge case tests
|
|
3
3
|
*
|
|
4
|
-
* Usage:
|
|
4
|
+
* Usage: draht --extension ./examples/extensions/overlay-qa-tests.ts
|
|
5
5
|
*
|
|
6
6
|
* Commands:
|
|
7
7
|
* /overlay-animation - Real-time animation demo (~30 FPS, proves DOOM-like rendering works)
|
|
@@ -485,13 +485,13 @@ class StreamingOverflowComponent extends BaseOverlay {
|
|
|
485
485
|
echo ""
|
|
486
486
|
for i in $(seq 1 100); do
|
|
487
487
|
# Simulate long file paths with OSC 8 hyperlinks (clickable) - tests width overflow
|
|
488
|
-
DIR="/Users/nicobailon/Documents/development/
|
|
488
|
+
DIR="/Users/nicobailon/Documents/development/draht-mono/packages/coding-agent/src/modes/interactive"
|
|
489
489
|
FILE="\${DIR}/components/very-long-component-name-that-exceeds-width-\${i}.ts"
|
|
490
490
|
echo -e "\\033]8;;file://\${FILE}\\007▶ read: \${FILE}\\033]8;;\\007"
|
|
491
491
|
|
|
492
492
|
# Add some colored status messages with long text
|
|
493
493
|
if [ $((i % 5)) -eq 0 ]; then
|
|
494
|
-
echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/
|
|
494
|
+
echo -e " \\033[32m✓ Successfully processed \${i} files in /Users/nicobailon/Documents/development/draht-mono\\033[0m"
|
|
495
495
|
fi
|
|
496
496
|
if [ $((i % 7)) -eq 0 ]; then
|
|
497
497
|
echo -e " \\033[33m⚠ Warning: potential issue detected at line \${i} in very-long-component-name-that-exceeds-width.ts\\033[0m"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { uuidv7 } from "@draht/ai";
|
|
1
2
|
import { complete, getModel } from "@draht/ai/compat";
|
|
2
3
|
import type { ExtensionAPI, ExtensionCommandContext } from "@draht/coding-agent";
|
|
3
4
|
import { DynamicBorder, getMarkdownTheme } from "@draht/coding-agent";
|
|
@@ -193,6 +194,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
193
194
|
headers: auth.headers,
|
|
194
195
|
env: auth.env,
|
|
195
196
|
reasoningEffort: "high",
|
|
197
|
+
cacheRetention: "none",
|
|
198
|
+
sessionId: uuidv7(),
|
|
196
199
|
},
|
|
197
200
|
);
|
|
198
201
|
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { getModel } from "@draht/ai/compat";
|
|
8
|
-
import {
|
|
8
|
+
import { createAgentSession, ModelRuntime } from "@draht/coding-agent";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
const authStorage = AuthStorage.create();
|
|
12
|
-
const modelRegistry = ModelRegistry.create(authStorage);
|
|
10
|
+
const modelRuntime = await ModelRuntime.create();
|
|
13
11
|
|
|
14
12
|
// Option 1: Find a specific built-in model by provider/id
|
|
15
13
|
const opus = getModel("anthropic", "claude-opus-4-5");
|
|
@@ -18,13 +16,13 @@ if (opus) {
|
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
// Option 2: Find model via registry (includes custom models from models.json)
|
|
21
|
-
const customModel =
|
|
19
|
+
const customModel = modelRuntime.getModel("my-provider", "my-model");
|
|
22
20
|
if (customModel) {
|
|
23
21
|
console.log(`Found custom model: ${customModel.provider}/${customModel.id}`);
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
// Option 3: Pick from available models (have valid API keys)
|
|
27
|
-
const available = await
|
|
25
|
+
const available = await modelRuntime.getAvailable();
|
|
28
26
|
console.log(
|
|
29
27
|
"Available models:",
|
|
30
28
|
available.map((m) => `${m.provider}/${m.id}`),
|
|
@@ -34,8 +32,7 @@ if (available.length > 0) {
|
|
|
34
32
|
const { session } = await createAgentSession({
|
|
35
33
|
model: available[0],
|
|
36
34
|
thinkingLevel: "medium", // off, low, medium, high
|
|
37
|
-
|
|
38
|
-
modelRegistry,
|
|
35
|
+
modelRuntime,
|
|
39
36
|
});
|
|
40
37
|
|
|
41
38
|
try {
|
|
@@ -1,52 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Keys and OAuth
|
|
3
3
|
*
|
|
4
|
-
* Configure
|
|
4
|
+
* Configure provider auth through ModelRuntime.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
// Default: AuthStorage uses ~/.pi/agent/auth.json
|
|
10
|
-
// ModelRegistry loads built-in + custom models from ~/.pi/agent/models.json
|
|
11
|
-
const authStorage = AuthStorage.create();
|
|
12
|
-
const modelRegistry = ModelRegistry.create(authStorage);
|
|
7
|
+
import { createAgentSession, ModelRuntime, SessionManager } from "@draht/coding-agent";
|
|
13
8
|
|
|
9
|
+
// Default: ModelRuntime uses ~/.pi/agent/auth.json for credentials
|
|
10
|
+
// and loads built-in + custom models from ~/.pi/agent/models.json
|
|
11
|
+
const modelRuntime = await ModelRuntime.create();
|
|
14
12
|
const { session: defaultAuthSession } = await createAgentSession({
|
|
15
13
|
sessionManager: SessionManager.inMemory(),
|
|
16
|
-
|
|
17
|
-
modelRegistry,
|
|
14
|
+
modelRuntime,
|
|
18
15
|
});
|
|
19
|
-
console.log("Session with default
|
|
16
|
+
console.log("Session with default model runtime");
|
|
20
17
|
defaultAuthSession.dispose();
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const customRuntime = await ModelRuntime.create({
|
|
20
|
+
authPath: "/tmp/my-app/auth.json",
|
|
21
|
+
modelsPath: "/tmp/my-app/models.json",
|
|
22
|
+
});
|
|
26
23
|
const { session: customAuthSession } = await createAgentSession({
|
|
27
24
|
sessionManager: SessionManager.inMemory(),
|
|
28
|
-
|
|
29
|
-
modelRegistry: customModelRegistry,
|
|
25
|
+
modelRuntime: customRuntime,
|
|
30
26
|
});
|
|
31
|
-
console.log("Session with custom auth
|
|
27
|
+
console.log("Session with custom auth and models locations");
|
|
32
28
|
customAuthSession.dispose();
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
authStorage.setRuntimeApiKey("anthropic", "sk-my-temp-key");
|
|
30
|
+
modelRuntime.setRuntimeApiKey("anthropic", "sk-my-temp-key");
|
|
36
31
|
const { session: runtimeKeySession } = await createAgentSession({
|
|
37
32
|
sessionManager: SessionManager.inMemory(),
|
|
38
|
-
|
|
39
|
-
modelRegistry,
|
|
33
|
+
modelRuntime,
|
|
40
34
|
});
|
|
41
35
|
console.log("Session with runtime API key override");
|
|
42
36
|
runtimeKeySession.dispose();
|
|
43
|
-
|
|
44
|
-
// No models.json - only built-in models
|
|
45
|
-
const simpleRegistry = ModelRegistry.inMemory(authStorage);
|
|
46
|
-
const { session: builtInModelsSession } = await createAgentSession({
|
|
47
|
-
sessionManager: SessionManager.inMemory(),
|
|
48
|
-
authStorage,
|
|
49
|
-
modelRegistry: simpleRegistry,
|
|
50
|
-
});
|
|
51
|
-
console.log("Session with only built-in models");
|
|
52
|
-
builtInModelsSession.dispose();
|
|
@@ -6,26 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
import { getModel } from "@draht/ai/compat";
|
|
8
8
|
import {
|
|
9
|
-
AuthStorage,
|
|
10
9
|
createAgentSession,
|
|
11
10
|
createExtensionRuntime,
|
|
12
|
-
|
|
11
|
+
ModelRuntime,
|
|
13
12
|
type ResourceLoader,
|
|
14
13
|
SessionManager,
|
|
15
14
|
SettingsManager,
|
|
16
15
|
} from "@draht/coding-agent";
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const modelRuntime = await ModelRuntime.create({
|
|
18
|
+
authPath: "/tmp/my-agent/auth.json",
|
|
19
|
+
modelsPath: "/tmp/my-agent/models.json",
|
|
20
|
+
});
|
|
22
21
|
if (process.env.MY_ANTHROPIC_KEY) {
|
|
23
|
-
|
|
22
|
+
modelRuntime.setRuntimeApiKey("anthropic", process.env.MY_ANTHROPIC_KEY);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
// Model registry with no custom models.json
|
|
27
|
-
const modelRegistry = ModelRegistry.inMemory(authStorage);
|
|
28
|
-
|
|
29
25
|
const model = getModel("anthropic", "claude-sonnet-4-5");
|
|
30
26
|
if (!model) throw new Error("Model not found");
|
|
31
27
|
|
|
@@ -45,7 +41,9 @@ const resourceLoader: ResourceLoader = {
|
|
|
45
41
|
getAgentsFiles: () => ({ agentsFiles: [] }),
|
|
46
42
|
getSystemPrompt: () => `You are a minimal assistant.
|
|
47
43
|
Available: read, bash. Be concise.`,
|
|
44
|
+
getSystemPromptSource: () => undefined,
|
|
48
45
|
getAppendSystemPrompt: () => [],
|
|
46
|
+
getAppendSystemPromptSources: () => [],
|
|
49
47
|
extendResources: () => {},
|
|
50
48
|
reload: async () => {},
|
|
51
49
|
};
|
|
@@ -55,8 +53,7 @@ const { session } = await createAgentSession({
|
|
|
55
53
|
agentDir: "/tmp/my-agent",
|
|
56
54
|
model,
|
|
57
55
|
thinkingLevel: "off",
|
|
58
|
-
|
|
59
|
-
modelRegistry,
|
|
56
|
+
modelRuntime,
|
|
60
57
|
resourceLoader,
|
|
61
58
|
tools: ["read", "bash"],
|
|
62
59
|
sessionManager: SessionManager.inMemory(cwd),
|
|
@@ -75,9 +75,9 @@ try {
|
|
|
75
75
|
execSync(tsCmd, { timeout: 60000, encoding: "utf-8", cwd });
|
|
76
76
|
} catch (error) {
|
|
77
77
|
const output = error.stdout || error.stderr || "";
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
issues.push({ severity: strict ? "error" : "warning", message: `${
|
|
78
|
+
const errorLines = output.split("\n").filter((line) => /error TS/.test(line));
|
|
79
|
+
if (errorLines.length > 0) {
|
|
80
|
+
issues.push({ severity: strict ? "error" : "warning", message: `${errorLines.length} TypeScript error(s)`, details: errorLines.join("\n").slice(0, 500) });
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draht/coding-agent",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.5-1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"drahtConfig": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"docs",
|
|
29
29
|
"examples",
|
|
30
30
|
"prompts",
|
|
31
|
+
"skills",
|
|
31
32
|
"hooks",
|
|
32
33
|
"agents",
|
|
33
34
|
"bin",
|
|
@@ -37,21 +38,21 @@
|
|
|
37
38
|
"clean": "shx rm -rf dist",
|
|
38
39
|
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
39
40
|
"build": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && bun run copy-assets",
|
|
40
|
-
"build:binary": "bun run build && bun build --compile ./dist/cli.js ./src/utils/image-resize-worker.ts --outfile dist/draht && bun run copy-binary-assets",
|
|
41
|
-
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && shx rm -rf dist/prompts dist/hooks dist/agents && shx cp -r prompts dist/prompts && shx cp -r hooks dist/hooks && shx cp -r agents dist/agents",
|
|
42
|
-
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp -r prompts dist/ && shx cp -r
|
|
41
|
+
"build:binary": "bun run build && bun build --compile --no-compile-autoload-bunfig ./dist/cli.js ./src/utils/image-resize-worker.ts --outfile dist/draht && bun run copy-binary-assets",
|
|
42
|
+
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/ && shx rm -rf dist/prompts dist/skills dist/hooks dist/agents && shx cp -r prompts dist/prompts && shx cp -r skills dist/skills && shx cp -r hooks dist/hooks && shx cp -r agents dist/agents",
|
|
43
|
+
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp -r prompts dist/ && shx cp -r skills dist/ && shx cp -r hooks dist/ && shx cp -r agents dist/ && node -e \"require('fs').copyFileSync(require.resolve('@silvia-odwyer/photon-node/photon_rs_bg.wasm'), 'dist/photon_rs_bg.wasm')\"",
|
|
43
44
|
"sync-tools": "node ../../scripts/sync-draht-tools.mjs",
|
|
44
45
|
"test": "vitest --run",
|
|
45
46
|
"prepublishOnly": "node ../../scripts/sync-draht-tools.mjs && bun run clean && bun run build"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"@mariozechner/jiti": "^2.6.2",
|
|
49
|
-
"@draht/agent-core": "2026.
|
|
50
|
-
"@draht/ai": "2026.
|
|
51
|
-
"@draht/rlm": "2026.
|
|
52
|
-
"@draht/router": "2026.
|
|
53
|
-
"@draht/tools": "2026.
|
|
54
|
-
"@draht/tui": "2026.
|
|
50
|
+
"@draht/agent-core": "2026.9.5-1",
|
|
51
|
+
"@draht/ai": "2026.9.5-1",
|
|
52
|
+
"@draht/rlm": "2026.9.5-1",
|
|
53
|
+
"@draht/router": "2026.9.5-1",
|
|
54
|
+
"@draht/tools": "2026.9.5-1",
|
|
55
|
+
"@draht/tui": "2026.9.5-1",
|
|
55
56
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
56
57
|
"@sinclair/typebox": "^0.34.41",
|
|
57
58
|
"chalk": "^5.6.2",
|
|
@@ -68,12 +69,13 @@
|
|
|
68
69
|
"proper-lockfile": "^4.1.2",
|
|
69
70
|
"semver": "^7.8.0",
|
|
70
71
|
"strip-ansi": "^7.1.0",
|
|
71
|
-
"typebox": "^1.
|
|
72
|
+
"typebox": "^1.3.7",
|
|
72
73
|
"undici": "^7.19.1",
|
|
73
74
|
"yaml": "^2.8.2",
|
|
74
75
|
"uuid": "^14.0.0"
|
|
75
76
|
},
|
|
76
77
|
"overrides": {
|
|
78
|
+
"protobufjs": "7.6.5",
|
|
77
79
|
"rimraf": "6.1.2",
|
|
78
80
|
"gaxios": {
|
|
79
81
|
"rimraf": "6.1.2"
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
"@types/node": "^24.3.0",
|
|
91
93
|
"@types/proper-lockfile": "^4.1.4",
|
|
92
94
|
"@types/semver": "^7.7.1",
|
|
95
|
+
"openai": "6.26.0",
|
|
93
96
|
"shx": "^0.4.0",
|
|
94
97
|
"typescript": "7.0.2",
|
|
95
98
|
"vitest": "^3.2.4"
|
|
@@ -18,18 +18,7 @@ Surface any of these to the user and split the change set before continuing.
|
|
|
18
18
|
|
|
19
19
|
## Atomic Reasoning
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**For each file change:**
|
|
24
|
-
1. **State the logical component** — What does this change do? What is its purpose? Does it complete a thought?
|
|
25
|
-
2. **Validate independence** — Can this change be applied independently? Does it depend on other changes? Does it break the build alone?
|
|
26
|
-
3. **Verify correctness** — Is this change logically complete? Does it mix concerns? Should it be split further?
|
|
27
|
-
|
|
28
|
-
**Synthesize commit strategy:**
|
|
29
|
-
- Group changes by logical concern (one commit = one idea)
|
|
30
|
-
- Order commits so each builds successfully
|
|
31
|
-
- Write clear commit messages that explain WHY, not just WHAT
|
|
32
|
-
- Ensure each commit is self-contained and reviewable
|
|
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.
|
|
33
22
|
|
|
34
23
|
## Gathering Current State
|
|
35
24
|
|
|
@@ -6,6 +6,8 @@ description: "Refine a fuzzy idea into a written design spec before planning or
|
|
|
6
6
|
|
|
7
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
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
|
+
|
|
9
11
|
## Usage
|
|
10
12
|
```
|
|
11
13
|
/brainstorm [idea or topic]
|
|
@@ -15,17 +17,7 @@ Topic: $ARGUMENTS
|
|
|
15
17
|
|
|
16
18
|
## Atomic Reasoning
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
1. **State the logical component** — What problem does this solve? Who is it for? What changes for them when it ships?
|
|
21
|
-
2. **Validate independence** — What bounded contexts will exist? What is core vs peripheral? What can be built independently?
|
|
22
|
-
3. **Verify correctness** — What defines v1 success? What constraints exist (time, tech, team)? What is explicitly out of scope?
|
|
23
|
-
|
|
24
|
-
**Synthesize design strategy:**
|
|
25
|
-
- Ground questions in what is already on disk instead of asking what the user already told you
|
|
26
|
-
- Sequence questions foundational → detailed, one at a time
|
|
27
|
-
- Surface 2–3 approaches with trade-offs before committing
|
|
28
|
-
- Record decisions (not proposals) in a spec file
|
|
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.
|
|
29
21
|
|
|
30
22
|
## Hear the Problem Beneath the Ask
|
|
31
23
|
|
|
@@ -43,7 +35,7 @@ The user's words describe an artifact; the design must serve a need. They are ra
|
|
|
43
35
|
## The Hard Gate
|
|
44
36
|
|
|
45
37
|
> Do NOT invoke any planning command, write any code, scaffold any project, or take any implementation action until you have:
|
|
46
|
-
> 1.
|
|
38
|
+
> 1. Worked the question frontier in rounds until it was empty
|
|
47
39
|
> 2. Proposed 2–3 approaches with trade-offs
|
|
48
40
|
> 3. Presented a structured design and the user has approved it
|
|
49
41
|
> 4. Written the design to `.planning/specs/YYYY-MM-DD-<slug>-design.md`
|
|
@@ -64,9 +56,9 @@ If an existing codebase is in play (extending a real project), run `draht-tools
|
|
|
64
56
|
|
|
65
57
|
Use this to ground questions in reality instead of asking things the user has already told you.
|
|
66
58
|
|
|
67
|
-
### 2.
|
|
59
|
+
### 2. Question in Rounds — Ask the Whole Frontier
|
|
68
60
|
|
|
69
|
-
Most failed projects come from rushing past ambiguity.
|
|
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.
|
|
70
62
|
|
|
71
63
|
Question categories (sequence from foundational → detailed):
|
|
72
64
|
- **Goal** — who is this for? what changes for them when it ships?
|
|
@@ -107,6 +99,8 @@ Once all sections are approved:
|
|
|
107
99
|
.planning/specs/YYYY-MM-DD-<topic-slug>-design.md
|
|
108
100
|
```
|
|
109
101
|
|
|
102
|
+
Write spec prose through the `unslop` skill — name mechanisms, not feelings; the spec structure below stays as specified.
|
|
103
|
+
|
|
110
104
|
The file should include:
|
|
111
105
|
- Header with date and approver
|
|
112
106
|
- All approved sections
|
|
@@ -142,7 +136,8 @@ The spec file becomes input to those commands.
|
|
|
142
136
|
|
|
143
137
|
## Anti-Patterns — STOP
|
|
144
138
|
|
|
145
|
-
- **
|
|
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
|
|
146
141
|
- **Pre-deciding before they've answered** — "I'll just assume you mean X" is a failure mode
|
|
147
142
|
- **Skipping the alternatives** — proposing only one approach hides the trade-space
|
|
148
143
|
- **Writing the spec before approval** — the spec records *decisions*, not *proposals*. Get the decision first.
|
|
@@ -156,6 +151,8 @@ The spec file becomes input to those commands.
|
|
|
156
151
|
| "User said 'just build it'" | They'll be unhappier when the wrong thing gets built. Surface the trade-off. |
|
|
157
152
|
| "I already know what they want" | Verify by stating it back and getting confirmation. |
|
|
158
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. |
|
|
159
156
|
|
|
160
157
|
## Output
|
|
161
158
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Generate a committed project-local verify-<app> skill that drives the real app the way a user does and captures proof artifacts — proven end to end once before handover"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /create-verification-skill
|
|
6
|
+
|
|
7
|
+
Every serious project needs a scripted way to drive the real app and prove behaviour: launch it, exercise a feature the way a user would, and capture evidence. This command generates that as a committed project-local skill — `.draht/skills/verify-<app>/` — tailored to the repo, so verification is a versioned repo asset instead of per-session improvisation.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```
|
|
11
|
+
/create-verification-skill [app or surface]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Target: $ARGUMENTS (optional — when empty, the interview below picks the primary user-facing surface)
|
|
15
|
+
|
|
16
|
+
Write the generated skill for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
### 1 — Interview the repo, not the user
|
|
21
|
+
|
|
22
|
+
Answer these from the codebase and only ask the user what you cannot observe:
|
|
23
|
+
|
|
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
|
+
- **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. Every recipe must run through plain shell commands — assume the runtime ships no browser-automation or app-control tooling of its own.
|
|
27
|
+
- **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
|
|
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
|
+
|
|
30
|
+
If the checkout doesn't build or start as-is, fix that first (or report it precisely) before generating; a skill written against a broken base teaches wrong steps. When an irrelevant missing asset blocks startup (a static dir the API never serves, a sample config), the generated skill may create it, clearly marked as verification scaffolding, and remove it in cleanup.
|
|
31
|
+
|
|
32
|
+
### 2 — Generate the skill
|
|
33
|
+
|
|
34
|
+
Write `.draht/skills/verify-<app>/SKILL.md`. `.draht/skills/` is the project-level skills directory, and project skills win name collisions against installed or shipped skills — the generated skill is authoritative for its repo. (If the target project's agents discover project skills at a different path, write the identical content there instead; the skill body is host-neutral.)
|
|
35
|
+
|
|
36
|
+
Frontmatter is `name: verify-<app>` plus a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers. Then these six sections, each grounded in what the interview actually found (no placeholders left):
|
|
37
|
+
|
|
38
|
+
- **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a port answering, a prompt). Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
|
|
39
|
+
- **Doctor:** one read-only check that answers "is this instance worth driving?" — process up, right version/build, port owned by us, auth valid. Run it before the first drive and again whenever anything looks off.
|
|
40
|
+
- **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
|
|
41
|
+
- **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
|
|
42
|
+
- **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
|
|
43
|
+
- **Helpers:** any script the skill ships is executable and its invocation is shown in the skill body. A helper the reader has to reverse-engineer is not a helper.
|
|
44
|
+
|
|
45
|
+
### 3 — Seed the feature map
|
|
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 (aim for the top 3-5 to start, from routes, commands, menus, or docs). The README carries the baseline preconditions (launch target, disposable data location, seed data, the Doctor requirement), the driving conventions (stable handles over positions, commands taken literally, restore mutated fixtures, never remove proof artifacts), the proof and skip-reporting rules (record the feature ID and entry point with every artifact; report an unreachable path with the attempted command and the unmet precondition; never report a skipped entry point as verified through a different path), and an index linking every feature file.
|
|
48
|
+
|
|
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
|
+
|
|
51
|
+
1. `Sub-features` — short IDs with one line per behaviour.
|
|
52
|
+
2. `How to get to it (user POV)` — every user entry point.
|
|
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
|
+
4. `Gotchas` — traps that can waste or invalidate a verification run.
|
|
55
|
+
|
|
56
|
+
Keep implementation details out of the map: name only user paths, stable handles, required state, commands, and observable proof. A condensed example entry:
|
|
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
|
+
|
|
86
|
+
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
|
+
|
|
88
|
+
### 4 — Prove the generated skill before handing it over
|
|
89
|
+
|
|
90
|
+
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
|
+
|
|
92
|
+
### 5 — Commit and hand over
|
|
93
|
+
|
|
94
|
+
The generated skill versions with the app it verifies: commit `.draht/skills/verify-<app>/` (skill, feature map, helpers) to the target repo. Then tell the user two things:
|
|
95
|
+
|
|
96
|
+
- `/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
|
+
- 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
|
|
@@ -15,25 +15,14 @@ Phase: $1
|
|
|
15
15
|
|
|
16
16
|
## Atomic Reasoning
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**For each implementation decision:**
|
|
21
|
-
1. **State the logical component** — What gray area exists? What choice needs to be made? Why does this matter?
|
|
22
|
-
2. **Validate independence** — Can this decision be made independently, or does it depend on other choices? What downstream impacts does it have?
|
|
23
|
-
3. **Verify correctness** — What criteria determine the right answer? What trade-offs exist? What domain terms need clarification?
|
|
24
|
-
|
|
25
|
-
**Synthesize discussion strategy:**
|
|
26
|
-
- Identify critical decisions that block planning
|
|
27
|
-
- Group related decisions (e.g., all API decisions together)
|
|
28
|
-
- Sequence questions from foundational to detailed
|
|
29
|
-
- Ensure domain language is established first
|
|
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.
|
|
30
19
|
|
|
31
20
|
## Steps
|
|
32
21
|
1. Run `draht-tools phase-info $1` to load phase context
|
|
33
22
|
2. Identify gray areas based on what's being built
|
|
34
|
-
3. Present
|
|
23
|
+
3. Present the whole frontier of open decisions in one numbered round — every question whose prerequisites are settled, each with a recommended answer the user can accept by number; defer questions that depend on still-open answers to the next round. Environment facts are your job, never the user's — dispatch a subagent and only hold back the questions downstream of it.
|
|
35
24
|
4. If `.planning/DOMAIN.md` exists, load it and validate discovered terms against the glossary. Add any new domain terms found during discussion.
|
|
36
|
-
5. Record decisions with `draht-tools save-context $1` — label each entry **decided** (the user explicitly chose) or **assumed** (you inferred from context). Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
|
|
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. Assumed entries are flagged for confirmation; a plan built on an unlabeled assumption fails silently later.
|
|
37
26
|
6. Commit: `draht-tools commit-docs "capture phase $1 context"`
|
|
38
27
|
|
|
39
28
|
## Workflow
|