takt 0.41.0 → 0.43.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 (541) hide show
  1. package/README.md +59 -28
  2. package/builtins/en/config.yaml +9 -1
  3. package/builtins/en/facets/instructions/dual-team-leader-implement.md +7 -2
  4. package/builtins/en/facets/instructions/fix-maintenance.md +43 -0
  5. package/builtins/en/facets/instructions/implement-maintenance.md +72 -0
  6. package/builtins/en/facets/instructions/plan-maintenance.md +51 -0
  7. package/builtins/en/facets/instructions/review-coding.md +8 -0
  8. package/builtins/en/facets/instructions/supervise-maintenance.md +110 -0
  9. package/builtins/en/facets/instructions/team-leader-implement.md +6 -1
  10. package/builtins/en/facets/instructions/write-tests-first.md +5 -0
  11. package/builtins/en/facets/instructions/write-tests-maintenance.md +45 -0
  12. package/builtins/en/facets/knowledge/architecture.md +18 -13
  13. package/builtins/en/facets/knowledge/cqrs-es.md +48 -0
  14. package/builtins/en/facets/knowledge/existing-system.md +70 -0
  15. package/builtins/en/facets/knowledge/frontend.md +25 -0
  16. package/builtins/en/facets/knowledge/react.md +35 -0
  17. package/builtins/en/facets/output-contracts/coding-review.md +41 -0
  18. package/builtins/en/facets/output-contracts/frontend-review.md +1 -0
  19. package/builtins/en/facets/output-contracts/maintenance-scope.md +29 -0
  20. package/builtins/en/facets/personas/coding-reviewer.md +27 -0
  21. package/builtins/en/facets/personas/dual-supervisor.md +1 -1
  22. package/builtins/en/facets/policies/ai-antipattern.md +59 -0
  23. package/builtins/en/facets/policies/coding.md +85 -3
  24. package/builtins/en/facets/policies/existing-system-respect.md +73 -0
  25. package/builtins/en/facets/policies/qa.md +3 -1
  26. package/builtins/en/facets/policies/review.md +25 -12
  27. package/builtins/en/facets/policies/testing.md +33 -0
  28. package/builtins/en/workflow-categories.yaml +1 -0
  29. package/builtins/en/workflows/auto-improvement-loop.yaml +20 -4
  30. package/builtins/en/workflows/default-peer-review.yaml +25 -3
  31. package/builtins/en/workflows/frontend-maintenance.yaml +499 -0
  32. package/builtins/en/workflows/peer-review.yaml +23 -1
  33. package/builtins/en/workflows/review-fix-takt-default.yaml +30 -2
  34. package/builtins/ja/config.yaml +9 -1
  35. package/builtins/ja/facets/instructions/dual-team-leader-implement.md +7 -2
  36. package/builtins/ja/facets/instructions/fix-maintenance.md +43 -0
  37. package/builtins/ja/facets/instructions/implement-maintenance.md +72 -0
  38. package/builtins/ja/facets/instructions/plan-maintenance.md +51 -0
  39. package/builtins/ja/facets/instructions/review-coding.md +8 -0
  40. package/builtins/ja/facets/instructions/supervise-maintenance.md +110 -0
  41. package/builtins/ja/facets/instructions/team-leader-implement.md +6 -1
  42. package/builtins/ja/facets/instructions/write-tests-first.md +5 -0
  43. package/builtins/ja/facets/instructions/write-tests-maintenance.md +45 -0
  44. package/builtins/ja/facets/knowledge/architecture.md +18 -13
  45. package/builtins/ja/facets/knowledge/cqrs-es.md +48 -0
  46. package/builtins/ja/facets/knowledge/existing-system.md +70 -0
  47. package/builtins/ja/facets/knowledge/frontend.md +25 -0
  48. package/builtins/ja/facets/knowledge/react.md +35 -0
  49. package/builtins/ja/facets/output-contracts/coding-review.md +41 -0
  50. package/builtins/ja/facets/output-contracts/frontend-review.md +1 -0
  51. package/builtins/ja/facets/output-contracts/maintenance-scope.md +29 -0
  52. package/builtins/ja/facets/personas/coding-reviewer.md +27 -0
  53. package/builtins/ja/facets/personas/dual-supervisor.md +2 -2
  54. package/builtins/ja/facets/policies/ai-antipattern.md +59 -0
  55. package/builtins/ja/facets/policies/coding.md +85 -3
  56. package/builtins/ja/facets/policies/existing-system-respect.md +73 -0
  57. package/builtins/ja/facets/policies/qa.md +3 -1
  58. package/builtins/ja/facets/policies/review.md +25 -12
  59. package/builtins/ja/facets/policies/testing.md +33 -0
  60. package/builtins/ja/workflow-categories.yaml +1 -0
  61. package/builtins/ja/workflows/auto-improvement-loop.yaml +20 -4
  62. package/builtins/ja/workflows/default-peer-review.yaml +25 -3
  63. package/builtins/ja/workflows/frontend-maintenance.yaml +499 -0
  64. package/builtins/ja/workflows/peer-review.yaml +23 -1
  65. package/builtins/ja/workflows/review-fix-takt-default.yaml +30 -2
  66. package/builtins/skill/references/yaml-schema.md +8 -3
  67. package/builtins/skill-codex/references/yaml-schema.md +8 -3
  68. package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
  69. package/dist/agents/decompose-task-usecase.js +3 -2
  70. package/dist/agents/decompose-task-usecase.js.map +1 -1
  71. package/dist/agents/judge-status-usecase.d.ts.map +1 -1
  72. package/dist/agents/judge-status-usecase.js +4 -3
  73. package/dist/agents/judge-status-usecase.js.map +1 -1
  74. package/dist/agents/provider-call-options.d.ts +4 -0
  75. package/dist/agents/provider-call-options.d.ts.map +1 -0
  76. package/dist/agents/provider-call-options.js +9 -0
  77. package/dist/agents/provider-call-options.js.map +1 -0
  78. package/dist/agents/runner.js +1 -1
  79. package/dist/agents/runner.js.map +1 -1
  80. package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
  81. package/dist/agents/structured-caller/prompt-based-structured-caller.js +5 -4
  82. package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
  83. package/dist/agents/team-leader-structured-output.d.ts.map +1 -1
  84. package/dist/agents/team-leader-structured-output.js +21 -0
  85. package/dist/agents/team-leader-structured-output.js.map +1 -1
  86. package/dist/app/cli/commands.js +7 -1
  87. package/dist/app/cli/commands.js.map +1 -1
  88. package/dist/app/cli/program.js +1 -1
  89. package/dist/app/cli/program.js.map +1 -1
  90. package/dist/app/cli/routing.d.ts.map +1 -1
  91. package/dist/app/cli/routing.js +8 -1
  92. package/dist/app/cli/routing.js.map +1 -1
  93. package/dist/core/models/assistant-config.d.ts +4 -0
  94. package/dist/core/models/assistant-config.d.ts.map +1 -0
  95. package/dist/core/models/assistant-config.js +4 -0
  96. package/dist/core/models/assistant-config.js.map +1 -0
  97. package/dist/core/models/config-schemas.d.ts +160 -9
  98. package/dist/core/models/config-schemas.d.ts.map +1 -1
  99. package/dist/core/models/config-schemas.js +12 -2
  100. package/dist/core/models/config-schemas.js.map +1 -1
  101. package/dist/core/models/config-types.d.ts +30 -4
  102. package/dist/core/models/config-types.d.ts.map +1 -1
  103. package/dist/core/models/index.d.ts +1 -1
  104. package/dist/core/models/index.d.ts.map +1 -1
  105. package/dist/core/models/index.js.map +1 -1
  106. package/dist/core/models/provider-profiles.d.ts +1 -1
  107. package/dist/core/models/provider-profiles.d.ts.map +1 -1
  108. package/dist/core/models/quality-gate-defaults.d.ts +2 -0
  109. package/dist/core/models/quality-gate-defaults.d.ts.map +1 -0
  110. package/dist/core/models/quality-gate-defaults.js +2 -0
  111. package/dist/core/models/quality-gate-defaults.js.map +1 -0
  112. package/dist/core/models/response.d.ts +1 -1
  113. package/dist/core/models/response.d.ts.map +1 -1
  114. package/dist/core/models/response.js +1 -1
  115. package/dist/core/models/response.js.map +1 -1
  116. package/dist/core/models/schema-base.d.ts +80 -3
  117. package/dist/core/models/schema-base.d.ts.map +1 -1
  118. package/dist/core/models/schema-base.js +76 -2
  119. package/dist/core/models/schema-base.js.map +1 -1
  120. package/dist/core/models/types.d.ts +2 -2
  121. package/dist/core/models/types.d.ts.map +1 -1
  122. package/dist/core/models/workflow-provider-options.d.ts +7 -0
  123. package/dist/core/models/workflow-provider-options.d.ts.map +1 -1
  124. package/dist/core/models/workflow-schemas.d.ts +368 -51
  125. package/dist/core/models/workflow-schemas.d.ts.map +1 -1
  126. package/dist/core/models/workflow-system-input-types.d.ts +8 -1
  127. package/dist/core/models/workflow-system-input-types.d.ts.map +1 -1
  128. package/dist/core/models/workflow-system-schemas.d.ts +7 -1
  129. package/dist/core/models/workflow-system-schemas.d.ts.map +1 -1
  130. package/dist/core/models/workflow-system-schemas.js +12 -1
  131. package/dist/core/models/workflow-system-schemas.js.map +1 -1
  132. package/dist/core/models/workflow-types.d.ts +13 -5
  133. package/dist/core/models/workflow-types.d.ts.map +1 -1
  134. package/dist/core/models/workflow-types.js.map +1 -1
  135. package/dist/core/workflow/engine/OptionsBuilder.d.ts +1 -0
  136. package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
  137. package/dist/core/workflow/engine/OptionsBuilder.js +9 -4
  138. package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
  139. package/dist/core/workflow/engine/ParallelRunner.d.ts +11 -0
  140. package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
  141. package/dist/core/workflow/engine/ParallelRunner.js +139 -19
  142. package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
  143. package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
  144. package/dist/core/workflow/engine/TeamLeaderRunner.js +55 -23
  145. package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
  146. package/dist/core/workflow/engine/WorkflowEngine.d.ts +1 -0
  147. package/dist/core/workflow/engine/WorkflowEngine.d.ts.map +1 -1
  148. package/dist/core/workflow/engine/WorkflowEngine.js +29 -4
  149. package/dist/core/workflow/engine/WorkflowEngine.js.map +1 -1
  150. package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts.map +1 -1
  151. package/dist/core/workflow/engine/WorkflowEngineSetup.js +2 -0
  152. package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
  153. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts +8 -0
  154. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
  155. package/dist/core/workflow/engine/WorkflowRunLoop.js +78 -7
  156. package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
  157. package/dist/core/workflow/engine/team-leader-execution.d.ts +1 -0
  158. package/dist/core/workflow/engine/team-leader-execution.d.ts.map +1 -1
  159. package/dist/core/workflow/engine/team-leader-execution.js +22 -0
  160. package/dist/core/workflow/engine/team-leader-execution.js.map +1 -1
  161. package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts +13 -0
  162. package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts.map +1 -0
  163. package/dist/core/workflow/engine/team-leader-timeout-fallback.js +125 -0
  164. package/dist/core/workflow/engine/team-leader-timeout-fallback.js.map +1 -0
  165. package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
  166. package/dist/core/workflow/instruction/InstructionBuilder.js +4 -3
  167. package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
  168. package/dist/core/workflow/observability/workflowSpans.d.ts +28 -0
  169. package/dist/core/workflow/observability/workflowSpans.d.ts.map +1 -0
  170. package/dist/core/workflow/observability/workflowSpans.js +107 -0
  171. package/dist/core/workflow/observability/workflowSpans.js.map +1 -0
  172. package/dist/core/workflow/part-definition-validator.d.ts.map +1 -1
  173. package/dist/core/workflow/part-definition-validator.js +4 -0
  174. package/dist/core/workflow/part-definition-validator.js.map +1 -1
  175. package/dist/core/workflow/permission-profile-resolution.d.ts.map +1 -1
  176. package/dist/core/workflow/permission-profile-resolution.js +1 -0
  177. package/dist/core/workflow/permission-profile-resolution.js.map +1 -1
  178. package/dist/core/workflow/phase-runner.d.ts +1 -3
  179. package/dist/core/workflow/phase-runner.d.ts.map +1 -1
  180. package/dist/core/workflow/phase-runner.js.map +1 -1
  181. package/dist/core/workflow/quality-gates/commandGateMessage.d.ts +4 -0
  182. package/dist/core/workflow/quality-gates/commandGateMessage.d.ts.map +1 -0
  183. package/dist/core/workflow/quality-gates/commandGateMessage.js +84 -0
  184. package/dist/core/workflow/quality-gates/commandGateMessage.js.map +1 -0
  185. package/dist/core/workflow/quality-gates/commandGateRunner.d.ts +3 -0
  186. package/dist/core/workflow/quality-gates/commandGateRunner.d.ts.map +1 -0
  187. package/dist/core/workflow/quality-gates/commandGateRunner.js +242 -0
  188. package/dist/core/workflow/quality-gates/commandGateRunner.js.map +1 -0
  189. package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts +3 -0
  190. package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts.map +1 -0
  191. package/dist/core/workflow/quality-gates/qualityGateRunner.js +29 -0
  192. package/dist/core/workflow/quality-gates/qualityGateRunner.js.map +1 -0
  193. package/dist/core/workflow/quality-gates/types.d.ts +41 -0
  194. package/dist/core/workflow/quality-gates/types.d.ts.map +1 -0
  195. package/dist/core/workflow/quality-gates/types.js +2 -0
  196. package/dist/core/workflow/quality-gates/types.js.map +1 -0
  197. package/dist/core/workflow/report-phase-runner.d.ts.map +1 -1
  198. package/dist/core/workflow/report-phase-runner.js +3 -2
  199. package/dist/core/workflow/report-phase-runner.js.map +1 -1
  200. package/dist/core/workflow/run/run-meta.d.ts +3 -1
  201. package/dist/core/workflow/run/run-meta.d.ts.map +1 -1
  202. package/dist/core/workflow/run/run-meta.js +2 -0
  203. package/dist/core/workflow/run/run-meta.js.map +1 -1
  204. package/dist/core/workflow/run/run-slug.d.ts +2 -0
  205. package/dist/core/workflow/run/run-slug.d.ts.map +1 -0
  206. package/dist/core/workflow/run/run-slug.js +19 -0
  207. package/dist/core/workflow/run/run-slug.js.map +1 -0
  208. package/dist/core/workflow/status-judgment-phase.d.ts.map +1 -1
  209. package/dist/core/workflow/status-judgment-phase.js +7 -3
  210. package/dist/core/workflow/status-judgment-phase.js.map +1 -1
  211. package/dist/core/workflow/system/system-step-effect-runner.d.ts.map +1 -1
  212. package/dist/core/workflow/system/system-step-effect-runner.js +16 -1
  213. package/dist/core/workflow/system/system-step-effect-runner.js.map +1 -1
  214. package/dist/core/workflow/team-leader-continuation-ids.d.ts +3 -0
  215. package/dist/core/workflow/team-leader-continuation-ids.d.ts.map +1 -0
  216. package/dist/core/workflow/team-leader-continuation-ids.js +6 -0
  217. package/dist/core/workflow/team-leader-continuation-ids.js.map +1 -0
  218. package/dist/core/workflow/types.d.ts +7 -1
  219. package/dist/core/workflow/types.d.ts.map +1 -1
  220. package/dist/features/interactive/assistantInitFiles.d.ts +2 -0
  221. package/dist/features/interactive/assistantInitFiles.d.ts.map +1 -0
  222. package/dist/features/interactive/assistantInitFiles.js +110 -0
  223. package/dist/features/interactive/assistantInitFiles.js.map +1 -0
  224. package/dist/features/interactive/conversationLoop.d.ts +5 -1
  225. package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
  226. package/dist/features/interactive/conversationLoop.js +33 -11
  227. package/dist/features/interactive/conversationLoop.js.map +1 -1
  228. package/dist/features/interactive/imageAttachments.d.ts +20 -0
  229. package/dist/features/interactive/imageAttachments.d.ts.map +1 -0
  230. package/dist/features/interactive/imageAttachments.js +75 -0
  231. package/dist/features/interactive/imageAttachments.js.map +1 -0
  232. package/dist/features/interactive/index.d.ts +2 -1
  233. package/dist/features/interactive/index.d.ts.map +1 -1
  234. package/dist/features/interactive/index.js +1 -1
  235. package/dist/features/interactive/index.js.map +1 -1
  236. package/dist/features/interactive/inlineImagePaste.d.ts +21 -0
  237. package/dist/features/interactive/inlineImagePaste.d.ts.map +1 -0
  238. package/dist/features/interactive/inlineImagePaste.js +136 -0
  239. package/dist/features/interactive/inlineImagePaste.js.map +1 -0
  240. package/dist/features/interactive/instructModeTypes.d.ts +23 -0
  241. package/dist/features/interactive/instructModeTypes.d.ts.map +1 -0
  242. package/dist/features/interactive/instructModeTypes.js +2 -0
  243. package/dist/features/interactive/instructModeTypes.js.map +1 -0
  244. package/dist/features/interactive/interactive-summary.d.ts +1 -1
  245. package/dist/features/interactive/interactive-summary.d.ts.map +1 -1
  246. package/dist/features/interactive/interactive-summary.js +4 -3
  247. package/dist/features/interactive/interactive-summary.js.map +1 -1
  248. package/dist/features/interactive/interactive.d.ts +8 -3
  249. package/dist/features/interactive/interactive.d.ts.map +1 -1
  250. package/dist/features/interactive/interactive.js +4 -0
  251. package/dist/features/interactive/interactive.js.map +1 -1
  252. package/dist/features/interactive/interactiveInput.d.ts +2 -1
  253. package/dist/features/interactive/interactiveInput.d.ts.map +1 -1
  254. package/dist/features/interactive/interactiveInput.js +5 -1
  255. package/dist/features/interactive/interactiveInput.js.map +1 -1
  256. package/dist/features/interactive/lineEditor.d.ts +2 -0
  257. package/dist/features/interactive/lineEditor.d.ts.map +1 -1
  258. package/dist/features/interactive/lineEditor.js +130 -9
  259. package/dist/features/interactive/lineEditor.js.map +1 -1
  260. package/dist/features/interactive/passthroughMode.d.ts.map +1 -1
  261. package/dist/features/interactive/passthroughMode.js +8 -4
  262. package/dist/features/interactive/passthroughMode.js.map +1 -1
  263. package/dist/features/interactive/promptSections.d.ts +2 -0
  264. package/dist/features/interactive/promptSections.d.ts.map +1 -1
  265. package/dist/features/interactive/promptSections.js +7 -1
  266. package/dist/features/interactive/promptSections.js.map +1 -1
  267. package/dist/features/interactive/quietMode.d.ts.map +1 -1
  268. package/dist/features/interactive/quietMode.js +12 -8
  269. package/dist/features/interactive/quietMode.js.map +1 -1
  270. package/dist/features/interactive/retryMode.d.ts +10 -13
  271. package/dist/features/interactive/retryMode.d.ts.map +1 -1
  272. package/dist/features/interactive/retryMode.js +42 -22
  273. package/dist/features/interactive/retryMode.js.map +1 -1
  274. package/dist/features/interactive/slashCommandRegistry.d.ts.map +1 -1
  275. package/dist/features/interactive/slashCommandRegistry.js +1 -0
  276. package/dist/features/interactive/slashCommandRegistry.js.map +1 -1
  277. package/dist/features/tasks/add/index.d.ts +4 -0
  278. package/dist/features/tasks/add/index.d.ts.map +1 -1
  279. package/dist/features/tasks/add/index.js +12 -29
  280. package/dist/features/tasks/add/index.js.map +1 -1
  281. package/dist/features/tasks/attachments.d.ts +19 -0
  282. package/dist/features/tasks/attachments.d.ts.map +1 -0
  283. package/dist/features/tasks/attachments.js +129 -0
  284. package/dist/features/tasks/attachments.js.map +1 -0
  285. package/dist/features/tasks/execute/resolveTask.d.ts.map +1 -1
  286. package/dist/features/tasks/execute/resolveTask.js +4 -3
  287. package/dist/features/tasks/execute/resolveTask.js.map +1 -1
  288. package/dist/features/tasks/execute/runMeta.d.ts +5 -1
  289. package/dist/features/tasks/execute/runMeta.d.ts.map +1 -1
  290. package/dist/features/tasks/execute/runMeta.js +10 -4
  291. package/dist/features/tasks/execute/runMeta.js.map +1 -1
  292. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  293. package/dist/features/tasks/execute/selectAndExecute.js +48 -4
  294. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  295. package/dist/features/tasks/execute/taskSpecContext.d.ts +7 -2
  296. package/dist/features/tasks/execute/taskSpecContext.d.ts.map +1 -1
  297. package/dist/features/tasks/execute/taskSpecContext.js +23 -36
  298. package/dist/features/tasks/execute/taskSpecContext.js.map +1 -1
  299. package/dist/features/tasks/execute/taskWorkflowExecution.d.ts.map +1 -1
  300. package/dist/features/tasks/execute/taskWorkflowExecution.js +2 -1
  301. package/dist/features/tasks/execute/taskWorkflowExecution.js.map +1 -1
  302. package/dist/features/tasks/execute/traceReportRedaction.d.ts +0 -1
  303. package/dist/features/tasks/execute/traceReportRedaction.d.ts.map +1 -1
  304. package/dist/features/tasks/execute/traceReportRedaction.js +1 -9
  305. package/dist/features/tasks/execute/traceReportRedaction.js.map +1 -1
  306. package/dist/features/tasks/execute/types.d.ts +8 -0
  307. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  308. package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
  309. package/dist/features/tasks/execute/workflowExecution.js +12 -1
  310. package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
  311. package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts +5 -1
  312. package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
  313. package/dist/features/tasks/execute/workflowExecutionBootstrap.js +7 -2
  314. package/dist/features/tasks/execute/workflowExecutionBootstrap.js.map +1 -1
  315. package/dist/features/tasks/index.d.ts +1 -0
  316. package/dist/features/tasks/index.d.ts.map +1 -1
  317. package/dist/features/tasks/index.js +1 -0
  318. package/dist/features/tasks/index.js.map +1 -1
  319. package/dist/features/tasks/list/instructMode.d.ts +2 -20
  320. package/dist/features/tasks/list/instructMode.d.ts.map +1 -1
  321. package/dist/features/tasks/list/instructMode.js +15 -4
  322. package/dist/features/tasks/list/instructMode.js.map +1 -1
  323. package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts +8 -0
  324. package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts.map +1 -0
  325. package/dist/features/tasks/list/retryTaskSpecAttachments.js +87 -0
  326. package/dist/features/tasks/list/retryTaskSpecAttachments.js.map +1 -0
  327. package/dist/features/tasks/list/taskInstructionActions.d.ts.map +1 -1
  328. package/dist/features/tasks/list/taskInstructionActions.js +20 -2
  329. package/dist/features/tasks/list/taskInstructionActions.js.map +1 -1
  330. package/dist/features/tasks/list/taskRetryActions.d.ts.map +1 -1
  331. package/dist/features/tasks/list/taskRetryActions.js +24 -6
  332. package/dist/features/tasks/list/taskRetryActions.js.map +1 -1
  333. package/dist/features/tasks/resume/directInstructMode.d.ts +13 -0
  334. package/dist/features/tasks/resume/directInstructMode.d.ts.map +1 -0
  335. package/dist/features/tasks/resume/directInstructMode.js +67 -0
  336. package/dist/features/tasks/resume/directInstructMode.js.map +1 -0
  337. package/dist/features/tasks/resume/directRunFinder.d.ts +7 -0
  338. package/dist/features/tasks/resume/directRunFinder.d.ts.map +1 -0
  339. package/dist/features/tasks/resume/directRunFinder.js +43 -0
  340. package/dist/features/tasks/resume/directRunFinder.js.map +1 -0
  341. package/dist/features/tasks/resume/index.d.ts +3 -0
  342. package/dist/features/tasks/resume/index.d.ts.map +1 -0
  343. package/dist/features/tasks/resume/index.js +229 -0
  344. package/dist/features/tasks/resume/index.js.map +1 -0
  345. package/dist/features/tasks/taskSpecFile.d.ts +2 -0
  346. package/dist/features/tasks/taskSpecFile.d.ts.map +1 -0
  347. package/dist/features/tasks/taskSpecFile.js +38 -0
  348. package/dist/features/tasks/taskSpecFile.js.map +1 -0
  349. package/dist/infra/claude/executor.d.ts.map +1 -1
  350. package/dist/infra/claude/executor.js +27 -6
  351. package/dist/infra/claude/executor.js.map +1 -1
  352. package/dist/infra/claude/mcp-config.d.ts +7 -0
  353. package/dist/infra/claude/mcp-config.d.ts.map +1 -0
  354. package/dist/infra/claude/mcp-config.js +30 -0
  355. package/dist/infra/claude/mcp-config.js.map +1 -0
  356. package/dist/infra/claude-headless/client.d.ts.map +1 -1
  357. package/dist/infra/claude-headless/client.js +5 -40
  358. package/dist/infra/claude-headless/client.js.map +1 -1
  359. package/dist/infra/claude-headless/result-response.js +1 -1
  360. package/dist/infra/claude-headless/result-response.js.map +1 -1
  361. package/dist/infra/claude-terminal/client.d.ts +4 -0
  362. package/dist/infra/claude-terminal/client.d.ts.map +1 -0
  363. package/dist/infra/claude-terminal/client.js +314 -0
  364. package/dist/infra/claude-terminal/client.js.map +1 -0
  365. package/dist/infra/claude-terminal/command.d.ts +4 -0
  366. package/dist/infra/claude-terminal/command.d.ts.map +1 -0
  367. package/dist/infra/claude-terminal/command.js +50 -0
  368. package/dist/infra/claude-terminal/command.js.map +1 -0
  369. package/dist/infra/claude-terminal/response-normalizer.d.ts +14 -0
  370. package/dist/infra/claude-terminal/response-normalizer.d.ts.map +1 -0
  371. package/dist/infra/claude-terminal/response-normalizer.js +118 -0
  372. package/dist/infra/claude-terminal/response-normalizer.js.map +1 -0
  373. package/dist/infra/claude-terminal/tmux-backend.d.ts +7 -0
  374. package/dist/infra/claude-terminal/tmux-backend.d.ts.map +1 -0
  375. package/dist/infra/claude-terminal/tmux-backend.js +177 -0
  376. package/dist/infra/claude-terminal/tmux-backend.js.map +1 -0
  377. package/dist/infra/claude-terminal/transcript-reader.d.ts +13 -0
  378. package/dist/infra/claude-terminal/transcript-reader.d.ts.map +1 -0
  379. package/dist/infra/claude-terminal/transcript-reader.js +329 -0
  380. package/dist/infra/claude-terminal/transcript-reader.js.map +1 -0
  381. package/dist/infra/claude-terminal/types.d.ts +106 -0
  382. package/dist/infra/claude-terminal/types.d.ts.map +1 -0
  383. package/dist/infra/claude-terminal/types.js +2 -0
  384. package/dist/infra/claude-terminal/types.js.map +1 -0
  385. package/dist/infra/codex/CodexStreamHandler.d.ts +4 -2
  386. package/dist/infra/codex/CodexStreamHandler.d.ts.map +1 -1
  387. package/dist/infra/codex/CodexStreamHandler.js +55 -21
  388. package/dist/infra/codex/CodexStreamHandler.js.map +1 -1
  389. package/dist/infra/codex/client.d.ts +2 -0
  390. package/dist/infra/codex/client.d.ts.map +1 -1
  391. package/dist/infra/codex/client.js +42 -6
  392. package/dist/infra/codex/client.js.map +1 -1
  393. package/dist/infra/config/configNormalizers.d.ts +23 -16
  394. package/dist/infra/config/configNormalizers.d.ts.map +1 -1
  395. package/dist/infra/config/configNormalizers.js +69 -7
  396. package/dist/infra/config/configNormalizers.js.map +1 -1
  397. package/dist/infra/config/env/global-current-env-specs.d.ts.map +1 -1
  398. package/dist/infra/config/env/global-current-env-specs.js +7 -0
  399. package/dist/infra/config/env/global-current-env-specs.js.map +1 -1
  400. package/dist/infra/config/env/project-current-env-specs.d.ts.map +1 -1
  401. package/dist/infra/config/env/project-current-env-specs.js +7 -0
  402. package/dist/infra/config/env/project-current-env-specs.js.map +1 -1
  403. package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
  404. package/dist/infra/config/global/globalConfigCore.js +5 -0
  405. package/dist/infra/config/global/globalConfigCore.js.map +1 -1
  406. package/dist/infra/config/global/globalConfigSerializer.d.ts.map +1 -1
  407. package/dist/infra/config/global/globalConfigSerializer.js +10 -0
  408. package/dist/infra/config/global/globalConfigSerializer.js.map +1 -1
  409. package/dist/infra/config/global/initialization.d.ts +1 -1
  410. package/dist/infra/config/global/initialization.d.ts.map +1 -1
  411. package/dist/infra/config/global/initialization.js +1 -0
  412. package/dist/infra/config/global/initialization.js.map +1 -1
  413. package/dist/infra/config/loaders/qualityGateOverrides.d.ts +3 -2
  414. package/dist/infra/config/loaders/qualityGateOverrides.d.ts.map +1 -1
  415. package/dist/infra/config/loaders/qualityGateOverrides.js +42 -3
  416. package/dist/infra/config/loaders/qualityGateOverrides.js.map +1 -1
  417. package/dist/infra/config/loaders/workflowFileLoader.d.ts.map +1 -1
  418. package/dist/infra/config/loaders/workflowFileLoader.js +2 -2
  419. package/dist/infra/config/loaders/workflowFileLoader.js.map +1 -1
  420. package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts +3 -1
  421. package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts.map +1 -1
  422. package/dist/infra/config/loaders/workflowNormalizationPolicies.js +28 -0
  423. package/dist/infra/config/loaders/workflowNormalizationPolicies.js.map +1 -1
  424. package/dist/infra/config/loaders/workflowParser.d.ts +2 -2
  425. package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
  426. package/dist/infra/config/loaders/workflowParser.js +3 -2
  427. package/dist/infra/config/loaders/workflowParser.js.map +1 -1
  428. package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
  429. package/dist/infra/config/loaders/workflowStepNormalizer.js +2 -1
  430. package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
  431. package/dist/infra/config/observabilityConfig.d.ts +13 -0
  432. package/dist/infra/config/observabilityConfig.d.ts.map +1 -0
  433. package/dist/infra/config/observabilityConfig.js +52 -0
  434. package/dist/infra/config/observabilityConfig.js.map +1 -0
  435. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  436. package/dist/infra/config/project/projectConfig.js +23 -5
  437. package/dist/infra/config/project/projectConfig.js.map +1 -1
  438. package/dist/infra/config/project/projectConfigTransforms.d.ts +5 -1
  439. package/dist/infra/config/project/projectConfigTransforms.d.ts.map +1 -1
  440. package/dist/infra/config/project/projectConfigTransforms.js +8 -0
  441. package/dist/infra/config/project/projectConfigTransforms.js.map +1 -1
  442. package/dist/infra/config/providerOptions.d.ts +8 -2
  443. package/dist/infra/config/providerOptions.d.ts.map +1 -1
  444. package/dist/infra/config/providerOptions.js +49 -1
  445. package/dist/infra/config/providerOptions.js.map +1 -1
  446. package/dist/infra/config/providerOptionsContract.d.ts +3 -3
  447. package/dist/infra/config/providerOptionsContract.d.ts.map +1 -1
  448. package/dist/infra/config/providerOptionsContract.js +14 -0
  449. package/dist/infra/config/providerOptionsContract.js.map +1 -1
  450. package/dist/infra/config/resolveConfigValue.d.ts.map +1 -1
  451. package/dist/infra/config/resolveConfigValue.js +18 -0
  452. package/dist/infra/config/resolveConfigValue.js.map +1 -1
  453. package/dist/infra/config/resolvedConfig.d.ts +2 -1
  454. package/dist/infra/config/resolvedConfig.d.ts.map +1 -1
  455. package/dist/infra/config/traced/tracedConfigSchema.d.ts.map +1 -1
  456. package/dist/infra/config/traced/tracedConfigSchema.js +16 -0
  457. package/dist/infra/config/traced/tracedConfigSchema.js.map +1 -1
  458. package/dist/infra/git/format.d.ts.map +1 -1
  459. package/dist/infra/git/format.js +75 -8
  460. package/dist/infra/git/format.js.map +1 -1
  461. package/dist/infra/git/index.d.ts +1 -1
  462. package/dist/infra/git/index.d.ts.map +1 -1
  463. package/dist/infra/git/types.d.ts +5 -0
  464. package/dist/infra/git/types.d.ts.map +1 -1
  465. package/dist/infra/github/pr.d.ts.map +1 -1
  466. package/dist/infra/github/pr.js +174 -28
  467. package/dist/infra/github/pr.js.map +1 -1
  468. package/dist/infra/observability/otelFoundation.d.ts +6 -0
  469. package/dist/infra/observability/otelFoundation.d.ts.map +1 -0
  470. package/dist/infra/observability/otelFoundation.js +89 -0
  471. package/dist/infra/observability/otelFoundation.js.map +1 -0
  472. package/dist/infra/opencode/client.d.ts.map +1 -1
  473. package/dist/infra/opencode/client.js +19 -15
  474. package/dist/infra/opencode/client.js.map +1 -1
  475. package/dist/infra/providers/claude-terminal.d.ts +6 -0
  476. package/dist/infra/providers/claude-terminal.d.ts.map +1 -0
  477. package/dist/infra/providers/claude-terminal.js +70 -0
  478. package/dist/infra/providers/claude-terminal.js.map +1 -0
  479. package/dist/infra/providers/index.d.ts.map +1 -1
  480. package/dist/infra/providers/index.js +2 -0
  481. package/dist/infra/providers/index.js.map +1 -1
  482. package/dist/infra/providers/provider-capabilities.d.ts +1 -0
  483. package/dist/infra/providers/provider-capabilities.d.ts.map +1 -1
  484. package/dist/infra/providers/provider-capabilities.js +16 -0
  485. package/dist/infra/providers/provider-capabilities.js.map +1 -1
  486. package/dist/infra/rate-limit/detection.d.ts +2 -0
  487. package/dist/infra/rate-limit/detection.d.ts.map +1 -1
  488. package/dist/infra/rate-limit/detection.js +14 -1
  489. package/dist/infra/rate-limit/detection.js.map +1 -1
  490. package/dist/infra/task/clone-base-branch.d.ts +11 -0
  491. package/dist/infra/task/clone-base-branch.d.ts.map +1 -1
  492. package/dist/infra/task/clone-base-branch.js +34 -4
  493. package/dist/infra/task/clone-base-branch.js.map +1 -1
  494. package/dist/infra/task/clone.d.ts +2 -1
  495. package/dist/infra/task/clone.d.ts.map +1 -1
  496. package/dist/infra/task/clone.js +20 -3
  497. package/dist/infra/task/clone.js.map +1 -1
  498. package/dist/infra/task/index.d.ts +1 -1
  499. package/dist/infra/task/index.d.ts.map +1 -1
  500. package/dist/infra/task/index.js +1 -1
  501. package/dist/infra/task/index.js.map +1 -1
  502. package/dist/infra/task/projectLocalTaktSync.d.ts.map +1 -1
  503. package/dist/infra/task/projectLocalTaktSync.js +6 -2
  504. package/dist/infra/task/projectLocalTaktSync.js.map +1 -1
  505. package/dist/infra/task/runner.d.ts +2 -2
  506. package/dist/infra/task/runner.d.ts.map +1 -1
  507. package/dist/infra/task/runner.js +4 -4
  508. package/dist/infra/task/runner.js.map +1 -1
  509. package/dist/infra/task/taskRecordMutations.d.ts +1 -1
  510. package/dist/infra/task/taskRecordMutations.d.ts.map +1 -1
  511. package/dist/infra/task/taskRecordMutations.js +5 -1
  512. package/dist/infra/task/taskRecordMutations.js.map +1 -1
  513. package/dist/infra/task/taskRetryService.d.ts +2 -2
  514. package/dist/infra/task/taskRetryService.d.ts.map +1 -1
  515. package/dist/infra/task/taskRetryService.js +4 -4
  516. package/dist/infra/task/taskRetryService.js.map +1 -1
  517. package/dist/infra/workflow/system/system-enqueue-effect.d.ts +2 -2
  518. package/dist/infra/workflow/system/system-enqueue-effect.d.ts.map +1 -1
  519. package/dist/infra/workflow/system/system-enqueue-effect.js +5 -2
  520. package/dist/infra/workflow/system/system-enqueue-effect.js.map +1 -1
  521. package/dist/shared/constants.d.ts +1 -0
  522. package/dist/shared/constants.d.ts.map +1 -1
  523. package/dist/shared/constants.js +1 -0
  524. package/dist/shared/constants.js.map +1 -1
  525. package/dist/shared/i18n/labels_en.yaml +3 -1
  526. package/dist/shared/i18n/labels_ja.yaml +3 -1
  527. package/dist/shared/prompts/en/score_direct_instruct_system_prompt.md +63 -0
  528. package/dist/shared/prompts/en/score_retry_system_prompt.md +2 -2
  529. package/dist/shared/prompts/ja/score_direct_instruct_system_prompt.md +63 -0
  530. package/dist/shared/prompts/ja/score_retry_system_prompt.md +2 -2
  531. package/dist/shared/types/provider.d.ts +1 -1
  532. package/dist/shared/types/provider.d.ts.map +1 -1
  533. package/dist/shared/utils/debug.d.ts +2 -0
  534. package/dist/shared/utils/debug.d.ts.map +1 -1
  535. package/dist/shared/utils/debug.js +1 -0
  536. package/dist/shared/utils/debug.js.map +1 -1
  537. package/dist/shared/utils/sensitiveText.d.ts +2 -0
  538. package/dist/shared/utils/sensitiveText.d.ts.map +1 -0
  539. package/dist/shared/utils/sensitiveText.js +40 -0
  540. package/dist/shared/utils/sensitiveText.js.map +1 -0
  541. package/package.json +4 -2
@@ -212,6 +212,7 @@ Detect comments that simply restate code behavior in natural language.
212
212
  | REJECT | JSDoc that only paraphrases the function name without adding information |
213
213
  | OK | Explains why a particular implementation was chosen |
214
214
  | OK | Explains the reason behind seemingly unusual behavior |
215
+ | OK | Explains the calculation basis or components of a constant or magic number |
215
216
  | Best | No comment needed — the code itself communicates intent |
216
217
 
217
218
  ```typescript
@@ -238,6 +239,10 @@ if (status === 'interrupted') {
238
239
  // OK - Reason behind seemingly odd behavior
239
240
  // stay can cause loops, but is only used when explicitly specified by the user
240
241
  return step.name;
242
+
243
+ // OK - Calculation basis for a constant
244
+ // paddingTop + paddingBottom + button height
245
+ const footerHeight = 24 + 12 + 48;
241
246
  ```
242
247
 
243
248
  **Direct State Mutation Detection Criteria:**
@@ -374,14 +379,14 @@ Don't overlook compromises made to "just make it work."
374
379
  | Swallowed errors | Empty `catch {}`, `rescue nil` |
375
380
  | Magic numbers | Unexplained `if (status == 3)` |
376
381
 
377
- ## Strict TODO Comment Prohibition
382
+ ## Unfinished Code Detection
378
383
 
379
- "We'll do it later" never gets done. What's not done now is never done.
384
+ Unfinished-code judgment follows the coding policy. In architecture review, check whether TODO/FIXME comments, empty implementations, or stubs are being used as substitutes for required boundaries, authorization, validation, or contract updates.
380
385
 
381
- TODO comments are immediate REJECT.
386
+ TODO/FIXME without an issue number, external blocker, and removal condition is REJECT.
382
387
 
383
388
  ```kotlin
384
- // REJECT - Future-looking TODO
389
+ // REJECT - Authorization check deferred with TODO
385
390
  // TODO: Add authorization check by facility ID
386
391
  fun deleteCustomHoliday(@PathVariable id: String) {
387
392
  deleteCustomHolidayInputPort.execute(input)
@@ -398,12 +403,12 @@ fun deleteCustomHoliday(@PathVariable id: String) {
398
403
  }
399
404
  ```
400
405
 
401
- Only acceptable TODO cases:
406
+ Acceptable TODO/FIXME cases:
402
407
 
403
408
  | Condition | Example | Judgment |
404
409
  |-----------|---------|----------|
405
- | External dependency prevents implementation + Issued | `// TODO(#123): Implement after API key obtained` | Acceptable |
406
- | Technical constraint prevents + Issued | `// TODO(#456): Waiting for library bug fix` | Acceptable |
410
+ | External dependency prevents implementation + issue exists + removal condition documented | `// TODO(#123): Implement after API key obtained` | Acceptable |
411
+ | Technical constraint prevents implementation + issue exists + removal condition documented | `// TODO(#456): Waiting for library bug fix` | Acceptable |
407
412
  | "Future implementation", "add later" | `// TODO: Add validation` | REJECT |
408
413
  | "No time for now" | `// TODO: Refactor` | REJECT |
409
414
 
@@ -429,7 +434,7 @@ When NOT to apply DRY:
429
434
 
430
435
  ## Spec Compliance Verification
431
436
 
432
- Verify that changes comply with the project's documented specifications.
437
+ Contract-change consistency follows the coding policy. In architecture review, check whether changes contradict documented specifications, types, schemas, or config formats.
433
438
 
434
439
  Verification targets:
435
440
 
@@ -460,10 +465,10 @@ REJECT when these patterns are found:
460
465
 
461
466
  ## Call Chain Verification
462
467
 
463
- When new parameters/fields are added, verify not just the changed file but also callers.
468
+ Missing wiring after contract changes follows the coding policy. In architecture review, check whether new parameters or fields actually reach callers, producers, and readers instead of staying local to the changed file.
464
469
 
465
470
  Verification steps:
466
- 1. When finding new optional parameters or interface fields, `Grep` all callers
471
+ 1. When finding new optional parameters or interface fields, search all callers
467
472
  2. Check if all callers pass the new parameter
468
473
  3. If fallback value (`?? default`) exists, verify if fallback is used as intended
469
474
 
@@ -471,7 +476,7 @@ Danger patterns:
471
476
 
472
477
  | Pattern | Problem | Detection |
473
478
  |---------|---------|-----------|
474
- | `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back | grep callers |
479
+ | `options.xxx ?? fallback` where all callers omit `xxx` | Feature implemented but always falls back | Check callers |
475
480
  | Tests set values directly with mocks | Don't go through actual call chain | Check test construction |
476
481
  | `executeXxx()` doesn't receive `options` it uses internally | No route to pass value from above | Check function signature |
477
482
 
@@ -493,12 +498,12 @@ Call chain verification applies not only to "missing wiring" but also to the rev
493
498
 
494
499
  | Pattern | Problem | Detection |
495
500
  |---------|---------|-----------|
496
- | TTY check when all callers require TTY | Unreachable branch remains | grep all callers' preconditions |
501
+ | TTY check when all callers require TTY | Unreachable branch remains | Check all callers' preconditions |
497
502
  | Null guard when callers already check null | Redundant defense | Trace caller constraints |
498
503
  | Runtime type check when TypeScript types constrain | Not trusting type safety | Check TypeScript type constraints |
499
504
 
500
505
  Verification steps:
501
- 1. When finding defensive branches (TTY check, null guard, etc.), grep all callers
506
+ 1. When finding defensive branches (TTY check, null guard, etc.), check all callers
502
507
  2. If all callers already guarantee the condition, guard is unnecessary → REJECT
503
508
  3. If some callers don't guarantee it, keep the guard
504
509
 
@@ -84,6 +84,54 @@ Event Granularity:
84
84
  - Appropriate: `ShippingAddressChanged` → Intent is clear
85
85
  - Too coarse: `OrderModified` → What changed is unclear
86
86
 
87
+ ## Event Evolution
88
+
89
+ Events are persisted contracts. When the current event type changes, old events must still be replayable. Translation of old events belongs in the upcaster / migration layer at the event-store boundary, not in the event type itself or in domain logic.
90
+
91
+ | Criteria | Judgment |
92
+ |----------|----------|
93
+ | Persisted event type or fields changed with no translation path | REJECT |
94
+ | Current event type keeps aliases or compatibility-only properties for old field names | REJECT. Keep history compatibility in upcasters |
95
+ | Aggregate or apply directly interprets old event shapes | REJECT. Convert to current events before replay |
96
+ | Event carries "previous value" only for compatibility | REJECT. Events represent the fact after it happened |
97
+ | Upcaster converts old payloads to the current event meaning | OK |
98
+ | Tests verify old payloads deserialize into current events through the upcaster | OK |
99
+
100
+ Responsibility split for event evolution:
101
+
102
+ | Responsibility | Place |
103
+ |----------------|-------|
104
+ | Current event meaning and fields | Event type |
105
+ | Translation of old payloads | Upcaster / migration layer |
106
+ | State restoration by event replay | Aggregate `apply` |
107
+ | Guarantee that old events can become current events | Upcaster tests |
108
+
109
+ ```kotlin
110
+ // NG - mixing old-field compatibility into the current event type
111
+ data class OrderAssignedEvent(
112
+ val orderId: String,
113
+ @JsonAlias("assigneeId")
114
+ val assigneeIds: List<String>
115
+ )
116
+
117
+ // OK - current event type represents only the current contract
118
+ data class OrderAssignedEvent(
119
+ val orderId: String,
120
+ val assigneeIds: List<String>
121
+ )
122
+ ```
123
+
124
+ ```kotlin
125
+ // OK - convert old payloads to current payloads in the upcaster
126
+ when (eventType) {
127
+ OrderAssignedEvent::class.java.typeName -> {
128
+ event.moveTextFieldToArray("assigneeId", "assigneeIds")
129
+ }
130
+ }
131
+ ```
132
+
133
+ Whether to keep old event classes depends on the framework and operations policy. In general, do not treat old classes as normal domain events; treat old serialized type names and payloads as the upcaster input contract and cover them with tests.
134
+
87
135
  ## Command Handlers
88
136
 
89
137
  | Criteria | Judgment |
@@ -0,0 +1,70 @@
1
+ # Existing System Knowledge
2
+
3
+ ## Existing System Contracts
4
+
5
+ In an existing system, contracts are not limited to explicit APIs. Values and structures observed by users or developers also function as contracts. A small code change can affect production screens, tests, reviews, and maintenance workflows.
6
+
7
+ | Criteria | Judgment |
8
+ |----------|----------|
9
+ | User-visible copy or state changes | Contract change |
10
+ | A value asserted by tests changes | Contract change |
11
+ | Hook or component call shape changes | Contract change |
12
+ | Only file placement or type names change | May still be a maintenance contract change |
13
+ | Closed internal duplication is removed | Internal change if impact is contained |
14
+
15
+ ## Diff Classification
16
+
17
+ Changes in existing systems are classified by causal relationship to the request. The question is whether the request requires the change, not whether the change is in a touched file.
18
+
19
+ | Classification | Decision criteria |
20
+ |----------------|-------------------|
21
+ | Required change | Directly required to satisfy the request |
22
+ | Related change | Required to wire, verify, or keep a required change consistent |
23
+ | Unnecessary change | The request still succeeds without it |
24
+ | Dangerous unnecessary change | The request still succeeds without it and it changes an existing contract |
25
+
26
+ ### Boundary of Related Changes
27
+
28
+ A related change must have an explainable connection to a required change. Proximity, same file, or same responsibility is not enough.
29
+
30
+ | Example | Classification |
31
+ |---------|----------------|
32
+ | Updating callers after adding a required parameter | Related change |
33
+ | Deleting an old store after changing persistence boundary | Related change |
34
+ | Renaming a touched component's Props type by preference | Unnecessary change |
35
+ | Changing a hook return shape to a props object as cleanup | Dangerous unnecessary change |
36
+
37
+ ## Conflicts With General Quality Criteria
38
+
39
+ In maintenance work, general design improvements and framework style are not always the highest priority. Even when the existing structure is imperfect, leaving it unchanged can be lower risk when the request does not require changing it.
40
+
41
+ | Situation | Judgment |
42
+ |-----------|----------|
43
+ | Component extraction would look cleaner but is unnecessary for this fix | Do not change |
44
+ | Renaming or relocating Props types only to match common style | Do not change |
45
+ | The existing structure cannot satisfy the request | Change the minimum necessary scope |
46
+ | The existing structure is the cause of the bug | Change it with reason and impact scope documented |
47
+
48
+ ## Meaning of Comments and Tests
49
+
50
+ Comments and tests may preserve historical constraints or intent. Even comments that look explanatory can act like contracts when they document calculation rationale, platform constraints, or known workaround reasons.
51
+
52
+ | Target | Handling |
53
+ |--------|----------|
54
+ | Calculation rationale comments | Preserve |
55
+ | Constraint or workaround comments | Preserve |
56
+ | Comments contradicting code | Correct |
57
+ | Comments that only restate function names | May consider deleting |
58
+ | Existing test expectations | Treat as existing contracts |
59
+
60
+ ## Maintenance Change Risk
61
+
62
+ For maintenance work, preserving existing behavior is more important than making new code look better. Even a technically good change increases review cost and regression risk when it is outside the request.
63
+
64
+ | Change | Risk |
65
+ |--------|------|
66
+ | Rename | Increases grep, history tracing, and review scope |
67
+ | File move | Changes ownership boundaries, imports, and history tracing |
68
+ | UI contract change | Changes user experience, assistive technology behavior, and tests |
69
+ | Test weakening | Reduces regression detection |
70
+ | Extra abstraction | Adds present understanding cost for future flexibility |
@@ -81,6 +81,18 @@ Third-party UI libraries such as data grids, date pickers, charts, and virtualiz
81
81
  | The real component is rendered with representative props and verified not to crash at screen level | OK |
82
82
  | Prop shapes are chosen by referencing existing in-project usage patterns and the installed version | OK |
83
83
 
84
+ ### Accessibility Contracts
85
+
86
+ Accessible names, roles, and states are UI contracts consumed by assistive technologies and tests. Add appropriate accessibility attributes for new UI elements, but treat changes to existing accessibility contracts like other user-facing copy or behavior changes.
87
+
88
+ | Criteria | Judgment |
89
+ |----------|----------|
90
+ | A new interactive element has no accessible name | REJECT |
91
+ | Checked, expanded, disabled, or similar state is not exposed to assistive technologies | Warning |
92
+ | An existing accessible name is changed without being required by the task | REJECT |
93
+ | Existing accessible names are preserved while missing role/state is added | OK |
94
+ | The reason and impact scope for changing an existing contract are explicit | OK |
95
+
84
96
  ## State Management
85
97
 
86
98
  Child components do not modify their own state. They bubble events to parent, and parent manipulates state.
@@ -117,6 +129,19 @@ Exception (OK for child to have local state):
117
129
  | Inappropriate useEffect dependencies | REJECT |
118
130
  | Initial load tied to unstable Context/Provider function references | REJECT |
119
131
 
132
+ ### Canonical and Derived State
133
+
134
+ State should hold canonical values such as user input, server data, and temporary UI state. Display values, aggregates, selection states, sorted results, and grouped results that can be computed from canonical state are derived values and must not be kept as independent state.
135
+
136
+ | Criteria | Judgment |
137
+ |----------|----------|
138
+ | A value that can always be computed from one state is kept as another state | REJECT |
139
+ | Multiple state fields have invariants that require constant synchronization | REJECT |
140
+ | Display labels, counts, totals, all-selected flags, sorted results, or grouped results are kept as canonical state | REJECT |
141
+ | API sending, persistence, or diffing depends on derived state instead of canonical state | REJECT |
142
+ | Only canonical state is stored, and display, aggregation, and decisions are derived via selectors, render logic, or useMemo | OK |
143
+ | Derived values required by external contracts are generated from canonical state at send or persistence boundaries | OK |
144
+
120
145
  State Placement Guidelines:
121
146
 
122
147
  | State Nature | Recommended Placement |
@@ -120,6 +120,41 @@ When shared state is required, call the hook once in the nearest common parent a
120
120
  | Multiple components call the same stateful hook independently when they need shared state | REJECT |
121
121
  | A hook returns JSX | REJECT |
122
122
 
123
+ ### Props Type Placement and Hook Boundaries
124
+
125
+ Props types that belong to a single component should generally live in the same file as that component. Separate type files are appropriate when the contract is shared by multiple components, is part of a public API, or has independent meaning as a domain model.
126
+
127
+ | Criteria | Judgment |
128
+ |----------|----------|
129
+ | A single component's private Props type is moved to a `types` file without a clear reason | Warning |
130
+ | Props are moved to a separate file only so a hook can import a component's Props type | REJECT |
131
+ | Shared Props/data contracts used by multiple components or public APIs live in a separate file | OK |
132
+ | A hook returns state, events, and derived values while a container maps them to component props | OK |
133
+ | Even when a hook returns a props-like object, the hook does not depend on the component's Props type | OK |
134
+
135
+ ```tsx
136
+ // REJECT - the hook depends on a specific component's Props contract
137
+ import type { DialogProps } from './Dialog'
138
+
139
+ export function useDialog(): { dialogProps: DialogProps } {
140
+ return { dialogProps: { open, onOpenChange } }
141
+ }
142
+
143
+ // OK - component-local Props stay with the component
144
+ interface DialogProps {
145
+ open: boolean
146
+ onOpenChange: (open: boolean) => void
147
+ }
148
+
149
+ export function Dialog(props: DialogProps) {
150
+ return <Modal {...props} />
151
+ }
152
+
153
+ // OK - the hook returns UI state and operations, and the caller passes them to the component
154
+ const dialog = useDialog()
155
+ return <Dialog open={dialog.open} onOpenChange={dialog.setOpen} />
156
+ ```
157
+
123
158
  ## Handling exhaustive-deps
124
159
 
125
160
  `react-hooks/exhaustive-deps` is not a rule to satisfy mechanically. If adding dependencies changes a mount-only effect into a loop, keep the effect mount-only and document why the suppression exists.
@@ -0,0 +1,41 @@
1
+ ```markdown
2
+ # Coding Review
3
+
4
+ ## Result: APPROVE / REJECT
5
+
6
+ ## Summary
7
+ {Summarize the review result in 1-2 sentences}
8
+
9
+ ## Current Iteration Findings (new)
10
+ | # | finding_id | family_tag | Severity | Location | Issue | Impact | Fix Suggestion |
11
+ |---|------------|------------|----------|----------|-------|--------|----------------|
12
+ | 1 | CODE-NEW-src-file-L42 | bug | High / Medium / Low | `src/file.ts:42` | {Issue} | {Impact} | {Fix suggestion} |
13
+
14
+ ## Carry-over Findings (persists)
15
+ | # | finding_id | family_tag | Previous Evidence | Current Evidence | Issue | Fix Suggestion |
16
+ |---|------------|------------|-------------------|------------------|-------|----------------|
17
+ | 1 | CODE-PERSIST-src-file-L77 | regression | `src/file.ts:77` | `src/file.ts:77` | {Unresolved issue} | {Fix suggestion} |
18
+
19
+ ## Resolved Findings (resolved)
20
+ | finding_id | Resolution Evidence |
21
+ |------------|---------------------|
22
+ | CODE-RESOLVED-src-file-L10 | Resolved at `src/file.ts:10` |
23
+
24
+ ## Reopened Findings (reopened)
25
+ | # | finding_id | family_tag | Prior Resolution Evidence | Recurrence Evidence | Issue | Fix Suggestion |
26
+ |---|------------|------------|--------------------------|---------------------|-------|----------------|
27
+ | 1 | CODE-REOPENED-src-file-L55 | bug | `Previously: src/file.ts:10` | `src/file.ts:55` | {Reopened issue} | {Fix suggestion} |
28
+
29
+ ## Verification Evidence
30
+ - Diff review: {What was checked}
31
+ - Build: {Result, or state unverified}
32
+ - Tests: {Result, or state unverified}
33
+
34
+ ## Rejection Gate
35
+ - REJECT only when at least one finding exists in `new`, `persists`, or `reopened`
36
+ - Findings without `finding_id` are invalid
37
+ ```
38
+
39
+ **Cognitive load reduction rules:**
40
+ - APPROVE: Summary only (5 lines or fewer)
41
+ - REJECT: Include only relevant finding rows (30 lines or fewer)
@@ -11,6 +11,7 @@
11
11
  |--------|--------|-------|
12
12
  | Component design | ✅ | - |
13
13
  | State management | ✅ | - |
14
+ | Canonical and derived state | ✅ | - |
14
15
  | Performance | ✅ | - |
15
16
  | Accessibility | ✅ | - |
16
17
  | Type safety | ✅ | - |
@@ -0,0 +1,29 @@
1
+ ```markdown
2
+ # Maintenance Change Scope
3
+
4
+ ## Task
5
+ {One-line task summary}
6
+
7
+ ## Required Changes
8
+ | File | Reason | Requirement Mapping |
9
+ |------|--------|---------------------|
10
+ | {File} | {Reason} | {Mapped requirement} |
11
+
12
+ ## Related Changes
13
+ | File | Reason | Relation to Required Change |
14
+ |------|--------|-----------------------------|
15
+ | {File} | {Reason} | {Relation} |
16
+
17
+ ## Existing Contracts Preserved
18
+ | Contract | Target | Preservation |
19
+ |----------|--------|--------------|
20
+ | {Contract type} | {Target} | {What is preserved} |
21
+
22
+ ## Unnecessary Change Check
23
+ | Check Target | Result | Notes |
24
+ |--------------|--------|-------|
25
+ | Renames or moves | {Present/none} | {Notes} |
26
+ | UI copy or accessibility | {Present/none} | {Notes} |
27
+ | Comment deletion | {Present/none} | {Notes} |
28
+ | Test expectation changes | {Present/none} | {Notes} |
29
+ ```
@@ -0,0 +1,27 @@
1
+ # Coding Reviewer
2
+
3
+ You are a code reviewer for an AI coding agent. You read the task intent and diff, then identify concrete implementation bugs, regressions, security risks, and missing tests.
4
+
5
+ ## Role Boundaries
6
+
7
+ **Do:**
8
+ - Inspect the diff and nearby code
9
+ - Check whether the implementation works for the task intent
10
+ - Detect changes that break existing behavior
11
+ - Detect failures in error handling, edge cases, persistence, concurrency, and external integration
12
+ - Flag clear security or data-protection issues
13
+ - Flag missing tests or verification when they matter
14
+
15
+ **Don't:**
16
+ - Write code yourself
17
+ - Turn unsupported speculation into findings
18
+ - Require preference-only refactors
19
+ - Mix unrelated pre-existing issues into this review
20
+
21
+ ## Behavioral Principles
22
+
23
+ - Ground findings in actual code, the diff, or execution evidence
24
+ - Do not include findings with weak fix justification
25
+ - Report higher-impact issues first
26
+ - State location, impact, and fix direction briefly and concretely
27
+ - Approve when there are no issues
@@ -138,7 +138,7 @@ When any of the following apply:
138
138
  - **Stop loops**: Suggest design revision for 3+ iterations
139
139
  - **Don't forget business value**: Value delivery over technical perfection
140
140
  - **Consider context**: Judge according to project situation
141
- - **Verify non-blocking classifications**: Always verify issues classified as "non-blocking," "existing problems," or "informational" by reviewers. If an issue in a changed file was marked as non-blocking, escalate it to blocking and REJECT
141
+ - **Verify non-blocking classifications**: Always verify issues classified as "non-blocking," "existing problems," or "informational" by reviewers. If an issue in changed code or in an area directly related to correctness, contracts, or wiring of the change was marked as non-blocking, escalate it to blocking and REJECT
142
142
  - **Do not invent command outcomes**: If there is no execution evidence, treat it as unverified
143
143
 
144
144
  ## Execution Evidence
@@ -144,15 +144,74 @@ AI tends to over-deliver. Check for unnecessary additions.
144
144
  | Premature abstraction | Interfaces/abstractions for single implementations |
145
145
  | Over-configuration | Making things configurable that don't need to be |
146
146
  | Gold-plating | "Nice-to-have" additions not asked for |
147
+ | Extra changes disguised as related work | Cleanup, renames, or moves justified only because they are near the edited code |
148
+ | Incidental observable contract changes | Changing values observed by users or tests without being asked |
147
149
  | Unnecessary legacy support | Adding mapping/normalization logic for old values without explicit instruction |
148
150
 
149
151
  The best code is the minimum code that solves the problem.
150
152
 
153
+ ### Extra Changes Disguised as Related Work
154
+
155
+ AI often justifies unnecessary cleanup as related work because it is "in the touched file", "near the same responsibility", or "more idiomatic". Whether a change is related is determined by causal necessity for the request, not by file proximity.
156
+
157
+ | Pattern | Verdict |
158
+ |---------|---------|
159
+ | Renaming, moving, or responsibility changes justified only because the file was touched | REJECT |
160
+ | Changing Props type names, return shapes, or public function names without direct implementation need | REJECT |
161
+ | Deleting existing comments after assuming they are merely explanatory | REJECT |
162
+ | Removing or weakening tested existing behavior just to make tests pass | REJECT |
163
+ | Mixing framework-style improvements without explicit request | REJECT |
164
+ | Adding parameters or updating call sites required to wire the new feature | OK |
165
+ | Deleting old implementation that is genuinely no longer used | OK |
166
+
167
+ Verification approach:
168
+ 1. Obtain the entire cumulative diff from the task's starting point (the base) and list renames, moves, deletions, responsibility changes, and test expectation changes (do not look only at the most recent fix; unrelated changes buried in earlier iterations do not appear in the latest fix report)
169
+ 2. For each change, ask whether the request fails without it
170
+ 3. Do not accept "more readable", "more idiomatic", or "cleanup while here" as necessity
171
+ 4. Revert changes whose necessity cannot be explained before completing the task
172
+
173
+ ### Incidental Observable Contract Changes
174
+
175
+ AI often changes existing contracts under the banner of "improvement", "standardization", or "clarity" even when the task does not require it. UI copy, accessible names, event names, return values, error messages, log formats, public APIs, type names, file placement, comments, and behavior asserted by tests are observable contracts.
176
+
177
+ | Pattern | Verdict |
178
+ |---------|---------|
179
+ | Contract change unrelated to the request | REJECT |
180
+ | Tests are updated only to follow the new contract | REJECT |
181
+ | New contract required by new functionality | OK |
182
+ | Missing information is added while preserving the existing contract | OK |
183
+ | Reason, impact scope, and migration path for the contract change are explicit | OK |
184
+
185
+ Verification approach:
186
+ 1. Inspect changed strings, attributes, event names, return values, error messages, and log formats in the diff
187
+ 2. Check whether each one is directly required by the task
188
+ 3. If test expectations merely follow implementation changes, check whether the original contract can be preserved
189
+ 4. If the contract change is necessary, verify that reason and impact scope are explained
190
+
151
191
  Legacy support criteria:
152
192
  - Unless explicitly instructed to "support legacy values" or "maintain backward compatibility", legacy support is unnecessary
153
193
  - Do not add `.transform()` normalization, `LEGACY_*_MAP` mappings, or `@deprecated` type definitions
154
194
  - Support only new values and keep it simple
155
195
 
196
+ ### Over-Abstracting with Function Objects
197
+
198
+ AI often turns a small number of concrete branches into config arrays, function objects, and generic loops to make the code look "extensible". The problem is not Strategy itself; the problem is hiding differences in data without naming the concept. A Strategy is useful when it names a domain concept and makes the replacement boundary explicit.
199
+
200
+ | Pattern | Example | Verdict |
201
+ |---------|---------|---------|
202
+ | Single-use operation config array | Processing `[{ kind, fields, removedFields }]` in a loop | REJECT |
203
+ | Deletions, side effects, or exception cases are hidden in config objects | Readers must inspect config values to find destructive behavior | REJECT |
204
+ | Function object introduced when each branch is only 1-3 lines | `handlers[type]()` adds indirection only | REJECT |
205
+ | Strategy represents a domain concept and clarifies the implementation boundary | `TaxPolicy`, `PaymentMethod`, `RetryStrategy` | OK |
206
+ | Many branches share the same shape and are expected to grow | Consider a handler map | OK |
207
+
208
+ Verification approach:
209
+ 1. Grep usage sites for added arrays, Maps, Strategies, or function objects
210
+ 2. If used in only one place, check whether explicit branching would be clearer
211
+ 3. Check whether side effects, deleted fields, or compatibility behavior are hidden in config objects
212
+ 4. Prefer `when` / `switch` when branch names sufficiently express domain meaning
213
+ 5. Allow Strategy when naming the concept improves understanding
214
+
156
215
  ## Premature Caching Strategy Introduction
157
216
 
158
217
  AI tends to proactively introduce caching mechanisms to "improve" performance. Do not add caching strategies until explicitly requested.
@@ -14,6 +14,7 @@ Prioritize correctness over speed, and code accuracy over ease of implementation
14
14
  | Boy Scout | Leave touched areas a little better than you found them |
15
15
  | Fail Fast | Detect errors early. Never swallow them |
16
16
  | Project scripts first | Use project-defined scripts for tool execution. Direct invocation is a last resort |
17
+ | State normalization | Do not keep the same fact in multiple states |
17
18
 
18
19
  ## No Fallbacks or Default Arguments
19
20
 
@@ -183,6 +184,41 @@ const handlers = { A: handleA, B: handleB, C: handleC };
183
184
  handlers[type]?.();
184
185
  ```
185
186
 
187
+ ### Do Not Over-Abstract
188
+
189
+ Use abstraction to reduce duplication and real axes of change, and also to name concepts so the code is easier to understand. Turning a few concrete operations into "config objects + function objects + loops" is not abstraction if it only makes domain differences harder to read.
190
+
191
+ | Criteria | Judgment |
192
+ |----------|----------|
193
+ | A small number of branches differs by event type, state, or domain concept | Use explicit `when` / `switch` |
194
+ | The same operation with the same argument shape repeats in 3+ places | Consider abstraction |
195
+ | A config array or function object is used in only one place | REJECT. Prefer explicit branching first |
196
+ | Side effects or removed fields cannot be understood without reading config objects | REJECT |
197
+ | Strategy names a domain concept and makes interchangeable implementations explicit | OK |
198
+ | Branch names read as domain concepts | OK |
199
+
200
+ ```typescript
201
+ // ❌ Over-abstracted - readers must inspect both the config array and loop to see behavior
202
+ const operations = [
203
+ { kind: 'create', normalize: ['owner'], remove: [] },
204
+ { kind: 'revise', normalize: ['owner'], remove: ['legacyOwner'] },
205
+ ]
206
+ for (const operation of operations) {
207
+ applyOperation(record, operation)
208
+ }
209
+
210
+ // ✅ When branch meaning matters, make it explicit
211
+ switch (record.kind) {
212
+ case 'create':
213
+ normalizeOwner(record)
214
+ break
215
+ case 'revise':
216
+ removeLegacyOwner(record)
217
+ normalizeOwner(record)
218
+ break
219
+ }
220
+ ```
221
+
186
222
  ### Keep Abstraction Levels Consistent
187
223
 
188
224
  Within a single function, keep operations at the same granularity. Extract detailed operations into separate functions. Do not mix "what to do" with "how to do it."
@@ -319,11 +355,56 @@ Dependencies and triggers must match the conditions under which the behavior sho
319
355
  | Rerun conditions correspond to URL, filters, explicit refresh actions, or other intended behavior | OK |
320
356
  | Initialization and later refetch triggers are designed separately | OK |
321
357
 
358
+ ## Contract Change Consistency
359
+
360
+ When changing contracts that other code or users depend on — types, interfaces, APIs, config schemas, persistence formats, events, or file formats — keep definitions, producers, consumers, and verification aligned in the same change.
361
+
362
+ | Criteria | Judgment |
363
+ |----------|----------|
364
+ | Only the contract definition is changed, while callers, producers, or readers are not updated | REJECT |
365
+ | A new argument, field, or config value is added but there is no route to pass it to consumers | REJECT |
366
+ | Fields or values not present in the documented schema/config format are used | REJECT |
367
+ | Mocks, fixtures, or test data return shapes that differ from the real contract | REJECT |
368
+ | The contract change and updates to callers, producers, and tests are made in the same change | OK |
369
+
322
370
  ## State Management
323
371
 
324
372
  - Confine state to where it is used
325
373
  - Children do not modify state directly (notify parents via events)
326
374
  - State flow is unidirectional
375
+ - Do not keep derived values that can be computed from canonical state as independent state
376
+ - If multiple fields require constant synchronization, revisit the state model
377
+
378
+ | Criteria | Judgment |
379
+ |----------|----------|
380
+ | A value that can always be computed from one state is kept as another state | REJECT |
381
+ | Multiple states have invariants that must always stay in sync | REJECT |
382
+ | Persistence, sending, or diffing depends on derived values | REJECT |
383
+ | Only canonical state is stored, and derived values are generated at use sites or boundaries | OK |
384
+
385
+ ## Unfinished Code
386
+
387
+ Do not leave TODO/FIXME comments, empty implementations, stubs, or commented-out old implementations as substitutes for completed code. Implement what is needed now and delete what is not needed.
388
+
389
+ | Criteria | Judgment |
390
+ |----------|----------|
391
+ | TODO/FIXME without an issue number, external blocker, and removal condition | REJECT |
392
+ | Authorization, validation, persistence, or error handling is deferred with TODO | REJECT |
393
+ | Empty implementations, `return null`, `pass`, or commented-out old implementations remain | REJECT |
394
+ | An external dependency or known blocker makes implementation impossible now, with issue number and removal condition documented | Acceptable |
395
+ | TODO only for future extension | REJECT |
396
+
397
+ ## Sensitive Information Handling
398
+
399
+ Do not expose passwords, tokens, API keys, session IDs, auth headers, personal information, or other sensitive data in code, logs, error responses, or test output.
400
+
401
+ | Criteria | Judgment |
402
+ |----------|----------|
403
+ | Sensitive data is hardcoded in source code or config files | REJECT |
404
+ | Logs, exceptions, error responses, or test snapshots contain sensitive data | REJECT |
405
+ | Whole requests or DTOs are logged and may include sensitive fields | REJECT |
406
+ | Sensitive fields are explicitly omitted or masked | OK |
407
+ | Debug logs include personal data but are assumed disabled in production | Warning. Verify it cannot leak through misconfiguration |
327
408
 
328
409
  ## Error Handling
329
410
 
@@ -486,10 +567,11 @@ Verification approach:
486
567
  - **Fallbacks are prohibited by default** - Do not write fallbacks using `?? 'unknown'`, `|| 'default'`, or swallowing via `try-catch`. Propagate errors upward. If absolutely necessary, add a comment explaining why
487
568
  - **Explanatory comments** - Express intent through code. Do not write What/How comments
488
569
  - **Unused code** - Do not write "just in case" code
570
+ - **Unfinished code** - Do not leave TODO/FIXME without an issue number, external blocker, and removal condition; do not leave stubs or commented-out old code
489
571
  - **any type** - Do not break type safety
490
572
  - **Direct mutation of objects/arrays** - Create new instances with spread operators
491
573
  - **console.log** - Do not leave in production code
492
- - **Hardcoded secrets**
574
+ - **Sensitive information exposure** - Do not include sensitive data in hardcoded values, logs, error responses, or test output
493
575
  - **Scattered hardcoded contract strings** - File names and config key names must be defined as constants in one place. Scattered literals are prohibited
494
576
  - **Scattered try-catch** - Centralize error handling at the upper layer
495
577
  - **Unsolicited backward compatibility / legacy support** - Not needed unless explicitly instructed
@@ -497,6 +579,6 @@ Verification approach:
497
579
  - **Replaced code surviving after refactoring** - Remove replaced code and exports. Do not keep unless explicitly told to
498
580
  - **Workarounds that bypass safety mechanisms** - If the root fix is correct, no additional bypass is needed
499
581
  - **Direct tool execution bypassing project scripts** - `npx tool` and similar bypass the lockfile, causing version mismatches. Look for project-defined scripts (npm scripts, Makefile, etc.) first. Only consider direct execution when no script exists
500
- - **Missing wiring** - When adding new parameters or fields, grep the entire call chain to verify. If callers do not pass the value, `options.xxx ?? fallback` always uses the fallback
582
+ - **Missing wiring** - When adding new parameters or fields, search the entire call chain to verify. If callers do not pass the value, `options.xxx ?? fallback` always uses the fallback
501
583
  - **Redundant conditionals** - When if/else calls the same function with only argument differences, unify using ternary operators or spread syntax
502
- - **Copy-paste patterns** - Before writing new code, grep for existing implementations of the same kind and follow the existing pattern. Do not introduce your own style
584
+ - **Copy-paste patterns** - Before writing new code, search for existing implementations of the same kind and follow the existing pattern. Do not introduce your own style