@chinhae/atw-cli 0.1.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/COPYRIGHT +14 -0
- package/LICENSE +77 -0
- package/README.md +122 -0
- package/bin/atw.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +299 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/ablate.d.ts +14 -0
- package/dist/commands/ablate.d.ts.map +1 -0
- package/dist/commands/ablate.js +307 -0
- package/dist/commands/ablate.js.map +1 -0
- package/dist/commands/channel/adapters/claude.d.ts +53 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
- package/dist/commands/channel/adapters/claude.js +225 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -0
- package/dist/commands/channel/adapters/codex.d.ts +93 -0
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
- package/dist/commands/channel/adapters/codex.js +573 -0
- package/dist/commands/channel/adapters/codex.js.map +1 -0
- package/dist/commands/channel/adapters/index.d.ts +94 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -0
- package/dist/commands/channel/adapters/index.js +116 -0
- package/dist/commands/channel/adapters/index.js.map +1 -0
- package/dist/commands/channel/adapters/types.d.ts +33 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -0
- package/dist/commands/channel/adapters/types.js +2 -0
- package/dist/commands/channel/adapters/types.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +32 -0
- package/dist/commands/channel/agent-loader.d.ts.map +1 -0
- package/dist/commands/channel/agent-loader.js +158 -0
- package/dist/commands/channel/agent-loader.js.map +1 -0
- package/dist/commands/channel/context-loader.d.ts +26 -0
- package/dist/commands/channel/context-loader.d.ts.map +1 -0
- package/dist/commands/channel/context-loader.js +311 -0
- package/dist/commands/channel/context-loader.js.map +1 -0
- package/dist/commands/channel/context-trust.d.ts +31 -0
- package/dist/commands/channel/context-trust.d.ts.map +1 -0
- package/dist/commands/channel/context-trust.js +139 -0
- package/dist/commands/channel/context-trust.js.map +1 -0
- package/dist/commands/channel/context.d.ts +16 -0
- package/dist/commands/channel/context.d.ts.map +1 -0
- package/dist/commands/channel/context.js +83 -0
- package/dist/commands/channel/context.js.map +1 -0
- package/dist/commands/channel/create.d.ts +27 -0
- package/dist/commands/channel/create.d.ts.map +1 -0
- package/dist/commands/channel/create.js +39 -0
- package/dist/commands/channel/create.js.map +1 -0
- package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
- package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
- package/dist/commands/channel/dev-parse-trace.js +70 -0
- package/dist/commands/channel/dev-parse-trace.js.map +1 -0
- package/dist/commands/channel/guard.d.ts +150 -0
- package/dist/commands/channel/guard.d.ts.map +1 -0
- package/dist/commands/channel/guard.js +479 -0
- package/dist/commands/channel/guard.js.map +1 -0
- package/dist/commands/channel/index.d.ts +3 -0
- package/dist/commands/channel/index.d.ts.map +1 -0
- package/dist/commands/channel/index.js +535 -0
- package/dist/commands/channel/index.js.map +1 -0
- package/dist/commands/channel/interrupt.d.ts +10 -0
- package/dist/commands/channel/interrupt.d.ts.map +1 -0
- package/dist/commands/channel/interrupt.js +22 -0
- package/dist/commands/channel/interrupt.js.map +1 -0
- package/dist/commands/channel/kill.d.ts +7 -0
- package/dist/commands/channel/kill.d.ts.map +1 -0
- package/dist/commands/channel/kill.js +130 -0
- package/dist/commands/channel/kill.js.map +1 -0
- package/dist/commands/channel/list.d.ts +17 -0
- package/dist/commands/channel/list.d.ts.map +1 -0
- package/dist/commands/channel/list.js +233 -0
- package/dist/commands/channel/list.js.map +1 -0
- package/dist/commands/channel/messages.d.ts +15 -0
- package/dist/commands/channel/messages.d.ts.map +1 -0
- package/dist/commands/channel/messages.js +245 -0
- package/dist/commands/channel/messages.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +27 -0
- package/dist/commands/channel/rm.d.ts.map +1 -0
- package/dist/commands/channel/rm.js +216 -0
- package/dist/commands/channel/rm.js.map +1 -0
- package/dist/commands/channel/run.d.ts +30 -0
- package/dist/commands/channel/run.d.ts.map +1 -0
- package/dist/commands/channel/run.js +130 -0
- package/dist/commands/channel/run.js.map +1 -0
- package/dist/commands/channel/send.d.ts +11 -0
- package/dist/commands/channel/send.d.ts.map +1 -0
- package/dist/commands/channel/send.js +24 -0
- package/dist/commands/channel/send.js.map +1 -0
- package/dist/commands/channel/spawn.d.ts +43 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -0
- package/dist/commands/channel/spawn.js +247 -0
- package/dist/commands/channel/spawn.js.map +1 -0
- package/dist/commands/channel/store/events.d.ts +22 -0
- package/dist/commands/channel/store/events.d.ts.map +1 -0
- package/dist/commands/channel/store/events.js +43 -0
- package/dist/commands/channel/store/events.js.map +1 -0
- package/dist/commands/channel/store/filter.d.ts +3 -0
- package/dist/commands/channel/store/filter.d.ts.map +1 -0
- package/dist/commands/channel/store/filter.js +2 -0
- package/dist/commands/channel/store/filter.js.map +1 -0
- package/dist/commands/channel/store/lock.d.ts +23 -0
- package/dist/commands/channel/store/lock.d.ts.map +1 -0
- package/dist/commands/channel/store/lock.js +99 -0
- package/dist/commands/channel/store/lock.js.map +1 -0
- package/dist/commands/channel/store/paths.d.ts +77 -0
- package/dist/commands/channel/store/paths.d.ts.map +1 -0
- package/dist/commands/channel/store/paths.js +272 -0
- package/dist/commands/channel/store/paths.js.map +1 -0
- package/dist/commands/channel/store/schema.d.ts +27 -0
- package/dist/commands/channel/store/schema.d.ts.map +1 -0
- package/dist/commands/channel/store/schema.js +34 -0
- package/dist/commands/channel/store/schema.js.map +1 -0
- package/dist/commands/channel/store/thread-state.d.ts +5 -0
- package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
- package/dist/commands/channel/store/thread-state.js +16 -0
- package/dist/commands/channel/store/thread-state.js.map +1 -0
- package/dist/commands/channel/store/watch.d.ts +19 -0
- package/dist/commands/channel/store/watch.d.ts.map +1 -0
- package/dist/commands/channel/store/watch.js +153 -0
- package/dist/commands/channel/store/watch.js.map +1 -0
- package/dist/commands/channel/supervisor/idle.d.ts +45 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/idle.js +70 -0
- package/dist/commands/channel/supervisor/idle.js.map +1 -0
- package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/inbox.js +160 -0
- package/dist/commands/channel/supervisor/inbox.js.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.js +146 -0
- package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
- package/dist/commands/channel/supervisor/stdout.d.ts +71 -0
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/stdout.js +229 -0
- package/dist/commands/channel/supervisor/stdout.js.map +1 -0
- package/dist/commands/channel/supervisor/turns.d.ts +31 -0
- package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/turns.js +45 -0
- package/dist/commands/channel/supervisor/turns.js.map +1 -0
- package/dist/commands/channel/supervisor/warning.d.ts +48 -0
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/warning.js +77 -0
- package/dist/commands/channel/supervisor/warning.js.map +1 -0
- package/dist/commands/channel/supervisor.d.ts +91 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -0
- package/dist/commands/channel/supervisor.js +463 -0
- package/dist/commands/channel/supervisor.js.map +1 -0
- package/dist/commands/channel/text-body.d.ts +13 -0
- package/dist/commands/channel/text-body.d.ts.map +1 -0
- package/dist/commands/channel/text-body.js +47 -0
- package/dist/commands/channel/text-body.js.map +1 -0
- package/dist/commands/channel/threads.d.ts +39 -0
- package/dist/commands/channel/threads.d.ts.map +1 -0
- package/dist/commands/channel/threads.js +106 -0
- package/dist/commands/channel/threads.js.map +1 -0
- package/dist/commands/channel/title.d.ts +12 -0
- package/dist/commands/channel/title.d.ts.map +1 -0
- package/dist/commands/channel/title.js +24 -0
- package/dist/commands/channel/title.js.map +1 -0
- package/dist/commands/channel/wait.d.ts +17 -0
- package/dist/commands/channel/wait.d.ts.map +1 -0
- package/dist/commands/channel/wait.js +75 -0
- package/dist/commands/channel/wait.js.map +1 -0
- package/dist/commands/init.d.ts +71 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1612 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mem.d.ts +30 -0
- package/dist/commands/mem.d.ts.map +1 -0
- package/dist/commands/mem.js +423 -0
- package/dist/commands/mem.js.map +1 -0
- package/dist/commands/uninstall.d.ts +36 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +205 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +133 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +2255 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/upgrade.d.ts +28 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +84 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/workflow.d.ts +35 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +232 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/configurators/antigravity.d.ts +7 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +11 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/claude.d.ts +23 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +123 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/codebuddy.d.ts +10 -0
- package/dist/configurators/codebuddy.d.ts.map +1 -0
- package/dist/configurators/codebuddy.js +24 -0
- package/dist/configurators/codebuddy.js.map +1 -0
- package/dist/configurators/codex.d.ts +57 -0
- package/dist/configurators/codex.d.ts.map +1 -0
- package/dist/configurators/codex.js +170 -0
- package/dist/configurators/codex.js.map +1 -0
- package/dist/configurators/copilot.d.ts +18 -0
- package/dist/configurators/copilot.d.ts.map +1 -0
- package/dist/configurators/copilot.js +50 -0
- package/dist/configurators/copilot.js.map +1 -0
- package/dist/configurators/cursor.d.ts +10 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +23 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/devin.d.ts +8 -0
- package/dist/configurators/devin.d.ts.map +1 -0
- package/dist/configurators/devin.js +12 -0
- package/dist/configurators/devin.js.map +1 -0
- package/dist/configurators/droid.d.ts +10 -0
- package/dist/configurators/droid.d.ts.map +1 -0
- package/dist/configurators/droid.js +24 -0
- package/dist/configurators/droid.js.map +1 -0
- package/dist/configurators/dsh.d.ts +29 -0
- package/dist/configurators/dsh.d.ts.map +1 -0
- package/dist/configurators/dsh.js +64 -0
- package/dist/configurators/dsh.js.map +1 -0
- package/dist/configurators/gemini.d.ts +19 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +40 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/grok.d.ts +17 -0
- package/dist/configurators/grok.d.ts.map +1 -0
- package/dist/configurators/grok.js +38 -0
- package/dist/configurators/grok.js.map +1 -0
- package/dist/configurators/index.d.ts +68 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +191 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/kilo.d.ts +7 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +11 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kimi.d.ts +26 -0
- package/dist/configurators/kimi.d.ts.map +1 -0
- package/dist/configurators/kimi.js +74 -0
- package/dist/configurators/kimi.js.map +1 -0
- package/dist/configurators/kiro.d.ts +11 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +30 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/configurators/omp.d.ts +6 -0
- package/dist/configurators/omp.d.ts.map +1 -0
- package/dist/configurators/omp.js +28 -0
- package/dist/configurators/omp.js.map +1 -0
- package/dist/configurators/opencode.d.ts +5 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +80 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/pi.d.ts +5 -0
- package/dist/configurators/pi.d.ts.map +1 -0
- package/dist/configurators/pi.js +39 -0
- package/dist/configurators/pi.js.map +1 -0
- package/dist/configurators/qoder.d.ts +12 -0
- package/dist/configurators/qoder.d.ts.map +1 -0
- package/dist/configurators/qoder.js +30 -0
- package/dist/configurators/qoder.js.map +1 -0
- package/dist/configurators/reasonix.d.ts +17 -0
- package/dist/configurators/reasonix.d.ts.map +1 -0
- package/dist/configurators/reasonix.js +37 -0
- package/dist/configurators/reasonix.js.map +1 -0
- package/dist/configurators/shared.d.ts +196 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +600 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/snow.d.ts +25 -0
- package/dist/configurators/snow.d.ts.map +1 -0
- package/dist/configurators/snow.js +69 -0
- package/dist/configurators/snow.js.map +1 -0
- package/dist/configurators/trae.d.ts +16 -0
- package/dist/configurators/trae.d.ts.map +1 -0
- package/dist/configurators/trae.js +34 -0
- package/dist/configurators/trae.js.map +1 -0
- package/dist/configurators/workflow.d.ts +51 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +210 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/configurators/zcode.d.ts +19 -0
- package/dist/configurators/zcode.d.ts.map +1 -0
- package/dist/configurators/zcode.js +51 -0
- package/dist/configurators/zcode.js.map +1 -0
- package/dist/constants/paths.d.ts +74 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +83 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +65 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +202 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/templates/atw/agents/implement-agent.md +69 -0
- package/dist/templates/atw/agents/review.md +68 -0
- package/dist/templates/atw/config.yaml +158 -0
- package/dist/templates/atw/gitattributes.txt +9 -0
- package/dist/templates/atw/gitignore.txt +32 -0
- package/dist/templates/atw/index.d.ts +70 -0
- package/dist/templates/atw/index.d.ts.map +1 -0
- package/dist/templates/atw/index.js +137 -0
- package/dist/templates/atw/index.js.map +1 -0
- package/dist/templates/atw/scripts/__init__.py +5 -0
- package/dist/templates/atw/scripts/add_session.py +1545 -0
- package/dist/templates/atw/scripts/common/__init__.py +94 -0
- package/dist/templates/atw/scripts/common/active_task.py +857 -0
- package/dist/templates/atw/scripts/common/atw_config.py +239 -0
- package/dist/templates/atw/scripts/common/cli_adapter.py +949 -0
- package/dist/templates/atw/scripts/common/config.py +482 -0
- package/dist/templates/atw/scripts/common/developer.py +192 -0
- package/dist/templates/atw/scripts/common/git.py +203 -0
- package/dist/templates/atw/scripts/common/git_context.py +106 -0
- package/dist/templates/atw/scripts/common/io.py +160 -0
- package/dist/templates/atw/scripts/common/log.py +45 -0
- package/dist/templates/atw/scripts/common/packages_context.py +238 -0
- package/dist/templates/atw/scripts/common/paths.py +543 -0
- package/dist/templates/atw/scripts/common/safe_commit.py +322 -0
- package/dist/templates/atw/scripts/common/session_context.py +892 -0
- package/dist/templates/atw/scripts/common/task_context.py +470 -0
- package/dist/templates/atw/scripts/common/task_queue.py +188 -0
- package/dist/templates/atw/scripts/common/task_store.py +1940 -0
- package/dist/templates/atw/scripts/common/task_utils.py +498 -0
- package/dist/templates/atw/scripts/common/tasks.py +122 -0
- package/dist/templates/atw/scripts/common/types.py +110 -0
- package/dist/templates/atw/scripts/common/workflow_phase.py +242 -0
- package/dist/templates/atw/scripts/get_context.py +16 -0
- package/dist/templates/atw/scripts/get_developer.py +26 -0
- package/dist/templates/atw/scripts/github_sync.py +391 -0
- package/dist/templates/atw/scripts/hooks/linear_sync.py +243 -0
- package/dist/templates/atw/scripts/init_developer.py +51 -0
- package/dist/templates/atw/scripts/task.py +833 -0
- package/dist/templates/atw/scripts/tickets.py +495 -0
- package/dist/templates/atw/tasks/.gitkeep +0 -0
- package/dist/templates/atw/workflow.md +754 -0
- package/dist/templates/claude/agents/atw-implement-agent.md +107 -0
- package/dist/templates/claude/agents/atw-review.md +113 -0
- package/dist/templates/claude/hooks/statusline.py +332 -0
- package/dist/templates/claude/index.d.ts +31 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +57 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +73 -0
- package/dist/templates/codebuddy/agents/atw-implement-agent.md +107 -0
- package/dist/templates/codebuddy/agents/atw-review.md +113 -0
- package/dist/templates/codebuddy/index.d.ts +15 -0
- package/dist/templates/codebuddy/index.d.ts.map +1 -0
- package/dist/templates/codebuddy/index.js +15 -0
- package/dist/templates/codebuddy/index.js.map +1 -0
- package/dist/templates/codebuddy/settings.json +69 -0
- package/dist/templates/codex/agents/atw-implement-agent.toml +37 -0
- package/dist/templates/codex/agents/atw-review.toml +56 -0
- package/dist/templates/codex/config.toml +39 -0
- package/dist/templates/codex/hooks/session-start.py +514 -0
- package/dist/templates/codex/hooks.json +27 -0
- package/dist/templates/codex/index.d.ts +35 -0
- package/dist/templates/codex/index.d.ts.map +1 -0
- package/dist/templates/codex/index.js +67 -0
- package/dist/templates/codex/index.js.map +1 -0
- package/dist/templates/common/bundled-skills/atw-askme/SKILL.md +7 -0
- package/dist/templates/common/bundled-skills/atw-askme/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-askme-with-docs/SKILL.md +7 -0
- package/dist/templates/common/bundled-skills/atw-askme-with-docs/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-channel/SKILL.md +67 -0
- package/dist/templates/common/bundled-skills/atw-channel/references/command-reference.md +480 -0
- package/dist/templates/common/bundled-skills/atw-channel/references/forum.md +233 -0
- package/dist/templates/common/bundled-skills/atw-channel/references/progress-debugging.md +226 -0
- package/dist/templates/common/bundled-skills/atw-channel/references/workers.md +274 -0
- package/dist/templates/common/bundled-skills/atw-channel/references/workflows.md +125 -0
- package/dist/templates/common/bundled-skills/atw-code-review/SKILL.md +113 -0
- package/dist/templates/common/bundled-skills/atw-code-review/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-codebase-design/DEEPENING.md +37 -0
- package/dist/templates/common/bundled-skills/atw-codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/dist/templates/common/bundled-skills/atw-codebase-design/SKILL.md +114 -0
- package/dist/templates/common/bundled-skills/atw-codebase-design/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-diagnosing-bugs/SKILL.md +138 -0
- package/dist/templates/common/bundled-skills/atw-diagnosing-bugs/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/dist/templates/common/bundled-skills/atw-domain-modeling/ADR-FORMAT.md +47 -0
- package/dist/templates/common/bundled-skills/atw-domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/dist/templates/common/bundled-skills/atw-domain-modeling/SKILL.md +74 -0
- package/dist/templates/common/bundled-skills/atw-domain-modeling/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-handoff/SKILL.md +16 -0
- package/dist/templates/common/bundled-skills/atw-handoff/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-implement/SKILL.md +21 -0
- package/dist/templates/common/bundled-skills/atw-implement/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/dist/templates/common/bundled-skills/atw-improve-codebase-architecture/SKILL.md +71 -0
- package/dist/templates/common/bundled-skills/atw-improve-codebase-architecture/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/SKILL.md +130 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/domain.md +51 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-atw-local.md +133 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-atw.md +109 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-github.md +45 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-gitlab.md +46 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-local.md +30 -0
- package/dist/templates/common/bundled-skills/atw-init-repo/references/triage-labels.md +15 -0
- package/dist/templates/common/bundled-skills/atw-interview/SKILL.md +22 -0
- package/dist/templates/common/bundled-skills/atw-interview/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-map/SKILL.md +128 -0
- package/dist/templates/common/bundled-skills/atw-map/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-merge/SKILL.md +14 -0
- package/dist/templates/common/bundled-skills/atw-merge/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-meta/SKILL.md +85 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/add-project-local-conventions.md +83 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-agents.md +55 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-context-loading.md +80 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-hooks.md +57 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-skills-or-commands.md +123 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-spec-structure.md +83 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-task-lifecycle.md +91 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-workflow.md +59 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/overview.md +55 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/bundled-skills.md +159 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/context-injection.md +68 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/generated-files.md +80 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/multi-agent-channel.md +69 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/overview.md +51 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/spec-system.md +102 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/task-system.md +126 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/workflow.md +79 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/workspace-memory.md +71 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/agents.md +80 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/hooks-and-settings.md +72 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/overview.md +59 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/platform-map.md +112 -0
- package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/skills-and-commands.md +86 -0
- package/dist/templates/common/bundled-skills/atw-prototype/LOGIC.md +67 -0
- package/dist/templates/common/bundled-skills/atw-prototype/SKILL.md +26 -0
- package/dist/templates/common/bundled-skills/atw-prototype/UI.md +112 -0
- package/dist/templates/common/bundled-skills/atw-prototype/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-research/SKILL.md +14 -0
- package/dist/templates/common/bundled-skills/atw-research/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-session-insight/SKILL.md +81 -0
- package/dist/templates/common/bundled-skills/atw-session-insight/references/cli-quick-reference.md +65 -0
- package/dist/templates/common/bundled-skills/atw-session-insight/references/triggering-patterns.md +93 -0
- package/dist/templates/common/bundled-skills/atw-spec/SKILL.md +75 -0
- package/dist/templates/common/bundled-skills/atw-spec/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-spec-bootstrap/SKILL.md +41 -0
- package/dist/templates/common/bundled-skills/atw-spec-bootstrap/references/mcp-setup.md +90 -0
- package/dist/templates/common/bundled-skills/atw-spec-bootstrap/references/repository-analysis.md +59 -0
- package/dist/templates/common/bundled-skills/atw-spec-bootstrap/references/spec-task-planning.md +61 -0
- package/dist/templates/common/bundled-skills/atw-spec-bootstrap/references/spec-writing.md +70 -0
- package/dist/templates/common/bundled-skills/atw-tdd/SKILL.md +38 -0
- package/dist/templates/common/bundled-skills/atw-tdd/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/atw-tdd/mocking.md +59 -0
- package/dist/templates/common/bundled-skills/atw-tdd/tests.md +77 -0
- package/dist/templates/common/bundled-skills/atw-tickets/SKILL.md +105 -0
- package/dist/templates/common/bundled-skills/atw-tickets/agents/openai.yaml +5 -0
- package/dist/templates/common/bundled-skills/atw-triage/AGENT-BRIEF.md +207 -0
- package/dist/templates/common/bundled-skills/atw-triage/OUT-OF-SCOPE.md +105 -0
- package/dist/templates/common/bundled-skills/atw-triage/SKILL.md +112 -0
- package/dist/templates/common/bundled-skills/atw-triage/agents/openai.yaml +5 -0
- package/dist/templates/common/commands/continue.md +55 -0
- package/dist/templates/common/commands/finish-work.md +69 -0
- package/dist/templates/common/commands/start.md +68 -0
- package/dist/templates/common/index.d.ts +48 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +104 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/common/skills/before-dev.md +44 -0
- package/dist/templates/common/skills/brainstorm.md +194 -0
- package/dist/templates/common/skills/update-spec.md +351 -0
- package/dist/templates/copilot/copilot-instructions.md +11 -0
- package/dist/templates/copilot/hooks/session-start.py +510 -0
- package/dist/templates/copilot/hooks.json +19 -0
- package/dist/templates/copilot/index.d.ts +23 -0
- package/dist/templates/copilot/index.d.ts.map +1 -0
- package/dist/templates/copilot/index.js +48 -0
- package/dist/templates/copilot/index.js.map +1 -0
- package/dist/templates/cursor/agents/atw-implement-agent.md +106 -0
- package/dist/templates/cursor/agents/atw-review.md +112 -0
- package/dist/templates/cursor/hooks.json +24 -0
- package/dist/templates/cursor/index.d.ts +13 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +13 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/droid/droids/atw-implement-agent.md +99 -0
- package/dist/templates/droid/droids/atw-review.md +105 -0
- package/dist/templates/droid/index.d.ts +15 -0
- package/dist/templates/droid/index.d.ts.map +1 -0
- package/dist/templates/droid/index.js +15 -0
- package/dist/templates/droid/index.js.map +1 -0
- package/dist/templates/droid/settings.json +69 -0
- package/dist/templates/dsh/DSH.md +56 -0
- package/dist/templates/dsh/index.d.ts +21 -0
- package/dist/templates/dsh/index.d.ts.map +1 -0
- package/dist/templates/dsh/index.js +25 -0
- package/dist/templates/dsh/index.js.map +1 -0
- package/dist/templates/extract.d.ts +40 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +106 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/gemini/agents/atw-implement-agent.md +99 -0
- package/dist/templates/gemini/agents/atw-review.md +105 -0
- package/dist/templates/gemini/index.d.ts +13 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +13 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/gemini/settings.json +40 -0
- package/dist/templates/grok/agents/atw-implement-agent.md +115 -0
- package/dist/templates/grok/agents/atw-review.md +105 -0
- package/dist/templates/grok/index.d.ts +15 -0
- package/dist/templates/grok/index.d.ts.map +1 -0
- package/dist/templates/grok/index.js +18 -0
- package/dist/templates/grok/index.js.map +1 -0
- package/dist/templates/kimi/agents/atw-implement-agent.md +114 -0
- package/dist/templates/kimi/agents/atw-review.md +103 -0
- package/dist/templates/kimi/index.d.ts +20 -0
- package/dist/templates/kimi/index.d.ts.map +1 -0
- package/dist/templates/kimi/index.js +23 -0
- package/dist/templates/kimi/index.js.map +1 -0
- package/dist/templates/kiro/agents/atw-implement-agent.json +26 -0
- package/dist/templates/kiro/agents/atw-review.json +26 -0
- package/dist/templates/kiro/agents/atw.json +34 -0
- package/dist/templates/kiro/hooks/atw-workflow-state.kiro.hook +14 -0
- package/dist/templates/kiro/index.d.ts +32 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +28 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/markdown/agents.md +21 -0
- package/dist/templates/markdown/gitignore.txt +15 -0
- package/dist/templates/markdown/index.d.ts +27 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +52 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +223 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +290 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +97 -0
- package/dist/templates/markdown/workspace-index.md +125 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/omp/agents/atw-implement-agent.md +45 -0
- package/dist/templates/omp/agents/atw-review.md +41 -0
- package/dist/templates/omp/extensions/atw/index.ts.txt +1109 -0
- package/dist/templates/omp/index.d.ts +4 -0
- package/dist/templates/omp/index.d.ts.map +1 -0
- package/dist/templates/omp/index.js +9 -0
- package/dist/templates/omp/index.js.map +1 -0
- package/dist/templates/opencode/agents/atw-implement-agent.md +115 -0
- package/dist/templates/opencode/agents/atw-review.md +120 -0
- package/dist/templates/opencode/lib/atw-context.js +637 -0
- package/dist/templates/opencode/lib/context-visibility.js +148 -0
- package/dist/templates/opencode/lib/session-utils.js +474 -0
- package/dist/templates/opencode/package.json +6 -0
- package/dist/templates/opencode/plugins/inject-subagent-context.js +390 -0
- package/dist/templates/opencode/plugins/inject-workflow-state.js +240 -0
- package/dist/templates/opencode/plugins/session-start.js +65 -0
- package/dist/templates/pi/agents/atw-implement-agent.md +42 -0
- package/dist/templates/pi/agents/atw-review.md +37 -0
- package/dist/templates/pi/extensions/atw/index.ts.txt +2014 -0
- package/dist/templates/pi/index.d.ts +5 -0
- package/dist/templates/pi/index.d.ts.map +1 -0
- package/dist/templates/pi/index.js +12 -0
- package/dist/templates/pi/index.js.map +1 -0
- package/dist/templates/pi/settings.json +9 -0
- package/dist/templates/qoder/agents/atw-implement-agent.md +100 -0
- package/dist/templates/qoder/agents/atw-review.md +106 -0
- package/dist/templates/qoder/index.d.ts +15 -0
- package/dist/templates/qoder/index.d.ts.map +1 -0
- package/dist/templates/qoder/index.js +15 -0
- package/dist/templates/qoder/index.js.map +1 -0
- package/dist/templates/qoder/settings.json +59 -0
- package/dist/templates/reasonix/agents/atw-implement-agent.md +41 -0
- package/dist/templates/reasonix/agents/atw-review.md +36 -0
- package/dist/templates/reasonix/index.d.ts +13 -0
- package/dist/templates/reasonix/index.d.ts.map +1 -0
- package/dist/templates/reasonix/index.js +16 -0
- package/dist/templates/reasonix/index.js.map +1 -0
- package/dist/templates/shared-hooks/index.d.ts +77 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +140 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/shared-hooks/inject-shell-session-context.py +292 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +1178 -0
- package/dist/templates/shared-hooks/inject-workflow-state.py +488 -0
- package/dist/templates/shared-hooks/session-start.py +889 -0
- package/dist/templates/snow/SNOW.md +86 -0
- package/dist/templates/snow/agents/atw-implement-agent.md +152 -0
- package/dist/templates/snow/agents/atw-review.md +135 -0
- package/dist/templates/snow/hooks/beforeSubAgentStart.json +15 -0
- package/dist/templates/snow/hooks/onSessionStart.json +15 -0
- package/dist/templates/snow/hooks/onUserMessage.json +15 -0
- package/dist/templates/snow/hooks/write-atw-context.py +637 -0
- package/dist/templates/snow/index.d.ts +25 -0
- package/dist/templates/snow/index.d.ts.map +1 -0
- package/dist/templates/snow/index.js +35 -0
- package/dist/templates/snow/index.js.map +1 -0
- package/dist/templates/template-utils.d.ts +26 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +64 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/templates/trae/agents/atw-implement-agent.md +100 -0
- package/dist/templates/trae/agents/atw-review.md +106 -0
- package/dist/templates/trae/hooks.json +39 -0
- package/dist/templates/trae/index.d.ts +15 -0
- package/dist/templates/trae/index.d.ts.map +1 -0
- package/dist/templates/trae/index.js +15 -0
- package/dist/templates/trae/index.js.map +1 -0
- package/dist/templates/zcode/agents/atw-implement-agent.md +108 -0
- package/dist/templates/zcode/agents/atw-review.md +109 -0
- package/dist/templates/zcode/config.json +52 -0
- package/dist/templates/zcode/index.d.ts +22 -0
- package/dist/templates/zcode/index.d.ts.map +1 -0
- package/dist/templates/zcode/index.js +26 -0
- package/dist/templates/zcode/index.js.map +1 -0
- package/dist/types/ai-tools.d.ts +95 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +494 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +125 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/ablation-store.d.ts +123 -0
- package/dist/utils/ablation-store.d.ts.map +1 -0
- package/dist/utils/ablation-store.js +749 -0
- package/dist/utils/ablation-store.js.map +1 -0
- package/dist/utils/agent-refs.d.ts +31 -0
- package/dist/utils/agent-refs.d.ts.map +1 -0
- package/dist/utils/agent-refs.js +63 -0
- package/dist/utils/agent-refs.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +30 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +86 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/cwd-guard.d.ts +38 -0
- package/dist/utils/cwd-guard.d.ts.map +1 -0
- package/dist/utils/cwd-guard.js +62 -0
- package/dist/utils/cwd-guard.js.map +1 -0
- package/dist/utils/file-writer.d.ts +36 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +204 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/managed-paths.d.ts +5 -0
- package/dist/utils/managed-paths.d.ts.map +1 -0
- package/dist/utils/managed-paths.js +51 -0
- package/dist/utils/managed-paths.js.map +1 -0
- package/dist/utils/managed-removal.d.ts +74 -0
- package/dist/utils/managed-removal.d.ts.map +1 -0
- package/dist/utils/managed-removal.js +270 -0
- package/dist/utils/managed-removal.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts +61 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -0
- package/dist/utils/manifest-prune.js +135 -0
- package/dist/utils/manifest-prune.js.map +1 -0
- package/dist/utils/posix.d.ts +13 -0
- package/dist/utils/posix.d.ts.map +1 -0
- package/dist/utils/posix.js +15 -0
- package/dist/utils/posix.js.map +1 -0
- package/dist/utils/project-detector.d.ts +46 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +666 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/proxy.d.ts +25 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/dist/utils/proxy.js +60 -0
- package/dist/utils/proxy.js.map +1 -0
- package/dist/utils/registry-config.d.ts +7 -0
- package/dist/utils/registry-config.d.ts.map +1 -0
- package/dist/utils/registry-config.js +172 -0
- package/dist/utils/registry-config.js.map +1 -0
- package/dist/utils/task-json.d.ts +13 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +12 -0
- package/dist/utils/task-json.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +161 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +994 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +127 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +335 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +66 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -0
- package/dist/utils/uninstall-scrubbers.js +417 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +86 -0
- package/dist/utils/workflow-resolver.d.ts.map +1 -0
- package/dist/utils/workflow-resolver.js +265 -0
- package/dist/utils/workflow-resolver.js.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Workers And Agent Cards
|
|
2
|
+
|
|
3
|
+
Use workers when a peer agent should execute independently and report back
|
|
4
|
+
through the channel event log. A worker is a registered child process (claude
|
|
5
|
+
or codex) attached to a channel; the supervisor forwards inbox messages to it
|
|
6
|
+
and translates its output back into channel events.
|
|
7
|
+
|
|
8
|
+
## Spawn
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
atw channel create impl-task --by dispatcher --cwd /path/to/repo
|
|
12
|
+
atw channel spawn impl-task --provider codex --as codex-impl --timeout 30m
|
|
13
|
+
|
|
14
|
+
echo "Implement the schema for table X per .atw/.../prd.md" \
|
|
15
|
+
| atw channel send impl-task --as dispatcher --to codex-impl --stdin
|
|
16
|
+
|
|
17
|
+
atw channel wait impl-task --as dispatcher --from codex-impl --kind done --timeout 30m
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`spawn` forks a `channel __supervisor` worker that emits `spawned`, streams
|
|
21
|
+
`progress`, and should end with `done`, `error`, or `killed`. Workers stay
|
|
22
|
+
inbox-idle until a `send --to <worker>` (or a broadcast when
|
|
23
|
+
`--inbox-policy broadcastAndExplicit` is set) wakes them.
|
|
24
|
+
|
|
25
|
+
Key `spawn` flags:
|
|
26
|
+
|
|
27
|
+
- `--agent <name>` — load `.atw/agents/<name>.md` (provider/model/as/system prompt defaults).
|
|
28
|
+
- `--provider <claude|codex>` — overrides the agent card; validated against the adapter registry.
|
|
29
|
+
- `--as <name>` — channel worker handle; defaults to the agent name.
|
|
30
|
+
- `--cwd <path>` — worker working directory (also the jail root for `--file`/`--jsonl`).
|
|
31
|
+
- `--model <id>` — model override.
|
|
32
|
+
- `--resume <id>` — resume an existing claude session / codex thread.
|
|
33
|
+
- `--timeout <duration>` — auto-kill after `30s` / `2m` / `1h`.
|
|
34
|
+
- `--warn-before <duration>` — supervisor_warning lead time (default `5m`; `0ms` disables).
|
|
35
|
+
- `--file <path>` (repeatable, glob-supported) — inject file content into the system prompt.
|
|
36
|
+
- `--jsonl <path>` (repeatable) — ATW jsonl manifest (`{file, reason}` per line).
|
|
37
|
+
- `--by <agent>` — author of the `spawned` event (defaults to `$ATW_CHANNEL_AS` or `main`).
|
|
38
|
+
- `--inbox-policy <explicitOnly|broadcastAndExplicit>` — default `explicitOnly`.
|
|
39
|
+
- `--idle-timeout <duration>` — OOM guard idle TTL (default `5m`; `0` disables).
|
|
40
|
+
- `--max-live-workers <n>` — spawn-time live-worker budget (default `6`; `0` disables).
|
|
41
|
+
|
|
42
|
+
The success event `spawned` records `pid`, `provider`, `agent`, the injected
|
|
43
|
+
`files`, and the resolved `manifests` so later spectators can audit context.
|
|
44
|
+
|
|
45
|
+
## Agent Cards
|
|
46
|
+
|
|
47
|
+
`--agent <name>` resolves to `.atw/agents/<name>.md`. The card name must
|
|
48
|
+
match `[A-Za-z0-9._-]+`. The default ATW install ships two cards:
|
|
49
|
+
|
|
50
|
+
- `.atw/agents/review.md` — code-quality reviewer.
|
|
51
|
+
- `.atw/agents/implement-agent.md` — coding worker for implementation runs.
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
---
|
|
55
|
+
name: review
|
|
56
|
+
description: Code quality check expert.
|
|
57
|
+
provider: claude
|
|
58
|
+
---
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Frontmatter fields populate `spawn` defaults (provider, model, `as`); the
|
|
62
|
+
markdown body becomes the worker's system-prompt role. Cards do **not**
|
|
63
|
+
auto-attach task files — context must be injected explicitly per spawn (see
|
|
64
|
+
below).
|
|
65
|
+
|
|
66
|
+
Always inspect project cards before spawning a named agent:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ls .atw/agents
|
|
70
|
+
sed -n '1,100p' .atw/agents/review.md
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Context Injection
|
|
74
|
+
|
|
75
|
+
Two flags inject content into the worker's system prompt under a
|
|
76
|
+
`# CONTEXT FILES` block, assembled by `context-loader`:
|
|
77
|
+
|
|
78
|
+
- `--file <path>` — repeatable, glob-supported (`*`, `**`). Each match is
|
|
79
|
+
read and concatenated.
|
|
80
|
+
- `--jsonl <path>` — repeatable ATW manifest where every line is
|
|
81
|
+
`{"file":"<path>","reason":"<why>"}`. The reason is preserved as a header
|
|
82
|
+
comment above each file's content.
|
|
83
|
+
|
|
84
|
+
Limits enforced by the loader:
|
|
85
|
+
|
|
86
|
+
- 1 MB hard cap per file (oversize → error).
|
|
87
|
+
- 200 KB per-file warning to stderr.
|
|
88
|
+
- 500 KB total assembled-context warning to stderr.
|
|
89
|
+
- Path-traversal jail: all resolved paths must stay under `--cwd`.
|
|
90
|
+
|
|
91
|
+
Example spawning a review agent against a task directory:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
TASK=.atw/tasks/05-13-example
|
|
95
|
+
atw channel spawn cr-example --agent review --provider codex --as review-cx \
|
|
96
|
+
--file "$TASK/prd.md" \
|
|
97
|
+
--jsonl "$TASK/check.jsonl" \
|
|
98
|
+
--cwd "$PWD" --timeout 30m
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The `spawned` event records both the literal `files` array and any `manifests`
|
|
102
|
+
expanded from `--jsonl`, so the audit trail captures whatever the worker was
|
|
103
|
+
actually shown.
|
|
104
|
+
|
|
105
|
+
## Names And Routing
|
|
106
|
+
|
|
107
|
+
`--as` has two meanings:
|
|
108
|
+
|
|
109
|
+
- `send` / `wait` / `interrupt`: speaker identity (author of the resulting event).
|
|
110
|
+
- `spawn`: the worker handle that other agents address with `--to`.
|
|
111
|
+
|
|
112
|
+
Use explicit names when multiple workers or providers participate in one
|
|
113
|
+
channel:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
atw channel spawn cr-feature --agent review --as review-claude
|
|
117
|
+
atw channel spawn cr-feature --agent review --provider codex --as review-cx
|
|
118
|
+
|
|
119
|
+
atw channel wait cr-feature --as main \
|
|
120
|
+
--from review-claude,review-cx --kind done --all --timeout 15m
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`--all` requires `--from` and blocks until every listed worker has produced a
|
|
124
|
+
matching event; timeout exits with code **124** and prints
|
|
125
|
+
`timeout: still waiting on ...` to stderr.
|
|
126
|
+
|
|
127
|
+
## Soft Interrupt — `interrupt`
|
|
128
|
+
|
|
129
|
+
`channel interrupt` is the cooperative redirect: it appends an `interrupt`
|
|
130
|
+
event (reason `"user"`) and, where the adapter supports it, issues a
|
|
131
|
+
provider-level turn interrupt with a replacement instruction. Use it when the
|
|
132
|
+
worker should drop its current turn and act on new input immediately, without
|
|
133
|
+
losing its session.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
echo "Stop refactoring the parser — switch to fixing the failing test in src/foo.ts" \
|
|
137
|
+
| atw channel interrupt impl-task --as dispatcher --to codex-impl --stdin
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Flags:
|
|
141
|
+
|
|
142
|
+
- `--as <agent>` **(required)** — caller identity.
|
|
143
|
+
- `--to <agent>` **(required)** — target worker.
|
|
144
|
+
- `--scope <project|global>` — channel scope.
|
|
145
|
+
- `--stdin` / `--text-file <path>` / `[text]` — replacement instruction body.
|
|
146
|
+
|
|
147
|
+
The appended event has `kind: "interrupt"` — downstream `wait` / `messages`
|
|
148
|
+
filters can subscribe with `--kind interrupt` to react to redirections (e.g.
|
|
149
|
+
to log the rerouting, or to gate other workers behind a coordinator's
|
|
150
|
+
correction).
|
|
151
|
+
|
|
152
|
+
For low-priority hints that should wait for the worker's next turn, send a
|
|
153
|
+
plain tagged message instead:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
echo "Check this when you reach the next turn." \
|
|
157
|
+
| atw channel send impl-task --as dispatcher --to codex-impl \
|
|
158
|
+
--stdin --tag question
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Hard Interrupt — `kill` + `--resume`
|
|
162
|
+
|
|
163
|
+
Use `kill` when the worker must stop **now** (e.g. runaway loop, bad
|
|
164
|
+
instructions already in flight, or `interrupt` is not honored by the
|
|
165
|
+
adapter). The supervisor escalates SIGTERM → 8 s grace → SIGKILL; the CLI
|
|
166
|
+
writes a `killed` event when SIGKILL is needed so the event log stays
|
|
167
|
+
truthful.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
atw channel kill impl-task --as codex-impl
|
|
171
|
+
atw channel spawn impl-task --as codex-impl --provider codex \
|
|
172
|
+
--resume "$(cat ~/.atw/channels/<bucket>/impl-task/worker.session-id)"
|
|
173
|
+
|
|
174
|
+
echo "STOP — new instructions: ..." \
|
|
175
|
+
| atw channel send impl-task --as dispatcher --to codex-impl --stdin
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`kill` flags:
|
|
179
|
+
|
|
180
|
+
- `--as <agent>` **(required)** — names the worker (positional `<name>` is the channel).
|
|
181
|
+
- `--scope <project|global>`.
|
|
182
|
+
- `--force` — SIGKILL immediately (also kills the inner worker pid).
|
|
183
|
+
|
|
184
|
+
Side effects: cleans `pid`, `worker-pid`, `config`, `spawnlock` sidecar
|
|
185
|
+
files; keeps `log`, `session-id`, `thread-id` for forensics and resume.
|
|
186
|
+
|
|
187
|
+
When `interrupt` will not converge, kill + `--resume` is the guaranteed
|
|
188
|
+
redirection path.
|
|
189
|
+
|
|
190
|
+
## Worker OOM Guard
|
|
191
|
+
|
|
192
|
+
The OOM guard prevents orphaned/idle workers from accumulating and exhausting
|
|
193
|
+
host resources. It runs at every `spawn` and enforces two policies per
|
|
194
|
+
project bucket:
|
|
195
|
+
|
|
196
|
+
- **Idle TTL** — sweep workers whose last activity is older than the
|
|
197
|
+
configured threshold (default `5m`; `0` disables).
|
|
198
|
+
- **Live-worker budget** — refuse the new spawn if more than N workers are
|
|
199
|
+
already alive in the same project bucket (default `6`; `0` disables).
|
|
200
|
+
|
|
201
|
+
Precedence (highest first):
|
|
202
|
+
|
|
203
|
+
1. CLI flags: `--idle-timeout`, `--max-live-workers` on `spawn`.
|
|
204
|
+
2. Environment variables: `ATW_CHANNEL_WORKER_IDLE_TIMEOUT`,
|
|
205
|
+
`ATW_CHANNEL_MAX_LIVE_WORKERS`.
|
|
206
|
+
3. `.atw/config.yaml` under `channel.worker_guard`.
|
|
207
|
+
4. Built-in defaults (`5m`, `6`).
|
|
208
|
+
|
|
209
|
+
Cleanup notices are written to stderr at spawn time so operators can see which
|
|
210
|
+
idle workers were swept and why a new spawn was rejected. The guard does not
|
|
211
|
+
touch ephemeral / `channel run` workers any differently — they are subject to
|
|
212
|
+
the same idle TTL and budget.
|
|
213
|
+
|
|
214
|
+
To audit current state, list workers via `channel list` (the `WORKERS`
|
|
215
|
+
column) and inspect per-channel `pid` / `worker-pid` sidecar files under
|
|
216
|
+
`~/.atw/channels/<bucket>/<channel>/`.
|
|
217
|
+
|
|
218
|
+
## Worker Inbox APIs
|
|
219
|
+
|
|
220
|
+
The inbox is the channel surface workers wake on. Routing is controlled by
|
|
221
|
+
two knobs:
|
|
222
|
+
|
|
223
|
+
- **Inbox policy** (`spawn --inbox-policy`):
|
|
224
|
+
- `explicitOnly` (default) — worker only wakes on `send --to <worker>` or
|
|
225
|
+
`interrupt --to <worker>`.
|
|
226
|
+
- `broadcastAndExplicit` — also wakes on broadcasts (`send` with no `--to`).
|
|
227
|
+
- **Delivery mode** (`send --delivery-mode`):
|
|
228
|
+
- `appendOnly` — append the event regardless of worker state.
|
|
229
|
+
- `requireKnownWorker` — fail if no worker named in `--to` was ever spawned.
|
|
230
|
+
- `requireRunningWorker` — fail if the named worker is not currently alive.
|
|
231
|
+
|
|
232
|
+
Stricter delivery modes prevent silent message loss when callers expect a
|
|
233
|
+
running peer.
|
|
234
|
+
|
|
235
|
+
Inbox-relevant subcommands:
|
|
236
|
+
|
|
237
|
+
- `send <channel> [text]` — append a `message` event.
|
|
238
|
+
- `--as <agent>` **(required)** — author.
|
|
239
|
+
- `--to <agents>` — CSV; one → string, many → array; broadcast if omitted.
|
|
240
|
+
- `--stdin` / `--text-file <path>` / `[text]` — body source.
|
|
241
|
+
- `--delivery-mode <appendOnly|requireKnownWorker|requireRunningWorker>`.
|
|
242
|
+
- `interrupt <channel> [text]` — soft-interrupt redirect (see above).
|
|
243
|
+
- `wait <channel>` — block until matching events arrive.
|
|
244
|
+
- `--as <agent>` **(required)** — `self` for filter context.
|
|
245
|
+
- `--from <agents>` — CSV authors.
|
|
246
|
+
- `--kind <kind[,kind...]>` — CSV (OR semantics); supports `interrupt`,
|
|
247
|
+
`done`, `progress`, etc.
|
|
248
|
+
- `--to <target>` — defaults to own agent (broadcast + explicit-to-me).
|
|
249
|
+
- `--include-progress` — also wake on progress events.
|
|
250
|
+
- `--all` — require every `--from` agent to match (timeout → exit **124**).
|
|
251
|
+
- `--timeout <duration>` — `30s` / `2m` / `1h` / `1000ms`.
|
|
252
|
+
- `messages <channel>` — view / filter / follow the event stream.
|
|
253
|
+
- `--follow` to tail, `--kind` / `--from` / `--to` to filter, `--raw` for
|
|
254
|
+
JSON-per-line, `--no-progress` to hide progress noise.
|
|
255
|
+
|
|
256
|
+
A typical dispatcher loop:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# 1. Wake the worker.
|
|
260
|
+
echo "Run the failing test and report." \
|
|
261
|
+
| atw channel send impl-task --as dispatcher --to codex-impl --stdin \
|
|
262
|
+
--delivery-mode requireRunningWorker
|
|
263
|
+
|
|
264
|
+
# 2. Block until it finishes.
|
|
265
|
+
atw channel wait impl-task --as dispatcher \
|
|
266
|
+
--from codex-impl --kind done,error --timeout 30m
|
|
267
|
+
|
|
268
|
+
# 3. Read the final answer.
|
|
269
|
+
atw channel messages impl-task --from codex-impl --last 1 --raw
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
All event-emitting subcommands (`send`, `interrupt`, `post`, `context add` /
|
|
273
|
+
`delete`, `title set` / `clear`, `thread rename`) print the appended event as
|
|
274
|
+
a single JSON line on stdout, making the inbox layer easy to script against.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Workflows
|
|
2
|
+
|
|
3
|
+
Use these patterns by intent. Prefer durable channels for multi-round work and
|
|
4
|
+
`channel run` for one-shot questions.
|
|
5
|
+
|
|
6
|
+
## Pattern A: Multi-round Brainstorm
|
|
7
|
+
|
|
8
|
+
Use when the user says "和 codex/claude 讨论一下", "brainstorm", or "拉一个 agent
|
|
9
|
+
进来一起看".
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
atw channel create brainstorm-storage-layer --by main \
|
|
13
|
+
--task .atw/tasks/05-XX-storage-adapter
|
|
14
|
+
|
|
15
|
+
atw channel spawn brainstorm-storage-layer \
|
|
16
|
+
--agent architect --provider codex \
|
|
17
|
+
--file .atw/tasks/05-XX-storage-adapter/prd.md \
|
|
18
|
+
--as cx-arch --timeout 30m
|
|
19
|
+
|
|
20
|
+
atw channel send brainstorm-storage-layer \
|
|
21
|
+
--as main --to cx-arch --text-file /tmp/brainstorm-r1.md
|
|
22
|
+
|
|
23
|
+
atw channel wait brainstorm-storage-layer \
|
|
24
|
+
--as main --kind done --from cx-arch --timeout 10m
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Do not stop after one answer. Read the answer, identify vague areas, send a
|
|
28
|
+
new probe, and repeat until the result is executable.
|
|
29
|
+
|
|
30
|
+
Minimum round structure:
|
|
31
|
+
|
|
32
|
+
1. Direction split: should this live in an existing mechanism or a new one?
|
|
33
|
+
2. MVP boundary: v1, v2, and what would force v2 back into v1.
|
|
34
|
+
3. Data contract: events, schema, metadata, state source of truth, compatibility.
|
|
35
|
+
4. CLI / UX contract: command names, flags, errors, defaults, ambiguity.
|
|
36
|
+
5. Cross-layer risk and tests: shared helpers, drift points, release-blocking tests.
|
|
37
|
+
|
|
38
|
+
Optional rounds:
|
|
39
|
+
|
|
40
|
+
- Operations: logs, debugging, stuck workers, kill/restart, recovery.
|
|
41
|
+
- Migration/release: breaking status, manifest, changelog, docs-site.
|
|
42
|
+
- Opposition review: ask the peer agent to argue against the current plan.
|
|
43
|
+
|
|
44
|
+
Every probe should request concrete file paths, commands, schema, rejected
|
|
45
|
+
alternatives, and release-blocking issues. Reject hedging when a decision is
|
|
46
|
+
needed.
|
|
47
|
+
|
|
48
|
+
## Pattern B: Implement / Review Agent
|
|
49
|
+
|
|
50
|
+
Use when the user asks to dispatch implementation or review work.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
TASK=.atw/tasks/05-12-foo
|
|
54
|
+
atw channel create cr-foo --task "$TASK" --by main
|
|
55
|
+
|
|
56
|
+
atw channel spawn cr-foo \
|
|
57
|
+
--agent review \
|
|
58
|
+
--jsonl "$TASK/check.jsonl" \
|
|
59
|
+
--file "$TASK/prd.md" \
|
|
60
|
+
--cwd "$PWD" --timeout 15m
|
|
61
|
+
|
|
62
|
+
atw channel send cr-foo --as main --to review --text-file /tmp/cr-brief.md
|
|
63
|
+
atw channel wait cr-foo --as main --kind done --from review --timeout 15m
|
|
64
|
+
atw channel messages cr-foo --kind message --from review --tag final_answer
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For implement work, use `--agent implement-agent` and send an implementation
|
|
68
|
+
brief. For review work, include the exact diff scope, relevant specs, and
|
|
69
|
+
validation already run.
|
|
70
|
+
|
|
71
|
+
## Pattern C: Parallel Reviewers
|
|
72
|
+
|
|
73
|
+
Use one channel and distinct worker names.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
atw channel create cr-feature --by main --ephemeral
|
|
77
|
+
|
|
78
|
+
atw channel spawn cr-feature --agent review \
|
|
79
|
+
--jsonl "$TASK/check.jsonl" --file "$TASK/prd.md" \
|
|
80
|
+
--timeout 15m
|
|
81
|
+
|
|
82
|
+
atw channel spawn cr-feature --agent review --provider codex --as review-cx \
|
|
83
|
+
--jsonl "$TASK/check.jsonl" --file "$TASK/prd.md" \
|
|
84
|
+
--timeout 15m
|
|
85
|
+
|
|
86
|
+
atw channel send cr-feature --as main --to review --text-file /tmp/cr-brief.md
|
|
87
|
+
atw channel send cr-feature --as main --to review-cx --text-file /tmp/cr-brief.md
|
|
88
|
+
atw channel wait cr-feature --as main --kind done --from review,review-cx --all --timeout 15m
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`--all` means every listed worker must emit a matching event.
|
|
92
|
+
|
|
93
|
+
## Pattern D: One-shot Worker
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
atw channel run --provider codex --message "say hi in 3 words" --timeout 1m
|
|
97
|
+
atw channel run --agent plan --message-file /tmp/plan-question.md --timeout 10m
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
On success, `run` removes the ephemeral channel. On error/timeout/killed, it
|
|
101
|
+
keeps the channel and prints the path for inspection.
|
|
102
|
+
|
|
103
|
+
## Pattern E: Forum Channel
|
|
104
|
+
|
|
105
|
+
Use for issue forums, topic-style feedback, release todos, agent findings, and
|
|
106
|
+
internal changelogs. Read `forum.md` for the full model.
|
|
107
|
+
|
|
108
|
+
## Pattern F: Take Over Existing Thread
|
|
109
|
+
|
|
110
|
+
If the user gives a forum/thread name, restore context yourself:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
atw channel forum <board> --scope global
|
|
114
|
+
atw channel thread <board> <thread> --scope global --raw
|
|
115
|
+
atw channel context list <board> --scope global --thread <thread>
|
|
116
|
+
atw channel messages <board> --scope global --raw --thread <thread>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Output a constraint summary, not a transcript dump:
|
|
120
|
+
|
|
121
|
+
- user-level problem
|
|
122
|
+
- context files that affect this repo
|
|
123
|
+
- current-version versus future-version requirements
|
|
124
|
+
- whether current code/design satisfies it
|
|
125
|
+
- next action or comment to append
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atw-code-review
|
|
3
|
+
description: "沿两个维度审查自某个固定点(提交、分支、标签或合并基点)以来的变更——标准(代码是否遵循了该仓库的文档化编码标准?)和规格(代码是否符合原始问题/规格的要求?)。在并行子代理中同时运行这两项审查,并将结果并排显示。当用户希望审查某个分支、拉取请求、进行中的更改,或要求“审查自 X 以来”的变更时,请使用此功能。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
|
|
7
|
+
|
|
8
|
+
- **Standards** — does the code conform to this repo's documented coding standards?
|
|
9
|
+
- **Spec** — does the code faithfully implement the originating issue / spec?
|
|
10
|
+
|
|
11
|
+
Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings.
|
|
12
|
+
|
|
13
|
+
**This skill only reports — it edits nothing.** Neither this skill nor either sub-agent writes to a source file: not to fix a finding, not to tidy something noticed in passing. They read the frozen patch and produce findings. Hand every finding back to whoever called the review — the user, or `/atw-implement` — and let the caller decide what changes. A reviewer that fixes what it found leaves no independent record of what was wrong, and the next review reads its own edits as the baseline.
|
|
14
|
+
|
|
15
|
+
The issue tracker should have been provided to you. If `docs/agents/issue-tracker.md` is missing, tell the user to call the Skill tool for `atw-init-repo`, which asks which tracker this repo uses and writes that file.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
### 1. Pin the fixed point
|
|
20
|
+
|
|
21
|
+
Whatever the user said is the fixed point — a commit SHA, branch name, tag, `main`, `HEAD~5`, etc. If they didn't specify one, ask for it. Confirm it resolves (`git rev-parse <fixed-point>`) before going further — a bad ref should fail here, not inside two parallel sub-agents.
|
|
22
|
+
|
|
23
|
+
Then **freeze one patch** covering everything under review, and hand that same patch to both sub-agents.
|
|
24
|
+
|
|
25
|
+
Do **not** use `git diff <fixed-point>...HEAD`. Three-dot syntax compares two *commits*, so the working tree takes no part in it — and this skill is normally called from `atw-implement` **before** the commit. The failure is silent, not loud: when the fixed point has earlier commits behind it, the diff is non-empty (it holds the *previous* ticket's already-reviewed code), the non-empty check passes, and the review reports "passed" without a single line of the new implementation ever being read.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
base=$(git merge-base "$fixed_point" HEAD)
|
|
29
|
+
patch=$(mktemp) # bare mktemp — `mktemp -t review-patch` errors on GNU coreutils
|
|
30
|
+
|
|
31
|
+
# ① committed changes + the current state of every tracked file
|
|
32
|
+
git diff --binary "$base" -- > "$patch"
|
|
33
|
+
|
|
34
|
+
# ② every untracked, non-ignored file — one at a time, NUL-safe
|
|
35
|
+
git ls-files --others --exclude-standard -z |
|
|
36
|
+
while IFS= read -r -d '' f; do
|
|
37
|
+
git diff --no-index --binary -- /dev/null "$f" >> "$patch" || true
|
|
38
|
+
done
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- `git ls-files --others` lists **files**, so no directory expansion is needed. (`git status --porcelain` reports a new directory as a single `?? newdir/` entry — that is why it isn't used here.)
|
|
42
|
+
- `git diff --no-index` **exits 1 when it finds a difference**. That is the normal result, not a failure — hence the `|| true`.
|
|
43
|
+
- Nothing writes to the index, so review stays read-only and never contends for `index.lock`.
|
|
44
|
+
- Cap the size of any single untracked file you inline. `--binary` base64-encodes content, so one image or build artifact can swamp the patch and both sub-agents' context. Over the cap, record the path and skip the body, and leave a line in the patch saying so.
|
|
45
|
+
|
|
46
|
+
Check that `$patch` is non-empty — this replaces the old "diff is non-empty" check. Also note the commit list via `git log <fixed-point>..HEAD --oneline`. If the patch is large, check its total size before spawning: both sub-agents receive it, so the token cost is doubled.
|
|
47
|
+
|
|
48
|
+
### 2. Identify the spec source
|
|
49
|
+
|
|
50
|
+
Look for the originating spec, in this order:
|
|
51
|
+
|
|
52
|
+
1. A path the user passed as an argument.
|
|
53
|
+
2. Wherever `docs/agents/issue-tracker.md` says specs live — its "When a skill says publish to the issue tracker" section names the location for this repo. Some trackers scope it to the current unit of work rather than a fixed directory; follow whatever resolution step it gives.
|
|
54
|
+
3. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.) — fetch via the workflow in `docs/agents/issue-tracker.md`.
|
|
55
|
+
4. A spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature.
|
|
56
|
+
5. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
|
|
57
|
+
|
|
58
|
+
### 3. Identify the standards sources
|
|
59
|
+
|
|
60
|
+
Anything in the repo that documents how code should be written, such as `CODING_STANDARDS.md` or `CONTRIBUTING.md`.
|
|
61
|
+
|
|
62
|
+
On top of whatever the repo documents, the Standards axis always carries the **smell baseline** below — a fixed set of Fowler code smells (_Refactoring_, ch.3) that applies even when a repo documents nothing. Two rules bind it:
|
|
63
|
+
|
|
64
|
+
- **The repo overrides.** A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
|
|
65
|
+
- **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation — and, like any standard here, skip anything tooling already enforces.
|
|
66
|
+
|
|
67
|
+
Each smell reads *what it is* → *how to fix*; match it against the diff:
|
|
68
|
+
|
|
69
|
+
- **Mysterious Name** — a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
|
|
70
|
+
- **Duplicated Code** — the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
|
|
71
|
+
- **Feature Envy** — a method that reaches into another object's data more than its own. → move the method onto the data it envies.
|
|
72
|
+
- **Data Clumps** — the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
|
|
73
|
+
- **Primitive Obsession** — a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
|
|
74
|
+
- **Repeated Switches** — the same `switch`/`if`-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
|
|
75
|
+
- **Shotgun Surgery** — one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
|
|
76
|
+
- **Divergent Change** — one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
|
|
77
|
+
- **Speculative Generality** — abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
|
|
78
|
+
- **Message Chains** — long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
|
|
79
|
+
- **Middle Man** — a class or function that mostly just delegates onward. → cut it, call the real target direct.
|
|
80
|
+
- **Refused Bequest** — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
|
|
81
|
+
|
|
82
|
+
### 4. Spawn both sub-agents in parallel
|
|
83
|
+
|
|
84
|
+
Both sub-agents read the **frozen patch from step 1** and run **no git commands of their own** — same input, no chance of one axis seeing a file the other missed, and no re-deriving the untracked list from memory.
|
|
85
|
+
|
|
86
|
+
**Standards sub-agent prompt** — include:
|
|
87
|
+
|
|
88
|
+
- The path to the frozen patch, and the commit list. State plainly: this patch is the complete change under review, including uncommitted and untracked files; do not run git.
|
|
89
|
+
- The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full — the sub-agent has no other access to it.
|
|
90
|
+
- The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."
|
|
91
|
+
|
|
92
|
+
**Spec sub-agent prompt** — include:
|
|
93
|
+
|
|
94
|
+
- The path to the frozen patch, and the commit list. Same instruction: the patch is complete; do not run git.
|
|
95
|
+
- The path or fetched contents of the spec.
|
|
96
|
+
- The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
|
|
97
|
+
|
|
98
|
+
If the spec is missing, skip the Spec sub-agent and note this in the final report.
|
|
99
|
+
|
|
100
|
+
### 5. Aggregate
|
|
101
|
+
|
|
102
|
+
Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings — the two axes are deliberately separate (see _Why two axes_).
|
|
103
|
+
|
|
104
|
+
End with a one-line summary: total findings per axis, and the worst issue _within each axis_ (if any). Don't pick a single winner across axes — that's the reranking the separation exists to prevent.
|
|
105
|
+
|
|
106
|
+
## Why two axes
|
|
107
|
+
|
|
108
|
+
A change can pass one axis and fail the other:
|
|
109
|
+
|
|
110
|
+
- Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
|
|
111
|
+
- Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
|
|
112
|
+
|
|
113
|
+
Reporting them separately stops one axis from masking the other.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Deepening
|
|
2
|
+
|
|
3
|
+
How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**, **seam**, **adapter**.
|
|
4
|
+
|
|
5
|
+
## Dependency categories
|
|
6
|
+
|
|
7
|
+
When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
|
|
8
|
+
|
|
9
|
+
### 1. In-process
|
|
10
|
+
|
|
11
|
+
Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed.
|
|
12
|
+
|
|
13
|
+
### 2. Local-substitutable
|
|
14
|
+
|
|
15
|
+
Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
|
|
16
|
+
|
|
17
|
+
### 3. Remote but owned (Ports & Adapters)
|
|
18
|
+
|
|
19
|
+
Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
|
|
20
|
+
|
|
21
|
+
Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*
|
|
22
|
+
|
|
23
|
+
### 4. True external (Mock)
|
|
24
|
+
|
|
25
|
+
Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
|
|
26
|
+
|
|
27
|
+
## Seam discipline
|
|
28
|
+
|
|
29
|
+
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
|
|
30
|
+
- **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
|
|
31
|
+
|
|
32
|
+
## Testing strategy: replace, don't layer
|
|
33
|
+
|
|
34
|
+
- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them.
|
|
35
|
+
- Write new tests at the deepened module's interface. The **interface is the test surface**.
|
|
36
|
+
- Tests assert on observable outcomes through the interface, not internal state.
|
|
37
|
+
- Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Design It Twice
|
|
2
|
+
|
|
3
|
+
When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best.
|
|
4
|
+
|
|
5
|
+
Uses the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**, **seam**, **adapter**, **leverage**.
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
### 1. Frame the problem space
|
|
10
|
+
|
|
11
|
+
Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
|
|
12
|
+
|
|
13
|
+
- The constraints any new interface would need to satisfy
|
|
14
|
+
- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
|
|
15
|
+
- A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
|
|
16
|
+
|
|
17
|
+
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
|
|
18
|
+
|
|
19
|
+
### 2. Spawn sub-agents
|
|
20
|
+
|
|
21
|
+
Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.
|
|
22
|
+
|
|
23
|
+
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
|
|
24
|
+
|
|
25
|
+
- Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point."
|
|
26
|
+
- Agent 2: "Maximise flexibility — support many use cases and extension."
|
|
27
|
+
- Agent 3: "Optimise for the most common caller — make the default case trivial."
|
|
28
|
+
- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
|
|
29
|
+
|
|
30
|
+
Include both [SKILL.md](SKILL.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
|
|
31
|
+
|
|
32
|
+
Each sub-agent outputs:
|
|
33
|
+
|
|
34
|
+
1. Interface (types, methods, params — plus invariants, ordering, error modes)
|
|
35
|
+
2. Usage example showing how callers use it
|
|
36
|
+
3. What the implementation hides behind the seam
|
|
37
|
+
4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
|
|
38
|
+
5. Trade-offs — where leverage is high, where it's thin
|
|
39
|
+
|
|
40
|
+
### 3. Present and compare
|
|
41
|
+
|
|
42
|
+
Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
|
|
43
|
+
|
|
44
|
+
After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
|