@bastani/atomic 0.8.26-alpha.1 → 0.8.26-alpha.11
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 +79 -0
- package/README.md +5 -5
- package/dist/builtin/intercom/CHANGELOG.md +60 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +60 -0
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +61 -0
- package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
- package/dist/builtin/subagents/agents/debugger.md +6 -6
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
- package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
- package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
- package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +55 -12
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +71 -12
- package/dist/builtin/subagents/src/runs/shared/acceptance.ts +2 -1
- package/dist/builtin/subagents/src/runs/shared/final-drain.ts +34 -0
- package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +416 -7
- package/dist/builtin/subagents/src/runs/shared/worktree.ts +2 -2
- package/dist/builtin/web-access/CHANGELOG.md +60 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +72 -0
- package/dist/builtin/workflows/README.md +10 -8
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +11 -8
- package/dist/builtin/workflows/builtin/goal.ts +137 -109
- package/dist/builtin/workflows/builtin/index.d.ts +2 -0
- package/dist/builtin/workflows/builtin/open-claude-design.ts +228 -151
- package/dist/builtin/workflows/builtin/ralph.d.ts +2 -0
- package/dist/builtin/workflows/builtin/ralph.ts +452 -279
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/create-spec/SKILL.md +14 -0
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +29 -10
- package/dist/builtin/workflows/src/extension/index.ts +10 -2
- package/dist/builtin/workflows/src/extension/runtime.ts +35 -3
- package/dist/builtin/workflows/src/extension/wiring.ts +13 -1
- package/dist/builtin/workflows/src/runs/background/status.ts +52 -6
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +453 -21
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +77 -11
- package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +402 -8
- package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -2
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +2 -2
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +182 -6
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +76 -6
- package/dist/builtin/workflows/src/shared/stage-prompt.ts +33 -2
- package/dist/builtin/workflows/src/shared/store-types.ts +31 -0
- package/dist/builtin/workflows/src/shared/store.ts +160 -18
- package/dist/builtin/workflows/src/shared/types.ts +3 -3
- package/dist/builtin/workflows/src/shared/workflow-failures.ts +758 -132
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +39 -3
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +74 -74
- package/dist/core/agent-session.d.ts +33 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +157 -182
- 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 +11 -9
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +23 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts +175 -0
- package/dist/core/compaction/context-compaction.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction.js +1636 -0
- package/dist/core/compaction/context-compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/extensions/types.d.ts +3 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +3 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +14 -7
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/session-manager.d.ts +41 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +146 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +5 -5
- 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 +5 -5
- 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 +16 -3
- 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 +21 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +17 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +17 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js +83 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +4 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +75 -10
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +13 -8
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +8 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +14 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/git-env.d.ts +10 -0
- package/dist/utils/git-env.d.ts.map +1 -0
- package/dist/utils/git-env.js +33 -0
- package/dist/utils/git-env.js.map +1 -0
- package/docs/compaction.md +185 -50
- package/docs/custom-provider.md +11 -9
- package/docs/extensions.md +46 -42
- package/docs/index.md +13 -6
- package/docs/json.md +15 -12
- package/docs/packages.md +2 -0
- package/docs/providers.md +4 -1
- package/docs/quickstart.md +18 -11
- package/docs/rpc.md +38 -23
- package/docs/sdk.md +17 -8
- package/docs/session-format.md +26 -13
- package/docs/sessions.md +3 -3
- package/docs/settings.md +2 -2
- package/docs/skills.md +1 -15
- package/docs/termux.md +9 -10
- package/docs/themes.md +2 -2
- package/docs/tmux.md +3 -3
- package/docs/tui.md +19 -32
- package/docs/usage.md +2 -2
- package/docs/workflows.md +60 -16
- package/package.json +6 -12
- package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
- package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
- package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
- package/node_modules/@earendil-works/pi-tui/README.md +0 -779
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +0 -47
- package/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/node_modules/get-east-asian-width/index.js +0 -30
- package/node_modules/get-east-asian-width/license +0 -9
- package/node_modules/get-east-asian-width/lookup-data.js +0 -21
- package/node_modules/get-east-asian-width/lookup.js +0 -138
- package/node_modules/get-east-asian-width/package.json +0 -71
- package/node_modules/get-east-asian-width/readme.md +0 -65
- package/node_modules/get-east-asian-width/utilities.js +0 -24
- package/node_modules/marked/LICENSE.md +0 -44
- package/node_modules/marked/README.md +0 -106
- package/node_modules/marked/bin/main.js +0 -282
- package/node_modules/marked/bin/marked.js +0 -15
- package/node_modules/marked/lib/marked.cjs +0 -2211
- package/node_modules/marked/lib/marked.cjs.map +0 -7
- package/node_modules/marked/lib/marked.d.cts +0 -728
- package/node_modules/marked/lib/marked.d.ts +0 -728
- package/node_modules/marked/lib/marked.esm.js +0 -2189
- package/node_modules/marked/lib/marked.esm.js.map +0 -7
- package/node_modules/marked/lib/marked.umd.js +0 -2213
- package/node_modules/marked/lib/marked.umd.js.map +0 -7
- package/node_modules/marked/man/marked.1 +0 -111
- package/node_modules/marked/man/marked.1.md +0 -92
- package/node_modules/marked/marked.min.js +0 -69
- package/node_modules/marked/package.json +0 -111
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/workflows",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.11",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for multi-stage workflow authoring and execution.",
|
|
6
6
|
"contributors": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@bastani/atomic": "*",
|
|
86
|
-
"@earendil-works/pi-tui": "
|
|
86
|
+
"@earendil-works/pi-tui": "^0.78.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@bastani/atomic": {
|
|
@@ -5,6 +5,20 @@ description: "Create a detailed execution plan/spec/PRD for implementing feature
|
|
|
5
5
|
|
|
6
6
|
You are tasked with creating a spec for implementing a new feature or system change in the codebase by leveraging existing research in the **$ARGUMENTS** path. If no research path is specified, use the entire `research/` directory. IMPORTANT: Research documents are located in the `research/` directory — do NOT look in the `specs/` directory for research. Follow the template below to produce a comprehensive specification as output in the `specs/` folder using the findings from RELEVANT research documents found in `research/`. The spec file MUST be named using the format `YYYY-MM-DD-topic.md` (e.g., `specs/2026-03-26-my-feature.md`), where the date is the current date and the topic is a kebab-case summary. Tip: It's good practice to use the `codebase-research-locator` and `codebase-research-analyzer` agents to help you find and analyze the research documents in the `research/` directory. It is also HIGHLY recommended to cite relevant research throughout the spec for additional context.
|
|
7
7
|
|
|
8
|
+
## Ask Clarifying Questions Before You Start
|
|
9
|
+
|
|
10
|
+
- If the user's request is vague or lacks necessary details, ask clarifying questions to gather more information before starting the spec creation process. This will help ensure that the spec is comprehensive and aligned with the user's needs.
|
|
11
|
+
|
|
12
|
+
### Determine the compatibility posture
|
|
13
|
+
|
|
14
|
+
- Before decomposing the spec creation request, identify whether this project must preserve backward compatibility for real downstream users.
|
|
15
|
+
- If the user explicitly allows breaking changes, public API changes, cleanup, or says there are no real users/downstream dependencies, allow breaking changes.
|
|
16
|
+
- If the user mentions production users, published APIs, downstream consumers, migration safety, or compatibility requirements, disallow breaking changes.
|
|
17
|
+
- If the posture is not inferable from the request, ask the user once before continuing, using the available structured question tool when possible.
|
|
18
|
+
- Carry this posture into the spec creation plan, the final spec frontmatter, and a `## Backwards Compatibility` section in the final spec.
|
|
19
|
+
- When allowing breaking changes, document existing legacy behavior, compatibility shims, optional flags, and public APIs as current state, not as constraints future specs must preserve unless the user explicitly asks for preservation.
|
|
20
|
+
- When not allowing breaking changes, document public APIs, compatibility-sensitive surfaces, downstream callers, migration constraints, and behavior that future work must preserve.
|
|
21
|
+
|
|
8
22
|
## Design philosophy: a spec is a theory of its doors
|
|
9
23
|
|
|
10
24
|
The entrypoints of a program, read together, are the program's **theory of its own purpose**. Everything inside the boundary is mechanism — the *how*. Only at the boundary does the code speak in terms of meaning — the *what* and the *why*. So the single most important thing this spec defines is not the mechanism inside the system, but the **set of doors** the system keeps: the functions, routes, and RPC methods through which untrusted input arrives and irreversible effects happen.
|
|
@@ -24,14 +24,24 @@ The user's research question/request is: **$ARGUMENTS**
|
|
|
24
24
|
- **CRITICAL**: Read these files yourself in the main context before spawning any sub-tasks
|
|
25
25
|
- This ensures you have full context before decomposing the research
|
|
26
26
|
|
|
27
|
-
2. **
|
|
27
|
+
2. **Determine the compatibility posture:**
|
|
28
|
+
- Before decomposing the research request, identify whether this project must preserve backward compatibility for real downstream users.
|
|
29
|
+
- If the user explicitly allows breaking changes, public API changes, cleanup, or says there are no real users/downstream dependencies, set `breaking_changes_allowed: true`.
|
|
30
|
+
- If the user mentions production users, published APIs, downstream consumers, migration safety, or compatibility requirements, set `breaking_changes_allowed: false`.
|
|
31
|
+
- If the posture is not inferable from the request, ask the user once before continuing, using the available structured question tool when possible.
|
|
32
|
+
- Carry this posture into the research plan, every sub-agent prompt, the final research document frontmatter, and the `## Compatibility Context` section.
|
|
33
|
+
- When `breaking_changes_allowed: true`, document existing legacy behavior, compatibility shims, optional flags, and public APIs as current state, not as constraints future specs must preserve unless the user explicitly asks for preservation.
|
|
34
|
+
- When `breaking_changes_allowed: false`, document public APIs, compatibility-sensitive surfaces, downstream callers, migration constraints, and behavior that future work must preserve.
|
|
35
|
+
|
|
36
|
+
3. **Analyze and decompose the research question:**
|
|
28
37
|
- Break the research question down into composable research areas
|
|
29
38
|
- Take time to ultrathink about the underlying patterns, connections, and architectural implications the user might be seeking
|
|
30
39
|
- Identify specific components, patterns, or concepts to investigate
|
|
31
40
|
- Create a research plan using TodoWrite to track all subtasks
|
|
41
|
+
- Include the compatibility posture in the plan so later synthesis and spec creation inherit the same constraint.
|
|
32
42
|
- Consider which directories, files, or architectural patterns are relevant
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
4. **Spawn parallel sub-agent tasks:**
|
|
35
45
|
- Create multiple Task agents to research different aspects concurrently
|
|
36
46
|
- We now have specialized agents that know how to do specific research tasks:
|
|
37
47
|
|
|
@@ -52,7 +62,7 @@ The user's research question/request is: **$ARGUMENTS**
|
|
|
52
62
|
|
|
53
63
|
**For online search:**
|
|
54
64
|
- VERY IMPORTANT: In case you discover external libraries as dependencies, use the **codebase-online-researcher** agent for external documentation and resources
|
|
55
|
-
- The agent fetches live web content using the **browser
|
|
65
|
+
- The agent fetches live web content using the **browser** skill's `browse` CLI (or `npx browse` / `curl`). Instruct it to apply the token-efficient fetch order: (1) try `curl https://<site>/llms.txt` for an AI-friendly index (see [llmstxt.org](https://llmstxt.org/llms.txt)), (2) try `curl <url> -H "Accept: text/markdown"` to get pre-converted Markdown (supported on Cloudflare-hosted docs via [Markdown for Agents](https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/)), (3) fall back to HTML parsing via `browse`
|
|
56
66
|
- Instruct the agent to return LINKS with their findings and INCLUDE those links in the research document
|
|
57
67
|
- The agent should persist reusable source documents under `research/web/<YYYY-MM-DD>-<kebab-case-topic>.md` (with frontmatter noting `source_url`, `fetched_at`, and `fetch_method`) so future research can reuse them without re-fetching
|
|
58
68
|
- Output directory for the synthesized research artifact: `research/docs/`
|
|
@@ -67,8 +77,9 @@ The user's research question/request is: **$ARGUMENTS**
|
|
|
67
77
|
- Each agent knows its job - just tell it what you're looking for
|
|
68
78
|
- Don't write detailed prompts about HOW to search - the agents already know
|
|
69
79
|
- Remind agents they are documenting, not evaluating or improving
|
|
80
|
+
- Include `breaking_changes_allowed: true` or `breaking_changes_allowed: false` in each sub-agent prompt so compatibility-sensitive findings are documented with the right posture.
|
|
70
81
|
|
|
71
|
-
|
|
82
|
+
5. **Wait for all sub-agents to complete and synthesize:**
|
|
72
83
|
- IMPORTANT: Wait for ALL sub-agent tasks to complete before proceeding
|
|
73
84
|
- Compile all sub-agent results (both codebase and research findings)
|
|
74
85
|
- Prioritize live codebase findings as primary source of truth
|
|
@@ -79,7 +90,7 @@ The user's research question/request is: **$ARGUMENTS**
|
|
|
79
90
|
- Answer the user's research question with concrete evidence
|
|
80
91
|
- **If findings reveal the original question was misframed** (e.g., the system works differently than assumed, or the components don't exist where expected), flag this to the user before finalizing the document. This is valuable signal — don't bury it.
|
|
81
92
|
|
|
82
|
-
|
|
93
|
+
6. **Generate research document:**
|
|
83
94
|
- Follow the directory structure for research documents:
|
|
84
95
|
|
|
85
96
|
```
|
|
@@ -117,6 +128,8 @@ research/
|
|
|
117
128
|
status: complete
|
|
118
129
|
last_updated: !`date '+%Y-%m-%d'`
|
|
119
130
|
last_updated_by: [Researcher name]
|
|
131
|
+
breaking_changes_allowed: [true or false]
|
|
132
|
+
compatibility_context: "[Short explanation of downstream-user/API compatibility posture]"
|
|
120
133
|
---
|
|
121
134
|
|
|
122
135
|
# Research
|
|
@@ -125,6 +138,10 @@ research/
|
|
|
125
138
|
|
|
126
139
|
[Original user query]
|
|
127
140
|
|
|
141
|
+
## Compatibility Context
|
|
142
|
+
|
|
143
|
+
[State whether breaking changes are allowed. If true, note that existing compatibility shims, optional flags, legacy APIs, and public APIs are documented as current state rather than preservation constraints. If false, summarize compatibility-sensitive surfaces, downstream users/callers, migration constraints, and behavior future work must preserve.]
|
|
144
|
+
|
|
128
145
|
## Summary
|
|
129
146
|
|
|
130
147
|
[High-level documentation of what was found, answering the user's question by describing what exists]
|
|
@@ -167,19 +184,19 @@ research/
|
|
|
167
184
|
[Any areas that need further investigation]
|
|
168
185
|
```
|
|
169
186
|
|
|
170
|
-
|
|
187
|
+
7. **Add GitHub permalinks (if applicable):**
|
|
171
188
|
- Check if on main branch or if commit is pushed: `git branch --show-current` and `git status`
|
|
172
189
|
- If on main/master or pushed, generate GitHub permalinks:
|
|
173
190
|
- Get repo info: `gh repo view --json owner,name`
|
|
174
191
|
- Create permalinks: `https://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}`
|
|
175
192
|
- Replace local file references with permalinks in the document
|
|
176
193
|
|
|
177
|
-
|
|
194
|
+
8. **Present findings:**
|
|
178
195
|
- Present a concise summary of findings to the user
|
|
179
196
|
- Include key file references for easy navigation
|
|
180
197
|
- Ask if they have follow-up questions or need clarification
|
|
181
198
|
|
|
182
|
-
|
|
199
|
+
9. **Handle follow-up questions:**
|
|
183
200
|
|
|
184
201
|
- If the user has follow-up questions, append to the same research document
|
|
185
202
|
- Update the frontmatter fields `last_updated` and `last_updated_by` to reflect the update
|
|
@@ -207,10 +224,12 @@ research/
|
|
|
207
224
|
- **REMEMBER**: Document what IS, not what SHOULD BE
|
|
208
225
|
- **NO RECOMMENDATIONS**: Only describe the current state of the codebase
|
|
209
226
|
- **File reading**: Always read mentioned files FULLY (no limit/offset) before spawning sub-tasks
|
|
227
|
+
- **Compatibility posture**: Always determine `breaking_changes_allowed` before decomposing the question. This is a single project/research posture, not a request to add compatibility flags. Use it to document whether old APIs and shims are constraints for future work.
|
|
210
228
|
- **Critical ordering**: Follow the numbered steps exactly
|
|
211
229
|
- ALWAYS read mentioned files first before spawning sub-tasks (step 1)
|
|
212
|
-
- ALWAYS
|
|
213
|
-
- ALWAYS
|
|
230
|
+
- ALWAYS determine compatibility posture before decomposing the question (step 2)
|
|
231
|
+
- ALWAYS wait for all sub-agents to complete before synthesizing (step 5)
|
|
232
|
+
- ALWAYS gather metadata before writing the document (as part of step 6)
|
|
214
233
|
- NEVER write the research document with placeholder values
|
|
215
234
|
|
|
216
235
|
- **Frontmatter consistency**:
|
|
@@ -1795,7 +1795,11 @@ export function makeExecuteWorkflowTool(
|
|
|
1795
1795
|
const isPaused =
|
|
1796
1796
|
run?.status === "paused" ||
|
|
1797
1797
|
(run?.stages.some((s) => s.status === "paused") ?? false);
|
|
1798
|
-
|
|
1798
|
+
const isResumableContinuation = run !== undefined && !isPaused && (
|
|
1799
|
+
(run.status === "failed" && run.endedAt !== undefined && run.resumable !== false) ||
|
|
1800
|
+
(run.endedAt === undefined && run.resumable === true && run.failureRecoverability === "recoverable")
|
|
1801
|
+
);
|
|
1802
|
+
if (isResumableContinuation) {
|
|
1799
1803
|
const continuation = activeRuntime.resumeFailedRun(stageRunId, stage.stageId, { policy });
|
|
1800
1804
|
return {
|
|
1801
1805
|
action: "resume",
|
|
@@ -3133,7 +3137,11 @@ function factory(pi: ExtensionAPI): void {
|
|
|
3133
3137
|
const isPaused =
|
|
3134
3138
|
run?.status === "paused" ||
|
|
3135
3139
|
(run?.stages.some((s) => s.status === "paused") ?? false);
|
|
3136
|
-
|
|
3140
|
+
const isResumableContinuation = run !== undefined && !isPaused && (
|
|
3141
|
+
(run.status === "failed" && run.endedAt !== undefined && run.resumable !== false) ||
|
|
3142
|
+
(run.endedAt === undefined && run.resumable === true && run.failureRecoverability === "recoverable")
|
|
3143
|
+
);
|
|
3144
|
+
if (isResumableContinuation) {
|
|
3137
3145
|
const continuation = runtimeForContext(ctx).resumeFailedRun(stageRunId, stageId, { policy });
|
|
3138
3146
|
if (continuation.ok) {
|
|
3139
3147
|
print(continuation.message);
|
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
import { validateWorkflowModels } from "../runs/shared/model-fallback.js";
|
|
45
45
|
import { runDetached } from "../runs/background/runner.js";
|
|
46
46
|
import type { JobTracker } from "../runs/background/job-tracker.js";
|
|
47
|
+
import { appendRunEnd } from "../shared/persistence-session-entries.js";
|
|
47
48
|
import { classifyWorkflowFailure } from "../shared/workflow-failures.js";
|
|
48
49
|
|
|
49
50
|
// ---------------------------------------------------------------------------
|
|
@@ -389,13 +390,39 @@ export function createExtensionRuntime(opts: ExtensionRuntimeOpts = {}): Extensi
|
|
|
389
390
|
return { ok: true, stageId: failedStageId };
|
|
390
391
|
}
|
|
391
392
|
|
|
393
|
+
function finalizeResumedActiveBlockedSourceRun(source: RunSnapshot, continuationRunId: string): void {
|
|
394
|
+
const errorMessage = source.error ?? source.failureMessage ?? `workflow resumed in new run ${continuationRunId}`;
|
|
395
|
+
const metadata = {
|
|
396
|
+
...(source.failureKind !== undefined ? { failureKind: source.failureKind } : {}),
|
|
397
|
+
...(source.failureCode !== undefined ? { failureCode: source.failureCode } : {}),
|
|
398
|
+
failureRecoverability: "non_recoverable",
|
|
399
|
+
failureDisposition: "terminal_killed",
|
|
400
|
+
...(source.failureMessage !== undefined ? { failureMessage: source.failureMessage } : {}),
|
|
401
|
+
...(source.failedStageId !== undefined ? { failedStageId: source.failedStageId } : {}),
|
|
402
|
+
resumable: false,
|
|
403
|
+
...(source.retryAfterMs !== undefined ? { retryAfterMs: source.retryAfterMs } : {}),
|
|
404
|
+
} as const;
|
|
405
|
+
const recorded = activeStore.recordRunEnd(source.id, "killed", undefined, errorMessage, metadata);
|
|
406
|
+
if (recorded && persistence !== undefined) {
|
|
407
|
+
appendRunEnd(persistence, {
|
|
408
|
+
runId: source.id,
|
|
409
|
+
status: "killed",
|
|
410
|
+
error: errorMessage,
|
|
411
|
+
...metadata,
|
|
412
|
+
ts: Date.now(),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
392
417
|
function resumeFailedRun(sourceRunId: string, stageId?: string, options?: RuntimeDispatchOptions): ResumeFailedRunResult {
|
|
393
418
|
const source = activeStore.runs().find((run) => run.id === sourceRunId);
|
|
394
419
|
if (source === undefined) {
|
|
395
420
|
return { ok: false, reason: "run_not_found", message: `run not found: ${sourceRunId}` };
|
|
396
421
|
}
|
|
397
|
-
|
|
398
|
-
|
|
422
|
+
const isTerminalFailedResumable = source.status === "failed" && source.endedAt !== undefined && source.resumable !== false;
|
|
423
|
+
const isActiveBlockedResumable = source.endedAt === undefined && source.resumable === true && source.failureRecoverability === "recoverable";
|
|
424
|
+
if (!isTerminalFailedResumable && !isActiveBlockedResumable) {
|
|
425
|
+
return { ok: false, reason: "not_resumable", message: `run ${sourceRunId} is not a resumable workflow run` };
|
|
399
426
|
}
|
|
400
427
|
const def = registry.get(source.name);
|
|
401
428
|
if (def === undefined) {
|
|
@@ -415,12 +442,17 @@ export function createExtensionRuntime(opts: ExtensionRuntimeOpts = {}): Extensi
|
|
|
415
442
|
...runOptions({ workflow: def.name, inputs: sourceInputs }, options?.policy),
|
|
416
443
|
continuation: { source, resumeFromStageId: resolvedStage.stageId },
|
|
417
444
|
});
|
|
445
|
+
if (isActiveBlockedResumable) {
|
|
446
|
+
finalizeResumedActiveBlockedSourceRun(source, accepted.runId);
|
|
447
|
+
}
|
|
418
448
|
return {
|
|
419
449
|
ok: true,
|
|
420
450
|
runId: accepted.runId,
|
|
421
451
|
sourceRunId: source.id,
|
|
422
452
|
resumeFromStageId: resolvedStage.stageId,
|
|
423
|
-
message:
|
|
453
|
+
message: isActiveBlockedResumable
|
|
454
|
+
? `Resuming blocked workflow "${def.name}" from run ${source.id.slice(0, 8)} at stage ${resolvedStage.stageId.slice(0, 8)} (new run ${accepted.runId}).`
|
|
455
|
+
: `Resuming failed workflow "${def.name}" from run ${source.id.slice(0, 8)} at stage ${resolvedStage.stageId.slice(0, 8)} (new run ${accepted.runId}).`,
|
|
424
456
|
};
|
|
425
457
|
}
|
|
426
458
|
|
|
@@ -226,7 +226,19 @@ async function createTestAgentSession(_options?: CreateAgentSessionOptions): Pro
|
|
|
226
226
|
return { cancelled: true };
|
|
227
227
|
},
|
|
228
228
|
async compact(): ReturnType<StageSessionRuntime["compact"]> {
|
|
229
|
-
return {
|
|
229
|
+
return {
|
|
230
|
+
promptVersion: 1,
|
|
231
|
+
deletedTargets: [],
|
|
232
|
+
protectedEntryIds: [],
|
|
233
|
+
stats: {
|
|
234
|
+
objectsBefore: 0,
|
|
235
|
+
objectsAfter: 0,
|
|
236
|
+
objectsDeleted: 0,
|
|
237
|
+
tokensBefore: 0,
|
|
238
|
+
tokensAfter: 0,
|
|
239
|
+
percentReduction: 0,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
230
242
|
},
|
|
231
243
|
abortCompaction(): void {},
|
|
232
244
|
async abort(): Promise<void> {},
|
|
@@ -82,6 +82,14 @@ export interface RunDetail {
|
|
|
82
82
|
readonly stages: readonly RunSnapshot["stages"][number][];
|
|
83
83
|
readonly result?: WorkflowOutputValues;
|
|
84
84
|
readonly error?: string;
|
|
85
|
+
readonly failureKind?: RunSnapshot["failureKind"];
|
|
86
|
+
readonly failureCode?: RunSnapshot["failureCode"];
|
|
87
|
+
readonly failureRecoverability?: RunSnapshot["failureRecoverability"];
|
|
88
|
+
readonly failureDisposition?: RunSnapshot["failureDisposition"];
|
|
89
|
+
readonly failedStageId?: string;
|
|
90
|
+
readonly resumable?: boolean;
|
|
91
|
+
readonly retryAfterMs?: number;
|
|
92
|
+
readonly blockedAt?: number;
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
export type InspectRunResult =
|
|
@@ -146,11 +154,26 @@ export function killRun(
|
|
|
146
154
|
const previousStatus = run.status;
|
|
147
155
|
|
|
148
156
|
// Abort active executor (no-op if not registered)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
const errorMessage = "workflow killed";
|
|
158
|
+
opts?.cancellation?.abort(runId, errorMessage);
|
|
159
|
+
|
|
160
|
+
const metadata = {
|
|
161
|
+
failureKind: "cancelled",
|
|
162
|
+
failureCode: "cancelled",
|
|
163
|
+
failureRecoverability: "non_recoverable",
|
|
164
|
+
failureDisposition: "terminal_killed",
|
|
165
|
+
failureMessage: errorMessage,
|
|
166
|
+
resumable: false,
|
|
167
|
+
} as const;
|
|
168
|
+
const recorded = activeStore.recordRunEnd(runId, "killed", undefined, errorMessage, metadata);
|
|
152
169
|
if (recorded && opts?.persistence) {
|
|
153
|
-
appendRunEnd(opts.persistence, {
|
|
170
|
+
appendRunEnd(opts.persistence, {
|
|
171
|
+
runId,
|
|
172
|
+
status: "killed",
|
|
173
|
+
error: errorMessage,
|
|
174
|
+
...metadata,
|
|
175
|
+
ts: Date.now(),
|
|
176
|
+
});
|
|
154
177
|
}
|
|
155
178
|
|
|
156
179
|
return { ok: true, runId, previousStatus };
|
|
@@ -247,14 +270,29 @@ export function resumeRun(
|
|
|
247
270
|
// Return a deep copy of the snapshot for safe consumption
|
|
248
271
|
const snapshot = structuredClone(run);
|
|
249
272
|
const resumedCopy = structuredClone(resumed);
|
|
250
|
-
if (run.status === "
|
|
273
|
+
if (run.status === "killed" || run.resumable === false) {
|
|
251
274
|
return {
|
|
252
275
|
ok: true,
|
|
253
276
|
runId,
|
|
254
277
|
snapshot,
|
|
255
278
|
resumed: resumedCopy,
|
|
256
279
|
mode: "not_resumable",
|
|
257
|
-
message: "This
|
|
280
|
+
message: "This workflow is not resumable; inspect the snapshot and start a new workflow run when ready.",
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
if (
|
|
284
|
+
run.endedAt === undefined &&
|
|
285
|
+
run.resumable === true &&
|
|
286
|
+
run.failureRecoverability === "recoverable" &&
|
|
287
|
+
run.failedStageId !== undefined
|
|
288
|
+
) {
|
|
289
|
+
return {
|
|
290
|
+
ok: true,
|
|
291
|
+
runId,
|
|
292
|
+
snapshot,
|
|
293
|
+
resumed: resumedCopy,
|
|
294
|
+
mode: resumedCopy.length > 0 ? "paused" : "snapshot",
|
|
295
|
+
message: `Workflow is blocked on a recoverable ${run.failureCode ?? run.failureKind ?? "workflow"} failure at stage ${run.failedStageId}; retry/resume after the issue clears.`,
|
|
258
296
|
};
|
|
259
297
|
}
|
|
260
298
|
return {
|
|
@@ -441,6 +479,14 @@ export function inspectRun(
|
|
|
441
479
|
stages: expandedStages.map((stage) => structuredClone(stage)),
|
|
442
480
|
result: copy.result,
|
|
443
481
|
error: copy.error,
|
|
482
|
+
failureKind: copy.failureKind,
|
|
483
|
+
failureCode: copy.failureCode,
|
|
484
|
+
failureRecoverability: copy.failureRecoverability,
|
|
485
|
+
failureDisposition: copy.failureDisposition,
|
|
486
|
+
failedStageId: copy.failedStageId,
|
|
487
|
+
resumable: copy.resumable,
|
|
488
|
+
retryAfterMs: copy.retryAfterMs,
|
|
489
|
+
blockedAt: copy.blockedAt,
|
|
444
490
|
};
|
|
445
491
|
|
|
446
492
|
return { ok: true, runId: copy.id, detail };
|