takt 0.40.0 → 0.41.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 (287) hide show
  1. package/builtins/en/config.yaml +2 -0
  2. package/builtins/en/facets/instructions/_system/fallback-notice.md +16 -0
  3. package/builtins/en/facets/instructions/ai-antipattern-fix.md +2 -14
  4. package/builtins/en/facets/instructions/ai-antipattern-review.md +5 -11
  5. package/builtins/en/facets/instructions/implement-after-tests.md +6 -7
  6. package/builtins/en/facets/instructions/implement.md +6 -7
  7. package/builtins/en/facets/instructions/review-arch.md +4 -36
  8. package/builtins/en/facets/instructions/review-cqrs-es.md +7 -23
  9. package/builtins/en/facets/instructions/review-frontend.md +6 -32
  10. package/builtins/en/facets/instructions/review-qa.md +5 -31
  11. package/builtins/en/facets/instructions/review-requirements.md +6 -24
  12. package/builtins/en/facets/instructions/review-security.md +13 -36
  13. package/builtins/en/facets/instructions/review-terraform.md +4 -28
  14. package/builtins/en/facets/instructions/review-test.md +8 -29
  15. package/builtins/en/facets/instructions/supervise.md +17 -35
  16. package/builtins/en/facets/knowledge/cqrs-es.md +18 -0
  17. package/builtins/en/facets/knowledge/frontend.md +4 -2
  18. package/builtins/en/facets/knowledge/react.md +3 -0
  19. package/builtins/en/facets/policies/review.md +30 -0
  20. package/builtins/en/workflows/auto-improvement-loop.yaml +20 -6
  21. package/builtins/ja/INSTRUCTION_STYLE_GUIDE.md +38 -3
  22. package/builtins/ja/config.yaml +2 -0
  23. package/builtins/ja/facets/instructions/_system/fallback-notice.md +16 -0
  24. package/builtins/ja/facets/instructions/ai-antipattern-fix.md +4 -16
  25. package/builtins/ja/facets/instructions/ai-antipattern-review.md +7 -13
  26. package/builtins/ja/facets/instructions/implement-after-tests.md +6 -7
  27. package/builtins/ja/facets/instructions/implement.md +6 -7
  28. package/builtins/ja/facets/instructions/review-arch.md +5 -37
  29. package/builtins/ja/facets/instructions/review-cqrs-es.md +7 -23
  30. package/builtins/ja/facets/instructions/review-frontend.md +6 -32
  31. package/builtins/ja/facets/instructions/review-qa.md +5 -31
  32. package/builtins/ja/facets/instructions/review-requirements.md +10 -28
  33. package/builtins/ja/facets/instructions/review-security.md +13 -36
  34. package/builtins/ja/facets/instructions/review-terraform.md +5 -29
  35. package/builtins/ja/facets/instructions/review-test.md +8 -29
  36. package/builtins/ja/facets/instructions/supervise.md +15 -33
  37. package/builtins/ja/facets/knowledge/cqrs-es.md +18 -0
  38. package/builtins/ja/facets/knowledge/frontend.md +4 -2
  39. package/builtins/ja/facets/knowledge/react.md +3 -0
  40. package/builtins/ja/facets/policies/review.md +30 -0
  41. package/builtins/ja/workflows/auto-improvement-loop.yaml +20 -6
  42. package/builtins/schemas/followup-task.json +65 -10
  43. package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts +1 -0
  44. package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
  45. package/dist/agents/structured-caller/prompt-based-structured-caller.js +64 -36
  46. package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
  47. package/dist/core/models/config-schemas.d.ts +32 -0
  48. package/dist/core/models/config-schemas.d.ts.map +1 -1
  49. package/dist/core/models/config-schemas.js +2 -1
  50. package/dist/core/models/config-schemas.js.map +1 -1
  51. package/dist/core/models/config-types.d.ts +3 -1
  52. package/dist/core/models/config-types.d.ts.map +1 -1
  53. package/dist/core/models/index.d.ts +1 -1
  54. package/dist/core/models/index.d.ts.map +1 -1
  55. package/dist/core/models/index.js.map +1 -1
  56. package/dist/core/models/part.d.ts +5 -0
  57. package/dist/core/models/part.d.ts.map +1 -1
  58. package/dist/core/models/response.d.ts +9 -0
  59. package/dist/core/models/response.d.ts.map +1 -1
  60. package/dist/core/models/response.js.map +1 -1
  61. package/dist/core/models/schema-base.d.ts +20 -0
  62. package/dist/core/models/schema-base.d.ts.map +1 -1
  63. package/dist/core/models/schema-base.js +9 -2
  64. package/dist/core/models/schema-base.js.map +1 -1
  65. package/dist/core/models/status.d.ts +1 -1
  66. package/dist/core/models/status.d.ts.map +1 -1
  67. package/dist/core/models/status.js +1 -1
  68. package/dist/core/models/status.js.map +1 -1
  69. package/dist/core/models/types.d.ts +2 -2
  70. package/dist/core/models/types.d.ts.map +1 -1
  71. package/dist/core/models/workflow-condition-expression.d.ts +12 -0
  72. package/dist/core/models/workflow-condition-expression.d.ts.map +1 -0
  73. package/dist/core/models/workflow-condition-expression.js +26 -0
  74. package/dist/core/models/workflow-condition-expression.js.map +1 -0
  75. package/dist/core/models/workflow-provider-options.d.ts +1 -0
  76. package/dist/core/models/workflow-provider-options.d.ts.map +1 -1
  77. package/dist/core/models/workflow-provider-options.js.map +1 -1
  78. package/dist/core/models/workflow-schemas.d.ts +323 -0
  79. package/dist/core/models/workflow-schemas.d.ts.map +1 -1
  80. package/dist/core/models/workflow-schemas.js +59 -5
  81. package/dist/core/models/workflow-schemas.js.map +1 -1
  82. package/dist/core/models/workflow-system-input-types.d.ts +1 -0
  83. package/dist/core/models/workflow-system-input-types.d.ts.map +1 -1
  84. package/dist/core/models/workflow-system-schemas.d.ts +1 -0
  85. package/dist/core/models/workflow-system-schemas.d.ts.map +1 -1
  86. package/dist/core/models/workflow-system-schemas.js +1 -0
  87. package/dist/core/models/workflow-system-schemas.js.map +1 -1
  88. package/dist/core/models/workflow-types.d.ts +33 -0
  89. package/dist/core/models/workflow-types.d.ts.map +1 -1
  90. package/dist/core/workflow/arpeggio/types.d.ts +3 -0
  91. package/dist/core/workflow/arpeggio/types.d.ts.map +1 -1
  92. package/dist/core/workflow/engine/ArpeggioRunner.d.ts +3 -6
  93. package/dist/core/workflow/engine/ArpeggioRunner.d.ts.map +1 -1
  94. package/dist/core/workflow/engine/ArpeggioRunner.js +40 -19
  95. package/dist/core/workflow/engine/ArpeggioRunner.js.map +1 -1
  96. package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
  97. package/dist/core/workflow/engine/OptionsBuilder.js +5 -1
  98. package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
  99. package/dist/core/workflow/engine/ParallelRunner.d.ts +4 -6
  100. package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
  101. package/dist/core/workflow/engine/ParallelRunner.js +55 -12
  102. package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
  103. package/dist/core/workflow/engine/StepExecutor.d.ts +10 -7
  104. package/dist/core/workflow/engine/StepExecutor.d.ts.map +1 -1
  105. package/dist/core/workflow/engine/StepExecutor.js +81 -11
  106. package/dist/core/workflow/engine/StepExecutor.js.map +1 -1
  107. package/dist/core/workflow/engine/TeamLeaderRunner.d.ts +3 -5
  108. package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
  109. package/dist/core/workflow/engine/TeamLeaderRunner.js +30 -7
  110. package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
  111. package/dist/core/workflow/engine/WorkflowCallExecutor.d.ts.map +1 -1
  112. package/dist/core/workflow/engine/WorkflowCallExecutor.js +1 -0
  113. package/dist/core/workflow/engine/WorkflowCallExecutor.js.map +1 -1
  114. package/dist/core/workflow/engine/WorkflowCallRunner.d.ts +3 -6
  115. package/dist/core/workflow/engine/WorkflowCallRunner.d.ts.map +1 -1
  116. package/dist/core/workflow/engine/WorkflowCallRunner.js +1 -1
  117. package/dist/core/workflow/engine/WorkflowCallRunner.js.map +1 -1
  118. package/dist/core/workflow/engine/WorkflowEngine.d.ts.map +1 -1
  119. package/dist/core/workflow/engine/WorkflowEngine.js +23 -17
  120. package/dist/core/workflow/engine/WorkflowEngine.js.map +1 -1
  121. package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts +4 -1
  122. package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts.map +1 -1
  123. package/dist/core/workflow/engine/WorkflowEngineSetup.js +1 -0
  124. package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
  125. package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.d.ts +9 -27
  126. package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.d.ts.map +1 -1
  127. package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.js +6 -6
  128. package/dist/core/workflow/engine/WorkflowEngineStepCoordinator.js.map +1 -1
  129. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts +5 -6
  130. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
  131. package/dist/core/workflow/engine/WorkflowRunLoop.js +151 -8
  132. package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
  133. package/dist/core/workflow/engine/engine-provider-options.d.ts +1 -1
  134. package/dist/core/workflow/engine/engine-provider-options.d.ts.map +1 -1
  135. package/dist/core/workflow/engine/state-manager.d.ts +1 -0
  136. package/dist/core/workflow/engine/state-manager.d.ts.map +1 -1
  137. package/dist/core/workflow/engine/state-manager.js +11 -0
  138. package/dist/core/workflow/engine/state-manager.js.map +1 -1
  139. package/dist/core/workflow/engine/structured-output-normalizer.d.ts +23 -0
  140. package/dist/core/workflow/engine/structured-output-normalizer.d.ts.map +1 -0
  141. package/dist/core/workflow/engine/structured-output-normalizer.js +13 -0
  142. package/dist/core/workflow/engine/structured-output-normalizer.js.map +1 -0
  143. package/dist/core/workflow/engine/team-leader-part-runner.d.ts +2 -1
  144. package/dist/core/workflow/engine/team-leader-part-runner.d.ts.map +1 -1
  145. package/dist/core/workflow/engine/team-leader-part-runner.js +17 -6
  146. package/dist/core/workflow/engine/team-leader-part-runner.js.map +1 -1
  147. package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
  148. package/dist/core/workflow/instruction/InstructionBuilder.js +7 -0
  149. package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
  150. package/dist/core/workflow/instruction/fallback-notice.d.ts +3 -0
  151. package/dist/core/workflow/instruction/fallback-notice.d.ts.map +1 -0
  152. package/dist/core/workflow/instruction/fallback-notice.js +20 -0
  153. package/dist/core/workflow/instruction/fallback-notice.js.map +1 -0
  154. package/dist/core/workflow/instruction/instruction-context.d.ts +3 -1
  155. package/dist/core/workflow/instruction/instruction-context.d.ts.map +1 -1
  156. package/dist/core/workflow/instruction/instruction-context.js.map +1 -1
  157. package/dist/core/workflow/phase-runner.d.ts +3 -1
  158. package/dist/core/workflow/phase-runner.d.ts.map +1 -1
  159. package/dist/core/workflow/phase-runner.js.map +1 -1
  160. package/dist/core/workflow/promotion/PromotionEvaluator.d.ts +13 -0
  161. package/dist/core/workflow/promotion/PromotionEvaluator.d.ts.map +1 -0
  162. package/dist/core/workflow/promotion/PromotionEvaluator.js +40 -0
  163. package/dist/core/workflow/promotion/PromotionEvaluator.js.map +1 -0
  164. package/dist/core/workflow/promotion/promotion-runtime.d.ts +11 -0
  165. package/dist/core/workflow/promotion/promotion-runtime.d.ts.map +1 -0
  166. package/dist/core/workflow/promotion/promotion-runtime.js +112 -0
  167. package/dist/core/workflow/promotion/promotion-runtime.js.map +1 -0
  168. package/dist/core/workflow/provider-options-trace.d.ts +3 -2
  169. package/dist/core/workflow/provider-options-trace.d.ts.map +1 -1
  170. package/dist/core/workflow/provider-resolution.js +10 -10
  171. package/dist/core/workflow/provider-resolution.js.map +1 -1
  172. package/dist/core/workflow/report-phase-runner.d.ts +5 -1
  173. package/dist/core/workflow/report-phase-runner.d.ts.map +1 -1
  174. package/dist/core/workflow/report-phase-runner.js +21 -3
  175. package/dist/core/workflow/report-phase-runner.js.map +1 -1
  176. package/dist/core/workflow/system/system-step-effect-runner.d.ts.map +1 -1
  177. package/dist/core/workflow/system/system-step-effect-runner.js +4 -1
  178. package/dist/core/workflow/system/system-step-effect-runner.js.map +1 -1
  179. package/dist/core/workflow/types.d.ts +15 -2
  180. package/dist/core/workflow/types.d.ts.map +1 -1
  181. package/dist/features/tasks/add/issueTask.d.ts +1 -14
  182. package/dist/features/tasks/add/issueTask.d.ts.map +1 -1
  183. package/dist/features/tasks/add/issueTask.js +124 -20
  184. package/dist/features/tasks/add/issueTask.js.map +1 -1
  185. package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
  186. package/dist/features/tasks/execute/workflowExecution.js +3 -0
  187. package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
  188. package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
  189. package/dist/features/tasks/execute/workflowExecutionBootstrap.js +2 -0
  190. package/dist/features/tasks/execute/workflowExecutionBootstrap.js.map +1 -1
  191. package/dist/features/tasks/execute/workflowExecutionEvents.d.ts.map +1 -1
  192. package/dist/features/tasks/execute/workflowExecutionEvents.js +18 -2
  193. package/dist/features/tasks/execute/workflowExecutionEvents.js.map +1 -1
  194. package/dist/infra/claude/client.d.ts.map +1 -1
  195. package/dist/infra/claude/client.js +5 -0
  196. package/dist/infra/claude/client.js.map +1 -1
  197. package/dist/infra/claude/executor.d.ts.map +1 -1
  198. package/dist/infra/claude/executor.js +35 -20
  199. package/dist/infra/claude/executor.js.map +1 -1
  200. package/dist/infra/claude/types.d.ts +2 -1
  201. package/dist/infra/claude/types.d.ts.map +1 -1
  202. package/dist/infra/claude-headless/client.d.ts.map +1 -1
  203. package/dist/infra/claude-headless/client.js +10 -3
  204. package/dist/infra/claude-headless/client.js.map +1 -1
  205. package/dist/infra/claude-headless/headless-spawn.d.ts +1 -0
  206. package/dist/infra/claude-headless/headless-spawn.d.ts.map +1 -1
  207. package/dist/infra/claude-headless/headless-spawn.js +16 -0
  208. package/dist/infra/claude-headless/headless-spawn.js.map +1 -1
  209. package/dist/infra/claude-headless/result-response.d.ts.map +1 -1
  210. package/dist/infra/claude-headless/result-response.js +34 -0
  211. package/dist/infra/claude-headless/result-response.js.map +1 -1
  212. package/dist/infra/codex/client.d.ts +1 -0
  213. package/dist/infra/codex/client.d.ts.map +1 -1
  214. package/dist/infra/codex/client.js +21 -1
  215. package/dist/infra/codex/client.js.map +1 -1
  216. package/dist/infra/config/configNormalizers.d.ts +13 -1
  217. package/dist/infra/config/configNormalizers.d.ts.map +1 -1
  218. package/dist/infra/config/configNormalizers.js +37 -2
  219. package/dist/infra/config/configNormalizers.js.map +1 -1
  220. package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
  221. package/dist/infra/config/global/globalConfigCore.js +2 -1
  222. package/dist/infra/config/global/globalConfigCore.js.map +1 -1
  223. package/dist/infra/config/global/globalConfigSerializer.d.ts.map +1 -1
  224. package/dist/infra/config/global/globalConfigSerializer.js +5 -1
  225. package/dist/infra/config/global/globalConfigSerializer.js.map +1 -1
  226. package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
  227. package/dist/infra/config/loaders/workflowParser.js +2 -1
  228. package/dist/infra/config/loaders/workflowParser.js.map +1 -1
  229. package/dist/infra/config/loaders/workflowRuleNormalizer.d.ts.map +1 -1
  230. package/dist/infra/config/loaders/workflowRuleNormalizer.js +8 -9
  231. package/dist/infra/config/loaders/workflowRuleNormalizer.js.map +1 -1
  232. package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
  233. package/dist/infra/config/loaders/workflowStepNormalizer.js +21 -0
  234. package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
  235. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  236. package/dist/infra/config/project/projectConfig.js +11 -3
  237. package/dist/infra/config/project/projectConfig.js.map +1 -1
  238. package/dist/infra/config/providerOptions.d.ts +2 -1
  239. package/dist/infra/config/providerOptions.d.ts.map +1 -1
  240. package/dist/infra/config/providerOptions.js +17 -3
  241. package/dist/infra/config/providerOptions.js.map +1 -1
  242. package/dist/infra/config/providerOptionsContract.d.ts +3 -3
  243. package/dist/infra/config/providerOptionsContract.d.ts.map +1 -1
  244. package/dist/infra/config/providerOptionsContract.js +3 -0
  245. package/dist/infra/config/providerOptionsContract.js.map +1 -1
  246. package/dist/infra/config/traced/tracedConfigSchema.d.ts.map +1 -1
  247. package/dist/infra/config/traced/tracedConfigSchema.js +4 -0
  248. package/dist/infra/config/traced/tracedConfigSchema.js.map +1 -1
  249. package/dist/infra/mock/client.d.ts.map +1 -1
  250. package/dist/infra/mock/client.js +2 -0
  251. package/dist/infra/mock/client.js.map +1 -1
  252. package/dist/infra/mock/scenario.d.ts.map +1 -1
  253. package/dist/infra/mock/scenario.js +11 -0
  254. package/dist/infra/mock/scenario.js.map +1 -1
  255. package/dist/infra/mock/types.d.ts +9 -0
  256. package/dist/infra/mock/types.d.ts.map +1 -1
  257. package/dist/infra/opencode/client.d.ts +1 -0
  258. package/dist/infra/opencode/client.d.ts.map +1 -1
  259. package/dist/infra/opencode/client.js +22 -0
  260. package/dist/infra/opencode/client.js.map +1 -1
  261. package/dist/infra/opencode/types.d.ts +1 -0
  262. package/dist/infra/opencode/types.d.ts.map +1 -1
  263. package/dist/infra/providers/opencode.d.ts.map +1 -1
  264. package/dist/infra/providers/opencode.js +1 -0
  265. package/dist/infra/providers/opencode.js.map +1 -1
  266. package/dist/infra/rate-limit/detection.d.ts +13 -0
  267. package/dist/infra/rate-limit/detection.d.ts.map +1 -0
  268. package/dist/infra/rate-limit/detection.js +45 -0
  269. package/dist/infra/rate-limit/detection.js.map +1 -0
  270. package/dist/infra/workflow/structured-output/followup-task-normalizer.d.ts +3 -0
  271. package/dist/infra/workflow/structured-output/followup-task-normalizer.d.ts.map +1 -0
  272. package/dist/infra/workflow/structured-output/followup-task-normalizer.js +206 -0
  273. package/dist/infra/workflow/structured-output/followup-task-normalizer.js.map +1 -0
  274. package/dist/infra/workflow/system/system-enqueue-effect.d.ts.map +1 -1
  275. package/dist/infra/workflow/system/system-enqueue-effect.js +4 -2
  276. package/dist/infra/workflow/system/system-enqueue-effect.js.map +1 -1
  277. package/dist/shared/prompts/en/perform_phase1_message.md +11 -1
  278. package/dist/shared/prompts/ja/perform_phase1_message.md +11 -1
  279. package/dist/shared/utils/delay.d.ts +2 -0
  280. package/dist/shared/utils/delay.d.ts.map +1 -0
  281. package/dist/shared/utils/delay.js +4 -0
  282. package/dist/shared/utils/delay.js.map +1 -0
  283. package/dist/shared/utils/index.d.ts +1 -0
  284. package/dist/shared/utils/index.d.ts.map +1 -1
  285. package/dist/shared/utils/index.js +1 -0
  286. package/dist/shared/utils/index.js.map +1 -1
  287. package/package.json +1 -1
@@ -74,6 +74,8 @@ language: en # UI language: en | ja
74
74
  # provider_options:
75
75
  # codex:
76
76
  # network_access: true
77
+ # opencode:
78
+ # variant: high
77
79
  # claude:
78
80
  # sandbox:
79
81
  # allow_unsandboxed_commands: true
@@ -0,0 +1,16 @@
1
+ ## Notice: This Step Is A Fallback Execution
2
+
3
+ The previous step execution was interrupted by an external condition ({{fallback_reason}}) and is being retried in a new session.
4
+ The previous session context is not carried into this session.
5
+
6
+ - Interrupted step: {{step_name}}
7
+ - Original iteration: {{original_iteration}}
8
+ - Interruption reason: {{fallback_reason_detail}}
9
+ - Previous provider/model: {{previous_provider}} / {{previous_model}}
10
+ - Current provider/model: {{current_provider}} / {{current_model}}
11
+
12
+ Previous work that remains on disk as files or reports is available, but chat context is not. Rebuild context as needed:
13
+
14
+ 1. Inspect existing reports under {{report_dir}}
15
+ 2. Inspect the latest commit or working tree diff
16
+ 3. If context is still missing, execute from the step instruction
@@ -1,16 +1,9 @@
1
1
  **This is AI Review iteration #{step_iteration}.**
2
- Use reports in the Report Directory as the primary source of truth. If additional context is needed, you may consult Previous Response and conversation history as secondary sources (Previous Response may be unavailable). If information conflicts, prioritize reports in the Report Directory and actual file contents.
3
-
4
- From the 2nd iteration onward, it means the previous fixes were not actually applied.
5
- **Your belief that they were "already fixed" is incorrect.**
6
2
 
7
- **First, acknowledge the following:**
8
- - The files you thought were "fixed" are actually not fixed
9
- - Your understanding of the previous work is wrong
10
- - You need to rethink from scratch
3
+ Use reports in the Report Directory as the primary source of truth. If additional context is needed, you may consult Previous Response and conversation history as secondary sources (Previous Response may be unavailable). If information conflicts, prioritize reports in the Report Directory and actual file contents.
11
4
 
12
5
  **Required actions:**
13
- 1. Open all flagged files with the Read tool (discard assumptions and verify the facts)
6
+ 1. Open all flagged files with the Read tool
14
7
  2. Search for the problem areas with grep to confirm they exist
15
8
  3. Fix the confirmed issues with the Edit tool
16
9
  4. Run tests to verify
@@ -20,11 +13,6 @@ From the 2nd iteration onward, it means the previous fixes were not actually app
20
13
  - NG: "It has already been fixed"
21
14
  - OK: "After checking file X at L123, I found issue Y and fixed it to Z"
22
15
 
23
- **Strictly prohibited:**
24
- - Reporting "already fixed" without opening the file
25
- - Making judgments based on assumptions
26
- - Leaving issues that the AI Reviewer REJECTed unresolved
27
-
28
16
  **Handling "no fix needed" (required)**
29
17
  - Do not judge "no fix needed" unless you can show verification results for the target file for each AI Review finding
30
18
  - If the finding relates to "generated output" or "spec synchronization", output the tag corresponding to "unable to determine" unless you can verify the source/spec
@@ -3,15 +3,9 @@
3
3
  On the first iteration, review comprehensively and report all issues that need to be flagged.
4
4
  From the 2nd iteration onward, prioritize verifying whether previously REJECTed items have been fixed.
5
5
 
6
- Review the code for AI-specific issues:
7
- - Verification of assumptions
8
- - Plausible but incorrect patterns
9
- - Compatibility with the existing codebase
10
- - Scope creep detection
11
- - Scope shrinkage detection (missing task requirements)
6
+ Review the diff for AI-specific issues.
12
7
 
13
- ## Judgment Procedure
14
-
15
- 1. Review the change diff and detect issues based on the AI-specific criteria above
16
- 2. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
17
- 3. If there is even one blocking issue, judge as REJECT
8
+ Procedure:
9
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
10
+ 2. List every `##` section in each of them (do not cherry-pick)
11
+ 3. Match the criteria in each listed section against the diff and detect any issues
@@ -42,13 +42,12 @@ Small / Medium / Large
42
42
  ```
43
43
 
44
44
  **Pre-completion self-check (required):**
45
- Before running build and tests, verify the following:
46
- - If new parameters/fields were added, grep to confirm they are actually passed from call sites
47
- - For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary
48
- - Verify no replaced code/exports remain after refactoring
49
- - Verify no features outside the task specification were added
50
- - Verify no if/else blocks call the same function with only argument differences
51
- - Verify new code matches existing implementation patterns (API call style, type definition style, etc.)
45
+
46
+ Before running build and tests, audit your work against Policy with the following procedure.
47
+
48
+ 1. Open the Policy Source path with the Read tool and obtain the full content
49
+ 2. List every `##` section (do not cherry-pick)
50
+ 3. Match the REJECT criteria in each listed section against your implementation
52
51
 
53
52
  **Required output (include headings)**
54
53
  ## Work results
@@ -41,13 +41,12 @@ Small / Medium / Large
41
41
  ```
42
42
 
43
43
  **Pre-completion self-check (required):**
44
- Before running build and tests, verify the following:
45
- - If new parameters/fields were added, grep to confirm they are actually passed from call sites
46
- - For any `??`, `||`, `= defaultValue` usage, confirm fallback is truly necessary
47
- - Verify no replaced code/exports remain after refactoring
48
- - Verify no features outside the task specification were added
49
- - Verify no if/else blocks call the same function with only argument differences
50
- - Verify new code matches existing implementation patterns (API call style, type definition style, etc.)
44
+
45
+ Before running build and tests, audit your work against Policy with the following procedure.
46
+
47
+ 1. Open the Policy Source path with the Read tool and obtain the full content
48
+ 2. List every `##` section (do not cherry-pick)
49
+ 3. Match the REJECT criteria in each listed section against your implementation
51
50
 
52
51
  **Required output (include headings)**
53
52
  ## Work results
@@ -1,39 +1,7 @@
1
1
  Focus on reviewing **architecture and design**.
2
2
  Do not review AI-specific issues (already covered by the ai-antipattern-review-1st step).
3
3
 
4
- **Review criteria:**
5
- - Structural and design validity
6
- - Modularization (high cohesion, low coupling, no circular dependencies)
7
- - Functionalization (single responsibility per function, operation discoverability, consistent abstraction level)
8
- - Code quality
9
- - Appropriateness of change scope
10
- - Test coverage
11
- - Dead code
12
- - Call chain verification
13
- - Scattered hardcoding of contract strings (file names, config key names)
14
-
15
-
16
- **Design decisions reference:**
17
- Review {report:coder-decisions.md} to understand the recorded design decisions.
18
- - Do not flag intentionally documented decisions as FP
19
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
20
-
21
- **Previous finding tracking (required):**
22
- - First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
23
- - If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
24
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
25
- - If status is `persists`, provide concrete unresolved evidence (file/line)
26
- - Do not drop open findings from the prior report when producing the current report
27
-
28
- ## Judgment Procedure
29
-
30
- 1. First, extract previous open findings and preliminarily classify as `new / persists / resolved / reopened`
31
- 2. Review the change diff and detect issues based on the architecture and design criteria above
32
- - Cross-check changes against REJECT criteria tables defined in knowledge
33
- - If you find a DRY violation, require it to be fixed
34
- - Before proposing a fix, verify that the consolidation target fits existing responsibility boundaries, contracts, and public API shape
35
- - If you require a new wrapper, helper, or public API, explain why that abstraction target is the natural one
36
- - If the proposed abstraction goes beyond the task spec or plan, state why the additional scope is necessary and justified
37
- - When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
38
- 3. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
39
- 4. If there is even one blocking issue (`new`, `persists`, or `reopened`), judge as REJECT
4
+ Procedure:
5
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
6
+ 2. List every `##` section in each of them (do not cherry-pick)
7
+ 3. Match the criteria in each listed section against the diff and detect any issues
@@ -1,25 +1,9 @@
1
- Review the changes from the perspective of CQRS (Command Query Responsibility Segregation) and Event Sourcing.
2
- AI-specific issue review is not needed (already covered by the ai-antipattern-review-1st step).
1
+ Focus on reviewing **CQRS (Command Query Responsibility Segregation) and Event Sourcing**.
2
+ Do not review AI-specific issues (already covered by the ai-antipattern-review-1st step).
3
3
 
4
- **Review criteria:**
5
- - Aggregate design validity
6
- - Event design (granularity, naming, schema)
7
- - Command/Query separation
8
- - Projection design
9
- - Eventual consistency considerations
4
+ Procedure:
5
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
6
+ 2. List every `##` section in each of them (do not cherry-pick)
7
+ 3. Match the criteria in each listed section against the diff and detect any issues
10
8
 
11
- **Note**: If this project does not use the CQRS+ES pattern,
12
- review from a general domain design perspective instead.
13
-
14
-
15
- **Design decisions reference:**
16
- Review {report:coder-decisions.md} to understand the recorded design decisions.
17
- - Do not flag intentionally documented decisions as FP
18
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
19
-
20
- ## Judgment Procedure
21
-
22
- 1. Review the change diff and detect issues based on the CQRS and Event Sourcing criteria above
23
- - Cross-check changes against REJECT criteria tables defined in knowledge
24
- 2. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
25
- 3. If there is even one blocking issue, judge as REJECT
9
+ **Note:** If this project does not use the CQRS+ES pattern, review from a general domain design perspective instead.
@@ -1,34 +1,8 @@
1
- Review the changes from a frontend development perspective.
1
+ Focus on reviewing **frontend development**.
2
2
 
3
- **Review criteria:**
4
- - Design fidelity (top priority when a design reference is provided)
5
- - Component design (separation of concerns, granularity)
6
- - State management (local vs. global decisions)
7
- - Performance (re-renders, memoization)
8
- - Accessibility (keyboard navigation, ARIA)
9
- - Data fetching patterns
10
- - Reachability wiring for user-facing features (routes, entry paths, launch conditions)
11
- - TypeScript type safety
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff and detect any issues
12
7
 
13
- **Design fidelity check (when a design reference exists):**
14
- 1. Identify the design reference from the task order's referenced materials
15
- 2. Compare design elements (layout, wording, colors, spacing) against implementation element by element
16
- 3. For any discrepancy, check the decisions log to determine if it was intentional
17
- 4. Report unintentional discrepancies as blocking issues
18
-
19
- **Note**: If this project does not include a frontend,
20
- proceed as no issues found.
21
-
22
-
23
- **Design decisions reference:**
24
- Review {report:coder-decisions.md} to understand the recorded design decisions.
25
- - Do not flag intentionally documented decisions as FP
26
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
27
-
28
- ## Judgment Procedure
29
-
30
- 1. Review the change diff and detect issues based on the frontend development criteria above
31
- - Cross-check changes against REJECT criteria tables defined in knowledge
32
- - When new screens or user-facing features are added, verify that entry points and caller wiring were updated as well
33
- 2. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
34
- 3. If there is even one blocking issue, judge as REJECT
8
+ **Note:** If this project does not include a frontend, proceed as no issues found.
@@ -1,32 +1,6 @@
1
- Review the changes from a quality assurance perspective.
1
+ Focus on reviewing **quality assurance (test strategy, coverage, error handling, maintainability)**.
2
2
 
3
- **Review criteria:**
4
- - Test coverage and quality
5
- - Test strategy (unit/integration/E2E)
6
- - Error handling
7
- - Logging and monitoring
8
- - Maintainability
9
-
10
-
11
- **Design decisions reference:**
12
- Review {report:coder-decisions.md} to understand the recorded design decisions.
13
- - Do not flag intentionally documented decisions as FP
14
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
15
-
16
- **Previous finding tracking (required):**
17
- - First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
18
- - If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
19
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
20
- - If status is `persists`, provide concrete unresolved evidence (file/line)
21
- - Do not drop open findings from the prior report when producing the current report
22
-
23
- ## Judgment Procedure
24
-
25
- 1. First, extract previous open findings and preliminarily classify as `new / persists / resolved / reopened`
26
- 2. Review the change diff and detect issues based on the quality assurance criteria above
27
- - Cross-check changes against REJECT criteria tables defined in knowledge
28
- - Even if tests pass, verify whether any additional change outside the task or plan is justified
29
- - If review-driven follow-up changes expand the design, evaluate whether that extra change is actually necessary
30
- - When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
31
- 3. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
32
- 4. If there is even one blocking issue (`new`, `persists`, or `reopened`), judge as REJECT
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff and detect any issues
@@ -1,25 +1,11 @@
1
- Review the changes from a requirements fulfillment perspective.
1
+ Focus on reviewing **requirements fulfillment**.
2
2
 
3
- **Review criteria:**
4
- - Whether each requested requirement has been implemented
5
- - Whether implicit requirements (naturally expected behaviors) are satisfied
6
- - Whether changes outside the scope (scope creep) have crept in
7
- - Whether there are any partial or missing implementations
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff and detect any issues
8
7
 
9
-
10
- **Design decisions reference:**
11
- Review {report:coder-decisions.md} to understand the recorded design decisions.
12
- - Do not flag intentionally documented decisions as FP
13
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
14
-
15
- **Previous finding tracking (required):**
16
- - First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
17
- - If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
18
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
19
- - If status is `persists`, provide concrete unresolved evidence (file/line)
20
- - Do not drop open findings from the prior report when producing the current report
21
-
22
- ## Judgment Procedure
8
+ ## Step-Specific Additional Procedure
23
9
 
24
10
  1. Read `order.md`, the task body, `plan.md`, and `coder-decisions.md`, then extract the requirements one by one
25
11
  2. If a sentence contains multiple conditions or paths, split it into the smallest independently verifiable units
@@ -29,7 +15,3 @@ Review {report:coder-decisions.md} to understand the recorded design decisions.
29
15
  - Do not mark a row `satisfied` without concrete code evidence
30
16
  - Do not mark a row `satisfied` when only part of the cases is covered
31
17
  5. List out-of-scope changes and judge whether they are justified or unnecessary
32
- 6. Reclassify prior findings into `new / persists / resolved / reopened`
33
- 7. When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
34
- 8. For each detected issue, classify it as blocking/non-blocking based on the Policy's scope table and judgment rules
35
- 9. If there is even one blocking issue in `new`, `persists`, or `reopened`, judge as REJECT
@@ -1,39 +1,16 @@
1
- Review the changes from a security perspective. Check for the following vulnerabilities:
2
- - Injection attacks (SQL, command, XSS)
3
- - Authentication and authorization flaws
4
- - Data exposure risks
5
- - Cryptographic weaknesses
1
+ Focus on reviewing **security**.
6
2
 
7
- **Primary sources to review:**
8
- - Review `order.md` to understand requirements and prohibitions.
9
- - Review `plan.md` to understand intended scope and design direction.
10
- - Review {report:coder-decisions.md} to understand the recorded design decisions.
11
- - Do not dismiss documented decisions as FP by default. Re-evaluate them against `order.md`, `plan.md`, and the actual code.
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff and detect any issues
12
7
 
13
- **Previous finding tracking (required):**
14
- - First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
15
- - If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
16
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
17
- - If status is `persists`, provide concrete unresolved evidence (file/line)
18
- - Do not drop open findings from the prior report when producing the current report
8
+ ## Step-Specific Notes
19
9
 
20
- **Important:**
21
- - Do not treat documented precedence rules, extension points, or configuration override behavior as vulnerabilities by themselves.
22
- - Do not assume that removing an interactive confirmation or warning automatically means a security boundary regression.
23
- - To issue a blocking finding, make the exploit path concrete: who controls what input, and what newly becomes possible.
24
-
25
- ## Judgment Procedure
26
-
27
- 1. Cross-check `order.md`, `plan.md`, `coder-decisions.md`, and the actual code to determine whether the behavior is intentional product behavior
28
- 2. Review the change diff and extract issue candidates by cross-checking changes against REJECT criteria in knowledge
29
- 3. For each candidate, verify the concrete exploit path
30
- - Which actor controls the input or configuration
31
- - Whether the change enables new privilege, data access, code execution, or prompt modification
32
- - Whether the impact exceeds the existing documented precedence or extension model
33
- 4. When configuration precedence, local/global shadowing, or non-interactive selection is involved, additionally verify:
34
- - Whether the behavior is intended by `order.md` or `plan.md`
35
- - Whether explicit selectors or arguments already make the user's intent clear
36
- - Whether there is an actual trust-boundary break or new attack capability, rather than merely an override relationship
37
- 5. When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
38
- 6. For each detected issue, classify it as blocking or non-blocking based on the Policy scope table and judgment rules
39
- 7. If there is even one blocking issue, judge as REJECT
10
+ - Do not treat documented precedence rules, extension points, or configuration override behavior as vulnerabilities by themselves
11
+ - Do not assume that removing an interactive confirmation or warning automatically means a security boundary regression
12
+ - To issue a blocking finding, make the exploit path concrete: which actor controls what input, and what newly becomes possible
13
+ - When configuration precedence, local/global shadowing, or non-interactive selection is involved, additionally verify:
14
+ - Whether the behavior is intended by `order.md` or `plan.md`
15
+ - Whether explicit selectors or arguments already make the user's intent clear
16
+ - Whether there is an actual trust-boundary break or new attack capability, rather than merely an override relationship
@@ -1,31 +1,7 @@
1
1
  Focus on reviewing **Terraform convention compliance**.
2
2
  Do not review AI-specific issues (already covered by the ai-antipattern-review-1st step).
3
3
 
4
- **Review criteria:**
5
- - Variable declaration compliance (type, description, sensitive)
6
- - Resource naming consistency (name_prefix pattern)
7
- - File organization compliance (one file per concern)
8
- - Security configurations (IMDSv2, encryption, access control, IAM least privilege)
9
- - Tag management (default_tags, no duplication)
10
- - Lifecycle rule appropriateness
11
- - Cost trade-off documentation
12
- - Unused variables / outputs / data sources
13
-
14
-
15
- **Design decisions reference:**
16
- Review {report:coder-decisions.md} to understand the recorded design decisions.
17
- - Do not flag intentionally documented decisions as FP
18
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
19
-
20
- **Previous finding tracking (required):**
21
- - First, extract open findings from "Previous Response"
22
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved`
23
- - If status is `persists`, provide concrete unresolved evidence (file/line)
24
-
25
- ## Judgment Procedure
26
-
27
- 1. First, extract previous open findings and preliminarily classify as `new / persists / resolved`
28
- 2. Review the change diff and detect issues based on Terraform convention criteria
29
- - Cross-check changes against REJECT criteria tables defined in knowledge
30
- 3. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
31
- 4. If there is even one blocking issue (`new` or `persists`), judge as REJECT
4
+ Procedure:
5
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
6
+ 2. List every `##` section in each of them (do not cherry-pick)
7
+ 3. Match the criteria in each listed section against the diff and detect any issues
@@ -1,32 +1,11 @@
1
- Review the changes from a test quality perspective.
1
+ Focus on reviewing **test quality**.
2
2
 
3
- **Review criteria:**
4
- - Whether all test plan items are covered
5
- - Test quality (Given-When-Then structure, independence, reproducibility)
6
- - Test naming conventions
7
- - Completeness (unnecessary tests, missing cases)
8
- - Appropriateness of mocks and fixtures
9
- - When an external contract exists, whether request body / query / path input locations are verified as defined
10
- - Whether the tests would catch an implementation that incorrectly reuses a response envelope for request parsing
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff and detect any issues
11
7
 
8
+ ## Step-Specific Additional Procedure
12
9
 
13
- **Design decisions reference:**
14
- Review {report:coder-decisions.md} to understand the recorded design decisions.
15
- - Do not flag intentionally documented decisions as FP
16
- - However, also evaluate whether the design decisions themselves are sound, and flag any problems
17
-
18
- **Previous finding tracking (required):**
19
- - First, inspect the review result previously produced by this step and its timestamped history in the Report Directory, treating the unversioned file as the latest result and the most recent timestamped file as the previous result
20
- - If "Previous Response" is available, use it only as supporting context; use report history as the source of truth for finding state transitions
21
- - Assign `finding_id` to each finding and classify current status as `new / persists / resolved / reopened`
22
- - If status is `persists`, provide concrete unresolved evidence (file/line)
23
- - Do not drop open findings from the prior report when producing the current report
24
-
25
- ## Judgment Procedure
26
-
27
- 1. First, extract prior open findings from report history and preliminarily classify them as `new / persists / resolved / reopened`
28
- 2. Cross-reference the test plan/test scope reports in the Report Directory with the implemented tests
29
- 3. When citing build, test, or functional verification as evidence, record the verified target, what was checked, and the observed result in the report
30
- 4. For each detected issue, classify as blocking/non-blocking based on Policy's scope determination table and judgment rules
31
- 5. If there is even one blocking issue, judge as REJECT
32
- 6. If an external contract exists and input locations (root body / query / path) are not verified, treat it as a coverage gap by default
10
+ 1. Cross-reference the test plan / test scope reports in the Report Directory with the implemented tests
11
+ 2. If an external contract exists and input locations (root body / query / path) are not verified, treat it as a coverage gap by default
@@ -1,52 +1,34 @@
1
1
  Verify existing evidence for tests, builds, and functional checks, then perform final approval.
2
2
 
3
- **Overall workflow verification:**
4
- 1. Check all reports in the report directory and verify overall workflow consistency
5
- - Does implementation match the plan?
6
- - Were all review step findings properly addressed?
7
- - Was the original task objective achieved?
8
- - Are prior review findings themselves valid against the task spec, plan, and actual code?
9
- 2. Verify the task spec, plan, and decision history as primary sources
10
- - Read `order.md` and extract required behavior and prohibitions
11
- - Read `plan.md` and confirm intended approach and scope
12
- - Read `coder-decisions.md` and confirm why the implementation moved in that direction
13
- - Do not treat prior review conclusions or requirements-review conclusions as authoritative unless they align with all three and the code
14
- 3. Whether each task spec requirement has been achieved
15
- - Extract requirements one by one from the task spec
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section in each of them (do not cherry-pick)
6
+ 3. Match the criteria in each listed section against the diff, execution evidence, and reports
7
+
8
+ ## Step-Specific Additional Procedure
9
+
10
+ 1. Extract each requirement from the task spec one by one
16
11
  - If a single sentence contains multiple conditions or paths, split it into the smallest independently verifiable units
17
12
  - Example: treat `global/project` as separate requirements
18
13
  - Example: treat `JSON override / leaf override` as separate requirements
19
14
  - Example: split parallel expressions such as `A and B`, `A/B`, `allow/deny`, or `read/write`
20
- - For each requirement, identify the implementing code (file:line)
21
- - Verify the code actually fulfills the requirement (read the file, check existing test/build evidence)
15
+ 2. For each requirement, identify the implementing code (file:line)
16
+ 3. Verify the code actually fulfills the requirement (read the file, check existing test/build evidence)
22
17
  - Do not mark a composite requirement as ✅ based on only one side of the cases
23
- - Evidence must cover the full content of the requirement row
24
- - Do not rely on the plan report's judgment; independently verify each requirement
18
+ - Do not rely on the plan report or requirements-review judgment; independently verify each requirement
25
19
  - If any requirement is unfulfilled, REJECT
26
20
  4. Re-evaluate prior review findings
27
- - Re-check each `new / persists / resolved` finding against the task spec, `plan.md`, `coder-decisions.md`, and actual code
28
21
  - If a finding does not hold in code, classify it as `false_positive`
29
22
  - If a finding holds technically but pushes work beyond the task objective or justified scope, classify it as `overreach`
30
23
  - Do not leave `false_positive` / `overreach` reasoning implicit
31
- 5. Handling tests, builds, and functional checks
32
- - Do not assume this step will rerun commands
33
- - Use only evidence available in this run, such as execution logs, reports, or CI results
34
- - If evidence is missing, mark the item as unverified rather than successful
35
- - If report text conflicts with execution evidence, call out the inconsistency explicitly
36
-
37
- **How to read reports:**
38
- - For reports with the same base name, treat the unversioned file as the latest result and `{report}.{timestamp}` files as history
39
- - When re-evaluating prior findings, compare the unversioned file with the most recent timestamped history file and verify that the meaning of `new / persists / resolved / reopened` is preserved
40
- - Treat summary reports as summaries, not as primary evidence. Prefer reports that record execution results, reviewer reports with concrete verification details, and then actual code
41
- - You may treat `Build Results` / `Test Results` sections in reports that record execution results as primary evidence
42
- - For `architecture-review`, `qa-review`, `testing-review`, `security-review`, and `requirements-review`, prioritize each report's `Verification Evidence` section when checking evidence
24
+
25
+ ## Report Priority (supervise-specific)
26
+
27
+ - Do not treat summary reports as primary evidence. Use execution-result reports, reviewer reports with concrete verification details, and actual code in that order
28
+ - You may treat `Build Results` / `Test Results` sections in execution-result reports as primary evidence
29
+ - For `architecture-review`, `qa-review`, `testing-review`, `security-review`, and `requirements-review`, prioritize each report's `Verification Evidence` section
43
30
  - Treat each `Verification Evidence` item as supporting evidence only when it states the verified target, what was checked, and observed result. If any part is missing, mark that item as `unverified`
44
- - Treat reviewer claims such as "confirmed success" as supporting evidence only when they state the verified target, what was checked, and the observed result
45
31
  - If items of evidence conflict, prioritize them in this order: `execution-result report > reviewer report with concrete verification details > summary report`
46
- - If a later report reclassifies an earlier finding as `resolved`, `false_positive`, or `overreach`, decide whether to accept that reclassification by checking it against the task, plan, and code
47
-
48
- **Report verification:** Read all reports in the Report Directory and
49
- check whether any blocking finding remains unresolved and whether those findings are themselves valid.
50
32
 
51
33
  **Validation output contract:**
52
34
  ```markdown
@@ -101,6 +101,24 @@ Good Command Handler:
101
101
  4. Save emitted events
102
102
  ```
103
103
 
104
+ ### Aggregate Decision Boundary
105
+
106
+ Aggregates make decisions only from state that can be restored from their event history and facts explicitly carried by commands. They are not the place to interpret, normalize, or authorize boundary-originated inputs.
107
+
108
+ Validation inside an Aggregate should be limited to facts reproducible by event replay. Other validation should be resolved before command dispatch, and the Aggregate should receive already-resolved facts.
109
+
110
+ | Decision target | Place |
111
+ |-----------------|-------|
112
+ | Whether the current state allows the operation | Aggregate |
113
+ | Whether the command requester matches the Aggregate owner | Aggregate |
114
+ | Whether HTTP/API input shape is valid | API layer |
115
+ | Parsing external identifiers such as object keys, URLs, or paths | UseCase layer or boundary-side Policy/Verifier |
116
+ | Whether an external identifier belongs to the current user/tenant | UseCase layer or boundary-side Policy/Verifier |
117
+ | Checking Read Models or other Aggregate state | UseCase layer |
118
+ | Checking that an external resource exists | Application-layer integration with the external service |
119
+
120
+ Example: for an upload-completed command, the Aggregate decides whether the session owner matches the requester and whether the current state can be completed. The storage object key format and whether the key belongs to the current user/tenant are validated in the UseCase layer before sending the command.
121
+
104
122
  ## Projection Design
105
123
 
106
124
  | Criteria | Judgment |
@@ -84,6 +84,7 @@ Third-party UI libraries such as data grids, date pickers, charts, and virtualiz
84
84
  ## State Management
85
85
 
86
86
  Child components do not modify their own state. They bubble events to parent, and parent manipulates state.
87
+ When multiple components read or update the same state, first place that state in their nearest common parent, then pass data and event callbacks down through props.
87
88
 
88
89
  ```tsx
89
90
  // ❌ Child modifies its own state
@@ -110,7 +111,7 @@ Exception (OK for child to have local state):
110
111
  | Criteria | Judgment |
111
112
  |----------|----------|
112
113
  | Unnecessary global state | Consider localizing |
113
- | Same state managed in multiple places | Needs normalization |
114
+ | Same state managed in multiple places | REJECT. Normalize it in the nearest common parent or shared store |
114
115
  | State changes from child to parent (reverse data flow) | REJECT |
115
116
  | API response stored as-is in state | Consider normalization |
116
117
  | Inappropriate useEffect dependencies | REJECT |
@@ -122,7 +123,8 @@ State Placement Guidelines:
122
123
  |--------------|----------------------|
123
124
  | Temporary UI state (modal open/close, etc.) | Local (useState) |
124
125
  | Form input values | Local or form library |
125
- | Shared across multiple components | Context or state management library |
126
+ | Shared across nearby parent/child or sibling components | Nearest common parent, passed through props |
127
+ | Shared across deep hierarchy or multiple screens | Context or state management library |
126
128
  | Server data cache | Data fetching library (TanStack Query, etc.) |
127
129
 
128
130
  ## Initial load and refetch boundaries
@@ -109,12 +109,15 @@ const loadMore = async () => {
109
109
  ## Custom Hook Responsibility
110
110
 
111
111
  A React custom hook should encapsulate state, effects, refs, or event translation. Pure calculations belong in function modules, not in a `use*` hook.
112
+ `useState` inside a custom hook creates a separate state instance for each caller. Calling the same hook from multiple components does not share state.
113
+ When shared state is required, call the hook once in the nearest common parent and pass data through props, or move the state into Context/external store.
112
114
 
113
115
  | Criteria | Judgment |
114
116
  |----------|----------|
115
117
  | A module is named `use*` but does not use React state/effect/ref | Warning |
116
118
  | Pure functions are modeled as a custom hook | Warning |
117
119
  | Stateful UI control lives in a custom hook and pure calculations live in functions | OK |
120
+ | Multiple components call the same stateful hook independently when they need shared state | REJECT |
118
121
  | A hook returns JSX | REJECT |
119
122
 
120
123
  ## Handling exhaustive-deps