@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,754 @@
|
|
|
1
|
+
# Development Workflow
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Core Principles
|
|
6
|
+
|
|
7
|
+
1. **Plan before code** — figure out what to do before you start
|
|
8
|
+
2. **Specs injected, not remembered** — guidelines are injected via hook/skill, not recalled from memory
|
|
9
|
+
3. **Persist everything** — research, decisions, and lessons all go to files; conversations get compacted, files don't
|
|
10
|
+
4. **One ticket at a time** — serial execution; claim, finish, close, then take the next
|
|
11
|
+
5. **Capture learnings** — after each ticket, review and write new knowledge back to spec
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ATW System
|
|
16
|
+
|
|
17
|
+
### Developer Identity
|
|
18
|
+
|
|
19
|
+
On first use, initialize your identity:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python3 ./.atw/scripts/init_developer.py <your-name>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Creates `.atw/.developer` (gitignored) + `.atw/workspace/<your-name>/`.
|
|
26
|
+
|
|
27
|
+
### Spec System
|
|
28
|
+
|
|
29
|
+
`.atw/spec/` holds coding guidelines organized by package and layer.
|
|
30
|
+
|
|
31
|
+
- `.atw/spec/<package>/<layer>/index.md` — entry point with **Pre-Development Checklist** + **Quality Check**. Actual guidelines live in the `.md` files it points to.
|
|
32
|
+
- `.atw/spec/guides/index.md` — cross-package thinking guides.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python3 ./.atw/scripts/get_context.py --mode packages # list packages / layers
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**When to update spec**: new pattern/convention found · bug-fix prevention to codify · new technical decision.
|
|
39
|
+
|
|
40
|
+
### Task System
|
|
41
|
+
|
|
42
|
+
Every task has its own directory under `.atw/tasks/{MM-DD-name}/`:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
.atw/tasks/MM-DD-<slug>/
|
|
46
|
+
├── task.json task record (status, branch, metadata, hooks)
|
|
47
|
+
├── prd.md the spec — requirements, constraints, acceptance criteria
|
|
48
|
+
├── map.md territory map; complex path only
|
|
49
|
+
├── map-issues/NN-*.md decision tickets (Type / Status / Blocked by)
|
|
50
|
+
├── issues/NN-*.md implementation tickets (Blocked by / Impl)
|
|
51
|
+
├── research/<topic>.md research notes
|
|
52
|
+
└── check.jsonl spec manifest + current-ticket path for review sub-agents
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`task.json.status` is one of six literal stages, in order:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
discover → specify → slice (optional) → implement → accept → completed
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Task lifecycle
|
|
63
|
+
python3 ./.atw/scripts/task.py create "<title>" --description "<desc>" [--slug <name>] [--parent <dir>]
|
|
64
|
+
python3 ./.atw/scripts/task.py set-status <name> <stage> # move between the six stages
|
|
65
|
+
python3 ./.atw/scripts/task.py start <name> # set active task; any planning stage → implement
|
|
66
|
+
python3 ./.atw/scripts/task.py current --source # show active task and source
|
|
67
|
+
python3 ./.atw/scripts/task.py finish # clear active task (triggers after_finish hooks)
|
|
68
|
+
python3 ./.atw/scripts/task.py archive <name> # → completed, move to archive/{year-month}/
|
|
69
|
+
python3 ./.atw/scripts/task.py list [--mine] [--status <s>]
|
|
70
|
+
python3 ./.atw/scripts/task.py list-archive
|
|
71
|
+
|
|
72
|
+
# Review context (injected into review sub-agents via check.jsonl).
|
|
73
|
+
# `check.jsonl` is seeded (empty) on `task create` for sub-agent-capable platforms;
|
|
74
|
+
# you curate real spec + research entries during planning. `validate` fails and
|
|
75
|
+
# `start` refuses while a seeded manifest is still empty — review sub-agents would
|
|
76
|
+
# run with zero spec context. Pass `start --allow-empty-context` when that is
|
|
77
|
+
# intentional.
|
|
78
|
+
python3 ./.atw/scripts/task.py add-context <name> check <file> <reason>
|
|
79
|
+
python3 ./.atw/scripts/task.py list-context <name> [check]
|
|
80
|
+
python3 ./.atw/scripts/task.py validate <name>
|
|
81
|
+
|
|
82
|
+
# Task metadata
|
|
83
|
+
python3 ./.atw/scripts/task.py set-branch <name> <branch>
|
|
84
|
+
python3 ./.atw/scripts/task.py set-base-branch <name> <branch> # PR target
|
|
85
|
+
python3 ./.atw/scripts/task.py set-scope <name> <scope>
|
|
86
|
+
|
|
87
|
+
# Hierarchy (parent/child)
|
|
88
|
+
python3 ./.atw/scripts/task.py add-subtask <parent> <child>
|
|
89
|
+
python3 ./.atw/scripts/task.py remove-subtask <parent> <child>
|
|
90
|
+
|
|
91
|
+
# PR creation
|
|
92
|
+
python3 ./.atw/scripts/task.py create-pr [name] [--dry-run]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
> Run `python3 ./.atw/scripts/task.py --help` to see the authoritative, up-to-date list.
|
|
96
|
+
|
|
97
|
+
**Current-task mechanism**: `task.py create` creates the task directory with `status=discover` and (when session identity is available) auto-sets the per-session active-task pointer so the discover breadcrumb fires immediately. `task.py set-status` moves the task between the six stages without touching the pointer. `task.py start` writes the same pointer (idempotent if already set) and flips `task.json.status` from whichever planning stage the task is in (`discover` / `specify` / `slice`) to `implement`; a task already at `implement` or later keeps its stage, so re-running `start` after a checkout is a pure resume. State is stored under `.atw/.runtime/sessions/`. If no context key is available from hook input, `ATW_CONTEXT_ID`, or a platform-native session environment variable, there is no active task and `task.py start` fails with a session identity hint. `task.py finish` deletes the current session file (status unchanged). `task.py archive <task>` writes `status=completed`, moves the directory to `archive/`, and deletes any runtime session files that still point at the archived task.
|
|
98
|
+
|
|
99
|
+
### Ticket System
|
|
100
|
+
|
|
101
|
+
Implementation tickets live in `{TASK_DIR}/issues/NN-slug.md` and carry two fields the tooling reads literally:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
**Impl:** ready | doing | done
|
|
105
|
+
**Blocked by:** none
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
python3 ./.atw/scripts/tickets.py list [--task-dir <dir>] # every ticket + state
|
|
110
|
+
python3 ./.atw/scripts/tickets.py frontier [--task-dir <dir>] # ready tickets with dependencies cleared
|
|
111
|
+
python3 ./.atw/scripts/tickets.py claim NN [--task-dir <dir>] # ready → doing
|
|
112
|
+
python3 ./.atw/scripts/tickets.py done NN [--task-dir <dir>] # doing → done
|
|
113
|
+
python3 ./.atw/scripts/tickets.py summary [--task-dir <dir>]
|
|
114
|
+
python3 ./.atw/scripts/tickets.py selfcheck
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**The current ticket is the single `issues/` ticket marked `**Impl:** doing`.** The per-turn hook reads that directly from the ticket files. Two tickets marked `doing` at once is a broken state, not a choice — clear it before continuing.
|
|
118
|
+
|
|
119
|
+
Decision tickets from the map live in `{TASK_DIR}/map-issues/` and use a different vocabulary (`Type` / `Status` / `Blocked by`). **Never mix the two directories**: `tickets.py` only reads `issues/`, and a decision ticket filed there corrupts the frontier in both directions.
|
|
120
|
+
|
|
121
|
+
### Workspace System
|
|
122
|
+
|
|
123
|
+
Records every AI session for cross-session tracking under `.atw/workspace/<developer>/`.
|
|
124
|
+
|
|
125
|
+
- `journal-N.md` — session log. **Max 2000 lines per file**; a new `journal-(N+1).md` is auto-created when exceeded.
|
|
126
|
+
- `index.md` — personal index (total sessions, last active).
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
python3 ./.atw/scripts/add_session.py --title "Title" --commit "hash" --summary "Summary"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Context Script
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
python3 ./.atw/scripts/get_context.py # full session runtime
|
|
136
|
+
python3 ./.atw/scripts/get_context.py --mode packages # available packages + spec layers
|
|
137
|
+
python3 ./.atw/scripts/get_context.py --mode phase --step <X.Y> # detailed guide for a workflow step
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
<!--
|
|
143
|
+
WORKFLOW-STATE BREADCRUMB CONTRACT (read this before editing the tag blocks below)
|
|
144
|
+
|
|
145
|
+
The [workflow-state:STATUS] blocks embedded in the ## Phase Index section
|
|
146
|
+
below are the SINGLE source of truth for the per-turn `<workflow-state>`
|
|
147
|
+
breadcrumb that every supported AI platform's UserPromptSubmit hook
|
|
148
|
+
reads. inject-workflow-state.py (Python platforms) and
|
|
149
|
+
inject-workflow-state.js (OpenCode plugin) only parse them — there is no
|
|
150
|
+
fallback dict baked into the scripts.
|
|
151
|
+
|
|
152
|
+
STATUS charset: [A-Za-z0-9_-]+. The tag name is matched against
|
|
153
|
+
`task.json.status` verbatim, so the six stage tags below must stay
|
|
154
|
+
spelled exactly as `discover` / `specify` / `slice` / `implement` /
|
|
155
|
+
`accept` / `completed`. When the hook can't find a tag, it degrades to a
|
|
156
|
+
generic "Refer to workflow.md for current step." line — intentionally
|
|
157
|
+
visible so users notice and fix a broken workflow.md.
|
|
158
|
+
|
|
159
|
+
INVARIANT:
|
|
160
|
+
Every workflow-walkthrough step marked `[required · once]` must have a
|
|
161
|
+
matching enforcement line in its stage's [workflow-state:*] block. The
|
|
162
|
+
breadcrumb is the only per-turn channel; if a mandatory step isn't
|
|
163
|
+
mentioned there, the AI silently skips it.
|
|
164
|
+
|
|
165
|
+
TAG ↔ STAGE scoping:
|
|
166
|
+
[workflow-state:no_task] → no active task; before Phase 1
|
|
167
|
+
[workflow-state:task_error] → active task record is unreadable; repair it before continuing
|
|
168
|
+
[workflow-state:discover] → Phase 1 steps 1.0-1.1 (the create default)
|
|
169
|
+
[workflow-state:specify] → Phase 1 steps 1.2-1.3
|
|
170
|
+
[workflow-state:slice] → Phase 1 step 1.4 (optional stage)
|
|
171
|
+
[workflow-state:implement] → all of Phase 2 (task.py start sets it)
|
|
172
|
+
[workflow-state:accept] → all of Phase 3, up to archive
|
|
173
|
+
[workflow-state:completed] → archive was interrupted; task still under .atw/tasks/
|
|
174
|
+
|
|
175
|
+
The tag set is "every state the active-task resolver can hand the hook",
|
|
176
|
+
not "the six stages": `no_task` and `task_error` are not task statuses at
|
|
177
|
+
all, and `completed` is reachable because `task.py archive` is not atomic —
|
|
178
|
+
it writes the status, re-parents children, then moves the directory, and it
|
|
179
|
+
does not roll back. An archive interrupted between those steps leaves a
|
|
180
|
+
`completed` task the resolver still finds.
|
|
181
|
+
|
|
182
|
+
Editing checklist:
|
|
183
|
+
- When you change a [workflow-state:STATUS] block, also check the
|
|
184
|
+
matching stage's `[required · once]` walkthrough steps for sync
|
|
185
|
+
- Run `atw update` after editing to push the new bodies to
|
|
186
|
+
downstream user projects (block-level managed replacement)
|
|
187
|
+
- `packages/cli/test/scripts/workflow-structure.test.ts` guards this
|
|
188
|
+
file's structure and runs with `pnpm test` — nothing to remember
|
|
189
|
+
-->
|
|
190
|
+
|
|
191
|
+
## Phase Index
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
Phase 1: Plan → discover, specify, and (when needed) slice into tickets
|
|
195
|
+
Phase 2: Execute → one ticket at a time, each through the full implement chain
|
|
196
|
+
Phase 3: Finish → read-only acceptance check, then archive
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Request Triage
|
|
200
|
+
|
|
201
|
+
Three complexity paths. The AI proposes, the user decides whether a task gets created at all.
|
|
202
|
+
|
|
203
|
+
| Path | Route |
|
|
204
|
+
|---|---|
|
|
205
|
+
| Simple | No task. Just do it, skip ATW for this session. |
|
|
206
|
+
| Medium | Create task → discover → specify → implement |
|
|
207
|
+
| Complex | Create task → map (decision tickets) → specify → slice into tickets → implement each |
|
|
208
|
+
|
|
209
|
+
The threshold is deliberately not a file count. Changing two files can be a typo fix or an auth rewrite. **When unsure, go one path up** — the cost of going up is one more `prd.md`; the cost of going down is discovering mid-build that there is no record, no spec, and no review baseline.
|
|
210
|
+
|
|
211
|
+
Map is worth running when the work is both **large** and **the route is unclear**. Large but well-understood goes straight to slicing. When unsure, run it: it scans breadth-first and stops itself if it finds no fog, at a cost of two turns.
|
|
212
|
+
|
|
213
|
+
### The Four Stops
|
|
214
|
+
|
|
215
|
+
Outside these four, the AI advances stages on its own. It does not stop to ask "shall we move on?".
|
|
216
|
+
|
|
217
|
+
| # | Where | Whose call |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| ① | Before creating a task | Does this work deserve a record — the user's |
|
|
220
|
+
| ② | After the spec is written | Is the spec right — the user's |
|
|
221
|
+
| ③ | Before each ticket starts | The user runs `/atw-implement`; the AI cannot invoke it |
|
|
222
|
+
| ④ | Before archiving | "This is done" — the user's acceptance |
|
|
223
|
+
|
|
224
|
+
### Planning Artifacts
|
|
225
|
+
|
|
226
|
+
- `prd.md` — requirements, constraints, and acceptance criteria. This is the spec; everything downstream is checked against it.
|
|
227
|
+
- `map.md` + `map-issues/NN-*.md` — territory map and its decision tickets. Complex path only.
|
|
228
|
+
- `issues/NN-*.md` — implementation tickets. Created by slicing; skipped for single-session work.
|
|
229
|
+
- `research/<topic>.md` — research notes, one file per topic.
|
|
230
|
+
- `check.jsonl` — spec/research manifest for the review sub-agents, plus the current ticket path.
|
|
231
|
+
|
|
232
|
+
### Tickets vs Parent / Child Task Trees
|
|
233
|
+
|
|
234
|
+
Both splitting mechanisms exist and they are not interchangeable. **The test is whether the pieces can be accepted and shipped independently.**
|
|
235
|
+
|
|
236
|
+
- **Yes, independently shippable** → child tasks. Each child gets its own `prd.md`, its own review, and archives on its own. Create with `task.py create "<title>" --description "<desc>" --slug <name> --parent <parent-dir>`; link existing tasks with `task.py add-subtask`, unlink with `task.py remove-subtask`.
|
|
237
|
+
- **No, they only count as done together** → tickets. All tickets share one `prd.md` and archive with the task. Ordering between them is a real dependency graph: write it in `**Blocked by:**` and let `tickets.py frontier` compute what is workable.
|
|
238
|
+
|
|
239
|
+
A parent task owns the source requirements, the child map, cross-child acceptance criteria, and final integration review. It is not itself an implementation target unless it also has direct work. Parent/child is **not** a dependency system — if child B must wait for child A, write that ordering into child B's `prd.md`.
|
|
240
|
+
|
|
241
|
+
<!-- Per-turn breadcrumb: shown when there is no active task (before Phase 1) -->
|
|
242
|
+
|
|
243
|
+
[workflow-state:no_task]
|
|
244
|
+
No active task. First classify the request against the three complexity paths, then ask for task-creation consent before creating any ATW task.
|
|
245
|
+
Simple: ask only whether this turn should create an ATW task. If the user says no, skip ATW for this session.
|
|
246
|
+
Medium or complex: ask the user if you may create an ATW task and enter discover. If the user says no, explain, clarify scope, or suggest a smaller split.
|
|
247
|
+
[/workflow-state:no_task]
|
|
248
|
+
|
|
249
|
+
<!-- Per-turn breadcrumb: shown when the active task record cannot be read. -->
|
|
250
|
+
|
|
251
|
+
[workflow-state:task_error]
|
|
252
|
+
The active task record could not be read. Do not create or activate another task.
|
|
253
|
+
Inspect the task directory named above and repair its task.json. It must be a valid JSON object with a non-empty status.
|
|
254
|
+
Preserve existing task fields and artifacts. If the correct status cannot be determined safely, ask the user before reconstructing the record.
|
|
255
|
+
[/workflow-state:task_error]
|
|
256
|
+
|
|
257
|
+
### Phase 1: Plan
|
|
258
|
+
|
|
259
|
+
- 1.0 Create task `[required · once]` (only after stop ①)
|
|
260
|
+
- 1.1 Discover `[required · repeatable]` (stage `discover`)
|
|
261
|
+
- 1.2 Specify `[required · once]` (stage `specify`; `prd.md`, then stop ②)
|
|
262
|
+
- 1.3 Configure context `[required · once]` — sub-agent-dispatch platforms curate `check.jsonl`; inline platforms skip
|
|
263
|
+
- 1.4 Slice `[optional · once]` (stage `slice`; only when the work needs tickets)
|
|
264
|
+
- 1.5 Activate task `[required · once]` (`task.py start`; status → `implement`)
|
|
265
|
+
|
|
266
|
+
<!-- Per-turn breadcrumb: stage 'discover' — the status task.py create writes -->
|
|
267
|
+
|
|
268
|
+
[workflow-state:discover]
|
|
269
|
+
Stay in discover. Do not write code and do not create tickets yet.
|
|
270
|
+
Tell the user to run `/atw-askme` (or `/atw-askme-with-docs` when the answer lives in project docs) to work through open requirements. Suggest `/atw-map` when the work is large and the route is unclear, `/atw-prototype` when a design question needs a throwaway build, and `/atw-research` for external unknowns.
|
|
271
|
+
Gate out of discover: not one question you raised this session may still be unanswered by the user. If any is open, ask it now instead of advancing.
|
|
272
|
+
When clear, run `task.py set-status <task> specify` yourself — this is not a stop.
|
|
273
|
+
[/workflow-state:discover]
|
|
274
|
+
|
|
275
|
+
<!-- Per-turn breadcrumb: stage 'specify' -->
|
|
276
|
+
|
|
277
|
+
[workflow-state:specify]
|
|
278
|
+
Tell the user to run `/atw-spec` to turn the discover findings into `{TASK_DIR}/prd.md`. Keep requirements, constraints, and acceptance criteria there; no execution checklists.
|
|
279
|
+
On sub-agent-dispatch platforms, curate `check.jsonl` with the spec and research files the review axes need (step 1.3) before leaving this stage.
|
|
280
|
+
Stop ②: present the finished `prd.md` and wait for the user to confirm it before advancing. Do not begin implementation on your own judgment that the spec looks right.
|
|
281
|
+
After the user confirms, decide whether the work needs tickets: `task.py set-status <task> slice` if yes, otherwise go straight to step 1.5.
|
|
282
|
+
[/workflow-state:specify]
|
|
283
|
+
|
|
284
|
+
<!-- Per-turn breadcrumb: stage 'slice' (optional; skipped for single-session work) -->
|
|
285
|
+
|
|
286
|
+
[workflow-state:slice]
|
|
287
|
+
Tell the user to run `/atw-tickets` to slice the confirmed `prd.md` into `{TASK_DIR}/issues/NN-slug.md`.
|
|
288
|
+
Every ticket needs `**Impl:** ready` and a `**Blocked by:**` line — those two fields are what `tickets.py` and the per-turn hook both read. Leave every ticket `ready`; claiming happens in Phase 2.
|
|
289
|
+
Decision tickets from `/atw-map` belong in `map-issues/`, never in `issues/`.
|
|
290
|
+
When the tickets are written, run `task.py start <task>` (step 1.5) to enter implement.
|
|
291
|
+
[/workflow-state:slice]
|
|
292
|
+
|
|
293
|
+
### Phase 2: Execute
|
|
294
|
+
|
|
295
|
+
- 2.1 Claim the next ticket `[required · repeatable]`
|
|
296
|
+
- 2.2 Run the implement chain `[required · repeatable]` (stop ③)
|
|
297
|
+
- 2.3 Relay the review reports `[required · repeatable]`
|
|
298
|
+
- 2.4 Close the ticket `[required · repeatable]`
|
|
299
|
+
- 2.5 Roll back `[on demand]`
|
|
300
|
+
|
|
301
|
+
<!-- Per-turn breadcrumb: stage 'implement' — set by task.py start, held for all of Phase 2 -->
|
|
302
|
+
|
|
303
|
+
[workflow-state:implement]
|
|
304
|
+
One ticket at a time. Run `tickets.py frontier`, pick one, `tickets.py claim NN` — never hold two tickets at `doing`.
|
|
305
|
+
Stop ③: tell the user to run `/atw-implement` for the claimed ticket. You may not invoke it yourself, and you may not do the implementation inline instead. One user invocation per ticket.
|
|
306
|
+
That one run is a closed chain and must not be broken up from the outside: implement (test-first where it fits) → run tests, full suite on the last pass → review → handle findings → write spec updates back → commit. Never instruct it to skip the review or the commit.
|
|
307
|
+
Findings triage: spec-axis findings and anything the standards axis calls a hard violation get fixed first, then a full re-review, then the commit. Judgement calls ship and get reported.
|
|
308
|
+
Relay both review reports to the user verbatim, even when the verdict is "nothing found". No report reaching you is not a passing review.
|
|
309
|
+
Any sub-agent dispatched from here starts its prompt with `Active task: <task path from task.py current>` — the role files read that line to find the task, and it is the context hooks' fallback when session resolution misses.
|
|
310
|
+
Main-session default: run the process, do not do the work. Sub-agent self-exemption: this breadcrumb reaches sub-agent turns on some hosts, so if you are already running as `atw-implement-agent`, do NOT spawn another `atw-implement-agent` or `atw-review` — do the work you were dispatched for; if already running as `atw-review`, do NOT spawn another `atw-review` or `atw-implement-agent`. Dispatch is main session only.
|
|
311
|
+
Then `tickets.py done NN` and back to the frontier. When the frontier is empty, run `task.py set-status <task> accept`.
|
|
312
|
+
[/workflow-state:implement]
|
|
313
|
+
|
|
314
|
+
### Phase 3: Finish
|
|
315
|
+
|
|
316
|
+
- 3.1 Acceptance check `[required · once]` (read-only; then stop ④)
|
|
317
|
+
- 3.2 Archive `[required · once]`
|
|
318
|
+
|
|
319
|
+
<!-- Per-turn breadcrumb: stage 'accept' — read-only until the user accepts -->
|
|
320
|
+
|
|
321
|
+
[workflow-state:accept]
|
|
322
|
+
Read-only from here. Do not open new work, do not fix things you notice — file them as tickets or a follow-up task instead.
|
|
323
|
+
Walk the acceptance criteria in `prd.md` one by one and report which are met, with evidence. Confirm `tickets.py summary` shows every ticket `done` and `git status --porcelain` is clean.
|
|
324
|
+
Stop ④: present that and wait for the user to accept. Acceptance is the user's judgement, not yours.
|
|
325
|
+
Once accepted, run `task.py archive <task>` — status goes to `completed` and the task moves to `archive/`.
|
|
326
|
+
[/workflow-state:accept]
|
|
327
|
+
|
|
328
|
+
<!-- Per-turn breadcrumb: stage 'completed' — only reachable when archive was interrupted -->
|
|
329
|
+
|
|
330
|
+
[workflow-state:completed]
|
|
331
|
+
The archive was interrupted. `task.py archive` writes `completed` to `task.json` first, re-parents child tasks, then moves the directory — and it does not roll back, so a task still sitting under `.atw/tasks/` with this status means the move never happened.
|
|
332
|
+
Re-run `task.py archive <task>` to finish it. Every step before the move is idempotent, so the re-run redoes them and completes the move; the original `completedAt` is kept.
|
|
333
|
+
Do not open new work, do not create another task, and do not move the directory by hand. If the re-run fails, report the error to the user instead of working around it.
|
|
334
|
+
[/workflow-state:completed]
|
|
335
|
+
|
|
336
|
+
### Rules
|
|
337
|
+
|
|
338
|
+
1. Identify which stage the task is in, then continue from the next step there
|
|
339
|
+
2. Run steps in order inside each phase; `[required]` steps can't be skipped
|
|
340
|
+
3. Stages can roll back (implement exposes a spec defect → `set-status specify`, fix `prd.md`, then return)
|
|
341
|
+
4. Steps tagged `[once]` are skipped if the output already exists; don't re-run
|
|
342
|
+
5. A missing `issues/` directory is a valid single-session task, not incomplete planning. A missing `prd.md` never is.
|
|
343
|
+
|
|
344
|
+
### Active Task Routing
|
|
345
|
+
|
|
346
|
+
When a user request matches one of these intents inside an active task, route first, then load the detailed step if needed.
|
|
347
|
+
|
|
348
|
+
- Requirements still fuzzy → `/atw-askme`, or `/atw-askme-with-docs` when the answer is in project docs
|
|
349
|
+
- Large scope, unclear route → `/atw-map`
|
|
350
|
+
- External or third-party unknowns → `/atw-research`; design question needing a throwaway build → `/atw-prototype`
|
|
351
|
+
- Writing or revising the spec → `/atw-spec`
|
|
352
|
+
- Slicing a confirmed spec into tickets → `/atw-tickets`
|
|
353
|
+
- Starting a claimed ticket → `/atw-implement` (the user runs it; stop ③)
|
|
354
|
+
- Same bug fixed more than once → `/atw-diagnosing-bugs`
|
|
355
|
+
- Knowledge worth keeping outside a ticket → `/atw-update-spec`
|
|
356
|
+
|
|
357
|
+
### Guardrails
|
|
358
|
+
|
|
359
|
+
- Consent to create a task is not consent to implement. Implementation starts at `task.py start`, after the user confirms `prd.md`.
|
|
360
|
+
- Stops ①–④ are the user's calls. Never advance through one by inferring the answer.
|
|
361
|
+
- Planning must be persisted to task artifacts; the review chain must run before reporting a ticket complete.
|
|
362
|
+
- Never mark two tickets `**Impl:** doing` at the same time.
|
|
363
|
+
|
|
364
|
+
### Loading Step Detail
|
|
365
|
+
|
|
366
|
+
At each step, run this to fetch detailed guidance:
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
python3 ./.atw/scripts/get_context.py --mode phase --step <step>
|
|
370
|
+
# e.g. python3 ./.atw/scripts/get_context.py --mode phase --step 1.1
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Phase 1: Plan
|
|
376
|
+
|
|
377
|
+
Goal: understand the request, get a confirmed spec, and — when the work needs it — a set of tickets.
|
|
378
|
+
|
|
379
|
+
#### 1.0 Create task `[required · once]`
|
|
380
|
+
|
|
381
|
+
Create the task directory only after stop ① — the user has agreed this work deserves a record. The command sets status to `discover`, writes `task.json`, creates a default `prd.md`, and auto-targets the new task when session identity is available:
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
python3 ./.atw/scripts/task.py create "<task title>" --description "<one-line description>" --slug <name>
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
`--slug` is the human-readable name only. Do **not** include the `MM-DD-` date prefix; `task.py create` adds that prefix automatically.
|
|
388
|
+
|
|
389
|
+
For task trees, create the parent task first and then create each child with `--parent <parent-dir>`. Do not start the parent just because children exist; start the child that owns the next independently shippable deliverable.
|
|
390
|
+
|
|
391
|
+
After this command succeeds, the per-turn breadcrumb auto-switches to `[workflow-state:discover]`.
|
|
392
|
+
|
|
393
|
+
Run only `create` here — do not also run `start`. `start` flips status straight to `implement`, which skips the whole planning stage. Save `start` for step 1.5.
|
|
394
|
+
|
|
395
|
+
Skip when `python3 ./.atw/scripts/task.py current --source` already points to a task.
|
|
396
|
+
|
|
397
|
+
#### 1.1 Discover `[required · repeatable]`
|
|
398
|
+
|
|
399
|
+
Goal: remove the unknowns before anything gets written down as a spec.
|
|
400
|
+
|
|
401
|
+
Tell the user which of these to run — you drive the conversation between them, but you do not run them for the user:
|
|
402
|
+
|
|
403
|
+
- `/atw-askme` — work through open requirement questions one at a time
|
|
404
|
+
- `/atw-askme-with-docs` — same, when the answers are already in project documentation
|
|
405
|
+
- `/atw-interview` — deeper elicitation when the request is a vague wish rather than a change
|
|
406
|
+
- `/atw-map` — build `map.md` plus decision tickets in `map-issues/`, for work that is both large and unclear
|
|
407
|
+
- `/atw-prototype` — throwaway build to settle a design question
|
|
408
|
+
- `/atw-research` — external unknowns: library docs, API references, industry practice
|
|
409
|
+
|
|
410
|
+
**Research artifact conventions**:
|
|
411
|
+
|
|
412
|
+
- One file per topic (e.g. `research/auth-library-comparison.md`)
|
|
413
|
+
- Record third-party usage examples, API references, and version constraints in the file, not in chat
|
|
414
|
+
- Note the spec file paths you discovered, for step 1.3
|
|
415
|
+
|
|
416
|
+
**Gate out of discover**: not one question you raised this session may still be unanswered by the user. Unanswered questions become assumptions, and assumptions become spec defects found in Phase 2. When the gate is clear:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
python3 ./.atw/scripts/task.py set-status <task-dir> specify
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
This is not a stop — advance on your own judgement.
|
|
423
|
+
|
|
424
|
+
#### 1.2 Specify `[required · once]`
|
|
425
|
+
|
|
426
|
+
Tell the user to run `/atw-spec`. It turns the discover findings into `{TASK_DIR}/prd.md`.
|
|
427
|
+
|
|
428
|
+
`prd.md` holds requirements, constraints, and acceptance criteria. It does not hold an execution checklist — that is what tickets are for.
|
|
429
|
+
|
|
430
|
+
**Stop ②**: present the finished `prd.md` and wait for the user to confirm it. This is the last cheap place to be wrong. Do not advance on your own judgement that the spec looks right.
|
|
431
|
+
|
|
432
|
+
Return to this step whenever requirements change, including from Phase 2 — `set-status <task-dir> specify`, revise, then go back.
|
|
433
|
+
|
|
434
|
+
#### 1.3 Configure context `[required · once]`
|
|
435
|
+
|
|
436
|
+
[Claude Code, Cursor, OpenCode, codex-sub-agent, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid, Pi, Oh My Pi, ZCode, Snow, Reasonix, Trae, Grok, Kimi Code]
|
|
437
|
+
|
|
438
|
+
Curate `check.jsonl` so the review sub-agents dispatched during Phase 2 get the right spec context. The file was seeded on `task create` with a single self-describing `_example` line; your job here is to fill in real entries.
|
|
439
|
+
|
|
440
|
+
**Location**: `{TASK_DIR}/check.jsonl` (already exists).
|
|
441
|
+
|
|
442
|
+
**Format**: one JSON object per line — `{"file": "<path>", "reason": "<why>"}`. Paths are repo-root relative.
|
|
443
|
+
|
|
444
|
+
**What to put in**:
|
|
445
|
+
|
|
446
|
+
- **Spec files** — `.atw/spec/<package>/<layer>/index.md` and any specific guideline files (`error-handling.md`, `conventions.md`, etc.) relevant to this task
|
|
447
|
+
- **Research files** — `{TASK_DIR}/research/*.md` the review axes will need to consult
|
|
448
|
+
|
|
449
|
+
**What NOT to put in**:
|
|
450
|
+
|
|
451
|
+
- Code files (`src/**`, `packages/**/*.ts`, etc.) — the review axes read those from the diff
|
|
452
|
+
- Files you are about to modify — same reason
|
|
453
|
+
|
|
454
|
+
The current ticket path is added to the injected context automatically at dispatch time; do not hand-maintain it here.
|
|
455
|
+
|
|
456
|
+
**How to discover relevant specs**:
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
python3 ./.atw/scripts/get_context.py --mode packages
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Lists every package + its spec layers with paths. Pick the entries that match this task's domain.
|
|
463
|
+
|
|
464
|
+
**How to append entries**:
|
|
465
|
+
|
|
466
|
+
Either edit the jsonl file directly in your editor, or use:
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
python3 ./.atw/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Delete the seed `_example` line once real entries exist (optional — it's skipped automatically by consumers).
|
|
473
|
+
|
|
474
|
+
Ready gate: `check.jsonl` must contain at least one real `{"file": "...", "reason": "..."}` entry before `task.py start`. The seed `_example` row alone is not ready.
|
|
475
|
+
|
|
476
|
+
Skip this step only when the file already has real curated entries.
|
|
477
|
+
|
|
478
|
+
[/Claude Code, Cursor, OpenCode, codex-sub-agent, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid, Pi, Oh My Pi, ZCode, Snow, Reasonix, Trae, Grok, Kimi Code]
|
|
479
|
+
|
|
480
|
+
[codex-inline, Kilo, Antigravity, Devin, DeepSeek Harness]
|
|
481
|
+
|
|
482
|
+
Skip this step. There is no sub-agent dispatch on this platform, so there is nothing to inject; the review step in Phase 2 loads spec context directly.
|
|
483
|
+
|
|
484
|
+
[/codex-inline, Kilo, Antigravity, Devin, DeepSeek Harness]
|
|
485
|
+
|
|
486
|
+
#### 1.4 Slice `[optional · once]`
|
|
487
|
+
|
|
488
|
+
Decide this yourself, after the spec is confirmed — it is not a stop.
|
|
489
|
+
|
|
490
|
+
Slice when the work is more than one sitting, or when parts of it must land in a specific order. Skip it for a single-session change: an empty `issues/` directory is worse than none, because `tickets.py frontier` then reports nothing workable on a task that is perfectly workable.
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
python3 ./.atw/scripts/task.py set-status <task-dir> slice
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
Then tell the user to run `/atw-tickets`, which writes `{TASK_DIR}/issues/NN-slug.md`.
|
|
497
|
+
|
|
498
|
+
Each ticket carries, literally:
|
|
499
|
+
|
|
500
|
+
```
|
|
501
|
+
**Impl:** ready
|
|
502
|
+
**Blocked by:** none
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
`**Impl:**` is read by both `tickets.py` and the per-turn context hook; `**Blocked by:**` is what `tickets.py frontier` walks to compute the workable set. A ticket missing `**Impl:**` makes `tickets.py` fail outright.
|
|
506
|
+
|
|
507
|
+
Leave every ticket `ready` — claiming is a Phase 2 action.
|
|
508
|
+
|
|
509
|
+
Decision tickets produced by `/atw-map` stay in `map-issues/`. They use `Type` / `Status` / `Blocked by`, and nothing ever mirrors them out of the task directory. Implementation tickets *can* be mirrored — but only where the repo asked for it: `github_sync.py` ships wired to nothing, and `docs/agents/issue-tracker.md` is where a repo records whether it runs the mirror at all. Filing a decision ticket in `issues/` breaks the frontier in both directions.
|
|
510
|
+
|
|
511
|
+
#### 1.5 Activate task `[required · once]`
|
|
512
|
+
|
|
513
|
+
After the user has confirmed `prd.md` (stop ②), and after slicing if the work needed it:
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
python3 ./.atw/scripts/task.py start <task-dir>
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
This sets the active-task pointer and flips status from the current planning stage (`discover` / `specify` / `slice`) to `implement`. On sub-agent-dispatch platforms, `check.jsonl` must have real curated entries before start; runtime consumers tolerate a missing or seed-only manifest for compatibility, but that tolerance is not a planning-ready state.
|
|
520
|
+
|
|
521
|
+
If `task.py start` errors with a session-identity message (no context key from hook input, `ATW_CONTEXT_ID`, or platform-native session env), follow the hint in the error to set up session identity, then retry.
|
|
522
|
+
|
|
523
|
+
Ready to leave Phase 1:
|
|
524
|
+
|
|
525
|
+
| Condition | Required |
|
|
526
|
+
|------|:---:|
|
|
527
|
+
| `prd.md` exists and the user confirmed it (stop ②) | ✅ |
|
|
528
|
+
| `research/` has artifacts | recommended |
|
|
529
|
+
| `issues/` has tickets | only when the work was sliced |
|
|
530
|
+
| `task.py start` has been run (status = `implement`) | ✅ |
|
|
531
|
+
|
|
532
|
+
[Claude Code, Cursor, OpenCode, codex-sub-agent, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid, Pi, Oh My Pi, ZCode, Snow, Reasonix, Trae, Grok, Kimi Code]
|
|
533
|
+
|
|
534
|
+
| `check.jsonl` contains at least one real curated entry (seed row does not count) | ✅ |
|
|
535
|
+
|
|
536
|
+
[/Claude Code, Cursor, OpenCode, codex-sub-agent, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid, Pi, Oh My Pi, ZCode, Snow, Reasonix, Trae, Grok, Kimi Code]
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## Phase 2: Execute
|
|
541
|
+
|
|
542
|
+
Goal: turn the confirmed spec into committed code, one ticket at a time, each one reviewed before it is closed.
|
|
543
|
+
|
|
544
|
+
The main session runs the process. It does not write the implementation itself and it does not dispatch an implementation sub-agent — the work happens inside `/atw-implement`, which the user starts.
|
|
545
|
+
|
|
546
|
+
**Sub-agent dispatch protocol** — applies to every platform and every sub-agent
|
|
547
|
+
dispatched anywhere in this workflow (the review sub-agents raised inside the
|
|
548
|
+
implement chain, native Codex `SubagentStart` injection with
|
|
549
|
+
child-side pull fallback, class-2 Gemini/Qoder/Copilot/Reasonix/Trae/Grok/Kimi
|
|
550
|
+
Code, and hook-backed ZCode/Snow): **every dispatch prompt starts with
|
|
551
|
+
`Active task: <task path from task.py current>`** before any role-specific
|
|
552
|
+
instruction.
|
|
553
|
+
|
|
554
|
+
This is an interface, not a style rule. Every `atw-implement-agent` /
|
|
555
|
+
`atw-review` role file tells the sub-agent to read that line out of its inbox to
|
|
556
|
+
locate task artifacts, and the context hooks parse the same prefix as their
|
|
557
|
+
fallback when session-pointer resolution misses. Drop it and the sub-agent still
|
|
558
|
+
starts — with no task context and no error.
|
|
559
|
+
|
|
560
|
+
**Dispatch prompt guard** — after the `Active task:` line, the prompt states the
|
|
561
|
+
role the spawned agent already holds. An implement dispatch says it is
|
|
562
|
+
already the `atw-implement-agent` sub-agent, must do the work directly, and must
|
|
563
|
+
not spawn another `atw-implement-agent` / `atw-review`. A review dispatch says it is
|
|
564
|
+
already the `atw-review` sub-agent and must
|
|
565
|
+
not spawn another `atw-review` / `atw-implement-agent`.
|
|
566
|
+
Without this the guidance a sub-agent inherits reads as an instruction to
|
|
567
|
+
dispatch, and it dispatches itself.
|
|
568
|
+
|
|
569
|
+
On Grok Build, use `spawn_subagent` with `subagent_type` set to the ATW agent
|
|
570
|
+
name (e.g. `atw-implement-agent`). On Kimi Code, dispatch the built-in `coder` /
|
|
571
|
+
`explore` sub-agent for the matching ATW role — Kimi installs the role prompts
|
|
572
|
+
as its own private skills, so the dispatch carries the role and the platform
|
|
573
|
+
supplies the instructions.
|
|
574
|
+
|
|
575
|
+
#### 2.1 Claim the next ticket `[required · repeatable]`
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
python3 ./.atw/scripts/tickets.py frontier
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
That lists the `ready` tickets whose `**Blocked by:**` dependencies are all `done`. Pick one and claim it:
|
|
582
|
+
|
|
583
|
+
```bash
|
|
584
|
+
python3 ./.atw/scripts/tickets.py claim NN
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
`claim` flips the ticket to `**Impl:** doing`. That single `doing` ticket is what every context hook treats as the current ticket, so **exactly one may be claimed at a time**. If two are ever `doing`, stop and resolve it before continuing — the hooks will refuse to inject ticket content rather than guess.
|
|
588
|
+
|
|
589
|
+
For a task that was never sliced, skip to 2.2: the whole `prd.md` is the unit of work.
|
|
590
|
+
|
|
591
|
+
#### 2.2 Run the implement chain `[required · repeatable]`
|
|
592
|
+
|
|
593
|
+
**Stop ③**: tell the user to run `/atw-implement`.
|
|
594
|
+
|
|
595
|
+
You cannot invoke it and you must not substitute for it — not by implementing inline, and not by reading its instructions and following them yourself. One user invocation per ticket.
|
|
596
|
+
|
|
597
|
+
That single run is a closed chain:
|
|
598
|
+
|
|
599
|
+
1. Implement, test-first where the change suits it
|
|
600
|
+
2. Run tests periodically; a full-suite run on the last pass
|
|
601
|
+
3. Review the change on both axes — spec compliance and coding standards
|
|
602
|
+
4. Handle the findings (see triage below)
|
|
603
|
+
5. Write new knowledge back into `.atw/spec/`
|
|
604
|
+
6. Commit to the current branch
|
|
605
|
+
|
|
606
|
+
**Do not break this chain up from the outside.** Instructions like "implement but don't review" or "skip the commit" put two directly conflicting sets of orders in front of the same agent; what comes back is unpredictable rather than merely reduced.
|
|
607
|
+
|
|
608
|
+
**Findings triage**:
|
|
609
|
+
|
|
610
|
+
| Finding | Handling |
|
|
611
|
+
|---|---|
|
|
612
|
+
| Spec-axis finding (the change does not match `prd.md` or the ticket) | Fix first, then re-run the full review, then commit |
|
|
613
|
+
| Standards-axis finding marked a hard violation | Same — fix, full re-review, then commit |
|
|
614
|
+
| Standards-axis judgement call | Commit as-is and report it to the user |
|
|
615
|
+
|
|
616
|
+
The hard gate on this work is the test suite, not the review. Reviews report; tests block.
|
|
617
|
+
|
|
618
|
+
Spec updates belong in the same chain, before the commit — knowledge that lands in a follow-up commit usually does not land at all.
|
|
619
|
+
|
|
620
|
+
#### 2.3 Relay the review reports `[required · repeatable]`
|
|
621
|
+
|
|
622
|
+
Pass both review reports back to the user **as written**. Do not merge them, do not re-rank them, do not pick a winner, and do not summarize a clean report away — "checked, nothing found" is still a report the user is entitled to see.
|
|
623
|
+
|
|
624
|
+
Not receiving a report is not the same as a review that passed. If no report came back, the review did not run; say so and re-run it rather than proceeding.
|
|
625
|
+
|
|
626
|
+
#### 2.4 Close the ticket `[required · repeatable]`
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
python3 ./.atw/scripts/tickets.py done NN
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
Then return to 2.1 for the next frontier ticket. When `tickets.py frontier` comes back empty and `tickets.py summary` shows every ticket `done`, move the task on:
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
python3 ./.atw/scripts/task.py set-status <task-dir> accept
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
#### 2.5 Roll back `[on demand]`
|
|
639
|
+
|
|
640
|
+
- Review exposes a spec defect → `task.py set-status <task-dir> specify`, fix `prd.md` (step 1.2), re-confirm with the user, then `set-status <task-dir> implement` and redo the ticket
|
|
641
|
+
- The slice itself turned out wrong → back to step 1.4 and re-cut the tickets; do not paper over it by widening the ticket you are holding
|
|
642
|
+
- Implementation went wrong → revert the code, keep the ticket claimed, rerun 2.2
|
|
643
|
+
- Missing information → research as in step 1.1, writing findings into `research/`
|
|
644
|
+
|
|
645
|
+
#### 2.6 Same bug twice `[on demand]`
|
|
646
|
+
|
|
647
|
+
If the same issue has now been fixed more than once, stop patching and tell the user to run `/atw-diagnosing-bugs` — it classifies the root cause, explains why the earlier fixes did not hold, and proposes prevention worth writing into `.atw/spec/`.
|
|
648
|
+
|
|
649
|
+
---
|
|
650
|
+
|
|
651
|
+
## Phase 3: Finish
|
|
652
|
+
|
|
653
|
+
Goal: confirm with the user that the work is actually done, then archive it.
|
|
654
|
+
|
|
655
|
+
#### 3.1 Acceptance check `[required · once]`
|
|
656
|
+
|
|
657
|
+
**Read-only.** Do not start new work here and do not fix problems you notice in passing — file them as tickets or a follow-up task. A "quick fix" at this point is unreviewed, uncommitted work sitting between the user's acceptance and the archive.
|
|
658
|
+
|
|
659
|
+
Walk `prd.md`'s acceptance criteria one at a time and report, per criterion, whether it is met and what the evidence is. Also confirm:
|
|
660
|
+
|
|
661
|
+
```bash
|
|
662
|
+
python3 ./.atw/scripts/tickets.py summary # every ticket done
|
|
663
|
+
git status --porcelain # clean tree; the chain commits as it goes
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
**Stop ④**: present that and wait. Whether the work is done is the user's judgement, not yours — you can report that every criterion is met, but you cannot accept on their behalf.
|
|
667
|
+
|
|
668
|
+
#### 3.2 Archive `[required · once]`
|
|
669
|
+
|
|
670
|
+
Once the user accepts:
|
|
671
|
+
|
|
672
|
+
```bash
|
|
673
|
+
python3 ./.atw/scripts/task.py archive <task-dir>
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
This writes `status=completed`, moves the directory to `archive/{year-month}/`, and clears any runtime session pointer still aimed at it. `after_archive` lifecycle hooks fire here.
|
|
677
|
+
|
|
678
|
+
Archiving ends the task; there is no further task-level step. Session wrap-up is a different scope: tell the user they can run the `finish-work` command to record the session journal (`add_session.py`) and archive any other tasks that finished alongside this one. This file is task-scoped, which is why nothing here drives it.
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
## Customizing ATW (for forks)
|
|
683
|
+
|
|
684
|
+
This section is for developers who want to modify the ATW workflow itself. All customization is done by editing this file; the scripts are parsers only.
|
|
685
|
+
|
|
686
|
+
### Changing what a step means
|
|
687
|
+
|
|
688
|
+
Edit the corresponding step's walkthrough body in the Phase 1 / 2 / 3 sections above. Critical invariants:
|
|
689
|
+
|
|
690
|
+
- No active task must triage first and ask for task-creation consent before creating an ATW task.
|
|
691
|
+
- Each of the four stops must stay reachable and must stay the user's call.
|
|
692
|
+
- Every execution path must keep the implement chain intact: review and spec update before the commit, never after.
|
|
693
|
+
|
|
694
|
+
Structure is guarded by `packages/cli/test/scripts/workflow-structure.test.ts`, which runs with `pnpm test` — there is no separate step to remember.
|
|
695
|
+
|
|
696
|
+
### Changing the per-turn prompt text
|
|
697
|
+
|
|
698
|
+
All tag blocks live in the `## Phase Index` section above, immediately after each stage summary:
|
|
699
|
+
|
|
700
|
+
| Scope | Corresponding tag |
|
|
701
|
+
|---|---|
|
|
702
|
+
| No active task (before Phase 1) | `[workflow-state:no_task]` |
|
|
703
|
+
| Active task record unreadable | `[workflow-state:task_error]` |
|
|
704
|
+
| Phase 1 steps 1.0–1.1 | `[workflow-state:discover]` |
|
|
705
|
+
| Phase 1 steps 1.2–1.3 | `[workflow-state:specify]` |
|
|
706
|
+
| Phase 1 step 1.4 | `[workflow-state:slice]` |
|
|
707
|
+
| All of Phase 2 | `[workflow-state:implement]` |
|
|
708
|
+
| All of Phase 3 up to archive | `[workflow-state:accept]` |
|
|
709
|
+
| Archive interrupted; task still under `.atw/tasks/` | `[workflow-state:completed]` |
|
|
710
|
+
|
|
711
|
+
Directly edit the body of the corresponding `[workflow-state:STATUS]` block. After editing, run `atw update` (if you're a template maintainer) or restart your AI session (if you're customizing your own project) — no script changes required.
|
|
712
|
+
|
|
713
|
+
`completed` has a block because `task.py archive` is not atomic: it writes the status, re-parents children, then moves the directory, and it does not roll back. An archive interrupted between those steps leaves a `completed` task the active-task resolver still finds, so the hook can fire on one. The block tells the AI to re-run `task.py archive <task>` — the same remedy the `continue` and `start` routing tables give.
|
|
714
|
+
|
|
715
|
+
### Adding a custom status
|
|
716
|
+
|
|
717
|
+
Add a new block:
|
|
718
|
+
|
|
719
|
+
```
|
|
720
|
+
[workflow-state:my-status]
|
|
721
|
+
your per-turn prompt text
|
|
722
|
+
[/workflow-state:my-status]
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
That example sits inside a code fence, but the per-turn hooks do not track fences — all four parse it as a real block. It is harmless because they look a block up by the task's exact status, and nothing ever writes `my-status`, so the entry is inert. The structure guard *does* track fences, and it rejects any fenced example named after a live or retired status, so an example can never quietly stand in for a block someone deleted. Give your example a name of its own.
|
|
726
|
+
|
|
727
|
+
Constraints:
|
|
728
|
+
|
|
729
|
+
- STATUS charset: `[A-Za-z0-9_-]+` (underscores and hyphens allowed, e.g. `in-review`, `blocked-by-team`)
|
|
730
|
+
- Something must write `task.json.status` to your custom value — `task.py set-status` only accepts the six built-in stages, so a custom value needs a lifecycle hook to write it
|
|
731
|
+
- Lifecycle hooks live in `task.json.hooks.after_*` and bind to one of `after_create / after_start / after_finish / after_archive`
|
|
732
|
+
|
|
733
|
+
### Adding a lifecycle hook
|
|
734
|
+
|
|
735
|
+
Add a `hooks` field to your `task.json`:
|
|
736
|
+
|
|
737
|
+
```json
|
|
738
|
+
{
|
|
739
|
+
"hooks": {
|
|
740
|
+
"after_finish": [
|
|
741
|
+
"your-script-or-command-here"
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
Supported events: `after_create / after_start / after_finish / after_archive`. Note that `after_finish` ≠ a status change (it only clears the active-task pointer); use `after_archive` for "task is done" notifications.
|
|
748
|
+
|
|
749
|
+
### Full contract
|
|
750
|
+
|
|
751
|
+
For the workflow state machine's runtime contract, the locations of all status writers, pseudo-statuses (`no_task` / `stale_<source_type>`), the hook reachability matrix, and other deep details, see:
|
|
752
|
+
|
|
753
|
+
- `.atw/spec/cli/backend/workflow-state-contract.md` — runtime contract + writer table + test invariants
|
|
754
|
+
- `.atw/scripts/inject-workflow-state.py` — actual parser (reads workflow.md only, no embedded text)
|