@dreb/coding-agent 1.16.0
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 +3316 -0
- package/README.md +657 -0
- package/agents/code-reviewer.md +55 -0
- package/agents/completeness-checker.md +71 -0
- package/agents/error-auditor.md +65 -0
- package/agents/explore.md +13 -0
- package/agents/feature-dev.md +23 -0
- package/agents/independent-assessor.md +61 -0
- package/agents/sandbox.md +14 -0
- package/agents/simplifier.md +69 -0
- package/agents/test-reviewer.md +63 -0
- package/dist/bun/cli.d.ts +3 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +7 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -0
- package/dist/bun/register-bedrock.js +4 -0
- package/dist/bun/register-bedrock.js.map +1 -0
- package/dist/cli/args.d.ts +50 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +310 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/config-selector.d.ts +14 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +83 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +92 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/session-picker.d.ts +9 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +35 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +14 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +76 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +234 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session.d.ts +658 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2898 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-storage.d.ts +130 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +421 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +46 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +113 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/buddy/buddy-controller.d.ts +139 -0
- package/dist/core/buddy/buddy-controller.d.ts.map +1 -0
- package/dist/core/buddy/buddy-controller.js +428 -0
- package/dist/core/buddy/buddy-controller.js.map +1 -0
- package/dist/core/buddy/buddy-manager.d.ts +68 -0
- package/dist/core/buddy/buddy-manager.d.ts.map +1 -0
- package/dist/core/buddy/buddy-manager.js +399 -0
- package/dist/core/buddy/buddy-manager.js.map +1 -0
- package/dist/core/buddy/buddy-prng.d.ts +28 -0
- package/dist/core/buddy/buddy-prng.d.ts.map +1 -0
- package/dist/core/buddy/buddy-prng.js +65 -0
- package/dist/core/buddy/buddy-prng.js.map +1 -0
- package/dist/core/buddy/buddy-species.d.ts +37 -0
- package/dist/core/buddy/buddy-species.d.ts.map +1 -0
- package/dist/core/buddy/buddy-species.js +287 -0
- package/dist/core/buddy/buddy-species.js.map +1 -0
- package/dist/core/buddy/buddy-types.d.ts +58 -0
- package/dist/core/buddy/buddy-types.d.ts.map +1 -0
- package/dist/core/buddy/buddy-types.js +46 -0
- package/dist/core/buddy/buddy-types.js.map +1 -0
- package/dist/core/buddy/index.d.ts +7 -0
- package/dist/core/buddy/index.d.ts.map +1 -0
- package/dist/core/buddy/index.js +6 -0
- package/dist/core/buddy/index.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +86 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +243 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +121 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +612 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +38 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +153 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/defaults.d.ts +3 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +2 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +224 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1001 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1690 -0
- package/dist/core/export-html/tool-renderer.d.ts +38 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +95 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +6 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +25 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +436 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +147 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +696 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1072 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +35 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +44 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +252 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/forbidden-commands.d.ts +31 -0
- package/dist/core/forbidden-commands.d.ts.map +1 -0
- package/dist/core/forbidden-commands.js +184 -0
- package/dist/core/forbidden-commands.js.map +1 -0
- package/dist/core/git-root.d.ts +6 -0
- package/dist/core/git-root.d.ts.map +1 -0
- package/dist/core/git-root.js +32 -0
- package/dist/core/git-root.js.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +280 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +245 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/memory-prompt.d.ts +10 -0
- package/dist/core/memory-prompt.d.ts.map +1 -0
- package/dist/core/memory-prompt.js +95 -0
- package/dist/core/memory-prompt.js.map +1 -0
- package/dist/core/messages.d.ts +77 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +123 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-registry.d.ts +114 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +563 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +116 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +465 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/output-guard.d.ts +6 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +59 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +172 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1767 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +51 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +251 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +17 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +94 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +205 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +866 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +92 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +258 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/search/chunker.d.ts +21 -0
- package/dist/core/search/chunker.d.ts.map +1 -0
- package/dist/core/search/chunker.js +51 -0
- package/dist/core/search/chunker.js.map +1 -0
- package/dist/core/search/db.d.ts +89 -0
- package/dist/core/search/db.d.ts.map +1 -0
- package/dist/core/search/db.js +406 -0
- package/dist/core/search/db.js.map +1 -0
- package/dist/core/search/embedder.d.ts +51 -0
- package/dist/core/search/embedder.d.ts.map +1 -0
- package/dist/core/search/embedder.js +143 -0
- package/dist/core/search/embedder.js.map +1 -0
- package/dist/core/search/index-manager.d.ts +55 -0
- package/dist/core/search/index-manager.d.ts.map +1 -0
- package/dist/core/search/index-manager.js +311 -0
- package/dist/core/search/index-manager.js.map +1 -0
- package/dist/core/search/metrics/bm25.d.ts +10 -0
- package/dist/core/search/metrics/bm25.d.ts.map +1 -0
- package/dist/core/search/metrics/bm25.js +32 -0
- package/dist/core/search/metrics/bm25.js.map +1 -0
- package/dist/core/search/metrics/git-recency.d.ts +14 -0
- package/dist/core/search/metrics/git-recency.d.ts.map +1 -0
- package/dist/core/search/metrics/git-recency.js +123 -0
- package/dist/core/search/metrics/git-recency.js.map +1 -0
- package/dist/core/search/metrics/import-graph.d.ts +15 -0
- package/dist/core/search/metrics/import-graph.d.ts.map +1 -0
- package/dist/core/search/metrics/import-graph.js +115 -0
- package/dist/core/search/metrics/import-graph.js.map +1 -0
- package/dist/core/search/metrics/path-match.d.ts +13 -0
- package/dist/core/search/metrics/path-match.d.ts.map +1 -0
- package/dist/core/search/metrics/path-match.js +54 -0
- package/dist/core/search/metrics/path-match.js.map +1 -0
- package/dist/core/search/metrics/symbol-match.d.ts +12 -0
- package/dist/core/search/metrics/symbol-match.d.ts.map +1 -0
- package/dist/core/search/metrics/symbol-match.js +62 -0
- package/dist/core/search/metrics/symbol-match.js.map +1 -0
- package/dist/core/search/metrics/tokenize.d.ts +12 -0
- package/dist/core/search/metrics/tokenize.d.ts.map +1 -0
- package/dist/core/search/metrics/tokenize.js +29 -0
- package/dist/core/search/metrics/tokenize.js.map +1 -0
- package/dist/core/search/poem.d.ts +38 -0
- package/dist/core/search/poem.d.ts.map +1 -0
- package/dist/core/search/poem.js +214 -0
- package/dist/core/search/poem.js.map +1 -0
- package/dist/core/search/query-classifier.d.ts +17 -0
- package/dist/core/search/query-classifier.d.ts.map +1 -0
- package/dist/core/search/query-classifier.js +54 -0
- package/dist/core/search/query-classifier.js.map +1 -0
- package/dist/core/search/scanner.d.ts +30 -0
- package/dist/core/search/scanner.d.ts.map +1 -0
- package/dist/core/search/scanner.js +335 -0
- package/dist/core/search/scanner.js.map +1 -0
- package/dist/core/search/search.d.ts +42 -0
- package/dist/core/search/search.d.ts.map +1 -0
- package/dist/core/search/search.js +337 -0
- package/dist/core/search/search.js.map +1 -0
- package/dist/core/search/text-chunker.d.ts +15 -0
- package/dist/core/search/text-chunker.d.ts.map +1 -0
- package/dist/core/search/text-chunker.js +580 -0
- package/dist/core/search/text-chunker.js.map +1 -0
- package/dist/core/search/tree-sitter-chunker.d.ts +25 -0
- package/dist/core/search/tree-sitter-chunker.d.ts.map +1 -0
- package/dist/core/search/tree-sitter-chunker.js +357 -0
- package/dist/core/search/tree-sitter-chunker.js.map +1 -0
- package/dist/core/search/types.d.ts +96 -0
- package/dist/core/search/types.d.ts.map +1 -0
- package/dist/core/search/types.js +6 -0
- package/dist/core/search/types.js.map +1 -0
- package/dist/core/search/vector-store.d.ts +43 -0
- package/dist/core/search/vector-store.d.ts.map +1 -0
- package/dist/core/search/vector-store.js +73 -0
- package/dist/core/search/vector-store.js.map +1 -0
- package/dist/core/session-manager.d.ts +329 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1097 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +239 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +705 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +67 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +428 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +23 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +18 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +19 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +33 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +184 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/timings.d.ts +8 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +31 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +73 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +342 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +63 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +244 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +51 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +218 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +37 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +46 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +241 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +56 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +293 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +176 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +137 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +46 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +172 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +8 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +81 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +46 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +225 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +21 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +49 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/search.d.ts +29 -0
- package/dist/core/tools/search.d.ts.map +1 -0
- package/dist/core/tools/search.js +187 -0
- package/dist/core/tools/search.js.map +1 -0
- package/dist/core/tools/skill.d.ts +26 -0
- package/dist/core/tools/skill.d.ts.map +1 -0
- package/dist/core/tools/skill.js +127 -0
- package/dist/core/tools/skill.js.map +1 -0
- package/dist/core/tools/subagent.d.ts +147 -0
- package/dist/core/tools/subagent.d.ts.map +1 -0
- package/dist/core/tools/subagent.js +950 -0
- package/dist/core/tools/subagent.js.map +1 -0
- package/dist/core/tools/tasks.d.ts +32 -0
- package/dist/core/tools/tasks.d.ts.map +1 -0
- package/dist/core/tools/tasks.js +110 -0
- package/dist/core/tools/tasks.js.map +1 -0
- package/dist/core/tools/tmp-read.d.ts +11 -0
- package/dist/core/tools/tmp-read.d.ts.map +1 -0
- package/dist/core/tools/tmp-read.js +63 -0
- package/dist/core/tools/tmp-read.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +30 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +70 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +205 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/web.d.ts +42 -0
- package/dist/core/tools/web.d.ts.map +1 -0
- package/dist/core/tools/web.js +518 -0
- package/dist/core/tools/web.js.map +1 -0
- package/dist/core/tools/write.d.ts +35 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +216 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +789 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +261 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +9 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +333 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +16 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +96 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +175 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/buddy-component.d.ts +58 -0
- package/dist/modes/interactive/components/buddy-component.d.ts.map +1 -0
- package/dist/modes/interactive/components/buddy-component.js +351 -0
- package/dist/modes/interactive/components/buddy-component.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +479 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +70 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +79 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/modes/interactive/components/daxnuts.js +140 -0
- package/dist/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +111 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +78 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +26 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +198 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +33 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +34 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +22 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +42 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +145 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +275 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +97 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +275 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +848 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +58 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +301 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/tasks-panel.d.ts +20 -0
- package/dist/modes/interactive/components/tasks-panel.d.ts.map +1 -0
- package/dist/modes/interactive/components/tasks-panel.js +66 -0
- package/dist/modes/interactive/components/tasks-panel.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +51 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +59 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +279 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +87 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1051 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +113 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +9 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +28 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +338 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4167 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +85 -0
- package/dist/modes/interactive/theme/light.json +84 -0
- package/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +975 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +107 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/index.d.ts +10 -0
- package/dist/modes/rpc/index.d.ts.map +1 -0
- package/dist/modes/rpc/index.js +8 -0
- package/dist/modes/rpc/index.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +237 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +448 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +592 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +471 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/utils/changelog.d.ts +21 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +87 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +11 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +78 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +245 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +8 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +14 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +78 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +158 -0
- package/dist/utils/exif-orientation.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +26 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +163 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/image-convert.d.ts +9 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +39 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize.d.ts +36 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +137 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/mime.d.ts +2 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +26 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/shell.d.ts +26 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +186 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +3 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +252 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/xml.d.ts +2 -0
- package/dist/utils/xml.d.ts.map +1 -0
- package/dist/utils/xml.js +9 -0
- package/dist/utils/xml.js.map +1 -0
- package/docs/buddy.md +111 -0
- package/docs/compaction.md +392 -0
- package/docs/custom-provider.md +599 -0
- package/docs/development.md +108 -0
- package/docs/extensions.md +2130 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/json.md +112 -0
- package/docs/keybindings.md +174 -0
- package/docs/mach6.md +150 -0
- package/docs/models.md +335 -0
- package/docs/packages.md +197 -0
- package/docs/prompt-templates.md +67 -0
- package/docs/providers.md +194 -0
- package/docs/rpc.md +1426 -0
- package/docs/sdk.md +969 -0
- package/docs/session.md +412 -0
- package/docs/settings.md +247 -0
- package/docs/shell-aliases.md +55 -0
- package/docs/skills.md +296 -0
- package/docs/terminal-setup.md +104 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +295 -0
- package/docs/tmux.md +61 -0
- package/docs/tree.md +228 -0
- package/docs/tui.md +887 -0
- package/docs/windows.md +61 -0
- package/examples/README.md +25 -0
- package/examples/extensions/README.md +205 -0
- package/examples/extensions/antigravity-image-gen.ts +418 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/built-in-tool-renderer.ts +246 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +114 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +349 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/custom-provider-qwen-cli/index.ts +345 -0
- package/examples/extensions/custom-provider-qwen-cli/package.json +16 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +73 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +51 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/handoff.ts +150 -0
- package/examples/extensions/hello.ts +25 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +426 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +55 -0
- package/examples/extensions/overlay-qa-tests.ts +1348 -0
- package/examples/extensions/overlay-test.ts +150 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +65 -0
- package/examples/extensions/plan-mode/index.ts +340 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +403 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +14 -0
- package/examples/extensions/qna.ts +119 -0
- package/examples/extensions/question.ts +264 -0
- package/examples/extensions/questionnaire.ts +427 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +124 -0
- package/examples/extensions/sandbox/index.ts +317 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +40 -0
- package/examples/extensions/subagent/README.md +172 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +126 -0
- package/examples/extensions/subagent/index.ts +986 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/summarize.ts +195 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +299 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +40 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +17 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/rpc-extension-ui.ts +632 -0
- package/examples/sdk/01-minimal.ts +22 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +55 -0
- package/examples/sdk/04-skills.ts +53 -0
- package/examples/sdk/05-tools.ts +56 -0
- package/examples/sdk/06-extensions.ts +88 -0
- package/examples/sdk/07-context-files.ts +40 -0
- package/examples/sdk/08-prompt-templates.ts +48 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +48 -0
- package/examples/sdk/10-settings.ts +51 -0
- package/examples/sdk/11-sessions.ts +48 -0
- package/examples/sdk/12-full-control.ts +87 -0
- package/examples/sdk/README.md +144 -0
- package/package.json +123 -0
- package/skills/mach6-implement/SKILL.md +170 -0
- package/skills/mach6-issue/SKILL.md +129 -0
- package/skills/mach6-plan/SKILL.md +123 -0
- package/skills/mach6-publish/SKILL.md +188 -0
- package/skills/mach6-push/SKILL.md +101 -0
- package/skills/mach6-review/SKILL.md +192 -0
- package/skills/telegram-send/SKILL.md +46 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# SDK Examples
|
|
2
|
+
|
|
3
|
+
Programmatic usage of dreb coding-agent via `createAgentSession()`.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `01-minimal.ts` | Simplest usage with all defaults |
|
|
10
|
+
| `02-custom-model.ts` | Select model and thinking level |
|
|
11
|
+
| `03-custom-prompt.ts` | Replace or modify system prompt |
|
|
12
|
+
| `04-skills.ts` | Discover, filter, or replace skills |
|
|
13
|
+
| `05-tools.ts` | Built-in tools, custom tools |
|
|
14
|
+
| `06-extensions.ts` | Logging, blocking, result modification |
|
|
15
|
+
| `07-context-files.ts` | AGENTS.md context files |
|
|
16
|
+
| `08-slash-commands.ts` | File-based slash commands |
|
|
17
|
+
| `09-api-keys-and-oauth.ts` | API key resolution, OAuth config |
|
|
18
|
+
| `10-settings.ts` | Override compaction, retry, terminal settings |
|
|
19
|
+
| `11-sessions.ts` | In-memory, persistent, continue, list sessions |
|
|
20
|
+
| `12-full-control.ts` | Replace everything, no discovery |
|
|
21
|
+
|
|
22
|
+
## Running
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd packages/coding-agent
|
|
26
|
+
npx tsx examples/sdk/01-minimal.ts
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Reference
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { getModel } from "@dreb/ai";
|
|
33
|
+
import {
|
|
34
|
+
AuthStorage,
|
|
35
|
+
createAgentSession,
|
|
36
|
+
DefaultResourceLoader,
|
|
37
|
+
ModelRegistry,
|
|
38
|
+
SessionManager,
|
|
39
|
+
SettingsManager,
|
|
40
|
+
codingTools,
|
|
41
|
+
readOnlyTools,
|
|
42
|
+
readTool, bashTool, editTool, writeTool,
|
|
43
|
+
} from "@dreb/coding-agent";
|
|
44
|
+
|
|
45
|
+
// Auth and models setup
|
|
46
|
+
const authStorage = AuthStorage.create();
|
|
47
|
+
const modelRegistry = new ModelRegistry(authStorage);
|
|
48
|
+
|
|
49
|
+
// Minimal
|
|
50
|
+
const { session } = await createAgentSession({ authStorage, modelRegistry });
|
|
51
|
+
|
|
52
|
+
// Custom model
|
|
53
|
+
const model = getModel("anthropic", "claude-opus-4-5");
|
|
54
|
+
const { session } = await createAgentSession({ model, thinkingLevel: "high", authStorage, modelRegistry });
|
|
55
|
+
|
|
56
|
+
// Modify prompt
|
|
57
|
+
const loader = new DefaultResourceLoader({
|
|
58
|
+
systemPromptOverride: (base) => `${base}\n\nBe concise.`,
|
|
59
|
+
});
|
|
60
|
+
await loader.reload();
|
|
61
|
+
const { session } = await createAgentSession({ resourceLoader: loader, authStorage, modelRegistry });
|
|
62
|
+
|
|
63
|
+
// Read-only
|
|
64
|
+
const { session } = await createAgentSession({ tools: readOnlyTools, authStorage, modelRegistry });
|
|
65
|
+
|
|
66
|
+
// In-memory
|
|
67
|
+
const { session } = await createAgentSession({
|
|
68
|
+
sessionManager: SessionManager.inMemory(),
|
|
69
|
+
authStorage,
|
|
70
|
+
modelRegistry,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// Full control
|
|
74
|
+
const customAuth = AuthStorage.create("/my/app/auth.json");
|
|
75
|
+
customAuth.setRuntimeApiKey("anthropic", process.env.MY_KEY!);
|
|
76
|
+
const customRegistry = new ModelRegistry(customAuth);
|
|
77
|
+
|
|
78
|
+
const resourceLoader = new DefaultResourceLoader({
|
|
79
|
+
systemPromptOverride: () => "You are helpful.",
|
|
80
|
+
extensionFactories: [myExtension],
|
|
81
|
+
skillsOverride: () => ({ skills: [], diagnostics: [] }),
|
|
82
|
+
agentsFilesOverride: () => ({ agentsFiles: [] }),
|
|
83
|
+
promptsOverride: () => ({ prompts: [], diagnostics: [] }),
|
|
84
|
+
});
|
|
85
|
+
await resourceLoader.reload();
|
|
86
|
+
|
|
87
|
+
const { session } = await createAgentSession({
|
|
88
|
+
model,
|
|
89
|
+
authStorage: customAuth,
|
|
90
|
+
modelRegistry: customRegistry,
|
|
91
|
+
resourceLoader,
|
|
92
|
+
tools: [readTool, bashTool],
|
|
93
|
+
customTools: [{ tool: myTool }],
|
|
94
|
+
sessionManager: SessionManager.inMemory(),
|
|
95
|
+
settingsManager: SettingsManager.inMemory(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Run prompts
|
|
99
|
+
session.subscribe((event) => {
|
|
100
|
+
if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
|
|
101
|
+
process.stdout.write(event.assistantMessageEvent.delta);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
await session.prompt("Hello");
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Options
|
|
108
|
+
|
|
109
|
+
| Option | Default | Description |
|
|
110
|
+
|--------|---------|-------------|
|
|
111
|
+
| `authStorage` | `AuthStorage.create()` | Credential storage |
|
|
112
|
+
| `modelRegistry` | `new ModelRegistry(authStorage)` | Model registry |
|
|
113
|
+
| `cwd` | `process.cwd()` | Working directory |
|
|
114
|
+
| `agentDir` | `~/.dreb/agent` | Config directory |
|
|
115
|
+
| `model` | From settings/first available | Model to use |
|
|
116
|
+
| `thinkingLevel` | From settings/"off" | off, low, medium, high |
|
|
117
|
+
| `tools` | `codingTools` | Built-in tools |
|
|
118
|
+
| `customTools` | `[]` | Additional tool definitions |
|
|
119
|
+
| `resourceLoader` | DefaultResourceLoader | Resource loader for extensions, skills, prompts, themes |
|
|
120
|
+
| `sessionManager` | `SessionManager.create(cwd)` | Persistence |
|
|
121
|
+
| `settingsManager` | `SettingsManager.create(cwd, agentDir)` | Settings overrides |
|
|
122
|
+
|
|
123
|
+
## Events
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
session.subscribe((event) => {
|
|
127
|
+
switch (event.type) {
|
|
128
|
+
case "message_update":
|
|
129
|
+
if (event.assistantMessageEvent.type === "text_delta") {
|
|
130
|
+
process.stdout.write(event.assistantMessageEvent.delta);
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case "tool_execution_start":
|
|
134
|
+
console.log(`Tool: ${event.toolName}`);
|
|
135
|
+
break;
|
|
136
|
+
case "tool_execution_end":
|
|
137
|
+
console.log(`Result: ${event.result}`);
|
|
138
|
+
break;
|
|
139
|
+
case "agent_end":
|
|
140
|
+
console.log("Done");
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dreb/coding-agent",
|
|
3
|
+
"version": "1.16.0",
|
|
4
|
+
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"drebConfig": {
|
|
7
|
+
"name": "dreb",
|
|
8
|
+
"configDir": ".dreb"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"dreb": "dist/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./hooks": {
|
|
21
|
+
"types": "./dist/core/hooks/index.d.ts",
|
|
22
|
+
"import": "./dist/core/hooks/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./rpc": {
|
|
25
|
+
"types": "./dist/modes/rpc/index.d.ts",
|
|
26
|
+
"import": "./dist/modes/rpc/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./buddy": {
|
|
29
|
+
"types": "./dist/core/buddy/index.d.ts",
|
|
30
|
+
"import": "./dist/core/buddy/index.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"agents",
|
|
39
|
+
"skills",
|
|
40
|
+
"docs",
|
|
41
|
+
"examples",
|
|
42
|
+
"CHANGELOG.md"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"clean": "shx rm -rf dist",
|
|
46
|
+
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
47
|
+
"build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js && npm run copy-assets",
|
|
48
|
+
"build:binary": "npm --prefix ../tui run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm run build && bun build --compile ./dist/bun/cli.js --outfile dist/dreb && npm run copy-binary-assets",
|
|
49
|
+
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && 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/",
|
|
50
|
+
"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/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 ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
51
|
+
"test": "vitest --run",
|
|
52
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@dreb/agent-core": "^1.0.0",
|
|
56
|
+
"@dreb/ai": "^1.0.0",
|
|
57
|
+
"@dreb/tui": "^1.0.0",
|
|
58
|
+
"@huggingface/transformers": "^4.0.1",
|
|
59
|
+
"@mariozechner/jiti": "^2.6.2",
|
|
60
|
+
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
61
|
+
"ajv": "^8.17.1",
|
|
62
|
+
"chalk": "^5.5.0",
|
|
63
|
+
"cli-highlight": "^2.1.11",
|
|
64
|
+
"diff": "^8.0.2",
|
|
65
|
+
"extract-zip": "^2.0.1",
|
|
66
|
+
"file-type": "^21.1.1",
|
|
67
|
+
"glob": "^13.0.1",
|
|
68
|
+
"hosted-git-info": "^9.0.2",
|
|
69
|
+
"ignore": "^7.0.5",
|
|
70
|
+
"marked": "^15.0.12",
|
|
71
|
+
"minimatch": "^10.2.3",
|
|
72
|
+
"proper-lockfile": "^4.1.2",
|
|
73
|
+
"strip-ansi": "^7.1.0",
|
|
74
|
+
"tree-sitter-c": "^0.24.1",
|
|
75
|
+
"tree-sitter-cpp": "^0.23.4",
|
|
76
|
+
"tree-sitter-go": "^0.25.0",
|
|
77
|
+
"tree-sitter-java": "^0.23.5",
|
|
78
|
+
"tree-sitter-javascript": "^0.25.0",
|
|
79
|
+
"tree-sitter-python": "^0.25.0",
|
|
80
|
+
"tree-sitter-rust": "^0.24.0",
|
|
81
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
82
|
+
"undici": "^7.19.1",
|
|
83
|
+
"web-tree-sitter": "^0.26.8",
|
|
84
|
+
"yaml": "^2.8.2"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"rimraf": "6.1.2",
|
|
88
|
+
"gaxios": {
|
|
89
|
+
"rimraf": "6.1.2"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"optionalDependencies": {
|
|
93
|
+
"@mariozechner/clipboard": "^0.3.2"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@types/diff": "^7.0.2",
|
|
97
|
+
"@types/hosted-git-info": "^3.0.5",
|
|
98
|
+
"@types/ms": "^2.1.0",
|
|
99
|
+
"@types/node": "^24.3.0",
|
|
100
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
101
|
+
"shx": "^0.4.0",
|
|
102
|
+
"typescript": "^5.7.3",
|
|
103
|
+
"vitest": "^3.2.4"
|
|
104
|
+
},
|
|
105
|
+
"keywords": [
|
|
106
|
+
"coding-agent",
|
|
107
|
+
"ai",
|
|
108
|
+
"llm",
|
|
109
|
+
"cli",
|
|
110
|
+
"tui",
|
|
111
|
+
"agent"
|
|
112
|
+
],
|
|
113
|
+
"author": "Drew Brereton",
|
|
114
|
+
"license": "MIT",
|
|
115
|
+
"repository": {
|
|
116
|
+
"type": "git",
|
|
117
|
+
"url": "https://github.com/aebrer/dreb.git",
|
|
118
|
+
"directory": "packages/coding-agent"
|
|
119
|
+
},
|
|
120
|
+
"engines": {
|
|
121
|
+
"node": ">=20.6.0"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mach6-implement
|
|
3
|
+
description: "Implement a plan from a PR, or fix review findings / CI failures. Usage: mach6-implement 42 [finding-numbers] or mach6-implement 42 ci"
|
|
4
|
+
argument-hint: "<pr-number> [finding-numbers | ci]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# mach6-implement — Implement Plans, Fix Findings, or Fix CI
|
|
8
|
+
|
|
9
|
+
**User input:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
This skill has two modes:
|
|
12
|
+
- **Implement mode** (just a PR number): reads the plan comment and implements it
|
|
13
|
+
- **Fix mode** (with finding numbers or `ci`): fixes specific review findings or CI failures
|
|
14
|
+
|
|
15
|
+
## Global Rules
|
|
16
|
+
|
|
17
|
+
1. **GitHub as shared memory** — Plans, reviews, and assessments are on the PR as comments with HTML markers.
|
|
18
|
+
2. **No `#N` in comment bodies** — Use "finding 3", "item 3" etc. instead.
|
|
19
|
+
3. **Safe git** — Never use `git add -A` or `git add .`. Stage files by name. Never stage secrets.
|
|
20
|
+
4. **Task tracking** — Use the `tasks_update` tool to show progress.
|
|
21
|
+
|
|
22
|
+
## Step 1: Parse input
|
|
23
|
+
|
|
24
|
+
Extract:
|
|
25
|
+
- **PR number** (required)
|
|
26
|
+
- **Finding numbers** to fix (optional — e.g., `1,2,3`)
|
|
27
|
+
- **`ci`** flag (optional — fix CI failures instead of review findings)
|
|
28
|
+
|
|
29
|
+
If only a PR number is given → **implement mode**.
|
|
30
|
+
If finding numbers or `ci` → **fix mode**.
|
|
31
|
+
|
|
32
|
+
## Step 2: Checkout
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
gh pr checkout <pr-number>
|
|
36
|
+
git pull
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Implement Mode (PR number only)
|
|
42
|
+
|
|
43
|
+
### Step 3i: Read the plan and full PR context
|
|
44
|
+
|
|
45
|
+
Read ALL PR comments and the PR body to get complete context:
|
|
46
|
+
```bash
|
|
47
|
+
gh pr view <pr-number> --json title,body,comments
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Find the plan comment (contains `<!-- mach6-plan -->` marker) from the comments. If no plan comment exists, tell the user and suggest running `/skill:mach6-plan` first.
|
|
51
|
+
|
|
52
|
+
Also read any progress updates, prior review findings, assessments, and discussion — all of this context informs implementation.
|
|
53
|
+
|
|
54
|
+
### Step 4i: Set up task tracking
|
|
55
|
+
|
|
56
|
+
Create tasks based on the plan's deliverables/features. Example:
|
|
57
|
+
```
|
|
58
|
+
tasks_update([
|
|
59
|
+
{ id: "read", title: "Read plan and codebase", status: "in_progress" },
|
|
60
|
+
{ id: "feature-1", title: "Implement feature 1", status: "pending" },
|
|
61
|
+
{ id: "feature-2", title: "Implement feature 2", status: "pending" },
|
|
62
|
+
{ id: "test", title: "Add/update tests", status: "pending" },
|
|
63
|
+
{ id: "verify", title: "Build and verify", status: "pending" }
|
|
64
|
+
])
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 5i: Read the codebase
|
|
68
|
+
|
|
69
|
+
Read all files mentioned in the plan. Understand the existing code before making changes.
|
|
70
|
+
|
|
71
|
+
### Step 6i: Implement
|
|
72
|
+
|
|
73
|
+
Use the `feature-dev` subagent to implement each deliverable. `feature-dev` is a **pre-existing agent definition** shipped with dreb — it has full tool access (read, write, edit, grep, find, ls, bash, search) and uses a strong-tier model with a provider fallback list. Do not override its model unless there's a specific reason.
|
|
74
|
+
|
|
75
|
+
**For each deliverable in the plan**, launch a `feature-dev` subagent via the `subagent` tool. Provide each agent with:
|
|
76
|
+
- The specific deliverable to implement (files to modify, what to change, expected behavior)
|
|
77
|
+
- The full plan context and any relevant PR discussion
|
|
78
|
+
- The list of files to read for understanding existing patterns
|
|
79
|
+
- Instructions to run tests and linting after making changes
|
|
80
|
+
- **If the plan includes tests for this deliverable, tests MUST be written as part of the implementation — not deferred**
|
|
81
|
+
|
|
82
|
+
**Test coverage is part of the deliverable, not an afterthought.** If the plan specifies tests for a deliverable, the feature-dev agent must implement them. If the target package lacks test infrastructure, add it.
|
|
83
|
+
|
|
84
|
+
**Parallelism:** If deliverables are independent (don't modify the same files), run their `feature-dev` agents in parallel. If they have dependencies, use chain mode or run them sequentially — later features may depend on earlier ones.
|
|
85
|
+
|
|
86
|
+
**Small plans (1-2 simple deliverables):** You may implement directly instead of delegating, if the changes are straightforward enough that subagent overhead isn't justified.
|
|
87
|
+
|
|
88
|
+
Update task tracking as each deliverable completes.
|
|
89
|
+
|
|
90
|
+
### Step 7i: Verify
|
|
91
|
+
|
|
92
|
+
After all `feature-dev` agents complete:
|
|
93
|
+
- Run the project's test suite
|
|
94
|
+
- Run any linting/formatting tools
|
|
95
|
+
- Build the project if applicable
|
|
96
|
+
- Verify each deliverable from the plan is addressed
|
|
97
|
+
- If any agent reported issues or partial completion, address the gaps
|
|
98
|
+
|
|
99
|
+
Suggest next step: `/skill:mach6-push` then `/skill:mach6-review <pr-number>` for review.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Fix Mode (finding numbers or `ci`)
|
|
104
|
+
|
|
105
|
+
### Step 3f: Set up task tracking
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
tasks_update([
|
|
109
|
+
{ id: "gather", title: "Gather findings to fix", status: "in_progress" },
|
|
110
|
+
{ id: "fix", title: "Implement fixes", status: "pending" },
|
|
111
|
+
{ id: "verify", title: "Verify fixes", status: "pending" }
|
|
112
|
+
])
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Step 4f: Gather context
|
|
116
|
+
|
|
117
|
+
#### If `ci` was specified:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
gh pr checks <pr-number>
|
|
121
|
+
gh run view <run-id> --log-failed
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Read the failed CI logs and identify issues. Extract test failures, stack traces, error messages. If all checks pass, report this and stop.
|
|
125
|
+
|
|
126
|
+
#### If finding numbers were specified:
|
|
127
|
+
|
|
128
|
+
Read ALL PR comments to get full context:
|
|
129
|
+
```bash
|
|
130
|
+
gh pr view <pr-number> --json title,body,comments
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Find the review (`<!-- mach6-review -->`) and assessment (`<!-- mach6-assessment -->`) comments, then extract the specific findings to fix. Prior progress comments and discussion may also provide useful context.
|
|
134
|
+
|
|
135
|
+
#### If no finding numbers and not `ci`:
|
|
136
|
+
|
|
137
|
+
Read ALL PR comments, find review/assessment comments, present genuine findings, and ask which to fix.
|
|
138
|
+
|
|
139
|
+
### Step 5f: Batch sizing
|
|
140
|
+
|
|
141
|
+
- **Simple fixes** (typos, naming, imports): ~10 per batch
|
|
142
|
+
- **Moderate fixes** (logic changes, refactors): ~6 per batch
|
|
143
|
+
- **Complex fixes** (architecture, new features): ~3 per batch
|
|
144
|
+
|
|
145
|
+
If more than batch size, fix first batch and tell user to re-run.
|
|
146
|
+
|
|
147
|
+
### Step 6f: Implement fixes
|
|
148
|
+
|
|
149
|
+
Use the `feature-dev` subagent to implement fixes. `feature-dev` is a **pre-existing agent definition** shipped with dreb — it has full tool access and uses a strong-tier model with a provider fallback list. Do not override its model unless there's a specific reason.
|
|
150
|
+
|
|
151
|
+
**For each finding** (or batch of related findings), launch a `feature-dev` subagent with:
|
|
152
|
+
- The finding description and the assessment's classification/reasoning
|
|
153
|
+
- The specific files and code locations involved
|
|
154
|
+
- Instructions on what to fix and how
|
|
155
|
+
- Instructions to run tests after fixing
|
|
156
|
+
|
|
157
|
+
**Parallelism:** If findings touch different files, run their `feature-dev` agents in parallel. If findings overlap (same file/function), batch them into a single agent.
|
|
158
|
+
|
|
159
|
+
**Simple fixes** (typos, naming, one-line changes): You may fix these directly instead of delegating.
|
|
160
|
+
|
|
161
|
+
Defer out-of-scope items to new issues. Update task tracking per finding.
|
|
162
|
+
|
|
163
|
+
### Step 7f: Verify
|
|
164
|
+
|
|
165
|
+
After all `feature-dev` agents complete:
|
|
166
|
+
- Run tests and linting
|
|
167
|
+
- Verify each fix addresses its finding
|
|
168
|
+
- If any agent reported issues, address the gaps
|
|
169
|
+
|
|
170
|
+
Suggest next step: `/skill:mach6-push` then `/skill:mach6-review <pr-number>` for re-review.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mach6-issue
|
|
3
|
+
description: "Assess an existing GitHub issue (explore codebase, identify scope/risks/ambiguities, post assessment) or create a new structured issue. Usage: mach6-issue 42 (assess) or mach6-issue (create) or mach6-issue <description> (create with context)"
|
|
4
|
+
argument-hint: "[issue-number | description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# mach6-issue — Assess or Create Issue
|
|
8
|
+
|
|
9
|
+
**User input:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Global Rules
|
|
12
|
+
|
|
13
|
+
1. **GitHub as shared memory** — Plans, reviews, assessments, and progress are posted as PR/issue comments so any future session can pick up context.
|
|
14
|
+
2. **HTML markers** — Use `<!-- mach6-assessment -->`, `<!-- mach6-plan -->`, `<!-- mach6-review -->`, `<!-- mach6-progress -->` as the first line of comment bodies for reliable discovery.
|
|
15
|
+
3. **No `#N` in comment bodies** — GitHub auto-links `#N` to issues/PRs. Use "finding 3", "item 3", "stage 2" etc. instead.
|
|
16
|
+
4. **Safe git** — Never use `git add -A` or `git add .`. Stage files by name. Never stage secrets (.env, credentials, tokens, keys).
|
|
17
|
+
5. **Task tracking** — Use the `tasks_update` tool to show progress through multi-step commands.
|
|
18
|
+
6. **Project conventions** — Check for CLAUDE.md, AGENTS.md, .dreb/CONTEXT.md, and CONTRIBUTING.md before planning or implementing.
|
|
19
|
+
|
|
20
|
+
## Determine Mode
|
|
21
|
+
|
|
22
|
+
If the input is a number, run **ASSESS** mode. Otherwise, run **CREATE** mode.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## ASSESS Mode
|
|
27
|
+
|
|
28
|
+
**Assess an existing GitHub issue — explore the codebase, identify scope/risks/ambiguities, post assessment.**
|
|
29
|
+
|
|
30
|
+
### Step 1: Set up task tracking
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
tasks_update([
|
|
34
|
+
{ id: "read", title: "Read issue and comments", status: "in_progress" },
|
|
35
|
+
{ id: "explore", title: "Explore relevant codebase", status: "pending" },
|
|
36
|
+
{ id: "assess", title: "Analyze and assess", status: "pending" },
|
|
37
|
+
{ id: "post", title: "Post assessment", status: "pending" }
|
|
38
|
+
])
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Read the issue
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
gh issue view <number>
|
|
45
|
+
gh issue view <number> --comments
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Parse: problem statement, constraints, requirements, acceptance criteria, prior discussion, linked PRs.
|
|
49
|
+
|
|
50
|
+
Update task: read → completed, explore → in_progress.
|
|
51
|
+
|
|
52
|
+
### Step 3: Explore the codebase
|
|
53
|
+
|
|
54
|
+
Launch 2-3 Explore subagents in parallel targeting different aspects. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly complex issue warrants a stronger tier).
|
|
55
|
+
- **Relevant code**: Find existing code related to the issue, trace implementation patterns
|
|
56
|
+
- **Architecture**: Map relevant architecture layers, abstractions, data flow
|
|
57
|
+
- **Prior work**: Check for related branches, PRs, or commits
|
|
58
|
+
|
|
59
|
+
Each agent should return 5-10 key files. After agents complete, read all identified files.
|
|
60
|
+
|
|
61
|
+
Update task: explore → completed, assess → in_progress.
|
|
62
|
+
|
|
63
|
+
### Step 4: Assess
|
|
64
|
+
|
|
65
|
+
Present to the user:
|
|
66
|
+
1. **Summary**: The issue in your own words
|
|
67
|
+
2. **Current state**: What exists today that's relevant
|
|
68
|
+
3. **Gaps**: What's missing, broken, or unclear
|
|
69
|
+
4. **Ambiguities**: Underspecified aspects or open questions
|
|
70
|
+
5. **Scope**: Size and complexity estimate
|
|
71
|
+
6. **Risks**: Pitfalls, edge cases, architectural concerns
|
|
72
|
+
|
|
73
|
+
### Step 5: Post assessment
|
|
74
|
+
|
|
75
|
+
Post as an issue comment:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
gh issue comment <number> --body "<!-- mach6-assessment -->
|
|
79
|
+
## Issue Assessment
|
|
80
|
+
|
|
81
|
+
<assessment content>
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
*Automated assessment by mach6*"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Update task: post → completed.
|
|
88
|
+
|
|
89
|
+
Suggest next step: `/skill:mach6-plan <number>`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## CREATE Mode
|
|
94
|
+
|
|
95
|
+
**Create a new structured GitHub issue from context or description.**
|
|
96
|
+
|
|
97
|
+
### Step 1: Gather context
|
|
98
|
+
|
|
99
|
+
If a description was provided, use it as the starting point. Otherwise, ask the user what they want to create an issue for.
|
|
100
|
+
|
|
101
|
+
Check if the repository has issue templates:
|
|
102
|
+
```bash
|
|
103
|
+
ls .github/ISSUE_TEMPLATE/ 2>/dev/null
|
|
104
|
+
```
|
|
105
|
+
If templates exist, read them and select the most appropriate one.
|
|
106
|
+
|
|
107
|
+
Explore the codebase if needed to understand the relevant area.
|
|
108
|
+
|
|
109
|
+
### Step 2: Draft the issue
|
|
110
|
+
|
|
111
|
+
Create a structured issue with:
|
|
112
|
+
- **Title**: Clear, concise, action-oriented (under 80 chars, imperative form)
|
|
113
|
+
- **Summary**: 2-3 sentences describing the problem or feature
|
|
114
|
+
- **Current Behavior** (for bugs/improvements): What happens now
|
|
115
|
+
- **Proposed Behavior**: What should happen
|
|
116
|
+
- **Acceptance Criteria**: Bullet list of verifiable conditions that define "done"
|
|
117
|
+
- **Context**: Links to related PRs, issues, or discussions
|
|
118
|
+
- **Technical Notes**: Implementation hints, relevant files, architectural considerations
|
|
119
|
+
- **Labels**: Suggest appropriate labels based on the issue type
|
|
120
|
+
|
|
121
|
+
Present the draft to the user for approval.
|
|
122
|
+
|
|
123
|
+
### Step 3: Create the issue
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
gh issue create --title "<title>" --body "<body>" [--label "<labels>"]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Report the issue number and URL. Suggest next step: `/skill:mach6-plan <number>`
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mach6-plan
|
|
3
|
+
description: "Explore codebase, create implementation plan, create feature branch with dummy commit, open draft PR, post plan as PR comment. Everything lives on the PR from this point forward. Usage: mach6-plan 42"
|
|
4
|
+
argument-hint: "<issue-number>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# mach6-plan — Plan, Branch, and Open PR
|
|
8
|
+
|
|
9
|
+
**User input:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
This command is strictly for **planning**. Do NOT implement any code changes — no file edits, no file writes.
|
|
12
|
+
|
|
13
|
+
## Global Rules
|
|
14
|
+
|
|
15
|
+
1. **GitHub as shared memory** — Plans, reviews, assessments, and progress are posted as PR/issue comments so any future session can pick up context.
|
|
16
|
+
2. **HTML markers** — Use `<!-- mach6-plan -->` as the first line of plan comment bodies for reliable discovery.
|
|
17
|
+
3. **No `#N` in comment bodies** — GitHub auto-links `#N` to issues/PRs. Use "finding 3", "item 3", "stage 2" etc. instead.
|
|
18
|
+
4. **Safe git** — Never use `git add -A` or `git add .`. Stage files by name. Never stage secrets.
|
|
19
|
+
5. **Task tracking** — Use the `tasks_update` tool to show progress through multi-step commands.
|
|
20
|
+
6. **Project conventions** — Check for CLAUDE.md, AGENTS.md, .dreb/CONTEXT.md, and CONTRIBUTING.md before planning.
|
|
21
|
+
|
|
22
|
+
## Step 1: Set up task tracking
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
tasks_update([
|
|
26
|
+
{ id: "read", title: "Read issue and context", status: "in_progress" },
|
|
27
|
+
{ id: "explore", title: "Explore codebase", status: "pending" },
|
|
28
|
+
{ id: "plan", title: "Draft implementation plan", status: "pending" },
|
|
29
|
+
{ id: "branch", title: "Create branch and draft PR", status: "pending" },
|
|
30
|
+
{ id: "post", title: "Post plan to PR", status: "pending" }
|
|
31
|
+
])
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Step 2: Read the issue
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
gh issue view <number>
|
|
38
|
+
gh issue view <number> --comments
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Parse everything: problem statement, constraints, requirements, acceptance criteria, prior discussion, any existing assessment comments (look for `<!-- mach6-assessment -->`).
|
|
42
|
+
|
|
43
|
+
Update task: read → completed, explore → in_progress.
|
|
44
|
+
|
|
45
|
+
## Step 3: Read project conventions
|
|
46
|
+
|
|
47
|
+
Check for and read (first found):
|
|
48
|
+
- CONTRIBUTING.md, DEVELOPMENT.md, .github/CONTRIBUTING.md
|
|
49
|
+
- CLAUDE.md, AGENTS.md, .dreb/CONTEXT.md
|
|
50
|
+
|
|
51
|
+
Extract planning-relevant guidance: project layers, testing expectations, coding conventions.
|
|
52
|
+
|
|
53
|
+
## Step 4: Explore the codebase
|
|
54
|
+
|
|
55
|
+
Launch 2-3 Explore subagents in parallel. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly large or complex codebase warrants a stronger tier).
|
|
56
|
+
- **Similar features**: Find existing code that solves related problems, trace implementation patterns
|
|
57
|
+
- **Architecture**: Map relevant architecture layers, abstractions, data flow
|
|
58
|
+
- **Integration points**: Identify where new code connects to existing systems
|
|
59
|
+
|
|
60
|
+
Include project conventions in each agent's context. Each agent returns 5-10 key files. Read all identified files.
|
|
61
|
+
|
|
62
|
+
Update task: explore → completed, plan → in_progress.
|
|
63
|
+
|
|
64
|
+
## Step 5: Draft the plan
|
|
65
|
+
|
|
66
|
+
Create an implementation plan with:
|
|
67
|
+
- Clear analysis of the problem
|
|
68
|
+
- **Deliverables**: What will be produced (be specific)
|
|
69
|
+
- **Acceptance criteria**: How to verify the work is done
|
|
70
|
+
- **Files to create or modify**: List each with what changes
|
|
71
|
+
- **Testing approach**: What tests to write, what to verify
|
|
72
|
+
- **Risks and open questions**: Anything that might derail implementation
|
|
73
|
+
|
|
74
|
+
The plan should be **high-level on implementation details** (avoid cascading spec errors from over-specifying) but **specific on deliverables and acceptance criteria**.
|
|
75
|
+
|
|
76
|
+
**Project-layer coverage:** Cross-check the plan against discovered project layers. Every affected layer should be addressed.
|
|
77
|
+
|
|
78
|
+
**Test coverage is mandatory, not optional.** Every new behavior, command handler, formatting function, or event wiring must include tests in the plan. If the target package lacks test infrastructure, the plan must include setting it up as a deliverable — this cannot be deferred. The testing approach should specify:
|
|
79
|
+
- Which test files to create or modify
|
|
80
|
+
- What behaviors to verify (happy paths, error paths, edge cases)
|
|
81
|
+
- What test infrastructure/helpers are needed (mocks, factories, fixtures)
|
|
82
|
+
|
|
83
|
+
Present the plan to the user. Discuss and revise if they have feedback.
|
|
84
|
+
|
|
85
|
+
Update task: plan → completed, branch → in_progress.
|
|
86
|
+
|
|
87
|
+
## Step 6: Create branch and draft PR
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Derive branch name from issue
|
|
91
|
+
# Format: feature/issue-<N>-<slug> (slug = 3-5 words from title, lowercase, hyphens)
|
|
92
|
+
git checkout -b feature/issue-<N>-<slug>
|
|
93
|
+
|
|
94
|
+
# Create an empty commit so the PR can be opened
|
|
95
|
+
git commit --allow-empty -m "chore: open PR for issue <N>"
|
|
96
|
+
|
|
97
|
+
git push -u origin feature/issue-<N>-<slug>
|
|
98
|
+
|
|
99
|
+
# Open draft PR
|
|
100
|
+
gh pr create --draft --title "<title>" --body "Closes #<N>
|
|
101
|
+
|
|
102
|
+
<brief description>
|
|
103
|
+
|
|
104
|
+
Implementation plan posted as a comment below."
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Update task: branch → completed, post → in_progress.
|
|
108
|
+
|
|
109
|
+
## Step 7: Post plan to PR
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
gh pr comment <pr-number> --body "<!-- mach6-plan -->
|
|
113
|
+
## Implementation Plan
|
|
114
|
+
|
|
115
|
+
<full plan content>
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
*Plan created by mach6*"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Update task: post → completed.
|
|
122
|
+
|
|
123
|
+
Suggest next step: implement the plan, then `/skill:mach6-push` when ready.
|