@draht/coding-agent 2026.7.7 → 2026.7.12-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 +55 -0
- package/README.md +2 -2
- package/agents/advisor.md +44 -0
- package/bin/draht-tools.cjs +1808 -988
- package/dist/agents/advisor.md +44 -0
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/attach-mode.d.ts.map +1 -1
- package/dist/cli/attach-mode.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/list-sessions.d.ts.map +1 -1
- package/dist/cli/list-sessions.js.map +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +0 -8
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +44 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +165 -136
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -7
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/builtins/index.d.ts +11 -0
- package/dist/core/builtins/index.d.ts.map +1 -0
- package/dist/core/builtins/index.js +11 -0
- package/dist/core/builtins/index.js.map +1 -0
- package/dist/core/builtins/subagent.d.ts +88 -1
- package/dist/core/builtins/subagent.d.ts.map +1 -1
- package/dist/core/builtins/subagent.js +263 -27
- package/dist/core/builtins/subagent.js.map +1 -1
- package/dist/core/cache-stats.d.ts +49 -0
- package/dist/core/cache-stats.d.ts.map +1 -0
- package/dist/core/cache-stats.js +101 -0
- package/dist/core/cache-stats.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +1 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +51 -73
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- 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 +23 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +22 -52
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +9 -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.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- 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.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.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +4 -6
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +39 -15
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/multi-agent/fsm.d.ts +60 -0
- package/dist/core/multi-agent/fsm.d.ts.map +1 -0
- package/dist/core/multi-agent/fsm.js +90 -0
- package/dist/core/multi-agent/fsm.js.map +1 -0
- package/dist/core/multi-agent/index.d.ts +21 -0
- package/dist/core/multi-agent/index.d.ts.map +1 -0
- package/dist/core/multi-agent/index.js +21 -0
- package/dist/core/multi-agent/index.js.map +1 -0
- package/dist/core/multi-agent/mailbox.d.ts +56 -0
- package/dist/core/multi-agent/mailbox.d.ts.map +1 -0
- package/dist/core/multi-agent/mailbox.js +112 -0
- package/dist/core/multi-agent/mailbox.js.map +1 -0
- package/dist/core/multi-agent/permission-gate.d.ts +140 -0
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -0
- package/dist/core/multi-agent/permission-gate.js +669 -0
- package/dist/core/multi-agent/permission-gate.js.map +1 -0
- package/dist/core/multi-agent/task-board.d.ts +100 -0
- package/dist/core/multi-agent/task-board.d.ts.map +1 -0
- package/dist/core/multi-agent/task-board.js +141 -0
- package/dist/core/multi-agent/task-board.js.map +1 -0
- package/dist/core/multi-agent/worktree.d.ts +50 -0
- package/dist/core/multi-agent/worktree.d.ts.map +1 -0
- package/dist/core/multi-agent/worktree.js +148 -0
- package/dist/core/multi-agent/worktree.js.map +1 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +0 -6
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -46
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +7 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +7 -11
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +7 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +17 -18
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +3 -3
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/socket-server/discovery.d.ts.map +1 -1
- package/dist/core/socket-server/discovery.js.map +1 -1
- package/dist/core/socket-server/index.d.ts.map +1 -1
- package/dist/core/socket-server/session-integration.d.ts.map +1 -1
- package/dist/core/socket-server/session-integration.js.map +1 -1
- package/dist/core/socket-server/socket-client.d.ts.map +1 -1
- package/dist/core/socket-server/socket-client.js.map +1 -1
- package/dist/core/socket-server/socket-server.d.ts.map +1 -1
- package/dist/core/socket-server/socket-server.js.map +1 -1
- package/dist/core/socket-server/types.d.ts.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +8 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +0 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +0 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/gsd/domain-validator.d.ts.map +1 -1
- package/dist/gsd/domain-validator.js.map +1 -1
- package/dist/gsd/domain.d.ts.map +1 -1
- package/dist/gsd/domain.js.map +1 -1
- package/dist/gsd/git.d.ts.map +1 -1
- package/dist/gsd/git.js.map +1 -1
- package/dist/gsd/hook-utils.d.ts.map +1 -1
- package/dist/gsd/hook-utils.js +3 -1
- package/dist/gsd/hook-utils.js.map +1 -1
- package/dist/gsd/index.d.ts.map +1 -1
- package/dist/gsd/index.js.map +1 -1
- package/dist/gsd/planning.d.ts.map +1 -1
- package/dist/gsd/planning.js.map +1 -1
- package/dist/hooks/gsd/draht-post-task.js +1 -1
- package/dist/hooks/gsd/draht-quality-gate.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +1 -7
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +4 -9
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-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 +5 -22
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +1 -4
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -7
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +2 -4
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +4 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -4
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -9
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +8 -20
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +3 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +19 -18
- 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 +9 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -57
- 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 -14
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +0 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-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 +9 -24
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -32
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +0 -6
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -3
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +21 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +312 -143
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +2 -7
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +3 -4
- package/dist/modes/interactive/theme/theme.d.ts +4 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +8 -10
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +6 -6
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +10 -11
- 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 +4 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/prompts/agents/build.md +38 -0
- package/dist/prompts/agents/plan.md +36 -0
- package/dist/prompts/agents/verify.md +36 -4
- package/dist/prompts/commands/brainstorm.md +16 -2
- package/dist/prompts/commands/discuss-phase.md +1 -1
- package/dist/prompts/commands/execute-phase.md +16 -3
- package/dist/prompts/commands/fix.md +13 -1
- package/dist/prompts/commands/init-project.md +1 -0
- package/dist/prompts/commands/map-codebase.md +9 -9
- package/dist/prompts/commands/new-project.md +1 -0
- package/dist/prompts/commands/next-milestone.md +3 -0
- package/dist/prompts/commands/orchestrate-loop.md +99 -0
- package/dist/prompts/commands/orchestrate.md +29 -6
- package/dist/prompts/commands/pause-work.md +2 -1
- package/dist/prompts/commands/plan-phase.md +6 -0
- package/dist/prompts/commands/quick.md +6 -2
- package/dist/prompts/commands/review.md +4 -1
- package/dist/prompts/commands/verify-work.md +10 -8
- package/dist/rlm-cli.d.ts +92 -0
- package/dist/rlm-cli.d.ts.map +1 -0
- package/dist/rlm-cli.js +379 -0
- package/dist/rlm-cli.js.map +1 -0
- package/dist/rpc-entry.d.ts.map +1 -1
- package/dist/rpc-entry.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- 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.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/notify.d.ts +3 -1
- package/dist/utils/notify.d.ts.map +1 -1
- package/dist/utils/notify.js +11 -4
- package/dist/utils/notify.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/custom-provider.md +4 -3
- package/docs/extensions.md +15 -10
- package/docs/models.md +49 -8
- package/docs/rpc.md +15 -5
- package/docs/sdk.md +1 -1
- package/docs/settings.md +3 -2
- package/docs/themes.md +5 -3
- package/docs/tui.md +1 -1
- package/docs/usage.md +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/preset.ts +2 -2
- package/examples/extensions/reload-runtime.ts +2 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/README.md +1 -1
- package/hooks/gsd/draht-post-task.js +1 -1
- package/hooks/gsd/draht-quality-gate.js +1 -1
- package/package.json +10 -8
- package/prompts/agents/build.md +38 -0
- package/prompts/agents/plan.md +36 -0
- package/prompts/agents/verify.md +36 -4
- package/prompts/commands/brainstorm.md +16 -2
- package/prompts/commands/discuss-phase.md +1 -1
- package/prompts/commands/execute-phase.md +16 -3
- package/prompts/commands/fix.md +13 -1
- package/prompts/commands/init-project.md +1 -0
- package/prompts/commands/map-codebase.md +9 -9
- package/prompts/commands/new-project.md +1 -0
- package/prompts/commands/next-milestone.md +3 -0
- package/prompts/commands/orchestrate-loop.md +99 -0
- package/prompts/commands/orchestrate.md +29 -6
- package/prompts/commands/pause-work.md +2 -1
- package/prompts/commands/plan-phase.md +6 -0
- package/prompts/commands/quick.md +6 -2
- package/prompts/commands/review.md +4 -1
- package/prompts/commands/verify-work.md +10 -8
package/docs/settings.md
CHANGED
|
@@ -29,8 +29,9 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
|
|
|
29
29
|
|---------|------|---------|-------------|
|
|
30
30
|
| `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
|
|
31
31
|
| `defaultModel` | string | - | Default model ID |
|
|
32
|
-
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"` |
|
|
32
|
+
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
33
33
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
34
|
+
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
|
|
34
35
|
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
35
36
|
|
|
36
37
|
#### thinkingBudgets
|
|
@@ -172,7 +173,7 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explic
|
|
|
172
173
|
|
|
173
174
|
| Setting | Type | Default | Description |
|
|
174
175
|
|---------|------|---------|-------------|
|
|
175
|
-
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows) |
|
|
176
|
+
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows); supports a leading `~` for the home directory |
|
|
176
177
|
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
177
178
|
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
178
179
|
|
package/docs/themes.md
CHANGED
|
@@ -109,6 +109,7 @@ vim ~/.pi/agent/themes/my-theme.json
|
|
|
109
109
|
"thinkingMedium": "#00ffff",
|
|
110
110
|
"thinkingHigh": "#ff00ff",
|
|
111
111
|
"thinkingXhigh": "#ff0000",
|
|
112
|
+
"thinkingMax": "#ff0088",
|
|
112
113
|
"bashMode": "#ffaa00"
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -139,13 +140,13 @@ vim ~/.pi/agent/themes/my-theme.json
|
|
|
139
140
|
|
|
140
141
|
- `name` is required and must be unique.
|
|
141
142
|
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
142
|
-
- `colors` must define all 51 required tokens.
|
|
143
|
+
- `colors` must define all 51 required tokens. `thinkingMax` is optional and falls back to `thinkingXhigh`.
|
|
143
144
|
|
|
144
145
|
The `$schema` field enables editor auto-completion and validation.
|
|
145
146
|
|
|
146
147
|
## Color Tokens
|
|
147
148
|
|
|
148
|
-
Every theme must define all 51 color tokens.
|
|
149
|
+
Every theme must define all 51 required color tokens. `thinkingMax` is optional for compatibility with existing themes; when omitted, it uses `thinkingXhigh`.
|
|
149
150
|
|
|
150
151
|
### Core UI (11 colors)
|
|
151
152
|
|
|
@@ -216,7 +217,7 @@ Every theme must define all 51 color tokens. There are no optional colors.
|
|
|
216
217
|
| `syntaxOperator` | Operators |
|
|
217
218
|
| `syntaxPunctuation` | Punctuation |
|
|
218
219
|
|
|
219
|
-
### Thinking Level Borders (6
|
|
220
|
+
### Thinking Level Borders (6 required, 1 optional)
|
|
220
221
|
|
|
221
222
|
Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):
|
|
222
223
|
|
|
@@ -228,6 +229,7 @@ Editor border colors indicating thinking level (visual hierarchy from subtle to
|
|
|
228
229
|
| `thinkingMedium` | Medium thinking |
|
|
229
230
|
| `thinkingHigh` | High thinking |
|
|
230
231
|
| `thinkingXhigh` | Extra high thinking |
|
|
232
|
+
| `thinkingMax` | Maximum thinking; optional, falls back to `thinkingXhigh` |
|
|
231
233
|
|
|
232
234
|
### Bash Mode (1 color)
|
|
233
235
|
|
package/docs/tui.md
CHANGED
|
@@ -424,7 +424,7 @@ renderResult(result, options, theme, context) {
|
|
|
424
424
|
| Diffs | `toolDiffAdded`, `toolDiffRemoved`, `toolDiffContext` |
|
|
425
425
|
| Markdown | `mdHeading`, `mdLink`, `mdLinkUrl`, `mdCode`, `mdCodeBlock`, `mdCodeBlockBorder`, `mdQuote`, `mdQuoteBorder`, `mdHr`, `mdListBullet` |
|
|
426
426
|
| Syntax | `syntaxComment`, `syntaxKeyword`, `syntaxFunction`, `syntaxVariable`, `syntaxString`, `syntaxNumber`, `syntaxType`, `syntaxOperator`, `syntaxPunctuation` |
|
|
427
|
-
| Thinking | `thinkingOff`, `thinkingMinimal`, `thinkingLow`, `thinkingMedium`, `thinkingHigh`, `thinkingXhigh` |
|
|
427
|
+
| Thinking | `thinkingOff`, `thinkingMinimal`, `thinkingLow`, `thinkingMedium`, `thinkingHigh`, `thinkingXhigh`, `thinkingMax` |
|
|
428
428
|
| Modes | `bashMode` |
|
|
429
429
|
|
|
430
430
|
**Background colors** (`theme.bg(color, text)`):
|
package/docs/usage.md
CHANGED
|
@@ -50,7 +50,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
50
50
|
| `/copy` | Copy last assistant message to clipboard |
|
|
51
51
|
| `/export [file]` | Export session to HTML |
|
|
52
52
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
53
|
-
| `/reload` | Reload keybindings, extensions, skills, prompts, and context files |
|
|
53
|
+
| `/reload` | Reload keybindings, extensions, skills, prompts, themes, and context files |
|
|
54
54
|
| `/hotkeys` | Show all keyboard shortcuts |
|
|
55
55
|
| `/changelog` | Display version history |
|
|
56
56
|
| `/quit` | Quit pi |
|
|
@@ -180,7 +180,7 @@ cat README.md | pi -p "Summarize this text"
|
|
|
180
180
|
| `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
|
|
181
181
|
| `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
|
|
182
182
|
| `--api-key <key>` | API key, overriding environment variables |
|
|
183
|
-
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
|
|
183
|
+
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
|
|
184
184
|
| `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
|
|
185
185
|
| `--list-models [search]` | List available models |
|
|
186
186
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.6",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -52,7 +52,7 @@ interface Preset {
|
|
|
52
52
|
/** Model ID (e.g., "claude-sonnet-4-5") */
|
|
53
53
|
model?: string;
|
|
54
54
|
/** Thinking level */
|
|
55
|
-
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
55
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
56
56
|
/** Tools to enable (replaces default set) */
|
|
57
57
|
tools?: string[];
|
|
58
58
|
/** Instructions to append to system prompt */
|
|
@@ -100,7 +100,7 @@ function loadPresets(cwd: string): PresetsConfig {
|
|
|
100
100
|
|
|
101
101
|
interface OriginalState {
|
|
102
102
|
model: Model<Api> | undefined;
|
|
103
|
-
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
103
|
+
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
104
104
|
tools: string[];
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -12,7 +12,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
12
12
|
// Command entrypoint for reload.
|
|
13
13
|
// Treat reload as terminal for this handler.
|
|
14
14
|
pi.registerCommand("reload-runtime", {
|
|
15
|
-
description: "Reload extensions, skills, prompts, and
|
|
15
|
+
description: "Reload extensions, skills, prompts, themes, and context files",
|
|
16
16
|
handler: async (_args, ctx) => {
|
|
17
17
|
await ctx.reload();
|
|
18
18
|
return;
|
|
@@ -24,7 +24,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
24
24
|
pi.registerTool({
|
|
25
25
|
name: "reload_runtime",
|
|
26
26
|
label: "Reload Runtime",
|
|
27
|
-
description: "Reload extensions, skills, prompts, and
|
|
27
|
+
description: "Reload extensions, skills, prompts, themes, and context files",
|
|
28
28
|
parameters: Type.Object({}),
|
|
29
29
|
async execute() {
|
|
30
30
|
pi.sendUserMessage("/reload-runtime", { deliverAs: "followUp" });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.10.
|
|
9
|
+
"version": "1.10.6",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.6",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/examples/sdk/README.md
CHANGED
|
@@ -119,7 +119,7 @@ await session.prompt("Hello");
|
|
|
119
119
|
| `thinkingLevel` | From settings/"off" | off, low, medium, high |
|
|
120
120
|
| `tools` | `codingTools` | Built-in tools |
|
|
121
121
|
| `customTools` | `[]` | Additional tool definitions |
|
|
122
|
-
| `resourceLoader` | DefaultResourceLoader | Resource loader for extensions, skills, prompts, themes |
|
|
122
|
+
| `resourceLoader` | DefaultResourceLoader | Resource loader for extensions, skills, prompts, themes, and context files |
|
|
123
123
|
| `sessionManager` | `SessionManager.create(cwd)` | Persistence |
|
|
124
124
|
| `settingsManager` | `SettingsManager.create(cwd, agentDir)` | Settings overrides |
|
|
125
125
|
|
|
@@ -105,7 +105,7 @@ fs.appendFileSync(LOG_FILE, JSON.stringify(entry) + "\n");
|
|
|
105
105
|
if (status === "pass") {
|
|
106
106
|
// Type check
|
|
107
107
|
try {
|
|
108
|
-
const tsCmd = toolchain.pm === "bun" ? "bun run
|
|
108
|
+
const tsCmd = toolchain.pm === "bun" ? "bun run tsc --noEmit 2>&1" : "npx tsc --noEmit 2>&1";
|
|
109
109
|
execSync(tsCmd, { timeout: 30000, encoding: "utf-8", cwd });
|
|
110
110
|
// Run tests
|
|
111
111
|
try {
|
|
@@ -71,7 +71,7 @@ const issues = [];
|
|
|
71
71
|
|
|
72
72
|
// 1. TypeScript check
|
|
73
73
|
try {
|
|
74
|
-
const tsCmd = toolchain.pm === "bun" ? "bun run
|
|
74
|
+
const tsCmd = toolchain.pm === "bun" ? "bun run tsc --noEmit 2>&1" : "npx tsc --noEmit 2>&1";
|
|
75
75
|
execSync(tsCmd, { timeout: 60000, encoding: "utf-8", cwd });
|
|
76
76
|
} catch (error) {
|
|
77
77
|
const output = error.stdout || error.stderr || "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draht/coding-agent",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.12-1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"drahtConfig": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
37
|
"clean": "shx rm -rf dist",
|
|
38
|
-
"dev": "
|
|
39
|
-
"build": "
|
|
38
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
39
|
+
"build": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && bun run copy-assets",
|
|
40
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
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
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 hooks dist/ && shx cp -r agents dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
@@ -46,10 +46,12 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@mariozechner/jiti": "^2.6.2",
|
|
49
|
-
"@draht/agent-core": "2026.7.
|
|
50
|
-
"@draht/ai": "2026.7.
|
|
51
|
-
"@draht/
|
|
52
|
-
"@draht/
|
|
49
|
+
"@draht/agent-core": "2026.7.12-1",
|
|
50
|
+
"@draht/ai": "2026.7.12-1",
|
|
51
|
+
"@draht/rlm": "2026.7.12-1",
|
|
52
|
+
"@draht/router": "2026.7.12-1",
|
|
53
|
+
"@draht/tools": "2026.7.12-1",
|
|
54
|
+
"@draht/tui": "2026.7.12-1",
|
|
53
55
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
54
56
|
"@sinclair/typebox": "^0.34.41",
|
|
55
57
|
"chalk": "^5.6.2",
|
|
@@ -89,7 +91,7 @@
|
|
|
89
91
|
"@types/proper-lockfile": "^4.1.4",
|
|
90
92
|
"@types/semver": "^7.7.1",
|
|
91
93
|
"shx": "^0.4.0",
|
|
92
|
-
"typescript": "
|
|
94
|
+
"typescript": "7.0.2",
|
|
93
95
|
"vitest": "^3.2.4"
|
|
94
96
|
},
|
|
95
97
|
"keywords": [
|
package/prompts/agents/build.md
CHANGED
|
@@ -13,6 +13,33 @@ You are an execution agent. Your job is to implement plans precisely.
|
|
|
13
13
|
4. Commit after each task: `draht commit-task N P T "description"`
|
|
14
14
|
5. If verification fails, fix it before continuing
|
|
15
15
|
6. Never skip a verify step — that's how quality dies
|
|
16
|
+
7. If a plan instruction contradicts what you find in the code, STOP and report `NEEDS_CONTEXT` — do not silently obey either side
|
|
17
|
+
|
|
18
|
+
## Evidence, Not Plausibility
|
|
19
|
+
|
|
20
|
+
A step is done when you have watched it be done.
|
|
21
|
+
|
|
22
|
+
**Procedure:**
|
|
23
|
+
1. "Verified" means you ran the command and read the output in this session — not that the code looks right.
|
|
24
|
+
2. Quote the decisive line of output in your summary: test counts, exit codes, the actual error text.
|
|
25
|
+
3. If you did not run it, write "not verified" — never let a plausible claim wear a verified claim's clothes.
|
|
26
|
+
|
|
27
|
+
**Example:** after implementing a parser, "bun test parser: 14 pass, 0 fail" is evidence; "the parser now handles all cases" is a guess in a suit.
|
|
28
|
+
|
|
29
|
+
**Prevents:** reporting a green build nobody ever ran.
|
|
30
|
+
|
|
31
|
+
## Competence Mimics
|
|
32
|
+
|
|
33
|
+
These feel like progress and are not:
|
|
34
|
+
|
|
35
|
+
| Looks like competence | Is actually |
|
|
36
|
+
|---|---|
|
|
37
|
+
| A test that passes on first run | Probably asserts nothing — break the code, watch it fail (red first) |
|
|
38
|
+
| A large diff | Unreviewable risk; the plan asked for the minimal green change |
|
|
39
|
+
| "Refactored while I was in there" | Scope drift that hides which change broke what |
|
|
40
|
+
| A confident summary of a file you skimmed | A guess — read it or say you didn't |
|
|
41
|
+
| Silencing a failing check to keep moving | Deleting the only warning you'll get |
|
|
42
|
+
| Obeying the plan where it contradicts the code | The code is reality — report the conflict |
|
|
16
43
|
|
|
17
44
|
## Tools Available
|
|
18
45
|
- `draht read-plan N P` — read the plan to execute
|
|
@@ -35,6 +62,9 @@ You are an execution agent. Your job is to implement plans precisely.
|
|
|
35
62
|
4. Fill in the summary with actual commits, files changed, notes
|
|
36
63
|
5. After all plans in phase: `draht verify-phase N`
|
|
37
64
|
|
|
65
|
+
## Summary Format
|
|
66
|
+
Verdict first (what state is the plan in), then evidence (quoted verify output per task), then remaining risk (what you did not verify, labeled as such). Never bury a failed task under completed ones.
|
|
67
|
+
|
|
38
68
|
## Checkpoint Handling
|
|
39
69
|
- `type="auto"` → execute silently
|
|
40
70
|
- `type="checkpoint:human-verify"` → STOP, show what was built, ask for confirmation
|
|
@@ -46,3 +76,11 @@ If a task fails 3 times:
|
|
|
46
76
|
2. Mark task as failed
|
|
47
77
|
3. Continue to next task (unless it depends on the failed one)
|
|
48
78
|
4. Note the failure for fix planning
|
|
79
|
+
|
|
80
|
+
## Send Gate — run before finishing
|
|
81
|
+
|
|
82
|
+
1. **Asked** — did you build what the plan's <done> describes, not just what its literal steps said?
|
|
83
|
+
2. **Evidence** — does every "done" claim quote the output that proves it, with unrun checks labeled "not verified"?
|
|
84
|
+
3. **Attacked** — did each test fail before the implementation made it pass?
|
|
85
|
+
4. **Ordered** — verdict first, evidence second, remaining risk last?
|
|
86
|
+
5. **Wrongness** — if this work is broken, where is it most likely — and did you run that path?
|
package/prompts/agents/plan.md
CHANGED
|
@@ -12,6 +12,34 @@ You are a planning agent. Your job is to create atomic, executable plans.
|
|
|
12
12
|
3. Maximum 5 tasks per plan
|
|
13
13
|
4. Goal-backward: start from "what must be TRUE" not "what should we build"
|
|
14
14
|
5. Every task needs <verify> and <done> — no ambiguity
|
|
15
|
+
6. 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
|
|
16
|
+
7. Every assumption a plan rests on gets an explicit `Assumes:` line (with how to confirm it) in the plan header — unwritten assumptions become the executor's bugs
|
|
17
|
+
|
|
18
|
+
## Read the Goal Beneath the Goal
|
|
19
|
+
|
|
20
|
+
The phase description says what to build; the plan must capture what must become true.
|
|
21
|
+
|
|
22
|
+
**Procedure:**
|
|
23
|
+
1. Restate the phase goal as the change in the user's world: "after this phase, a user can X."
|
|
24
|
+
2. If the goal names a mechanism ("add Redis caching"), find the outcome behind it ("p95 under 200ms") and plan toward the outcome — the mechanism is a candidate, not a requirement.
|
|
25
|
+
3. If you cannot state the outcome, the phase is not plannable yet — report `NEEDS_CONTEXT` instead of planning the mechanism.
|
|
26
|
+
|
|
27
|
+
**Example:** "add retry logic to the sync job" → the outcome is "syncs recover from transient failures without human help." That truth may need idempotency more than retries; a plan built on the literal words ships retries that double-write.
|
|
28
|
+
|
|
29
|
+
**Prevents:** precisely executing the wrong plan.
|
|
30
|
+
|
|
31
|
+
## Risk-First Ordering
|
|
32
|
+
|
|
33
|
+
Not all tasks deserve equal effort or the same position in the sequence.
|
|
34
|
+
|
|
35
|
+
**Procedure:**
|
|
36
|
+
1. For each observable truth, score uncertainty (has this codebase done it before?) and blast radius (how much of the plan is invalid if it's wrong?).
|
|
37
|
+
2. Order plans and tasks so the highest uncertainty × blast-radius truth is proven first.
|
|
38
|
+
3. Boilerplate goes last — it never invalidates a plan; the risky part regularly does.
|
|
39
|
+
|
|
40
|
+
**Example:** a phase needs a third-party webhook plus a settings UI. The webhook contract is the risk: plan 1 proves an end-to-end webhook round-trip; the UI waits.
|
|
41
|
+
|
|
42
|
+
**Prevents:** discovering in task 9 that the foundation under tasks 1–8 cannot work.
|
|
15
43
|
|
|
16
44
|
## Tools Available
|
|
17
45
|
- `draht load-phase-context N` — gather all context for a phase
|
|
@@ -41,3 +69,11 @@ You are a planning agent. Your job is to create atomic, executable plans.
|
|
|
41
69
|
```
|
|
42
70
|
|
|
43
71
|
Task types: auto, checkpoint:human-verify, checkpoint:decision
|
|
72
|
+
|
|
73
|
+
## Send Gate — run before finishing
|
|
74
|
+
|
|
75
|
+
1. **Asked** — do the plans produce the outcome behind the request, not just its literal words?
|
|
76
|
+
2. **Evidence** — is every claim about the codebase something you read, with assumptions written as `Assumes:` lines?
|
|
77
|
+
3. **Attacked** — did you try to break your own decomposition (a truth with no task, a task with no independent check)?
|
|
78
|
+
4. **Ordered** — does the riskiest truth get proven first?
|
|
79
|
+
5. **Wrongness** — if these plans fail, where is it most likely — and does a task check exactly there?
|
package/prompts/agents/verify.md
CHANGED
|
@@ -12,6 +12,28 @@ You are a verification agent. Your job is to test completed work against accepta
|
|
|
12
12
|
3. Be honest — if something doesn't work, say so
|
|
13
13
|
4. Create fix plans for failures, don't just report them
|
|
14
14
|
|
|
15
|
+
## Re-Derive, Don't Trust
|
|
16
|
+
|
|
17
|
+
A claim is verified when you have reproduced it, not when it sounds right.
|
|
18
|
+
|
|
19
|
+
**Procedure:**
|
|
20
|
+
1. Never accept a summary's claim ("tests pass", "endpoint works") — re-run the command yourself and read the output.
|
|
21
|
+
2. Every pass verdict cites its observed evidence: the command you ran and the decisive output line.
|
|
22
|
+
3. For each pass, attempt one break: an input, sequence, or state the implementer probably didn't try. A pass you haven't tried to break is only "not yet failed".
|
|
23
|
+
|
|
24
|
+
**Example:** the summary says "auth middleware verified." You re-run the suite — it passes. Then you request a route with an expired token: 500 instead of 401. The claim was true and the work was still broken.
|
|
25
|
+
|
|
26
|
+
**Prevents:** rubber-stamp verification — trust laundered into evidence.
|
|
27
|
+
|
|
28
|
+
## Known vs Guessed
|
|
29
|
+
|
|
30
|
+
Label every statement in your report:
|
|
31
|
+
- **observed** — you ran it and saw it
|
|
32
|
+
- **derived** — follows necessarily from something observed
|
|
33
|
+
- **assumed** — believed but unchecked, with what would check it
|
|
34
|
+
|
|
35
|
+
A verdict inherits the weakest label it rests on: an "assumed pass" is not a pass — test it or mark the deliverable partial.
|
|
36
|
+
|
|
15
37
|
## Tools Available
|
|
16
38
|
- `draht extract-deliverables N` — list testable items
|
|
17
39
|
- `draht create-fix-plan N P "issue"` — create fix plan for failures
|
|
@@ -31,7 +53,17 @@ You are a verification agent. Your job is to test completed work against accepta
|
|
|
31
53
|
5. Update state: `draht update-state`
|
|
32
54
|
|
|
33
55
|
## Output
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
Answer first, reasoning second, risk last:
|
|
57
|
+
1. **Verdict** — X/Y passed, phase pass/fail, in the first line
|
|
58
|
+
2. **Evidence** — per deliverable: what you ran, what you observed, its label (observed/derived/assumed)
|
|
59
|
+
3. **Risk** — what was NOT tested and how it could bite; fix plans created; recommended next action
|
|
60
|
+
|
|
61
|
+
Never bury a failure under a list of passes.
|
|
62
|
+
|
|
63
|
+
## Send Gate — run before finishing
|
|
64
|
+
|
|
65
|
+
1. **Asked** — did you test what the user needs to be true, not just what the developer built?
|
|
66
|
+
2. **Evidence** — is every pass backed by output you personally observed this session?
|
|
67
|
+
3. **Attacked** — did you try to break each pass at least once?
|
|
68
|
+
4. **Ordered** — verdict first, evidence second, risk last?
|
|
69
|
+
5. **Wrongness** — if this UAT is wrong, which verdict is most likely the false one — and did you re-check it?
|
|
@@ -27,6 +27,19 @@ Before asking anything, decompose the idea into atomic reasoning units:
|
|
|
27
27
|
- Surface 2–3 approaches with trade-offs before committing
|
|
28
28
|
- Record decisions (not proposals) in a spec file
|
|
29
29
|
|
|
30
|
+
## Hear the Problem Beneath the Ask
|
|
31
|
+
|
|
32
|
+
The user's words describe an artifact; the design must serve a need. They are rarely the same thing.
|
|
33
|
+
|
|
34
|
+
**Procedure:**
|
|
35
|
+
1. Separate the stated artifact ("a dashboard") from the underlying need — what decision, pain, or moment does it serve?
|
|
36
|
+
2. When the user names a solution, ask what it solves before refining it. Solutions stay candidates until the need is confirmed.
|
|
37
|
+
3. State the need back in one sentence ("so the real problem is X — right?") and get an explicit yes before proposing any approach.
|
|
38
|
+
|
|
39
|
+
**Example:** "I want an admin dashboard" → questioning reveals they check one number, once a week → a scheduled email beats the dashboard by a month of build time.
|
|
40
|
+
|
|
41
|
+
**Prevents:** a polished spec for the wrong artifact.
|
|
42
|
+
|
|
30
43
|
## The Hard Gate
|
|
31
44
|
|
|
32
45
|
> Do NOT invoke any planning command, write any code, scaffold any project, or take any implementation action until you have:
|
|
@@ -102,13 +115,14 @@ The file should include:
|
|
|
102
115
|
|
|
103
116
|
### 6. Self-Review the Written Spec
|
|
104
117
|
|
|
105
|
-
Before handing off,
|
|
118
|
+
Before handing off, attack the spec as if you were paid to kill it:
|
|
106
119
|
- Contradictions between sections (the goal says X, the architecture implies not-X)
|
|
107
120
|
- Gaps (a user story with no architectural support)
|
|
108
121
|
- Premature commitments (specific tech choices made before they were needed)
|
|
109
122
|
- Domain language drift (different names for the same thing)
|
|
123
|
+
- The strongest case the whole design is wrong — wrong scope, wrong user, or already exists as a simpler tool. Write that case and why the design survives it into the spec's Open Questions.
|
|
110
124
|
|
|
111
|
-
Report any findings to the user and update before proceeding.
|
|
125
|
+
Report any findings to the user and update before proceeding. A spec that was never attacked has never been tested.
|
|
112
126
|
|
|
113
127
|
### 7. Hand Off
|
|
114
128
|
|
|
@@ -33,7 +33,7 @@ Before questioning, decompose this phase scope into atomic reasoning units:
|
|
|
33
33
|
2. Identify gray areas based on what's being built
|
|
34
34
|
3. Present 1-2 questions at a time about preferences
|
|
35
35
|
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`
|
|
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.
|
|
37
37
|
6. Commit: `draht-tools commit-docs "capture phase $1 context"`
|
|
38
38
|
|
|
39
39
|
## Workflow
|
|
@@ -24,6 +24,15 @@ STOP and report to the user instead of proceeding if **any** of these is true:
|
|
|
24
24
|
- The working tree is dirty with changes unrelated to this phase
|
|
25
25
|
- A subagent returns `STATUS: BLOCKED` — never retry blindly; report and ask the user
|
|
26
26
|
|
|
27
|
+
## RLM Routing for Oversize Inputs (`rlm: true`)
|
|
28
|
+
|
|
29
|
+
A plan's YAML frontmatter may declare `rlm: true` (alongside `phase`, `plan`, `depends_on`, `must_haves`). This flags that one or more of the plan's tasks reference input files that can be large enough to be worth deferring instead of reading directly.
|
|
30
|
+
|
|
31
|
+
- **Threshold: 200KB.** When a plan has `rlm: true` and a task's `<action>`/`<test>` references an input file at or above ~200KB on disk, the executing agent (implementer subagent) should call the `rlm_query` tool — `{ input: "<path|glob|http(s) URL|knowledge:<client-slug>>", query: "..." }` — instead of reading the file directly with the read tool. 200KB is roughly 50k tokens of plain text, a large enough bite out of the subagent's context budget to justify offloading it to a Recursive Language Model sub-session rather than reading it inline; files below the threshold should still be read directly as normal — don't reach for `rlm_query` on ordinary source files.
|
|
32
|
+
- This only applies to reading large *input* files referenced by the plan (fixtures, datasets, logs, generated artifacts, client knowledge bases). It never applies to the plan file itself, to code files being edited, or to test output — those are always read directly.
|
|
33
|
+
- If `rlm_query` is unavailable in the session (the `@draht/rlm-agent` extension isn't installed for this project), fall back to reading the file directly and note this in the task's `STATUS` report rather than failing the task.
|
|
34
|
+
- When dispatching Stage 1 (Implementer) below for a plan with `rlm: true`, carry this instruction into the subagent's prompt so it actually reaches the agent doing the reading — the orchestrator itself does not read task input files.
|
|
35
|
+
|
|
27
36
|
## Atomic Reasoning
|
|
28
37
|
|
|
29
38
|
Before executing, decompose this phase execution into atomic reasoning units:
|
|
@@ -36,6 +45,7 @@ Before executing, decompose this phase execution into atomic reasoning units:
|
|
|
36
45
|
**Synthesize execution strategy:**
|
|
37
46
|
- Identify parallel execution groups (plans with no shared files/dependencies)
|
|
38
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
|
|
39
49
|
- Map each plan to a subagent task with clear success criteria
|
|
40
50
|
|
|
41
51
|
## Steps
|
|
@@ -46,7 +56,7 @@ Before executing, decompose this phase execution into atomic reasoning units:
|
|
|
46
56
|
|
|
47
57
|
### Stage 1 — Implementer
|
|
48
58
|
Use the `subagent` tool in **single mode** with the `implementer` agent. Prompt includes the full plan content + the TDD cycle instructions (template below). Read the final `STATUS:` line:
|
|
49
|
-
- `DONE` →
|
|
59
|
+
- `DONE` → **re-derive before trusting**: a `DONE` that does not quote its verification output (test counts, command output) is treated as `DONE_WITH_CONCERNS` — run the task's `<verify>` step yourself and read the result before Stage 2. Subagent claims are inputs, not verdicts.
|
|
50
60
|
- `DONE_WITH_CONCERNS` → if concerns are correctness-related, re-dispatch with a fix instruction; otherwise note and proceed.
|
|
51
61
|
- `NEEDS_CONTEXT` → provide the missing info and re-dispatch.
|
|
52
62
|
- `BLOCKED` → STOP, report to the user.
|
|
@@ -55,13 +65,13 @@ Before executing, decompose this phase execution into atomic reasoning units:
|
|
|
55
65
|
Use the `subagent` tool with the `spec-reviewer` agent. ONLY checks "does the diff cover exactly what the spec asked for". Prompt includes the task XML and the diff range.
|
|
56
66
|
- `DONE` → go to Stage 3.
|
|
57
67
|
- `DONE_WITH_CONCERNS` → note and proceed.
|
|
58
|
-
- `BLOCKED` → re-dispatch implementer with the "Required Fixes" list; repeat Stage 1+2 until `DONE`. Never proceed to Stage 3 with a non-compliant diff.
|
|
68
|
+
- `BLOCKED` → re-dispatch implementer with the "Required Fixes" list; repeat Stage 1+2 until `DONE`. Never proceed to Stage 3 with a non-compliant diff. **Hard cap: 3 implementer re-dispatches per task (across Stage 2 and Stage 3 combined)** — at the cap, record the task as failed and STOP; report the disagreement to the user.
|
|
59
69
|
|
|
60
70
|
### Stage 3 — Reviewer (code quality)
|
|
61
71
|
Use the `subagent` tool with the `reviewer` agent for code-quality review. Spec compliance is already ✅.
|
|
62
72
|
- `DONE` → task complete; move to next task.
|
|
63
73
|
- `DONE_WITH_CONCERNS` → log `Should fix` items; if any are correctness-critical, re-dispatch implementer.
|
|
64
|
-
- `BLOCKED` → `Must fix` issues exist; re-dispatch implementer with the issue list. Repeat until `DONE
|
|
74
|
+
- `BLOCKED` → `Must fix` issues exist; re-dispatch implementer with the issue list. Repeat until `DONE` — subject to the same **hard cap of 3 re-dispatches per task**; at the cap, record the task as failed and STOP.
|
|
65
75
|
|
|
66
76
|
5. After all plans complete, run `draht-tools verify-phase $1` yourself (not the subagent)
|
|
67
77
|
6. Run `draht-tools update-state` yourself
|
|
@@ -85,6 +95,9 @@ For each <task> in the plan, follow this TDD cycle:
|
|
|
85
95
|
|
|
86
96
|
Domain rules: Use ubiquitous language from .planning/DOMAIN.md (read it). Do not import across bounded context boundaries.
|
|
87
97
|
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
|
+
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
|
+
|
|
100
|
+
Evidence rule: quote the decisive output of every test run and <verify> step in your report (pass/fail counts, exit codes, error text). Unquoted claims will be re-run by the orchestrator. If a plan instruction contradicts what you find in the code, stop and report NEEDS_CONTEXT — do not silently obey either side.
|
|
88
101
|
|
|
89
102
|
End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED` per the agent contract.
|
|
90
103
|
|
package/prompts/commands/fix.md
CHANGED
|
@@ -19,6 +19,14 @@ Issue: $ARGUMENTS
|
|
|
19
19
|
|
|
20
20
|
Symptom fixes are failure. If you find yourself proposing a "quick fix for now, investigate later", STOP and return to Phase 1.
|
|
21
21
|
|
|
22
|
+
## The Report Is a Symptom, Not a Diagnosis
|
|
23
|
+
|
|
24
|
+
**Procedure:** Restate the failure as observable behavior — "X happens when Y; expected Z" — before touching anything. If the user names a cause ("the cache is stale"), treat it as Hypothesis #0: it enters Phase 3 like any other hypothesis and does not skip Phase 1.
|
|
25
|
+
|
|
26
|
+
**Example:** "fix the stale cache bug" — Phase 1 traces the data flow and finds the cache is fine; the query behind it silently drops a filter. The fix lands in the query.
|
|
27
|
+
|
|
28
|
+
**Prevents:** shipping a correct fix to the wrong component.
|
|
29
|
+
|
|
22
30
|
## Red Flags — STOP
|
|
23
31
|
|
|
24
32
|
Stop immediately if you catch yourself:
|
|
@@ -29,7 +37,7 @@ Stop immediately if you catch yourself:
|
|
|
29
37
|
- Making "one more fix attempt" after already trying 2+
|
|
30
38
|
- Watching each fix reveal new problems elsewhere
|
|
31
39
|
|
|
32
|
-
After **3 failed fix attempts**, STOP. This is an architectural problem, not a hypothesis problem. Report back to the user — do not try a 4th fix.
|
|
40
|
+
After **3 failed fix attempts**, STOP. This is a **hard cap**, not advice — an architectural problem, not a hypothesis problem. Report back to the user — do not try a 4th fix. Before reporting, append one dated line to `.planning/STATE.md` under `## Lessons`: what was tried and why it failed, so the next session doesn't repeat the same three attempts.
|
|
33
41
|
|
|
34
42
|
## Atomic Reasoning
|
|
35
43
|
|
|
@@ -54,6 +62,7 @@ Walk through these steps and report on each:
|
|
|
54
62
|
3. Check recent changes — `git log --oneline -20` and `git diff HEAD~5` against affected files.
|
|
55
63
|
4. Trace data flow upward until you find the source. Fix at source, not at symptom.
|
|
56
64
|
5. State the root cause as one sentence: "X happens because Y at <file:line>."
|
|
65
|
+
6. Label every statement in your report: observed (you ran it and saw it), derived (follows necessarily from evidence), or assumed (unchecked — say what would check it). A root cause resting on an assumption is a hypothesis, not a diagnosis.
|
|
57
66
|
|
|
58
67
|
End your response with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
|
|
59
68
|
Do NOT run draht, draht-tools, or pi commands.
|
|
@@ -105,6 +114,8 @@ If Phase 2 reveals a different root cause, go back to Phase 1.
|
|
|
105
114
|
| "I'll write the test after I confirm the fix" | Untested fixes don't stick. |
|
|
106
115
|
| "I'll just try things and see what works" | Can't isolate what worked. Creates new bugs. |
|
|
107
116
|
| "I already manually tested it" | A reproducing test is the only durable proof. |
|
|
117
|
+
| "The user already told me the cause" | The reporter saw the symptom. Their diagnosis is Hypothesis #0, not a finding. |
|
|
118
|
+
| "The fix passed, so my diagnosis was right" | Fixes can mask. Verify the causal chain, not just the symptom's absence. |
|
|
108
119
|
|
|
109
120
|
## Rules
|
|
110
121
|
- Always reproduce before fixing
|
|
@@ -112,3 +123,4 @@ If Phase 2 reveals a different root cause, go back to Phase 1.
|
|
|
112
123
|
- Fix at source, not symptom
|
|
113
124
|
- 3 failed attempts ⇒ architecture problem, stop and discuss
|
|
114
125
|
- If the root cause spans multiple files, explain the chain in the commit message
|
|
126
|
+
- Final report order: verdict first (fixed / not fixed, root cause in one sentence), then evidence (reproducing test red→green, suite results), then risk (what the fix could regress, what stays assumed)
|
|
@@ -78,6 +78,7 @@ Each step runs in its own session (`/new` between steps). Do NOT suggest `/next-
|
|
|
78
78
|
- Follow threads based on answers
|
|
79
79
|
- Use examples ("Like Stripe Checkout, or custom?")
|
|
80
80
|
- Confirm, don't assume
|
|
81
|
+
- When the focus names a solution ("migrate to X"), ask what problem it solves — the existing code may admit a smaller answer
|
|
81
82
|
- 3-7 follow-up rounds typical
|
|
82
83
|
- Respect what already exists — do not propose rewriting working code
|
|
83
84
|
- Stop when you have: current state, goals, MVP scope, constraints, success criteria
|