@bastani/atomic 0.8.10 → 0.8.12-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 +29 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +3 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/agents/agent-serializer.ts +3 -2
- package/dist/builtin/subagents/src/agents/agents.ts +1 -1
- package/dist/builtin/subagents/src/extension/index.ts +597 -471
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +16 -8
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +9 -13
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +7 -3
- package/dist/builtin/subagents/src/shared/formatters.ts +8 -3
- package/dist/builtin/subagents/src/slash/slash-commands.ts +625 -468
- package/dist/builtin/subagents/src/tui/render.ts +342 -158
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +15 -4
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +75 -33
- package/dist/builtin/workflows/src/shared/store-types.ts +3 -4
- package/dist/builtin/workflows/src/shared/store.ts +2 -3
- package/dist/builtin/workflows/src/tui/graph-view.ts +12 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +1 -2
- package/dist/builtin/workflows/src/tui/status-helpers.ts +1 -1
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts +2 -2
- 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 +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -6
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +45 -22
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +9 -9
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +2 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +7 -7
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +10 -10
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.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 +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +1 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -3
- 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 +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts +3 -3
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/index.d.ts +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 +2 -2
- 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 +8 -8
- 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 +3 -3
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +6 -6
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +20 -20
- 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 +2 -2
- 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.map +1 -1
- package/dist/core/http-dispatcher.d.ts +32 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +43 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +8 -8
- 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.map +1 -1
- package/dist/core/model-registry.d.ts +4 -4
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +2 -2
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +10 -11
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.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 +9 -9
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +13 -13
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +21 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +2 -2
- 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 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +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 +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +7 -8
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts +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/ask-user-question/ask-user-question.d.ts +4 -4
- package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
- package/dist/core/tools/ask-user-question/index.d.ts +1 -1
- package/dist/core/tools/ask-user-question/index.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/index.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/build-questionnaire.d.ts +5 -5
- package/dist/core/tools/ask-user-question/state/build-questionnaire.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/build-questionnaire.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/key-router.d.ts +2 -2
- package/dist/core/tools/ask-user-question/state/key-router.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/key-router.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts +3 -3
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts +2 -2
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts +6 -6
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/derivations.d.ts +2 -2
- package/dist/core/tools/ask-user-question/state/selectors/derivations.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/derivations.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/focus.d.ts +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/focus.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/focus.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.d.ts +8 -8
- package/dist/core/tools/ask-user-question/state/selectors/projections.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.d.ts +4 -4
- package/dist/core/tools/ask-user-question/state/state-reducer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.d.ts +2 -2
- package/dist/core/tools/ask-user-question/state/state.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/validate-questionnaire.d.ts +1 -1
- package/dist/core/tools/ask-user-question/tool/validate-questionnaire.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/validate-questionnaire.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/body-residual-spacer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/body-residual-spacer.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/component-binding.d.ts +4 -4
- package/dist/core/tools/ask-user-question/view/component-binding.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/component-binding.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts +2 -2
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.d.ts +4 -4
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/option-list-view.d.ts +2 -2
- package/dist/core/tools/ask-user-question/view/components/option-list-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/option-list-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.d.ts +2 -2
- package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/markdown-content-cache.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.d.ts +3 -3
- package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-block-renderer.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-layout-decider.d.ts +2 -2
- package/dist/core/tools/ask-user-question/view/components/preview/preview-layout-decider.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-layout-decider.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.d.ts +8 -8
- package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/preview/preview-pane.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/submit-picker.d.ts +3 -3
- package/dist/core/tools/ask-user-question/view/components/submit-picker.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/submit-picker.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/tab-bar.d.ts +3 -3
- package/dist/core/tools/ask-user-question/view/components/tab-bar.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/tab-bar.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts +8 -8
- package/dist/core/tools/ask-user-question/view/dialog-builder.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/dialog-builder.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts +5 -5
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/tab-components.d.ts +4 -4
- package/dist/core/tools/ask-user-question/view/tab-components.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/tab-components.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/tab-content-strategy.d.ts +9 -9
- package/dist/core/tools/ask-user-question/view/tab-content-strategy.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/tab-content-strategy.js +2 -2
- package/dist/core/tools/ask-user-question/view/tab-content-strategy.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -1
- 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 +2 -2
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- 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 +2 -2
- 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 +19 -19
- 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 +2 -2
- 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 +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- 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 +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/todos.d.ts +1 -1
- package/dist/core/tools/todos.d.ts.map +1 -1
- package/dist/core/tools/todos.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +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/write.d.ts +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +30 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -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 +5 -5
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +3 -3
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts +2 -2
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +2 -2
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +2 -2
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- 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.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.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 +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +3 -3
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +34 -34
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.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 +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +1 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -2
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +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 +3 -3
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +13 -0
- 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.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-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.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/working-status.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +7 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +5 -5
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +1 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +2 -2
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +4 -4
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +22 -6
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/changelog.d.ts +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 +5 -2
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +9 -7
- 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.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.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-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.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 +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +78 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- package/docs/compaction.md +5 -5
- package/docs/custom-provider.md +2 -2
- package/docs/development.md +22 -16
- package/docs/docs.json +6 -2
- package/docs/extensions.md +25 -25
- package/docs/index.md +11 -14
- package/docs/keybindings.md +5 -5
- package/docs/models.md +6 -6
- package/docs/packages.md +55 -48
- package/docs/prompt-templates.md +5 -5
- package/docs/providers.md +10 -10
- package/docs/quickstart.md +32 -30
- package/docs/rpc.md +9 -9
- package/docs/sdk.md +1 -1
- package/docs/session-format.md +3 -3
- package/docs/sessions.md +11 -11
- package/docs/settings.md +18 -15
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +11 -11
- package/docs/terminal-setup.md +8 -8
- package/docs/termux.md +6 -6
- package/docs/themes.md +10 -10
- package/docs/tui.md +5 -4
- package/docs/usage.md +50 -50
- package/docs/windows.md +2 -2
- package/docs/workflows.md +695 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
- package/examples/extensions/doom-overlay/doom-component.ts +2 -2
- package/examples/extensions/doom-overlay/index.ts +3 -3
- package/examples/extensions/overlay-qa-tests.ts +116 -33
- package/examples/extensions/overlay-test.ts +9 -3
- package/examples/extensions/plan-mode/index.ts +1 -1
- package/examples/extensions/subagent/index.ts +1159 -903
- package/package.json +6 -4
- package/dist/builtin/workflows/skills/workflow/SKILL.md +0 -322
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/advanced-evaluation.md +0 -404
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/bdi-mental-states.md +0 -313
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/context-compression.md +0 -274
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/context-degradation.md +0 -208
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/context-fundamentals.md +0 -203
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/context-optimization.md +0 -197
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/evaluation.md +0 -253
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/filesystem-context.md +0 -289
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/hosted-agents.md +0 -262
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/memory-systems.md +0 -221
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/multi-agent-patterns.md +0 -259
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/project-development.md +0 -293
- package/dist/builtin/workflows/skills/workflow/references/context-engineering/tool-design.md +0 -273
- package/dist/builtin/workflows/skills/workflow/references/context-engineering.md +0 -23
- package/dist/builtin/workflows/skills/workflow/references/design-checklist.md +0 -83
- package/dist/builtin/workflows/skills/workflow/references/running-workflows.md +0 -159
- package/dist/builtin/workflows/skills/workflow/references/sdk-authoring.md +0 -260
package/dist/builtin/workflows/skills/workflow/references/context-engineering/tool-design.md
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tool-design
|
|
3
|
-
description: This skill should be used when the user asks to "design agent tools", "create tool descriptions", "reduce tool complexity", "implement MCP tools", or mentions tool consolidation, architectural reduction, tool naming conventions, or agent-tool interfaces. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of designing tools that shape how agents receive and process context.
|
|
4
|
-
metadata:
|
|
5
|
-
provider: atomic
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Tool Design for Agents
|
|
9
|
-
|
|
10
|
-
Design every tool as a contract between a deterministic system and a non-deterministic agent. Unlike human-facing APIs, agent-facing tools must make the contract unambiguous through the description alone -- agents infer intent from descriptions and generate calls that must match expected formats. Every ambiguity becomes a potential failure mode that no amount of prompt engineering can fix.
|
|
11
|
-
|
|
12
|
-
## When to Activate
|
|
13
|
-
|
|
14
|
-
Activate this skill when:
|
|
15
|
-
- Creating new tools for agent systems
|
|
16
|
-
- Debugging tool-related failures or misuse
|
|
17
|
-
- Optimizing existing tool sets for better agent performance
|
|
18
|
-
- Designing tool APIs from scratch
|
|
19
|
-
- Evaluating third-party tools for agent integration
|
|
20
|
-
- Standardizing tool conventions across a codebase
|
|
21
|
-
|
|
22
|
-
## Core Concepts
|
|
23
|
-
|
|
24
|
-
Design tools around the consolidation principle: if a human engineer cannot definitively say which tool should be used in a given situation, an agent cannot be expected to do better. Reduce the tool set until each tool has one unambiguous purpose, because agents select tools by comparing descriptions and any overlap introduces selection errors.
|
|
25
|
-
|
|
26
|
-
Treat every tool description as prompt engineering that shapes agent behavior. The description is not documentation for humans -- it is injected into the agent's context and directly steers reasoning. Write descriptions that answer what the tool does, when to use it, and what it returns, because these three questions are exactly what agents evaluate during tool selection.
|
|
27
|
-
|
|
28
|
-
## Detailed Topics
|
|
29
|
-
|
|
30
|
-
### The Tool-Agent Interface
|
|
31
|
-
|
|
32
|
-
**Tools as Contracts**
|
|
33
|
-
Design each tool as a self-contained contract. When humans call APIs, they read docs, understand conventions, and make appropriate requests. Agents must infer the entire contract from a single description block. Make the contract unambiguous by including format examples, expected patterns, and explicit constraints. Omit nothing that a caller needs to know, because agents cannot ask clarifying questions before making a call.
|
|
34
|
-
|
|
35
|
-
**Tool Description as Prompt**
|
|
36
|
-
Write tool descriptions knowing they load directly into agent context and collectively steer behavior. A vague description like "Search the database" with cryptic parameter names forces the agent to guess -- and guessing produces incorrect calls. Instead, include usage context, parameter format examples, and sensible defaults. Every word in the description either helps or hurts tool selection accuracy.
|
|
37
|
-
|
|
38
|
-
**Namespacing and Organization**
|
|
39
|
-
Namespace tools under common prefixes as the collection grows, because agents benefit from hierarchical grouping. When an agent needs database operations, it routes to the `db_*` namespace; when it needs web interactions, it routes to `web_*`. Without namespacing, agents must evaluate every tool in a flat list, which degrades selection accuracy as the count grows.
|
|
40
|
-
|
|
41
|
-
### The Consolidation Principle
|
|
42
|
-
|
|
43
|
-
**Single Comprehensive Tools**
|
|
44
|
-
Build single comprehensive tools instead of multiple narrow tools that overlap. Rather than implementing `list_users`, `list_events`, and `create_event` separately, implement `schedule_event` that finds availability and schedules in one call. The comprehensive tool handles the full workflow internally, removing the agent's burden of chaining calls in the correct order.
|
|
45
|
-
|
|
46
|
-
**Why Consolidation Works**
|
|
47
|
-
Apply consolidation because agents have limited context and attention. Each tool in the collection competes for attention during tool selection, each description consumes context budget tokens, and overlapping functionality creates ambiguity. Consolidation eliminates redundant descriptions, removes selection ambiguity, and shrinks the effective tool set. Vercel demonstrated this principle by reducing their agent from 17 specialized tools to 2 general-purpose tools and achieving better performance -- fewer tools meant less confusion and more reliable tool selection.
|
|
48
|
-
|
|
49
|
-
**When Not to Consolidate**
|
|
50
|
-
Keep tools separate when they have fundamentally different behaviors, serve different contexts, or must be callable independently. Over-consolidation creates a different problem: a single tool with too many parameters and modes becomes hard for agents to parameterize correctly.
|
|
51
|
-
|
|
52
|
-
### Architectural Reduction
|
|
53
|
-
|
|
54
|
-
Push the consolidation principle to its logical extreme by removing most specialized tools in favor of primitive, general-purpose capabilities. Production evidence shows this approach can outperform sophisticated multi-tool architectures.
|
|
55
|
-
|
|
56
|
-
**The File System Agent Pattern**
|
|
57
|
-
Provide direct file system access through a single command execution tool instead of building custom tools for data exploration, schema lookup, and query validation. The agent uses standard Unix utilities (grep, cat, find, ls) to explore and operate on the system. This works because file systems are a proven abstraction that models understand deeply, standard tools have predictable behavior, agents can chain primitives flexibly rather than being constrained to predefined workflows, and good documentation in files replaces summarization tools.
|
|
58
|
-
|
|
59
|
-
**When Reduction Outperforms Complexity**
|
|
60
|
-
Choose reduction when the data layer is well-documented and consistently structured, the model has sufficient reasoning capability, specialized tools were constraining rather than enabling the model, or more time is spent maintaining scaffolding than improving outcomes. Avoid reduction when underlying data is messy or poorly documented, the domain requires specialized knowledge the model lacks, safety constraints must limit agent actions, or operations genuinely benefit from structured workflows.
|
|
61
|
-
|
|
62
|
-
**Build for Future Models**
|
|
63
|
-
Design minimal architectures that benefit from model improvements rather than sophisticated architectures that lock in current limitations. Ask whether each tool enables new capabilities or constrains reasoning the model could handle on its own -- tools built as "guardrails" often become liabilities as models improve.
|
|
64
|
-
|
|
65
|
-
See [Architectural Reduction Case Study](./references/architectural_reduction.md) for production evidence.
|
|
66
|
-
|
|
67
|
-
### Tool Description Engineering
|
|
68
|
-
|
|
69
|
-
**Description Structure**
|
|
70
|
-
Structure every tool description to answer four questions:
|
|
71
|
-
|
|
72
|
-
1. What does the tool do? State exactly what the tool accomplishes -- avoid vague language like "helps with" or "can be used for."
|
|
73
|
-
2. When should it be used? Specify direct triggers ("User asks about pricing") and indirect signals ("Need current market rates").
|
|
74
|
-
3. What inputs does it accept? Describe each parameter with types, constraints, defaults, and format examples.
|
|
75
|
-
4. What does it return? Document the output format, structure, successful response examples, and error conditions.
|
|
76
|
-
|
|
77
|
-
**Default Parameter Selection**
|
|
78
|
-
Set defaults to reflect common use cases. Defaults reduce agent burden by eliminating unnecessary parameter specification and prevent errors from omitted parameters. Choose defaults that produce useful results without requiring the agent to understand every option.
|
|
79
|
-
|
|
80
|
-
### Response Format Optimization
|
|
81
|
-
|
|
82
|
-
Offer response format options (concise vs. detailed) because tool response size significantly impacts context usage. Concise format returns essential fields only, suitable for confirmations. Detailed format returns complete objects, suitable when full context drives decisions. Document when to use each format in the tool description so agents learn to select appropriately.
|
|
83
|
-
|
|
84
|
-
### Error Message Design
|
|
85
|
-
|
|
86
|
-
Design error messages for two audiences: developers debugging issues and agents recovering from failures. For agents, every error message must be actionable -- it must state what went wrong and how to correct it. Include retry guidance for retryable errors, corrected format examples for input errors, and specific missing fields for incomplete requests. An error that says only "failed" provides zero recovery signal.
|
|
87
|
-
|
|
88
|
-
### Tool Definition Schema
|
|
89
|
-
|
|
90
|
-
Establish a consistent schema across all tools. Use verb-noun pattern for tool names (`get_customer`, `create_order`), consistent parameter names across tools (always `customer_id`, never sometimes `id` and sometimes `identifier`), and consistent return field names. Consistency reduces the cognitive load on agents and improves cross-tool generalization.
|
|
91
|
-
|
|
92
|
-
### Tool Collection Design
|
|
93
|
-
|
|
94
|
-
Limit tool collections to 10-20 tools for most applications, because research shows description overlap causes model confusion and more tools do not always lead to better outcomes. When more tools are genuinely needed, use namespacing to create logical groupings. Implement selection mechanisms: tool grouping by domain, example-based selection hints, and umbrella tools that route to specialized sub-tools.
|
|
95
|
-
|
|
96
|
-
### MCP Tool Naming Requirements
|
|
97
|
-
|
|
98
|
-
Always use fully qualified tool names with MCP (Model Context Protocol) to avoid "tool not found" errors.
|
|
99
|
-
|
|
100
|
-
Format: `ServerName:tool_name`
|
|
101
|
-
|
|
102
|
-
```python
|
|
103
|
-
# Correct: Fully qualified names
|
|
104
|
-
"Use the BigQuery:bigquery_schema tool to retrieve table schemas."
|
|
105
|
-
"Use the GitHub:create_issue tool to create issues."
|
|
106
|
-
|
|
107
|
-
# Incorrect: Unqualified names
|
|
108
|
-
"Use the bigquery_schema tool..." # May fail with multiple servers
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Without the server prefix, agents may fail to locate tools when multiple MCP servers are available. Establish naming conventions that include server context in all tool references.
|
|
112
|
-
|
|
113
|
-
### Using Agents to Optimize Tools
|
|
114
|
-
|
|
115
|
-
Feed observed tool failures back to an agent to diagnose issues and improve descriptions. Production testing shows this approach achieves 40% reduction in task completion time by helping future agents avoid mistakes.
|
|
116
|
-
|
|
117
|
-
**The Tool-Testing Agent Pattern**:
|
|
118
|
-
|
|
119
|
-
```python
|
|
120
|
-
def optimize_tool_description(tool_spec, failure_examples):
|
|
121
|
-
"""
|
|
122
|
-
Use an agent to analyze tool failures and improve descriptions.
|
|
123
|
-
|
|
124
|
-
Process:
|
|
125
|
-
1. Agent attempts to use tool across diverse tasks
|
|
126
|
-
2. Collect failure modes and friction points
|
|
127
|
-
3. Agent analyzes failures and proposes improvements
|
|
128
|
-
4. Test improved descriptions against same tasks
|
|
129
|
-
"""
|
|
130
|
-
prompt = f"""
|
|
131
|
-
Analyze this tool specification and the observed failures.
|
|
132
|
-
|
|
133
|
-
Tool: {tool_spec}
|
|
134
|
-
|
|
135
|
-
Failures observed:
|
|
136
|
-
{failure_examples}
|
|
137
|
-
|
|
138
|
-
Identify:
|
|
139
|
-
1. Why agents are failing with this tool
|
|
140
|
-
2. What information is missing from the description
|
|
141
|
-
3. What ambiguities cause incorrect usage
|
|
142
|
-
|
|
143
|
-
Propose an improved tool description that addresses these issues.
|
|
144
|
-
"""
|
|
145
|
-
|
|
146
|
-
return get_agent_response(prompt)
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
This creates a feedback loop: agents using tools generate failure data, which agents then use to improve tool descriptions, which reduces future failures.
|
|
150
|
-
|
|
151
|
-
### Testing Tool Design
|
|
152
|
-
|
|
153
|
-
Evaluate tool designs against five criteria: unambiguity, completeness, recoverability, efficiency, and consistency. Test by presenting representative agent requests and evaluating the resulting tool calls against expected behavior.
|
|
154
|
-
|
|
155
|
-
## Practical Guidance
|
|
156
|
-
|
|
157
|
-
### Tool Selection Framework
|
|
158
|
-
|
|
159
|
-
When designing tool collections:
|
|
160
|
-
1. Identify distinct workflows agents must accomplish
|
|
161
|
-
2. Group related actions into comprehensive tools
|
|
162
|
-
3. Ensure each tool has a clear, unambiguous purpose
|
|
163
|
-
4. Document error cases and recovery paths
|
|
164
|
-
5. Test with actual agent interactions
|
|
165
|
-
|
|
166
|
-
## Examples
|
|
167
|
-
|
|
168
|
-
**Example 1: Well-Designed Tool**
|
|
169
|
-
```python
|
|
170
|
-
def get_customer(customer_id: str, format: str = "concise"):
|
|
171
|
-
"""
|
|
172
|
-
Retrieve customer information by ID.
|
|
173
|
-
|
|
174
|
-
Use when:
|
|
175
|
-
- User asks about specific customer details
|
|
176
|
-
- Need customer context for decision-making
|
|
177
|
-
- Verifying customer identity
|
|
178
|
-
|
|
179
|
-
Args:
|
|
180
|
-
customer_id: Format "CUST-######" (e.g., "CUST-000001")
|
|
181
|
-
format: "concise" for key fields, "detailed" for complete record
|
|
182
|
-
|
|
183
|
-
Returns:
|
|
184
|
-
Customer object with requested fields
|
|
185
|
-
|
|
186
|
-
Errors:
|
|
187
|
-
NOT_FOUND: Customer ID not found
|
|
188
|
-
INVALID_FORMAT: ID must match CUST-###### pattern
|
|
189
|
-
"""
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**Example 2: Poor Tool Design**
|
|
193
|
-
|
|
194
|
-
This example demonstrates several tool design anti-patterns:
|
|
195
|
-
|
|
196
|
-
```python
|
|
197
|
-
def search(query):
|
|
198
|
-
"""Search the database."""
|
|
199
|
-
pass
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
**Problems with this design:**
|
|
203
|
-
|
|
204
|
-
1. **Vague name**: "search" is ambiguous - search what, for what purpose?
|
|
205
|
-
2. **Missing parameters**: What database? What format should query take?
|
|
206
|
-
3. **No return description**: What does this function return? A list? A string? Error handling?
|
|
207
|
-
4. **No usage context**: When should an agent use this versus other tools?
|
|
208
|
-
5. **No error handling**: What happens if the database is unavailable?
|
|
209
|
-
|
|
210
|
-
**Failure modes:**
|
|
211
|
-
- Agents may call this tool when they should use a more specific tool
|
|
212
|
-
- Agents cannot determine correct query format
|
|
213
|
-
- Agents cannot interpret results
|
|
214
|
-
- Agents cannot recover from failures
|
|
215
|
-
|
|
216
|
-
## Guidelines
|
|
217
|
-
|
|
218
|
-
1. Write descriptions that answer what, when, and what returns
|
|
219
|
-
2. Use consolidation to reduce ambiguity
|
|
220
|
-
3. Implement response format options for token efficiency
|
|
221
|
-
4. Design error messages for agent recovery
|
|
222
|
-
5. Establish and follow consistent naming conventions
|
|
223
|
-
6. Limit tool count and use namespacing for organization
|
|
224
|
-
7. Test tool designs with actual agent interactions
|
|
225
|
-
8. Iterate based on observed failure modes
|
|
226
|
-
9. Question whether each tool enables or constrains the model
|
|
227
|
-
10. Prefer primitive, general-purpose tools over specialized wrappers
|
|
228
|
-
11. Invest in documentation quality over tooling sophistication
|
|
229
|
-
12. Build minimal architectures that benefit from model improvements
|
|
230
|
-
|
|
231
|
-
## Gotchas
|
|
232
|
-
|
|
233
|
-
1. **Vague descriptions**: Descriptions like "Search the database for customer information" leave too many questions unanswered. State the exact database, query format, and return shape.
|
|
234
|
-
2. **Cryptic parameter names**: Parameters named `x`, `val`, or `param1` force agents to guess meaning. Use descriptive names that convey purpose without reading further documentation.
|
|
235
|
-
3. **Missing error recovery guidance**: Tools that fail with generic messages like "Error occurred" provide no recovery signal. Every error response must tell the agent what went wrong and what to try next.
|
|
236
|
-
4. **Inconsistent naming across tools**: Using `id` in one tool, `identifier` in another, and `customer_id` in a third creates confusion. Standardize parameter names across the entire tool collection.
|
|
237
|
-
5. **MCP namespace collisions**: When multiple MCP tool providers register tools with similar names (e.g., two servers both exposing `search`), agents cannot disambiguate. Always use fully qualified `ServerName:tool_name` format and audit for collisions when adding new providers.
|
|
238
|
-
6. **Tool description rot**: Descriptions become inaccurate as underlying APIs evolve -- parameters get added, return formats change, error codes shift. Treat descriptions as code: version them, review them during API changes, and test them against current behavior.
|
|
239
|
-
7. **Over-consolidation**: Making a single tool handle too many workflows produces parameter lists so large that agents struggle to select the right combination. If a tool requires more than 8-10 parameters or serves fundamentally different use cases, split it.
|
|
240
|
-
8. **Parameter explosion**: Too many optional parameters overwhelm agent decision-making. Each parameter the agent must evaluate adds cognitive load. Provide sensible defaults, group related options into format presets, and move rarely-used parameters into an `options` object.
|
|
241
|
-
9. **Missing error context**: Error messages that say only "failed" or "invalid input" without specifying which input, why it failed, or what a valid input looks like leave agents unable to self-correct. Include the invalid value, the expected format, and a concrete example in every error response.
|
|
242
|
-
|
|
243
|
-
## Integration
|
|
244
|
-
|
|
245
|
-
This skill connects to:
|
|
246
|
-
- context-fundamentals - How tools interact with context
|
|
247
|
-
- multi-agent-patterns - Specialized tools per agent
|
|
248
|
-
- evaluation - Evaluating tool effectiveness
|
|
249
|
-
|
|
250
|
-
## References
|
|
251
|
-
|
|
252
|
-
Internal references:
|
|
253
|
-
- [Best Practices Reference](./references/best_practices.md) - Read when: designing a new tool from scratch or auditing an existing tool collection for quality gaps
|
|
254
|
-
- [Architectural Reduction Case Study](./references/architectural_reduction.md) - Read when: considering removing specialized tools in favor of primitives, or evaluating whether a complex tool architecture is justified
|
|
255
|
-
|
|
256
|
-
Related skills in this collection:
|
|
257
|
-
- context-fundamentals - Tool context interactions
|
|
258
|
-
- evaluation - Tool testing patterns
|
|
259
|
-
|
|
260
|
-
External resources:
|
|
261
|
-
- MCP (Model Context Protocol) documentation - Read when: implementing tools for multi-server agent environments or debugging tool routing failures
|
|
262
|
-
- Framework tool conventions - Read when: adopting a new agent framework and need to map tool design principles to framework-specific APIs
|
|
263
|
-
- API design best practices for agents - Read when: translating existing human-facing APIs into agent-facing tool interfaces
|
|
264
|
-
- Vercel d0 agent architecture case study - Read when: evaluating whether to consolidate tools or seeking production evidence for architectural reduction
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Skill Metadata
|
|
269
|
-
|
|
270
|
-
**Created**: 2025-12-20
|
|
271
|
-
**Last Updated**: 2026-03-17
|
|
272
|
-
**Author**: Agent Skills for Context Engineering Contributors
|
|
273
|
-
**Version**: 2.0.0
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Context Engineering References for Workflow Design
|
|
2
|
-
|
|
3
|
-
These files were copied from the upstream context-engineering skill set so the workflow skill can load design guidance on demand without relying on global skill availability.
|
|
4
|
-
|
|
5
|
-
Load them selectively based on the workflow's risk profile:
|
|
6
|
-
|
|
7
|
-
| Concern | Reference | Load when |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| Prompt/context basics | `context-engineering/context-fundamentals.md` | Every non-trivial workflow; designing stage prompts, token budgets, context placement, progressive disclosure. |
|
|
10
|
-
| Context loss | `context-engineering/context-degradation.md` | Long-running workflows, multi-turn sessions, accumulated state, review/fix loops. |
|
|
11
|
-
| Compression | `context-engineering/context-compression.md` | Passing large transcripts, summaries, research bundles, or logs between stages. |
|
|
12
|
-
| Token efficiency | `context-engineering/context-optimization.md` | Large fan-outs, repeated context blocks, cache-sensitive prompts, or expensive runs. |
|
|
13
|
-
| Multi-agent topology | `context-engineering/multi-agent-patterns.md` | Parallel specialists, orchestrator/reviewer/fixer patterns, handoff protocols. |
|
|
14
|
-
| Memory | `context-engineering/memory-systems.md` | Cross-run persistence, durable project knowledge, or reusable workflow memory. |
|
|
15
|
-
| Tools | `context-engineering/tool-design.md` | A stage needs custom tools, constrained capabilities, MCP access, or tool ergonomics. |
|
|
16
|
-
| Filesystem handoff | `context-engineering/filesystem-context.md` | Stages coordinate through files, artifacts, progress docs, or shared directories. |
|
|
17
|
-
| Hosted/remote agents | `context-engineering/hosted-agents.md` | Sandboxed, remote, containerized, or hosted execution environments. |
|
|
18
|
-
| Quality gates | `context-engineering/evaluation.md` | Review loops, acceptance checks, deterministic grading, or success criteria. |
|
|
19
|
-
| LLM-as-judge | `context-engineering/advanced-evaluation.md` | Automated judges, rubric-based review, pairwise comparison, evaluator agents. |
|
|
20
|
-
| Task fit | `context-engineering/project-development.md` | Deciding whether a workflow is a good automation target. |
|
|
21
|
-
| Deliberation model | `context-engineering/bdi-mental-states.md` | Explainable planning/reasoning workflows or cognitive-state decomposition. |
|
|
22
|
-
|
|
23
|
-
Use these references to design information flow before writing TypeScript. A workflow fails more often from missing/poorly-routed context than from syntax errors.
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Workflow Design Checklist
|
|
2
|
-
|
|
3
|
-
Use this before implementing or shipping a non-trivial workflow.
|
|
4
|
-
|
|
5
|
-
## 1. Purpose and fit
|
|
6
|
-
|
|
7
|
-
- What concrete outcome should the workflow produce?
|
|
8
|
-
- Is the task naturally multi-stage, parallel, resumable, or reusable?
|
|
9
|
-
- Which parts require LLM judgment and which are deterministic TypeScript?
|
|
10
|
-
- What should explicitly be out of scope?
|
|
11
|
-
|
|
12
|
-
## 2. Inputs
|
|
13
|
-
|
|
14
|
-
- Declare every user-provided value as an input.
|
|
15
|
-
- Pick the narrowest schema type: `text`, `string`, `number`, `boolean`, or `select`.
|
|
16
|
-
- Add useful descriptions because `/workflow inputs`, `--help`, and the input picker show them.
|
|
17
|
-
- Set defaults only when safe; remember runtime validation rejects unknown keys, missing required values, wrong types, and invalid `select` choices.
|
|
18
|
-
- Validate risky input combinations before starting expensive stages.
|
|
19
|
-
|
|
20
|
-
## 3. Stage decomposition
|
|
21
|
-
|
|
22
|
-
For each planned stage, write:
|
|
23
|
-
|
|
24
|
-
- stage name
|
|
25
|
-
- whether it is sequential, parallel, or conditional
|
|
26
|
-
- the LLM question/prompt it answers
|
|
27
|
-
- input context required
|
|
28
|
-
- output artifact/result shape
|
|
29
|
-
- model/thinking/tool/MCP needs
|
|
30
|
-
- failure mode and retry/fallback behavior, including whether `fallbackModels` is appropriate
|
|
31
|
-
|
|
32
|
-
Avoid stages that only do filesystem, parsing, git, or formatting work.
|
|
33
|
-
|
|
34
|
-
## 4. Information flow
|
|
35
|
-
|
|
36
|
-
For every edge between stages, specify the handoff mechanism:
|
|
37
|
-
|
|
38
|
-
- `previous` / `{previous}` for concise textual output
|
|
39
|
-
- structured return values for typed summaries
|
|
40
|
-
- files/artifacts for large outputs
|
|
41
|
-
- `reads` for explicit file preload
|
|
42
|
-
- `output` / `outputMode` for durable result files
|
|
43
|
-
- `sessionDir` for debug/session capture
|
|
44
|
-
|
|
45
|
-
Ask: "If the downstream stage only receives this handoff, can it succeed?"
|
|
46
|
-
|
|
47
|
-
## 5. Context engineering
|
|
48
|
-
|
|
49
|
-
Load `context-engineering.md` and relevant detailed references. At minimum consider:
|
|
50
|
-
|
|
51
|
-
- prompt placement and progressive disclosure
|
|
52
|
-
- transcript compression for large handoffs
|
|
53
|
-
- context degradation in loops
|
|
54
|
-
- file-based coordination for large artifacts
|
|
55
|
-
- multi-agent handoff protocols
|
|
56
|
-
- quality gates and evaluator stages
|
|
57
|
-
|
|
58
|
-
## 6. Control flow
|
|
59
|
-
|
|
60
|
-
- Use `ctx.chain` for dependent steps.
|
|
61
|
-
- Use `ctx.parallel` for independent branches.
|
|
62
|
-
- Use `ctx.ui.input/confirm/select/editor` for real human decisions or missing information during a run.
|
|
63
|
-
- Use direct-mode `concurrency` limits when available; for authored `ctx.parallel(...)`, keep fan-outs intentionally bounded because the high-level primitive currently runs its steps together.
|
|
64
|
-
- Use `failFast` deliberately where available.
|
|
65
|
-
- Use loops only with clear bounds and termination criteria.
|
|
66
|
-
- Use `fallbackModels` for critical expensive stages when model availability is uncertain.
|
|
67
|
-
|
|
68
|
-
## 7. User experience
|
|
69
|
-
|
|
70
|
-
- Name stages so they make sense in workflow UI/status.
|
|
71
|
-
- Return a compact structured output at the end.
|
|
72
|
-
- Save important artifacts with stable paths.
|
|
73
|
-
- Surface HIL/attention states promptly and tell users to open F2 or `/workflow connect <run-id>` when input is needed.
|
|
74
|
-
- Make attachable stage names clear enough for `/workflow attach <run-id> <stage>`.
|
|
75
|
-
- Include enough progress and output for resumed/inspected runs.
|
|
76
|
-
|
|
77
|
-
## 8. Final sanity pass
|
|
78
|
-
|
|
79
|
-
- Confirm the workflow definition exports `defineWorkflow(...).run(...).compile()`.
|
|
80
|
-
- Confirm every required input is declared and described.
|
|
81
|
-
- Confirm every stage name is user-readable in `/workflow status` and the graph UI.
|
|
82
|
-
- Confirm the workflow uses a supported surface: `/workflow`, the `workflow` tool, or explicit `runWorkflow(...)` objects.
|
|
83
|
-
- Confirm any required live controls are represented accurately: `connect`/`attach`/`pause` are slash/TUI controls; tool controls cover status/interrupt/resume.
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# Running and Inspecting Pi Workflows
|
|
2
|
-
|
|
3
|
-
Use this when the user asks to run, start, kick off, monitor, connect to, attach to, pause, interrupt, resume, or inspect a workflow.
|
|
4
|
-
|
|
5
|
-
## Discover first
|
|
6
|
-
|
|
7
|
-
For named workflows, do not guess names or schemas:
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
workflow({ action: "list" })
|
|
11
|
-
workflow({ action: "get", workflow: "<name>" })
|
|
12
|
-
workflow({ action: "inputs", workflow: "<name>" })
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
If required inputs are missing and cannot be inferred, ask the user with `ask_user_question` or a concise free-form question.
|
|
16
|
-
|
|
17
|
-
## Run named workflows
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
workflow({
|
|
21
|
-
action: "run",
|
|
22
|
-
workflow: "deep-research-codebase",
|
|
23
|
-
inputs: { prompt: "map workflow dispatch", max_concurrency: 4 },
|
|
24
|
-
})
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Slash equivalent:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
/workflow deep-research-codebase prompt="map workflow dispatch" max_concurrency=4
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Input overrides are bare `key=value` tokens. Values are JSON-parsed when possible, so `count=3`, `flag=true`, and `prompt="multi word value"` preserve useful types. A whole input object can also be passed as one JSON token.
|
|
34
|
-
|
|
35
|
-
Named workflow dispatch is always background-oriented: expect a run id and then monitor status. Press F2 or use `/workflow connect <run-id>` to attach to the graph viewer. In the TUI, `/workflow <name>` opens an input picker when the workflow declares inputs and either no arguments were supplied or required inputs are missing; supplied values seed the picker. Pass `--no-picker` to skip that interactive flow.
|
|
36
|
-
|
|
37
|
-
## Slash command surface
|
|
38
|
-
|
|
39
|
-
```text
|
|
40
|
-
/workflow list
|
|
41
|
-
/workflow inputs <name>
|
|
42
|
-
/workflow <name> --help
|
|
43
|
-
/workflow <name> [key=value ...]
|
|
44
|
-
/workflow connect [run-id]
|
|
45
|
-
/workflow attach [run-id] [stage-id-or-name]
|
|
46
|
-
/workflow pause [run-id] [stage-id-or-name]
|
|
47
|
-
/workflow status [run-id]
|
|
48
|
-
/workflow status --all
|
|
49
|
-
/workflow interrupt <run-id|--all>
|
|
50
|
-
/workflow kill <run-id|--all>
|
|
51
|
-
/workflow resume <run-id> [stage-id-or-name] [message]
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Use `connect` for the orchestrator graph. Use `attach` when the user wants to open a chat pane for a specific stage. Use `interrupt`/`pause`/`resume` for resumable live work; `resume` on a non-paused run reopens the saved snapshot/overlay. Use `kill` only when the run should be terminated and removed from live history/status. `/workflow status` lists in-flight runs by default; `/workflow status --all` includes retained ended runs as well.
|
|
55
|
-
|
|
56
|
-
Human-in-the-loop prompts from `ctx.ui.input`, `ctx.ui.confirm`, `ctx.ui.select`, and `ctx.ui.editor` surface in the workflow UI/graph viewer, not as ordinary chat modals.
|
|
57
|
-
|
|
58
|
-
## Direct runs
|
|
59
|
-
|
|
60
|
-
Use direct workflow-native orchestration for one-off tracked work that does not need a reusable workflow file.
|
|
61
|
-
|
|
62
|
-
Single tracked task:
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
workflow({
|
|
66
|
-
task: { name: "review", task: "Review this patch for API risks." },
|
|
67
|
-
async: true,
|
|
68
|
-
intercom: { delivery: "result" },
|
|
69
|
-
})
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Parallel fan-out:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
workflow({
|
|
76
|
-
tasks: [
|
|
77
|
-
{ name: "docs", task: "Review documentation gaps" },
|
|
78
|
-
{ name: "risks", task: "Review operational risks" },
|
|
79
|
-
],
|
|
80
|
-
concurrency: 2,
|
|
81
|
-
outputMode: "file-only",
|
|
82
|
-
async: true,
|
|
83
|
-
})
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Dependent chain:
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
workflow({
|
|
90
|
-
task: "Design the workflow SDK migration",
|
|
91
|
-
chain: [
|
|
92
|
-
{ name: "research", task: "Research {task}" },
|
|
93
|
-
{ name: "plan", task: "Plan from {previous}" },
|
|
94
|
-
],
|
|
95
|
-
async: true,
|
|
96
|
-
})
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Direct mode supports top-level/default options and per-task options such as `context`, `forkFromSessionFile`, `model`, `fallbackModels`, `thinkingLevel`, `tools`, `noTools`, `customTools`, `mcp`, `output`, `outputMode`, `reads`, `worktree`, `maxOutput`, `artifacts`, `sessionDir`, `cwd`, and `agentDir`. Direct chains also support `chainName`, `chainDir`, and `failFast`; use `chainDir` for shared relative reads/outputs/worktree diffs. For large fan-outs, prefer `outputMode: "file-only"`.
|
|
100
|
-
|
|
101
|
-
## Monitor/control with the workflow tool
|
|
102
|
-
|
|
103
|
-
The LLM-callable workflow tool exposes lifecycle controls with the same targeting affordances as the slash commands where a non-interactive tool call makes sense.
|
|
104
|
-
|
|
105
|
-
```ts
|
|
106
|
-
workflow({ action: "status" })
|
|
107
|
-
workflow({ action: "status", runId: "<id-or-prefix>" })
|
|
108
|
-
|
|
109
|
-
// Resumable interruption. Omit runId to target the active run.
|
|
110
|
-
workflow({ action: "interrupt" })
|
|
111
|
-
workflow({ action: "interrupt", runId: "<id-or-prefix>" })
|
|
112
|
-
workflow({ action: "interrupt", all: true })
|
|
113
|
-
workflow({ action: "interrupt", runId: "--all" })
|
|
114
|
-
|
|
115
|
-
// Resume a run, optionally targeting a stage by id, prefix, or name.
|
|
116
|
-
workflow({ action: "resume", runId: "<id-or-prefix>" })
|
|
117
|
-
workflow({ action: "resume", runId: "<id-or-prefix>", stageId: "review", message: "continue with the approved fix" })
|
|
118
|
-
|
|
119
|
-
// Destructive termination. Omit runId to target the active run.
|
|
120
|
-
workflow({ action: "kill" })
|
|
121
|
-
workflow({ action: "kill", runId: "<id-or-prefix>" })
|
|
122
|
-
workflow({ action: "kill", all: true })
|
|
123
|
-
workflow({ action: "kill", runId: "--all" })
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Control semantics:
|
|
127
|
-
|
|
128
|
-
- `runId` accepts full run ids or unique prefixes for `status`, `interrupt`, `resume`, and `kill`.
|
|
129
|
-
- `interrupt` and `kill` default to the active run when `runId` is omitted.
|
|
130
|
-
- `interrupt` is resumable: it pauses live work when pausable stages exist and keeps the run in live history/status.
|
|
131
|
-
- `resume` can target a stage with `stageId`; the target may be a stage id, unique prefix, or stage name. `message` is forwarded to paused work.
|
|
132
|
-
- `kill` is destructive: it aborts in-flight work and removes the run from live history/status. Use it only when the user wants the workflow gone.
|
|
133
|
-
|
|
134
|
-
Use slash commands for graph connect and stage attach because those are interactive TUI surfaces. When a run needs user input or attention, surface that to the user instead of polling silently.
|
|
135
|
-
|
|
136
|
-
## Intercom
|
|
137
|
-
|
|
138
|
-
For async direct runs, request result delivery when available:
|
|
139
|
-
|
|
140
|
-
```ts
|
|
141
|
-
workflow({
|
|
142
|
-
tasks: [{ name: "reviewer", task: "Review the patch" }],
|
|
143
|
-
async: true,
|
|
144
|
-
intercom: { delivery: "result" },
|
|
145
|
-
})
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Treat intercom payloads as user-visible workflow output.
|
|
149
|
-
|
|
150
|
-
## Common mistakes
|
|
151
|
-
|
|
152
|
-
- Do not fabricate workflow names; list first.
|
|
153
|
-
- Do not guess input keys; inspect with `inputs` or `get` first.
|
|
154
|
-
- Do not call `create`, `update`, or `delete` on the workflow tool; definitions are code-authored.
|
|
155
|
-
- Do not use legacy tool fields like `agent`, `stage`, or run-control `name`.
|
|
156
|
-
- Do not expect named workflow runs to block the chat turn; they are background tasks.
|
|
157
|
-
- Prefer `outputMode: "file-only"` for large fan-outs.
|
|
158
|
-
- Use status/interrupt/resume/kill controls for run lifecycle; inspect workflow output and artifacts for behavior.
|
|
159
|
-
- Do not call `kill` when the user asks to interrupt or pause resumably; kill removes the run from live history/status.
|