@chinhae/atw-cli 0.5.0 → 0.7.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.
Files changed (257) hide show
  1. package/README.md +128 -451
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +24 -1
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/channel/adapters/claude.d.ts +44 -2
  6. package/dist/commands/channel/adapters/claude.d.ts.map +1 -1
  7. package/dist/commands/channel/adapters/claude.js +124 -23
  8. package/dist/commands/channel/adapters/claude.js.map +1 -1
  9. package/dist/commands/channel/adapters/codex.d.ts +36 -6
  10. package/dist/commands/channel/adapters/codex.d.ts.map +1 -1
  11. package/dist/commands/channel/adapters/codex.js +150 -10
  12. package/dist/commands/channel/adapters/codex.js.map +1 -1
  13. package/dist/commands/channel/adapters/index.d.ts +33 -4
  14. package/dist/commands/channel/adapters/index.d.ts.map +1 -1
  15. package/dist/commands/channel/adapters/index.js +159 -6
  16. package/dist/commands/channel/adapters/index.js.map +1 -1
  17. package/dist/commands/channel/adapters/omp.d.ts +106 -0
  18. package/dist/commands/channel/adapters/omp.d.ts.map +1 -0
  19. package/dist/commands/channel/adapters/omp.js +405 -0
  20. package/dist/commands/channel/adapters/omp.js.map +1 -0
  21. package/dist/commands/channel/adapters/pi.d.ts +123 -0
  22. package/dist/commands/channel/adapters/pi.d.ts.map +1 -0
  23. package/dist/commands/channel/adapters/pi.js +387 -0
  24. package/dist/commands/channel/adapters/pi.js.map +1 -0
  25. package/dist/commands/channel/adapters/types.d.ts +16 -0
  26. package/dist/commands/channel/adapters/types.d.ts.map +1 -1
  27. package/dist/commands/channel/agent-loader.d.ts +1 -0
  28. package/dist/commands/channel/agent-loader.d.ts.map +1 -1
  29. package/dist/commands/channel/agent-loader.js +45 -5
  30. package/dist/commands/channel/agent-loader.js.map +1 -1
  31. package/dist/commands/channel/dev-parse-trace.d.ts +1 -1
  32. package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -1
  33. package/dist/commands/channel/dev-parse-trace.js +25 -2
  34. package/dist/commands/channel/dev-parse-trace.js.map +1 -1
  35. package/dist/commands/channel/index.d.ts.map +1 -1
  36. package/dist/commands/channel/index.js +44 -12
  37. package/dist/commands/channel/index.js.map +1 -1
  38. package/dist/commands/channel/run.d.ts +39 -2
  39. package/dist/commands/channel/run.d.ts.map +1 -1
  40. package/dist/commands/channel/run.js +227 -68
  41. package/dist/commands/channel/run.js.map +1 -1
  42. package/dist/commands/channel/spawn.d.ts +7 -2
  43. package/dist/commands/channel/spawn.d.ts.map +1 -1
  44. package/dist/commands/channel/spawn.js +35 -1
  45. package/dist/commands/channel/spawn.js.map +1 -1
  46. package/dist/commands/channel/store/events.d.ts +2 -2
  47. package/dist/commands/channel/store/events.d.ts.map +1 -1
  48. package/dist/commands/channel/store/events.js +1 -1
  49. package/dist/commands/channel/store/events.js.map +1 -1
  50. package/dist/commands/channel/supervisor/shutdown.d.ts +2 -0
  51. package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -1
  52. package/dist/commands/channel/supervisor/shutdown.js +6 -1
  53. package/dist/commands/channel/supervisor/shutdown.js.map +1 -1
  54. package/dist/commands/channel/supervisor.d.ts +2 -2
  55. package/dist/commands/channel/supervisor.d.ts.map +1 -1
  56. package/dist/commands/channel/supervisor.js +26 -3
  57. package/dist/commands/channel/supervisor.js.map +1 -1
  58. package/dist/commands/init.d.ts.map +1 -1
  59. package/dist/commands/init.js +6 -1
  60. package/dist/commands/init.js.map +1 -1
  61. package/dist/commands/mem.d.ts +2 -1
  62. package/dist/commands/mem.d.ts.map +1 -1
  63. package/dist/commands/mem.js +162 -13
  64. package/dist/commands/mem.js.map +1 -1
  65. package/dist/commands/mode.d.ts.map +1 -1
  66. package/dist/commands/mode.js +5 -3
  67. package/dist/commands/mode.js.map +1 -1
  68. package/dist/commands/uninstall.d.ts +5 -3
  69. package/dist/commands/uninstall.d.ts.map +1 -1
  70. package/dist/commands/uninstall.js +40 -16
  71. package/dist/commands/uninstall.js.map +1 -1
  72. package/dist/commands/update.d.ts +34 -0
  73. package/dist/commands/update.d.ts.map +1 -1
  74. package/dist/commands/update.js +209 -11
  75. package/dist/commands/update.js.map +1 -1
  76. package/dist/commands/verify.d.ts +18 -0
  77. package/dist/commands/verify.d.ts.map +1 -0
  78. package/dist/commands/verify.js +75 -0
  79. package/dist/commands/verify.js.map +1 -0
  80. package/dist/configurators/index.d.ts.map +1 -1
  81. package/dist/configurators/index.js +3 -2
  82. package/dist/configurators/index.js.map +1 -1
  83. package/dist/configurators/omp.d.ts +22 -0
  84. package/dist/configurators/omp.d.ts.map +1 -1
  85. package/dist/configurators/omp.js +101 -2
  86. package/dist/configurators/omp.js.map +1 -1
  87. package/dist/configurators/shared.d.ts.map +1 -1
  88. package/dist/configurators/shared.js +39 -7
  89. package/dist/configurators/shared.js.map +1 -1
  90. package/dist/configurators/workflow.d.ts.map +1 -1
  91. package/dist/configurators/workflow.js +5 -1
  92. package/dist/configurators/workflow.js.map +1 -1
  93. package/dist/constants/paths.d.ts +4 -0
  94. package/dist/constants/paths.d.ts.map +1 -1
  95. package/dist/constants/paths.js +4 -0
  96. package/dist/constants/paths.js.map +1 -1
  97. package/dist/migrations/manifests/0.6.0.json +442 -0
  98. package/dist/migrations/manifests/0.7.0.json +1378 -0
  99. package/dist/templates/atw/definition-of-done.md +65 -0
  100. package/dist/templates/atw/gitignore.txt +7 -0
  101. package/dist/templates/atw/index.d.ts +11 -0
  102. package/dist/templates/atw/index.d.ts.map +1 -1
  103. package/dist/templates/atw/index.js +22 -0
  104. package/dist/templates/atw/index.js.map +1 -1
  105. package/dist/templates/atw/scripts/common/active_task.py +2 -2
  106. package/dist/templates/atw/scripts/common/workflow_phase.py +33 -0
  107. package/dist/templates/atw/scripts/cross_model_review.py +3312 -0
  108. package/dist/templates/atw/scripts/decision_log.py +2002 -0
  109. package/dist/templates/atw/scripts/floor_guard.py +642 -0
  110. package/dist/templates/atw/scripts/task.py +25 -6
  111. package/dist/templates/atw/scripts/tickets.py +480 -10
  112. package/dist/templates/atw/workflow-general.md +6 -1
  113. package/dist/templates/atw/workflow.md +346 -26
  114. package/dist/templates/claude/settings.json +12 -0
  115. package/dist/templates/codex/hooks/session-start.py +2 -2
  116. package/dist/templates/common/bundled-skills/atw-askme/SKILL.md +1 -1
  117. package/dist/templates/common/bundled-skills/atw-askme-with-docs/SKILL.md +1 -1
  118. package/dist/templates/common/bundled-skills/atw-channel/SKILL.md +5 -2
  119. package/dist/templates/common/bundled-skills/atw-channel/references/command-reference.md +44 -5
  120. package/dist/templates/common/bundled-skills/atw-channel/references/progress-debugging.md +9 -0
  121. package/dist/templates/common/bundled-skills/atw-channel/references/workers.md +48 -4
  122. package/dist/templates/common/bundled-skills/atw-code-review/SKILL.md +78 -3
  123. package/dist/templates/common/bundled-skills/atw-codebase-design/SKILL.md +2 -2
  124. package/dist/templates/common/bundled-skills/atw-codebase-design/{DESIGN-IT-TWICE.md → design-it-twice.md} +3 -3
  125. package/dist/templates/common/bundled-skills/atw-cross-model-review/SKILL.md +361 -0
  126. package/dist/templates/common/bundled-skills/atw-cross-model-review/agents/openai.yaml +5 -0
  127. package/dist/templates/common/bundled-skills/atw-cross-model-review/references/four-tiers.md +42 -0
  128. package/dist/templates/common/bundled-skills/atw-cross-model-review/references/log-review-questions.md +38 -0
  129. package/dist/templates/common/bundled-skills/atw-cross-model-review/references/questions.md +54 -0
  130. package/dist/templates/common/bundled-skills/atw-cross-model-review/references/recheck-questions.md +42 -0
  131. package/dist/templates/common/bundled-skills/atw-cross-model-review/references/report-format.md +22 -0
  132. package/dist/templates/common/bundled-skills/atw-diagnosing-bugs/SKILL.md +13 -2
  133. package/dist/templates/common/bundled-skills/atw-domain-modeling/SKILL.md +2 -2
  134. package/dist/templates/common/bundled-skills/atw-handoff/SKILL.md +1 -1
  135. package/dist/templates/common/bundled-skills/atw-implement/SKILL.md +37 -1
  136. package/dist/templates/common/bundled-skills/atw-implement-all/SKILL.md +219 -24
  137. package/dist/templates/common/bundled-skills/atw-implement-spec/SKILL.md +237 -18
  138. package/dist/templates/common/bundled-skills/atw-improve-codebase-architecture/SKILL.md +2 -2
  139. package/dist/templates/common/bundled-skills/atw-init-repo/SKILL.md +1 -1
  140. package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-atw-local.md +7 -1
  141. package/dist/templates/common/bundled-skills/atw-init-repo/references/issue-tracker-atw.md +7 -1
  142. package/dist/templates/common/bundled-skills/atw-map/SKILL.md +1 -1
  143. package/dist/templates/common/bundled-skills/atw-meta/SKILL.md +1 -1
  144. package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/add-project-local-conventions.md +4 -3
  145. package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-skills-or-commands.md +21 -16
  146. package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/change-task-lifecycle.md +1 -1
  147. package/dist/templates/common/bundled-skills/atw-meta/references/customize-local/overview.md +1 -0
  148. package/dist/templates/common/bundled-skills/atw-meta/references/local-architecture/task-system.md +2 -1
  149. package/dist/templates/common/bundled-skills/atw-meta/references/platform-files/hooks-and-settings.md +1 -0
  150. package/dist/templates/common/bundled-skills/atw-noob-mode/SKILL.md +1 -1
  151. package/dist/templates/common/bundled-skills/atw-performance/SKILL.md +134 -0
  152. package/dist/templates/common/bundled-skills/atw-performance/agents/openai.yaml +3 -0
  153. package/dist/templates/common/bundled-skills/atw-performance/references/optimization-patterns.md +250 -0
  154. package/dist/templates/common/bundled-skills/atw-performance/references/performance-checklist.md +238 -0
  155. package/dist/templates/common/bundled-skills/atw-performance/references/performance-optimization.md +264 -0
  156. package/dist/templates/common/bundled-skills/atw-prototype/SKILL.md +3 -3
  157. package/dist/templates/common/bundled-skills/atw-prototype/{LOGIC.md → logic.md} +1 -1
  158. package/dist/templates/common/bundled-skills/atw-prototype/references/design-direction.md +91 -58
  159. package/dist/templates/common/bundled-skills/atw-prototype/references/direction-persuasion.md +25 -0
  160. package/dist/templates/common/bundled-skills/atw-prototype/references/style-explorer.md +1 -1
  161. package/dist/templates/common/bundled-skills/atw-prototype/ui.md +194 -0
  162. package/dist/templates/common/bundled-skills/atw-reflect/SKILL.md +77 -0
  163. package/dist/templates/common/bundled-skills/atw-reflect/agents/openai.yaml +5 -0
  164. package/dist/templates/common/bundled-skills/atw-reflect/references/divergent-reviewer.md +38 -0
  165. package/dist/templates/common/bundled-skills/atw-reflect/references/judgment-reviewer.md +37 -0
  166. package/dist/templates/common/bundled-skills/atw-reflect/references/synthesizer.md +63 -0
  167. package/dist/templates/common/bundled-skills/atw-reflect/references/tooling-reviewer.md +48 -0
  168. package/dist/templates/common/bundled-skills/atw-security/SKILL.md +248 -0
  169. package/dist/templates/common/bundled-skills/atw-security/agents/openai.yaml +3 -0
  170. package/dist/templates/common/bundled-skills/atw-security/references/hardening-patterns.md +324 -0
  171. package/dist/templates/common/bundled-skills/atw-security/references/security-checklist.md +248 -0
  172. package/dist/templates/common/bundled-skills/atw-session-insight/SKILL.md +1 -1
  173. package/dist/templates/common/bundled-skills/atw-session-insight/references/cli-quick-reference.md +11 -2
  174. package/dist/templates/common/bundled-skills/atw-spec/SKILL.md +1 -1
  175. package/dist/templates/common/bundled-skills/atw-tdd/SKILL.md +25 -0
  176. package/dist/templates/common/bundled-skills/atw-tickets/SKILL.md +1 -1
  177. package/dist/templates/common/bundled-skills/atw-triage/SKILL.md +5 -5
  178. package/dist/templates/common/bundled-skills/atw-ui/SKILL.md +99 -31
  179. package/dist/templates/common/bundled-skills/atw-ui/references/accessibility-checklist.md +160 -0
  180. package/dist/templates/common/bundled-skills/atw-ui/references/layout-and-viewport.md +7 -5
  181. package/dist/templates/common/bundled-skills/atw-ui/references/media.md +117 -20
  182. package/dist/templates/common/bundled-skills/atw-ui/references/motion.md +47 -23
  183. package/dist/templates/common/bundled-skills/atw-ui/references/play.md +18 -0
  184. package/dist/templates/common/bundled-skills/atw-ui/references/reviewer-manual.md +73 -0
  185. package/dist/templates/common/bundled-skills/atw-ui/references/scroll-narrative.md +98 -0
  186. package/dist/templates/common/bundled-skills/atw-ui/references/tools.md +46 -0
  187. package/dist/templates/common/bundled-skills/atw-ui/references/visual-language.md +40 -24
  188. package/dist/templates/common/bundled-skills/atw-ui/references/visual-review.md +26 -82
  189. package/dist/templates/common/bundled-skills/atw-ui/scripts/shoot.mjs +1721 -0
  190. package/dist/templates/common/bundled-skills/atw-verify-skill/SKILL.md +58 -0
  191. package/dist/templates/common/bundled-skills/atw-verify-skill/agents/openai.yaml +5 -0
  192. package/dist/templates/common/bundled-skills/atw-verify-skill/references/feature-map-example/README.md +47 -0
  193. package/dist/templates/common/bundled-skills/atw-verify-skill/references/feature-map-example/create-note.md +39 -0
  194. package/dist/templates/common/bundled-skills/atw-verify-skill/references/feature-map-example/search.md +45 -0
  195. package/dist/templates/common/bundled-skills/atw-verify-skill/references/generate.md +107 -0
  196. package/dist/templates/common/bundled-skills/atw-verify-skill/references/health-check.md +100 -0
  197. package/dist/templates/common/bundled-skills/atw-verify-skill/references/verify-skill-template.md +99 -0
  198. package/dist/templates/common/bundled-skills/atw-what-happened/SKILL.md +49 -0
  199. package/dist/templates/common/bundled-skills/atw-what-happened/agents/openai.yaml +5 -0
  200. package/dist/templates/common/commands/finish-work.md +10 -1
  201. package/dist/templates/common/commands/start.md +3 -1
  202. package/dist/templates/common/skills/update-spec.md +40 -4
  203. package/dist/templates/copilot/hooks/session-start.py +2 -2
  204. package/dist/templates/dsh/DSH.md +2 -2
  205. package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +10 -0
  206. package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +10 -0
  207. package/dist/templates/omp/config.yml +15 -0
  208. package/dist/templates/omp/extensions/atw/index.ts.txt +135 -18
  209. package/dist/templates/omp/index.d.ts +1 -0
  210. package/dist/templates/omp/index.d.ts.map +1 -1
  211. package/dist/templates/omp/index.js +3 -0
  212. package/dist/templates/omp/index.js.map +1 -1
  213. package/dist/templates/opencode/lib/session-utils.js +4 -2
  214. package/dist/templates/opencode/plugins/inject-workflow-state.js +5 -1
  215. package/dist/templates/pi/extensions/atw/index.ts.txt +80 -7
  216. package/dist/templates/shared-hooks/index.d.ts +8 -1
  217. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  218. package/dist/templates/shared-hooks/index.js +8 -0
  219. package/dist/templates/shared-hooks/index.js.map +1 -1
  220. package/dist/templates/shared-hooks/inject-workflow-state.py +131 -14
  221. package/dist/templates/shared-hooks/session-start.py +4 -2
  222. package/dist/templates/shared-hooks/show-notice.py +135 -0
  223. package/dist/templates/snow/SNOW.md +1 -1
  224. package/dist/utils/initialized.d.ts +9 -0
  225. package/dist/utils/initialized.d.ts.map +1 -0
  226. package/dist/utils/initialized.js +24 -0
  227. package/dist/utils/initialized.js.map +1 -0
  228. package/dist/utils/managed-removal.d.ts +2 -0
  229. package/dist/utils/managed-removal.d.ts.map +1 -1
  230. package/dist/utils/managed-removal.js +23 -3
  231. package/dist/utils/managed-removal.js.map +1 -1
  232. package/dist/utils/optional-skills.d.ts +2 -0
  233. package/dist/utils/optional-skills.d.ts.map +1 -1
  234. package/dist/utils/optional-skills.js +1 -1
  235. package/dist/utils/optional-skills.js.map +1 -1
  236. package/dist/utils/template-hash.d.ts.map +1 -1
  237. package/dist/utils/template-hash.js +3 -0
  238. package/dist/utils/template-hash.js.map +1 -1
  239. package/dist/utils/uninstall-scrubbers.d.ts +10 -0
  240. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  241. package/dist/utils/uninstall-scrubbers.js +50 -0
  242. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  243. package/dist/utils/verify-entries.d.ts +51 -0
  244. package/dist/utils/verify-entries.d.ts.map +1 -0
  245. package/dist/utils/verify-entries.js +399 -0
  246. package/dist/utils/verify-entries.js.map +1 -0
  247. package/package.json +2 -2
  248. package/dist/templates/common/bundled-skills/atw-prototype/UI.md +0 -174
  249. package/dist/templates/common/bundled-skills/atw-prototype/references/visual-language.md +0 -88
  250. package/dist/templates/common/bundled-skills/atw-prototype/references/visual-review.md +0 -63
  251. package/dist/templates/common/bundled-skills/atw-ui/references/imagery.md +0 -69
  252. /package/dist/templates/common/bundled-skills/atw-codebase-design/{DEEPENING.md → deepening.md} +0 -0
  253. /package/dist/templates/common/bundled-skills/atw-domain-modeling/{ADR-FORMAT.md → adr-format.md} +0 -0
  254. /package/dist/templates/common/bundled-skills/atw-domain-modeling/{GLOSSARY-FORMAT.md → glossary-format.md} +0 -0
  255. /package/dist/templates/common/bundled-skills/atw-improve-codebase-architecture/{HTML-REPORT.md → html-report.md} +0 -0
  256. /package/dist/templates/common/bundled-skills/atw-triage/{AGENT-BRIEF.md → agent-brief.md} +0 -0
  257. /package/dist/templates/common/bundled-skills/atw-triage/{OUT-OF-SCOPE.md → out-of-scope.md} +0 -0
@@ -57,6 +57,18 @@
57
57
  ]
58
58
  }
59
59
  ],
60
+ "PostToolUse": [
61
+ {
62
+ "matcher": "Bash",
63
+ "hooks": [
64
+ {
65
+ "type": "command",
66
+ "command": "{{PYTHON_CMD}} .claude/hooks/show-notice.py",
67
+ "timeout": 15
68
+ }
69
+ ]
70
+ }
71
+ ],
60
72
  "UserPromptSubmit": [
61
73
  {
62
74
  "hooks": [
@@ -237,8 +237,8 @@ def _get_task_status(atw_dir: Path, hook_input: dict, general: bool = False) ->
237
237
  )
238
238
  return (
239
239
  "Status: NO ACTIVE TASK\n"
240
- "Next: Classify the current turn and ask for task-creation consent "
241
- "before creating any ATW task."
240
+ "Next: If the request is about a task that already exists — the user names it, or asks to continue or accept and only one open task fits — make it this session's task first, as the no-task breadcrumb says; do not ask whether to create a new one. "
241
+ "Otherwise classify the current turn and ask for task-creation consent before creating any ATW task."
242
242
  )
243
243
 
244
244
  task_ref = active.task_path
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: atw-askme
3
- description: "一场毫不留情的访谈,旨在打磨计划或设计。"
3
+ description: "一场毫不留情的访谈,旨在打磨计划或设计。用户想把计划或设计拿来逐条拷问时使用。"
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: atw-askme-with-docs
3
- description: "一场旨在完善计划或设计的深入访谈,同时在过程中逐步生成相关文档(ADR 和术语表)。"
3
+ description: "一场旨在完善计划或设计的深入访谈,同时在过程中逐步生成相关文档(ADR 和术语表)。用户想一边被追问一边留下书面成果时使用。"
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: atw-channel
3
- description: Use ATW channel for live multi-agent collaboration, spawned workers, cross-agent review, progress inspection, forum channels, and channel log debugging.
3
+ description: Use when the user wants live multi-agent collaboration through ATW channel, spawned workers, cross-agent review, progress inspection, forum channels, or channel log debugging.
4
4
  ---
5
5
 
6
6
  # atw-channel
@@ -41,14 +41,17 @@ atw channel context list <board> --scope global --thread <thread>
41
41
 
42
42
  ## Core Rules
43
43
 
44
+ - Workers can be Claude Code, Codex, pi or omp: `spawn` / `run` take `--provider <claude|codex|pi|omp>`. An agent card's `provider:` field only takes `claude` or `codex` — any other value is dropped, as if unset — so pick pi or omp with `--provider`. Flags: `references/workers.md`.
44
45
  - New forum channels use `--type forum`. A `thread` is one item inside a forum channel.
45
46
  - Use `--context-file` / `--context-raw` and `atw channel context add/delete/list`. `--linked-context-*` is deprecated terminology.
46
47
  - Use `--stdin` or `--text-file` for long messages. Do not put long mixed Chinese/English text in the positional shell argument.
47
48
  - Pretty `messages` output is an operator dashboard and may truncate progress. Use `--raw` for audit.
49
+ - Reviewer workers: `spawn` / `run` take `--read-only`, `--clean`, `--no-session`, `--effort <level>`, `--standard-speed`; none of them means the worker launches as before. Claude Code with `--read-only` alone is still widened by the user's own allow rules and hooks — add `--clean`. Details: `references/workers.md` "Reviewer Mode".
50
+ - `run --json` prints one result object on stdout in every outcome — `status` (done / timeout / error / not-started), `text` with `partial` (on timeout: what was produced so far), `durationMs`, `costUsd` or token `usage` (`null` = not reported; `costUnreported` also flags the `0` pi or omp gives for an interrupted turn), `model`, codex `instructionSources`, raw `error`, and the tool's own `errorKind` / `errorStatus` / `errorSubkind` (claude, codex; `null` when it gave none); exit code and keep-on-failure unchanged. Fields: `references/command-reference.md` "run".
48
51
  - `--as` is the speaker or worker handle, depending on the command. Use explicit, stable names when multiple agents or sessions are involved.
49
52
  - `--scope project` (default) operates on the current cwd's project bucket; `--scope global` operates on the shared `__global__` bucket. Pick scope deliberately — a global board is invisible from project listings unless `--scope global` is passed.
50
53
  - For brainstorm, do multiple pressure-test rounds. One answer plus one confirmation is review, not brainstorm.
51
- - **Dispatcher wait pattern**: use `--kind done` / `--kind turn_finished` (atw-emitted system events), NOT a user `--tag` as the completion signal. CLI help lists `phase_done` / `question` as `--tag` examples but only `interrupt` is a reserved tag with hardcoded atw behavior; the others are opaque user labels. Relying on a worker to run `send --tag <my_signal>` is unreliable — LLM workers commonly write the tag string into prose instead of running the actual CLI command. See `references/command-reference.md` "tag vs kind".
54
+ - **Dispatcher wait pattern**: use `--kind done` / `--kind turn_finished` (ATW-emitted system events), NOT a user `--tag` as the completion signal. CLI help lists `phase_done` / `question` as `--tag` examples but only `interrupt` is a reserved tag with hardcoded atw behavior; the others are opaque user labels. Relying on a worker to run `send --tag <my_signal>` is unreliable — LLM workers commonly write the tag string into prose instead of running the actual CLI command. See `references/command-reference.md` "tag vs kind".
52
55
  - Forum channels are event-sourced. Do not parse `events.jsonl` first; use `forum`, `thread`, `messages --thread`, and `context list`.
53
56
  - `@chinhae/atw-core` owns reusable channel/thread state, event append, seq allocation, context/title projection, reducers, and task helpers. The CLI owns flags, terminal rendering, prompts, worker lifecycle, and process exits.
54
57
 
@@ -151,7 +151,7 @@ not a legacy alias for any `--tag` flag.
151
151
  Concrete model in the current source:
152
152
 
153
153
  - `--kind` is the only event-type filter, and it is constrained to the
154
- atw-emitted whitelist (`CHANNEL_EVENT_KINDS` in
154
+ ATW-emitted whitelist (`CHANNEL_EVENT_KINDS` in
155
155
  `packages/core/src/channel/internal/store/events.ts`):
156
156
  - `create`, `join`, `leave`, `message`, `thread`, `context`, `channel`,
157
157
  `spawned`, `killed`, `respawned`, `progress`, `done`, `error`,
@@ -214,7 +214,7 @@ Behavior:
214
214
  atw channel spawn <name>
215
215
  [--scope project|global]
216
216
  [--agent <agent-name>] # loads .atw/agents/<name>.md
217
- [--provider claude|codex] # overrides agent file
217
+ [--provider claude|codex|pi|omp] # overrides agent file
218
218
  [--as <worker-name>] # default: agent name
219
219
  [--cwd <path>]
220
220
  [--model <id>]
@@ -232,12 +232,19 @@ atw channel spawn <name>
232
232
  # default 5m, 0 disables
233
233
  [--max-live-workers <n>] # spawn-time live-worker budget
234
234
  # default 6, 0 disables
235
+ [--sandbox read-only|workspace-write|danger-full-access]
236
+ # codex only; default workspace-write
237
+ [--read-only] # reviewer mode, see workers.md
238
+ [--clean] # claude: needs --read-only
239
+ [--no-session] # no session record, not resumable
240
+ [--effort <level>] # tool's own levels, checked first
241
+ [--standard-speed] # skip the user's fast tier
235
242
  ```
236
243
 
237
244
  Behavior:
238
245
  - Provider is validated against the adapter registry
239
246
  (`packages/cli/src/commands/channel/adapters/`); current: `claude`,
240
- `codex`.
247
+ `codex`, `pi`, `omp`.
241
248
  - Worker stays inbox-idle until the first `send --to <worker>`.
242
249
  - Records a `spawned` event with `pid`, `provider`, `agent`, `files`,
243
250
  `manifests`.
@@ -245,13 +252,22 @@ Behavior:
245
252
  (`ATW_CHANNEL_WORKER_IDLE_TIMEOUT`,
246
253
  `ATW_CHANNEL_MAX_LIVE_WORKERS`) →
247
254
  `.atw/config.yaml#channel.worker_guard` → built-in defaults.
255
+ - Reviewer mode (`--read-only`, `--clean`, `--no-session`, `--effort`,
256
+ `--standard-speed`): without them the launch is unchanged. Unknown effort
257
+ levels and combinations a tool cannot do (claude `--clean` without
258
+ `--read-only`; codex `--read-only` with a writable `--sandbox`; omp
259
+ `--effort auto`, or `--read-only --clean` without `--model`) exit 1
260
+ before launch; a pi or omp level the model lacks fails the handshake before
261
+ any message is sent. Codex workers record the thread's `instructionSources` as a
262
+ `progress` event (`detail.kind: "instruction_sources"`). Per-tool
263
+ translation and known limits: `workers.md` "Reviewer Mode".
248
264
 
249
265
  ### `run [name]`
250
266
 
251
267
  ```bash
252
268
  atw channel run [name?]
253
269
  [--agent <name>]
254
- [--provider claude|codex]
270
+ [--provider claude|codex|pi|omp]
255
271
  [--as <worker-name>]
256
272
  [--cwd <path>]
257
273
  [--model <id>]
@@ -259,6 +275,9 @@ atw channel run [name?]
259
275
  [--jsonl <path>] ... # repeatable
260
276
  [--message <text> | --message-file <path> | --stdin]
261
277
  [--timeout <Ns|Nm|Nh>] # default 5m
278
+ [--read-only] [--clean] [--no-session] # reviewer mode, same as spawn
279
+ [--effort <level>] [--standard-speed]
280
+ [--json] # one result object on stdout
262
281
  ```
263
282
 
264
283
  Behavior:
@@ -267,6 +286,25 @@ Behavior:
267
286
  sends the prompt, waits for `done`, prints the final assistant text to
268
287
  stdout, then removes the channel on success. On failure the channel is
269
288
  kept for inspection and exit code is 1.
289
+ - `--json`: stdout carries exactly one JSON object, printed in every
290
+ outcome (the create / spawn / send notes move to stderr). Exit code and
291
+ keep-on-failure are the same as without it. Fields:
292
+
293
+ | Field | Value |
294
+ |---|---|
295
+ | `status` | `done` · `timeout` · `error` · `not-started` (the tool never said anything: arguments or launch refused, not installed, handshake failed, or exited at once — e.g. not logged in; or it errored before a word of its own, whether or not it reported an error kind — model names, usage and cost do not count. Claude's `<synthetic>` error message is not an answer) |
296
+ | `text` | `done`: the final answer. Otherwise the text produced so far (claude: finished text blocks; codex, pi, omp: the streamed answer), or `null` |
297
+ | `partial` | `true` when `text` is not a finished answer (always the case on timeout with text) |
298
+ | `durationMs` | wall-clock time of the whole run |
299
+ | `costUsd` | dollars the tool reported (claude `total_cost_usd`; pi and omp the turn's growth of the `get_session_stats` cost total, which also counts tool-reported and compaction cost, falling back to the turn's `usage.cost.total`); `null` = not reported, distinct from `0`. Codex never reports money, and a timed-out claude, pi or omp run has no cost frame. A failed claude turn's `total_cost_usd` is passed on as is (`0` stays `0`) |
300
+ | `costUnreported` | `true` when the tool did not report this turn's cost: `costUsd` is `null`, or pi / omp reported `0` for an interrupted turn (pi gives `0` there although the turn did cost; `costUsd` keeps that `0`). A failed turn's `0` is passed on unmarked |
301
+ | `usage` | token counts the tool reported (codex `tokenUsage.total`: `totalTokens`, `inputTokens`, `cachedInputTokens`, `cacheWriteInputTokens`, `outputTokens`, `reasoningOutputTokens`; pi `get_session_stats` `tokens`: `input`, `output`, `cacheRead`, `cacheWrite`, `total`; omp the same plus `reasoning`); `null` = not reported |
302
+ | `model` | model the tool says it ran (claude `init`, codex `thread/start`, pi and omp `get_state` as `provider/id`); `null` = not reported |
303
+ | `instructionSources` | codex: instruction files the thread loaded; `null` for claude, pi and omp |
304
+ | `error` | raw error text when not `done` (a tool that exits at once has its stderr tail appended; on `timeout` the timeout reason); `null` on `done` |
305
+ | `errorKind` | the tool's own error kind, verbatim (claude: the `error` of its `<synthetic>` error message, e.g. `model_not_found`, `authentication_failed`; codex: `codexErrorInfo`, e.g. `usageLimitExceeded`); `null` when the tool gave none (always for pi and omp) |
306
+ | `errorStatus` | the HTTP status the tool reported with that kind (claude `api_error_status`, codex `httpStatusCode`); `null` when it gave none |
307
+ | `errorSubkind` | a finer kind under `errorKind`, verbatim (claude `api_error`: a used-up plan comes as `rate_limit` with `usage_limit_reached` or `model_requires_usage_credits`; Claude documents the field as internal, so it may be renamed); `null` when it gave none |
270
308
 
271
309
  > `run` has **no** `--tag` flag. Completion is detected via the `done`
272
310
  > event the supervisor emits.
@@ -474,7 +512,8 @@ Forum channels are event-sourced; use the CLI reducers
474
512
  - **Pretty reads** (`list`, `messages`, `forum`, `thread`, `context list`)
475
513
  print colored, padded tables / timelines.
476
514
  - **`run`** prints only the final assistant text on stdout (so callers can
477
- pipe); diagnostic notes go to stderr.
515
+ pipe); diagnostic notes go to stderr. `run --json` prints one result
516
+ object instead (see `run` above).
478
517
  - **Errors** go through `chalk.red("Error:")` to stderr and `exit 1`.
479
518
  - **`wait` timeout** specifically exits **124**.
480
519
 
@@ -106,6 +106,15 @@ by `action` field, but the load-bearing fields are always under `detail`:
106
106
  - `detail.status` — short string used by long-running actions
107
107
  (`starting`, `running`, `flushing`, `done`).
108
108
  - `detail.action` — semantic label (e.g. `status` for thread heartbeats).
109
+ - `detail.kind: "model"` (`detail.model`) — the model the tool says it runs
110
+ (claude `init`, codex `thread/start`, pi and omp `get_state` as `provider/id`).
111
+ - `detail.kind: "token_usage"` (`detail.usage`) — codex token counts after
112
+ each model request (`total`, `last`, `modelContextWindow`); no money. pi
113
+ and omp: the session's `get_session_stats` tokens as `usage.total`, after each turn.
114
+ - `detail.kind: "turn_cost"` (`detail.cost_usd`) — pi's or omp's dollars for
115
+ one finished turn (growth of the `get_session_stats` cost total);
116
+ `detail.unreported: true` marks the `0` reported for an interrupted turn
117
+ (the tool did not report that turn's cost).
109
118
 
110
119
  Progress events are **noisy** by design. `wait` ignores them unless you
111
120
  pass `--include-progress`. When you do want to see them, prefer:
@@ -1,8 +1,8 @@
1
1
  # Workers And Agent Cards
2
2
 
3
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
4
+ through the channel event log. A worker is a registered child process (claude,
5
+ codex, pi or omp) attached to a channel; the supervisor forwards inbox messages to it
6
6
  and translates its output back into channel events.
7
7
 
8
8
  ## Spawn
@@ -25,11 +25,11 @@ inbox-idle until a `send --to <worker>` (or a broadcast when
25
25
  Key `spawn` flags:
26
26
 
27
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.
28
+ - `--provider <claude|codex|pi|omp>` — overrides the agent card; validated against the adapter registry.
29
29
  - `--as <name>` — channel worker handle; defaults to the agent name.
30
30
  - `--cwd <path>` — worker working directory (also the jail root for `--file`/`--jsonl`).
31
31
  - `--model <id>` — model override.
32
- - `--resume <id>` — resume an existing claude session / codex thread.
32
+ - `--resume <id>` — resume an existing claude session / codex thread / pi or omp session (pi: `--session-id`, omp: `--resume`; both ids are read with `get_state` and kept in `<worker>.session-id`).
33
33
  - `--timeout <duration>` — auto-kill after `30s` / `2m` / `1h`.
34
34
  - `--warn-before <duration>` — supervisor_warning lead time (default `5m`; `0ms` disables).
35
35
  - `--file <path>` (repeatable, glob-supported) — inject file content into the system prompt.
@@ -38,10 +38,54 @@ Key `spawn` flags:
38
38
  - `--inbox-policy <explicitOnly|broadcastAndExplicit>` — default `explicitOnly`.
39
39
  - `--idle-timeout <duration>` — OOM guard idle TTL (default `5m`; `0` disables).
40
40
  - `--max-live-workers <n>` — spawn-time live-worker budget (default `6`; `0` disables).
41
+ - Reviewer mode: `--read-only`, `--clean`, `--no-session`, `--effort <level>`, `--standard-speed` (see below; `run` takes them too).
41
42
 
42
43
  The success event `spawned` records `pid`, `provider`, `agent`, the injected
43
44
  `files`, and the resolved `manifests` so later spectators can audit context.
44
45
 
46
+ ## Reviewer Mode
47
+
48
+ Five switches on both `spawn` and `run`. With none of them the worker launches
49
+ exactly as before (claude with full permissions; codex in `workspace-write`, or
50
+ whatever `--sandbox` says; pi with its default tools, writable; omp with `--approval-mode yolo` and no UI, so a
51
+ tool that would need approval fails instead of waiting). A cross-model reviewer turns on `--read-only`,
52
+ `--clean`, `--no-session` and `--standard-speed` together.
53
+
54
+ | Switch | Meaning | claude | codex | pi | omp |
55
+ |---|---|---|---|---|---|
56
+ | `--read-only` | may read, may not write or run commands | `--permission-mode dontAsk --tools Read,Grep,Glob` (no Bash) instead of the bypass pair | thread `sandbox: "read-only"` | `--tools read,grep,find,ls` | `--tools read,grep,glob --approval-mode always-ask`; overlay `tools.xdev: false` |
57
+ | `--clean` | ignore the user's and project's settings, hooks, MCP, plugins, skills, project instruction files | `--safe-mode --restricted --strict-mcp-config`; file reads limited to `--cwd` | thread config: project untrusted + `project_doc_max_bytes: 0`, hooks / plugins / apps off, every MCP server from `config/read` disabled, skills off, `notify: []` | `--no-extensions --no-mcp --no-skills --no-prompt-templates --no-themes --no-context-files --no-approve` | `--no-extensions --no-skills --no-rules --no-lsp --no-title`; overlay `disabledProviders` switches off context files (`AGENTS.md`, `CLAUDE.md`), MCP and other tools' plugins |
58
+ | `--no-session` | leave no session record; the worker cannot be resumed | `--no-session-persistence` | thread `ephemeral: true` | `--no-session` | `--no-session` |
59
+ | `--effort <level>` | thinking effort, in the tool's own levels | `--effort`; `low` `medium` `high` `xhigh` `max` `ultracode` | `model_reasoning_effort`; `none` `minimal` `low` `medium` `high` `xhigh` `max` `ultra` `persistent` | `--thinking`; `off` `minimal` `low` `medium` `high` `xhigh` `max`, and only the ones the model has | `--thinking`; same levels as pi, only the ones the model has; never `auto` |
60
+ | `--standard-speed` | do not use the fast tier the user set for this tool | `--settings '{"fastMode":false}'` | `service_tier: "default"` | nothing to pass (pi has no fast-tier setting) | overlay `tier.openai` / `tier.anthropic` / `tier.google: none`, `providers.fireworksTier: standard` |
61
+
62
+ omp reads the "overlay" from a settings file the supervisor writes for each
63
+ launch (`<worker>.config-overlay.yml`, passed as `--config`); no switch, no file.
64
+ As a reviewer (`--read-only` with `--clean`) omp must not reach for another
65
+ model: `--model` is passed together with `--smol`, `--slow` and `--plan`, and the
66
+ overlay pins every chat role (`default` `smol` `slow` `plan` `vision` `commit`
67
+ `tiny` `memory` `task` `advisor`, plus `judge`) to that model whatever the
68
+ user's own roles say, and turns off `retry.modelFallback`, TTSR and compaction.
69
+ An ordinary omp helper gets `--model` only when one was given (otherwise omp's
70
+ own default). Messages that start with `/` are sent with a leading space, or omp
71
+ would run them as its built-in commands.
72
+
73
+ Refused before anything launches (no silent downgrade):
74
+
75
+ - an effort level the tool does not have — Claude Code and pi would only warn and use their default, Codex would send it unchanged;
76
+ - omp `--effort auto` — omp would ask its judge model to pick a level for every request;
77
+ - a pi or omp level the chosen model lacks (both would silently use the nearest one): the handshake asks the tool `get_available_thinking_levels` and stops before any message is sent;
78
+ - claude `--clean` without `--read-only` — restricted mode refuses the full-permission mode;
79
+ - codex `--read-only` with `--sandbox workspace-write` / `danger-full-access`;
80
+ - pi or omp `--resume` with `--no-session` — an unsaved session cannot be resumed;
81
+ - omp `--read-only` with `--clean` but no `--model` — the helper roles cannot be pinned.
82
+
83
+ Known limits:
84
+
85
+ - claude `--read-only` alone still loads the user's own allow rules and hooks from their settings files, which can widen what the worker may do (for example read outside the cwd). Add `--clean` to drop them.
86
+ - pi and omp `--read-only` alone keep MCP and extension tools (`--tools` does not filter them). Add `--clean` to drop them.
87
+ - codex `--clean` cannot switch off the user-level `~/.codex/AGENTS.md`. The thread's `instructionSources` (the instruction files it actually loaded) are recorded as a `progress` event with `detail.kind: "instruction_sources"`.
88
+
45
89
  ## Agent Cards
46
90
 
47
91
  `--agent <name>` resolves to `.atw/agents/<name>.md`. The card name must
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: atw-code-review
3
- description: "沿两个维度审查自某个固定点(提交、分支、标签或合并基点)以来的变更——标准(代码是否遵循了该仓库的文档化编码标准?)和规格(代码是否符合原始问题/规格的要求?)。在并行子代理中同时运行这两项审查;变更涉及界面且调用方提供了截图时,再加第三个维度——视觉(渲染出来的画面是否满足界面验收标准和项目设计规范)。各维度结果并排显示。当用户希望审查某个分支、拉取请求、进行中的更改,或要求“审查自 X 以来”的变更时,请使用此功能。"
3
+ description: "沿两个维度审查自某个固定点(提交、分支、标签或合并基点)以来的变更——标准(代码是否遵循了该仓库的文档化编码标准?)和规格(代码是否符合原始问题/规格的要求?)。在并行子代理中同时运行这两项审查;变更涉及界面且调用方提供了截图时,再加第三个维度——视觉(渲染出来的画面是否满足界面验收标准和项目设计规范)。各维度结果并排显示。当用户希望审查或“审一下”某个分支、拉取请求、进行中的更改或改动,或要求“审查自 X 以来”的变更时,请使用此功能。"
4
4
  ---
5
5
 
6
6
  Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
@@ -51,6 +51,29 @@ git ls-files --others --exclude-standard -z |
51
51
 
52
52
  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.
53
53
 
54
+ #### Run the floor guard
55
+
56
+ The moment the patch is frozen, run the floor guard on it — before step 2, before any sub-agent is spawned. It reads only the frozen patch and runs no git of its own, so the guard and the sub-agents look at the same change.
57
+
58
+ ```bash
59
+ floor=$(mktemp); floor_err=$(mktemp)
60
+ task_dir=$(python3 .atw/scripts/task.py current 2>/dev/null)
61
+ if [ -n "$task_dir" ] && [ -f "$task_dir/waiting-on-you.md" ] && [ -f "$task_dir/decision-log.md" ]; then
62
+ python3 .atw/scripts/floor_guard.py "$patch" --waiting-on-you "$task_dir/waiting-on-you.md" --decision-log "$task_dir/decision-log.md" > "$floor" 2> "$floor_err"
63
+ else
64
+ python3 .atw/scripts/floor_guard.py "$patch" > "$floor" 2> "$floor_err"
65
+ fi
66
+ floor_exit=$?
67
+ ```
68
+
69
+ When the current task's directory holds both `waiting-on-you.md` and `decision-log.md`, the guard gets them too and passes a placeholder that an item in that list names under the three conditions in step 3. A passed placeholder is still printed, with `放行:等你处理第 N 条` (passed: waiting-on-you item N) at the end of its line. The guard reads the two files when it runs, which is why it runs here, before anything else in the review: an item written after the review began cannot pass. Without both files the guard runs exactly as before.
70
+
71
+ - `0` — clean, or every line it printed is a placeholder it passed against a waiting-on-you item.
72
+ - `1` — at least one finding that was not passed. One line per finding: rule name, `file:line`, the marker or a short snippet. Seven rules: `skip-marker`, `suppress-comment`, `test-file-deleted`, `assertion-removed`, `ignore-entry`, `placeholder`, and `guard-opt-out` — a file whose head declares `floor-guard: opt-out — <reason>` is reported as that one line (file, reason) instead of line by line; a declaration without a reason does not count. The declaration is read from the file in the working tree when it is there (a hunk that never shows the file head still counts), so run the guard from the repo root. Conditional skips (`.skipIf(`, `pytest.mark.skipif`, a `pytest.skip(` under an `if`) are not reported; an assertion that was only edited around (its expression is still in the file) is not reported as removed.
73
+ - `2` — the guard did not run (file missing, not a patch, a waiting-on-you list or decision log it cannot read, the script itself failed). Its error is in `$floor_err`, kept apart from the findings in `$floor` so nothing but findings ever lands in the report verbatim. **`2` is never `0`**: a guard that did not run is a hard violation in the report (step 5), not a clean result.
74
+
75
+ Keep `$floor` and `$floor_exit`. The output goes into the Standards sub-agent prompt (step 4) and, verbatim, into the final report (step 5).
76
+
54
77
  ### 2. Identify the spec source
55
78
 
56
79
  Look for the originating spec, in this order:
@@ -85,6 +108,33 @@ Each smell reads *what it is* → *how to fix*; match it against the diff:
85
108
  - **Middle Man** — a class or function that mostly just delegates onward. → cut it, call the real target direct.
86
109
  - **Refused Bequest** — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
87
110
 
111
+ #### Floor-guard checks
112
+
113
+ After the smell baseline, the Standards axis always carries three **floor-guard checks**. Unlike the smells, these are **hard violations, not judgement calls**: each either happened in the diff or it didn't, and no "possible" label applies. The floor guard script (step 1) catches the mechanical part — markers, deleted tests, removed assertions, ignore entries, placeholders; these three cover what needs reading:
114
+
115
+ - **Thresholds** — a numeric bar in configuration (coverage requirement, budget, severity level) moved: was it lowered or raised? Lowering is the violation; raising is not.
116
+ - **Placeholders** — a stub, `not implemented`, empty catch or TODO left in the change: did the ticket, the PRD, or a waiting-on-you item passed under the three conditions say in advance that this placeholder would be there? If not, it is a violation.
117
+ - **Exceptions** — a skip, suppression or ignore entry: is it written on the offending line itself, with a reason? An exception somewhere else, or without a reason, is a violation.
118
+
119
+ **Every finding the floor guard reports goes into the report, unless the ticket or the PRD said in advance that it is allowed.** "Said in advance" means a line in the ticket or the PRD that names the placeholder or exception — or, for a placeholder only, an item in the task's waiting-on-you list (`waiting-on-you.md`) that passes all three conditions below. So the sources of "said in advance" are the ticket, the PRD, or a waiting-on-you item passed under the three conditions. Nothing else exempts a finding — not a commit message, not a code comment, not the author's word, not a decision-log row on its own.
120
+
121
+ A placeholder left because an unattended run lacked an external account, a key or a payment passes against a waiting-on-you item only when all three hold:
122
+
123
+ 1. The item's category is external account · key · payment (外部账号·密钥·付费).
124
+ 2. The item is still open (not checked off), names this placeholder's `file:line`, says what is missing and how to hook it up once filled in, the decision log has the item's row and that row has not been superseded, and the item was written before this review began.
125
+ 3. The report still lists it, marked `放行:等你处理第 N 条` (passed: waiting-on-you item N).
126
+
127
+ The guard checks the first two itself when step 1 hands it the two files, and marks the line; take its mark as the verdict and do not pass a placeholder by reading the list yourself. Every other placeholder is as before: if the ticket or the PRD did not say it in advance, it is a hard violation.
128
+
129
+ #### Security and speed checks
130
+
131
+ Two more checklists join the Standards axis only when the change calls for them. They are not a new axis: the Standards sub-agent runs them, and a change that calls for neither carries neither. Read the patch and decide:
132
+
133
+ - **Security check** — when the change touches what atw-security's description lists: external input, login and permissions, stored data or personal information, file upload, external services, or calling AI models. Load atw-security's completion self-check — the "Verification" list in [atw-security](../atw-security/SKILL.md) — and check the change against each item.
134
+ - **Speed check** — only when the change clearly affects speed: a hot loop, a query, bundle size, or page load that the change is about or visibly makes heavier — a new query in ordinary feature code does not by itself qualify. Load the seven questions under "Benchmark checklist" → "The questions" in [atw-performance](../atw-performance/SKILL.md), and check that the change carries measurements — before-and-after numbers in the patch (a benchmark, a raw data file, a decision-log row) or in the commit list — and that the numbers answer the seven questions. A change that clearly affects speed and carries no measurements is a hard violation. Measurements that do not answer all seven questions are a judgement call — name the questions left unanswered.
135
+
136
+ A self-check item is a hard violation only when the code this change adds or modifies shows it failing. An item the patch simply does not contain — rate limiting or security headers that live elsewhere in the system — is not a finding: a missing item is not a vulnerability. An item the changed code touches but the patch cannot settle is a judgement call — say what would settle it.
137
+
88
138
  ### 4. Spawn the sub-agents in parallel
89
139
 
90
140
  The Standards and Spec 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.
@@ -93,7 +143,9 @@ The Standards and Spec sub-agents read the **frozen patch from step 1** and run
93
143
 
94
144
  - 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.
95
145
  - 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.
96
- - 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."
146
+ - **The floor guard's output** from step 1 — the contents of `$floor` pasted verbatim with `$floor_exit`, **plus the floor-guard checks from step 3** pasted in full. Tell the sub-agent what to do with it: for each line the guard reported, check whether the ticket or the PRD said in advance that it is allowed — a line the guard marked `放行:等你处理第 N 条` is allowed by waiting-on-you item N: list it as passed with its item number, not as a violation — and report every line that isn't allowed as a hard violation; if the exit code is `2`, report "the floor guard did not run" as a hard violation.
147
+ - The security check, the speed check, or both from step 3, pasted in full, when the change calls for them — the section's text plus the "Verification" list or the seven questions it points at, with one line on what in the change triggered each. When neither applies, paste neither.
148
+ - The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); (b) any baseline smell you spot: name it and quote the hunk; (c) every floor-guard finding not allowed in advance by the ticket, the PRD or a waiting-on-you item the guard passed, and every floor-guard check that fails — say where the ticket or PRD allows the ones you drop, and list each passed line with its waiting-on-you item number; and (d) when the security or speed check is pasted, every item of it the change fails, and for the speed check whether the change carries measurements that answer the seven questions. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, floor-guard findings and checks are always hard, security and speed findings are hard or judgement calls as the pasted section says, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."
97
149
 
98
150
  **Spec sub-agent prompt** — include:
99
151
 
@@ -108,7 +160,8 @@ If the spec is missing, skip the Spec sub-agent and note this in the final repor
108
160
  - The screenshot paths, each labelled with screen, state and logical viewport.
109
161
  - The spec's UI and Design section and the ticket's UI acceptance criteria.
110
162
  - The path to the UI layer's `design-system.md` in `.atw/spec/`, if the project has one.
111
- - The brief: "Look at every screenshot before judging. Report: (a) UI acceptance criteria not met, citing the screenshot; (b) departures from the project's design rules — colours, type sizes, spacing or components outside them; (c) the one to three biggest visual problems — hierarchy, alignment, crowding, overflow, unreadable text — each with location, observation and a concrete fix. Distinguish observable defects from taste. Do not open source files. If you cannot view images, say so and stop. Under 400 words."
163
+ - The project's accessibility requirements, if it has any (in `design-system.md` or elsewhere in `.atw/spec/`); otherwise the path to atw-ui's [accessibility checklist](../atw-ui/references/accessibility-checklist.md).
164
+ - The brief: "Look at every screenshot before judging. Report: (a) UI acceptance criteria not met, citing the screenshot; (b) departures from the project's design rules — colours, type sizes, spacing or components outside them; (c) the one to three biggest visual problems — hierarchy, alignment, crowding, overflow, unreadable text — each with location, observation and a concrete fix; (d) accessibility problems the screenshots show, checked against the project's accessibility requirements or, when it has none, the accessibility checklist — contrast, visible focus, colour as the only signal, target size — leaving out what a screenshot cannot show. Distinguish observable defects from taste. Do not open source files. If you cannot view images, say so and stop. Under 400 words."
112
165
 
113
166
  This sub-agent needs a model that can view images. If none is available, skip it and say in the final report that the Visual axis did not run.
114
167
 
@@ -118,8 +171,19 @@ Issue every sub-agent call together, in the foreground, and aggregate the report
118
171
 
119
172
  Present the reports under `## Standards` and `## Spec` headings — plus `## Visual` when that axis ran — verbatim or lightly cleaned. Do **not** merge or rerank findings — the axes are deliberately separate (see _Why two axes_).
120
173
 
174
+ Under `## Standards`, add a `### Floor guard` sub-section: the guard's output from step 1 verbatim, its exit code, and the sub-agent's verdict on each line — where the ticket or PRD allows it, passed: waiting-on-you item N (for a line the guard marked `放行:等你处理第 N 条`), or a hard violation. Passed lines stay in the sub-section and do not count as violations in the Standards tally. When the exit code was `2`, the sub-section says **"the floor guard did not run"**, carries the error from `$floor_err`, and counts as a hard violation in the Standards tally — a guard that did not run is not a clean guard. Say on one line which of the security and speed checks the Standards axis carried and what triggered each, or that it carried neither.
175
+
121
176
  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.
122
177
 
178
+ When the user asked for this review themselves, inside an ATW task, and the change is a high-risk change or the task's decision log has rows marked unsure (拿不准), close the report with one sentence suggesting a cross-model review — one sentence even when both hold. Say nothing when `/atw-implement`, `/atw-implement-all` or `/atw-implement-spec` runs this review as a step of its flow, and nothing for a small change with no task. High-risk means you read the whole change and it really changes behaviour in at least one of three areas — security (login and authentication, permission checks, keys and encryption, handling content from outside, network endpoints open to others), data (database schemas, data migrations, deleting or bulk-rewriting user data, data formats saved to disk or sent out), or irreversible or wide blast radius (releases, deployment and upgrades, public interfaces and command-line arguments others depend on, billing and payment); a typo, comments or tests alone do not count, and concurrency and retries are not on the list. Unsure rows are technical judgements made without being sure; when the task has a `decision-log.md`, list them with `python3 .atw/scripts/decision_log.py unsure` — rows already superseded are left out — acknowledged ones still count. The sentence, for a high-risk change, names the files and the area each falls in; for unsure rows, names each row by its time and decision; says what it costs — one run's money or quota, the code is sent to another company's model, and it takes up to about 30 minutes; and gives the input for the user's current tool only, the one line below that names that tool:
179
+
180
+ - Claude Code: `/atw-cross-model-review`
181
+ - Codex: `$atw-cross-model-review`
182
+ - pi: `/skill:atw-cross-model-review`
183
+ - omp: `/skill:atw-cross-model-review`
184
+
185
+ The user runs it; you never start it. When the change is not high-risk and there are no unsure rows, say nothing about cross-model review at all — not that it is not needed, not that the change is low-risk. Once per task: say nothing when the task directory already holds a report under `cross-model-review/`, or when it was already suggested in this conversation.
186
+
123
187
  ## Why two axes
124
188
 
125
189
  A change can pass one axis and fail the other:
@@ -130,3 +194,14 @@ A change can pass one axis and fail the other:
130
194
  Reporting them separately stops one axis from masking the other.
131
195
 
132
196
  The Visual axis exists for the same reason: code can match the spec and every standard and still render as an unreadable, overflowing screen. Neither code-reading axis can see that.
197
+
198
+ ## Rationalizations specific to this skill
199
+
200
+ Same shape as the general table in `.atw/workflow.md`; these are the excuses that only show up while reviewing.
201
+
202
+ | Rationalization | Reality |
203
+ |---|---|
204
+ | The patch is too big to read in full, sample it | Say it is too big to read in full; sampling is not reviewing |
205
+ | This is a judgement call, no need to report it | Judgement calls get reported too — labelled as judgement calls |
206
+ | The author says it has been tested | Do not accept conclusions; look only at artefacts |
207
+ | Nobody wrote this standard down | The smell baseline applies even when the repo documents nothing |
@@ -110,5 +110,5 @@ Good interfaces make testing natural:
110
110
 
111
111
  ## Going deeper
112
112
 
113
- - **Deepening a cluster given its dependencies** — see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing.
114
- - **Exploring alternative interfaces** — see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
113
+ - **Deepening a cluster given its dependencies** — see [deepening.md](deepening.md): dependency categories, seam discipline, and replace-don't-layer testing.
114
+ - **Exploring alternative interfaces** — see [design-it-twice.md](design-it-twice.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
@@ -11,7 +11,7 @@ Uses the vocabulary in [SKILL.md](SKILL.md) — **module**, **interface**, **sea
11
11
  Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
12
12
 
13
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))
14
+ - The dependencies it would rely on, and which category they fall into (see [deepening.md](deepening.md))
15
15
  - A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
16
16
 
17
17
  Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
@@ -20,7 +20,7 @@ Show this to the user, then immediately proceed to Step 2. The user reads and th
20
20
 
21
21
  Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.
22
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:
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
24
 
25
25
  - Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point."
26
26
  - Agent 2: "Maximise flexibility — support many use cases and extension."
@@ -34,7 +34,7 @@ Each sub-agent outputs:
34
34
  1. Interface (types, methods, params — plus invariants, ordering, error modes)
35
35
  2. Usage example showing how callers use it
36
36
  3. What the implementation hides behind the seam
37
- 4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
37
+ 4. Dependency strategy and adapters (see [deepening.md](deepening.md))
38
38
  5. Trade-offs — where leverage is high, where it's thin
39
39
 
40
40
  ### 3. Present and compare