@tea-agent/loop-agent 0.43.0-next.17 → 0.43.0-next.3

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 (187) hide show
  1. package/CHANGELOG.md +9 -140
  2. package/dist/application/task-lifecycle/advance.js +4 -17
  3. package/dist/application/task-lifecycle/observe.js +29 -43
  4. package/dist/application/task-lifecycle/plan-transitions.js +4 -5
  5. package/dist/build-stamp.json +3 -3
  6. package/dist/commands/client-recovery.js +55 -20
  7. package/dist/commands/new-task.js +5 -0
  8. package/dist/commands/status.js +57 -0
  9. package/dist/commands/task-contract.js +269 -0
  10. package/dist/executors/dag-pi-executor.js +230 -269
  11. package/dist/executors/pi-executor.js +0 -2
  12. package/dist/executors/pi-sdk-executor.js +39 -77
  13. package/dist/executors/shell-executor.js +2 -3
  14. package/dist/executors/shell-write-guard.js +32 -27
  15. package/dist/shared/pi-context-pressure/extension.js +16 -26
  16. package/dist/shared/pi-retry-settings.js +0 -40
  17. package/dist/shared/prompts.js +26 -0
  18. package/dist/task/config.js +2 -0
  19. package/dist/task/contract/validate-draft.js +106 -0
  20. package/dist/task/goal.js +3 -0
  21. package/dist/task/index.js +12 -0
  22. package/dist/task/lifecycle.js +1 -0
  23. package/dist/task/operator/capabilities.js +6 -0
  24. package/dist/task/operator/envelope.js +2 -0
  25. package/dist/task/operator/index.js +5 -0
  26. package/dist/task/operator/registry.js +2 -0
  27. package/dist/task/operator/types.js +1 -0
  28. package/dist/task/paths.js +1 -0
  29. package/dist/task/source-prepare/source-fidelity-pi.js +2 -2
  30. package/dist/task/source-references.js +23 -48
  31. package/dist/task/source-state.js +1 -0
  32. package/dist/task/subagent-guidance.js +1 -0
  33. package/dist/worker/console/chat/assistant-content.js +2 -23
  34. package/dist/worker/console/chat/explore-tools.js +0 -13
  35. package/dist/worker/console/chat/pi-runtime.js +1182 -221
  36. package/dist/worker/console/chat/routes.js +71 -213
  37. package/dist/worker/console/chat/sdd-data-alignment.js +9 -65
  38. package/dist/worker/console/chat/session-catalog.js +0 -32
  39. package/dist/worker/console/chat/session-store.js +6 -22
  40. package/dist/worker/console/chat/shortcuts.js +0 -6
  41. package/dist/worker/console/chat/sift-bridge.js +1 -0
  42. package/dist/worker/console/chat/tool-preview.js +0 -11
  43. package/dist/worker/console/chat/tools.js +0 -6
  44. package/dist/worker/console/console-update-and-init.js +19 -1
  45. package/dist/worker/console/console-update-runtime.js +20 -5
  46. package/dist/worker/console/index.js +20 -0
  47. package/dist/worker/console/operator-actions.js +1 -13
  48. package/dist/worker/console/routes.js +0 -8
  49. package/dist/worker/console/server.js +29 -11
  50. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-C4NXyedy.js → abnfDiagram-N423BO3Z-hUmM_GRf.js} +1 -1
  51. package/dist/worker/console/static/assets/{arc-NZ3qXvBI.js → arc-Bt-xuieW.js} +1 -1
  52. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-COZSRvml.js → architectureDiagram-T3A2C74G-DTqkL4DJ.js} +1 -1
  53. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-Ck0Gxi9C.js → blockDiagram-VBNYF7ZC-Cy0MNnzV.js} +1 -1
  54. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-BX5HQ4Ox.js → c4Diagram-5PPSVZJV-DDdlT0Pd.js} +1 -1
  55. package/dist/worker/console/static/assets/channel-BpzRnZmU.js +1 -0
  56. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-CoviemSL.js → chunk-2GRJ4B5K-3JawwNZ6.js} +1 -1
  57. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-DbOdOkbZ.js → chunk-2Q5K7J3B-DoTp7Cri.js} +1 -1
  58. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-BsG2pmdQ.js → chunk-5RXB4S5H-CcirhZaS.js} +1 -1
  59. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-DGdvrNm8.js → chunk-5VM5RSS4-VrG21gnP.js} +1 -1
  60. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-BAy7Yd6y.js → chunk-6Q2QTUOP-DDOgIS70.js} +1 -1
  61. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-D9UA7hUb.js → chunk-GF5L2VYU-CBjmgvJ_.js} +1 -1
  62. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-DPz7SZ8V.js → chunk-JWPE2WC7-CCQSht8M.js} +1 -1
  63. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-BmuEOIh7.js → chunk-KBJHAD2P-BpGMkUUV.js} +1 -1
  64. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-CIhBWnd8.js → chunk-RYQCIY6F-DNDT41QL.js} +1 -1
  65. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-CScR6mDD.js → chunk-XXDRQBXY-euXnDFbn.js} +1 -1
  66. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BhlMVqCc.js +1 -0
  67. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BhlMVqCc.js +1 -0
  68. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BjpfWaUr.js → cose-bilkent-JH36ORCC-BJ6NAeql.js} +1 -1
  69. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-BFQohJgT.js → cynefin-VYW2F7L2-F5JKIvIq.js} +1 -1
  70. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-D3gzRJnS.js → cynefinDiagram-MW4NZA55-Cwmkl_Gi.js} +1 -1
  71. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-5eojkhoA.js → dagre-VZM6K2ZE-BmCZ8815.js} +1 -1
  72. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-CpD8LWu_.js → diagram-7IWD3JNH-zWA3hUnX.js} +1 -1
  73. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-B8_4qJ2a.js → diagram-B4RE2ZJO-BzA-888F.js} +1 -1
  74. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-HOsXf0eu.js → diagram-LBJQPF4R-tPNheoch.js} +1 -1
  75. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BqwRwiWP.js → diagram-Q27KOJAE-Cdi7Fyqp.js} +1 -1
  76. package/dist/worker/console/static/assets/{diagram-UB23O5K3-BRVCNZe1.js → diagram-UB23O5K3-DFK9VBf1.js} +1 -1
  77. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Cvb1TgGh.js → ebnfDiagram-BXEA7PRR-xCUr1kpg.js} +1 -1
  78. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-DS0O0qG9.js → erDiagram-JOGREHBK-BANQHY_A.js} +1 -1
  79. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-BHIRvRr3.js → flowDiagram-UKHOOZJN-VHJYEMkP.js} +1 -1
  80. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-DcCJ1JWx.js → ganttDiagram-PKOTCBZU-DiyZQ0C6.js} +1 -1
  81. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-B9ia5ony.js → gitGraphDiagram-DS77QQ5N-CZtIeBBa.js} +1 -1
  82. package/dist/worker/console/static/assets/index-BlN6ytLr.css +1 -0
  83. package/dist/worker/console/static/assets/index-CA-jfWlE.js +449 -0
  84. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-3ogpgegn.js → infoDiagram-6WML65LV-BuSspC0X.js} +1 -1
  85. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-4tgpQ5SL.js → ishikawaDiagram-WSZJBQD7-DRJZyPFy.js} +1 -1
  86. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-DNfgHqFx.js → journeyDiagram-NVQOT4AX-DIfXIVuE.js} +1 -1
  87. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-Dz7ngC8z.js → kanban-definition-27J2QSJJ-CT10_7Lt.js} +1 -1
  88. package/dist/worker/console/static/assets/{linear-DI7Jv62E.js → linear-ufemj74H.js} +1 -1
  89. package/dist/worker/console/static/assets/{mermaid.core-CQA4Nzmo.js → mermaid.core-DEQe8-_m.js} +5 -5
  90. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-CtsMc8Mf.js → mindmap-definition-FAOFIHXS-BRLUrbrC.js} +1 -1
  91. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-ByppE9yH.js → pegDiagram-VL7TDLO6-BgibKtiF.js} +1 -1
  92. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-B5PtgFgt.js → pieDiagram-7S7Q4E2Y-D3eyfdV9.js} +1 -1
  93. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-Cq4p0k2K.js → quadrantDiagram-CIZ2JOQS-DXeTk5Px.js} +1 -1
  94. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-DjfkyljN.js → railroadDiagram-AXF67PYL-BgXdFEe7.js} +1 -1
  95. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-DzynNRSl.js → requirementDiagram-LRYGKXZP-CseC2A7R.js} +1 -1
  96. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-Cj7TCpTJ.js → sankeyDiagram-W5VNT64P-D80PFzfJ.js} +1 -1
  97. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-C73C6ykA.js → sequenceDiagram-SI44F4Z6-BWzHW7LS.js} +1 -1
  98. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-BiNLgN2x.js → sizeCapture-X5ZJPWSS-xWQYTLAn.js} +1 -1
  99. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-UwvjS64-.js → stateDiagram-OKZ733FA-CLxtpZeL.js} +1 -1
  100. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-CiVoq4G-.js +1 -0
  101. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-CC7DH98r.js → swimlanes-SLNWSIFB-DwugtmWV.js} +2 -2
  102. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BkdgdpfR.js +8 -0
  103. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-LSBXTR70.js → timeline-definition-Z64GVDOM-DHEOwHIe.js} +1 -1
  104. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-BAuxWwGP.js → vennDiagram-T6HMQDX7-pmbZKlBK.js} +1 -1
  105. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y--E5_gjZx.js → wardleyDiagram-T6FBY63Y-CivHoM5q.js} +1 -1
  106. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-dJWNmyzF.js → xychartDiagram-ELKLHX3M-BfHIE7o6.js} +1 -1
  107. package/dist/worker/console/static/index.html +2 -2
  108. package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +10 -122
  109. package/dist/worker/console/static-src/operator-chat/compaction-message.js +0 -7
  110. package/dist/worker/console/static-src/operator-chat/pending-user-message.js +15 -35
  111. package/dist/worker/console/static-src/operator-chat/useChatSessions.js +62 -136
  112. package/dist/worker/console/static-src/operator-chat/useChatStream.js +68 -159
  113. package/dist/worker/console/static-src/operator-chat/useChatThread.js +56 -75
  114. package/dist/worker/console/static-src/operator-chat/useComposer.js +78 -206
  115. package/dist/worker/console/workspace-context.js +1 -21
  116. package/dist/worker/observe/static/router.js +1 -1
  117. package/dist/worker/observe/static/styles.css +4 -7
  118. package/dist/worker/observe/static/views/dag-inspector.js +19 -12
  119. package/dist/worker/observe/static/views/dag.js +2 -2
  120. package/dist/worker/scheduler/index.js +25 -0
  121. package/dist/workflows/dag/facts.js +4 -0
  122. package/dist/workflows/dag/frontend-closeout.js +1 -1
  123. package/dist/workflows/dag/frontend-design-policy.js +1 -2
  124. package/dist/workflows/dag/frontend-implementation-contract.js +4 -8
  125. package/dist/workflows/dag/frontend-prewrite-gate.js +3 -3
  126. package/dist/workflows/dag/frontend-repair.js +76 -55
  127. package/dist/workflows/dag/frontend-review-context.js +1 -2
  128. package/dist/workflows/dag/frontend-review-scopes.js +12 -34
  129. package/dist/workflows/dag/frontend-shape-facts.js +2 -12
  130. package/dist/workflows/dag/frontend-verification-trace.js +42 -8
  131. package/dist/workflows/dag/index.js +6 -0
  132. package/dist/workflows/dag/init-hybrid.js +160 -97
  133. package/dist/workflows/dynamic/index.js +7 -0
  134. package/docs/architecture/runtime-boundaries.md +3 -3
  135. package/docs/templates/frontend-implementation-dag.json +8 -9
  136. package/package.json +3 -7
  137. package/skills/frontend-bounded-implement/SKILL.md +3 -4
  138. package/skills/frontend-bounded-implement/references/code-standards.md +3 -3
  139. package/skills/frontend-contract/references/contract-protocol.md +1 -3
  140. package/skills/frontend-design-review/SKILL.md +7 -12
  141. package/skills/frontend-design-review/references/review-checklist.md +7 -7
  142. package/skills/frontend-plan/SKILL.md +0 -19
  143. package/skills/frontend-plan/references/decision-contract.md +19 -26
  144. package/skills/frontend-review/SKILL.md +18 -12
  145. package/skills/frontend-review/references/review-findings.md +43 -24
  146. package/dist/shared/pi-provider-recovery.js +0 -182
  147. package/dist/worker/console/chat/browser-automation.js +0 -363
  148. package/dist/worker/console/chat/browser-policy.js +0 -113
  149. package/dist/worker/console/chat/browser-routes.js +0 -162
  150. package/dist/worker/console/chat/pi-runtime/custom-tools/ask-user-question.js +0 -44
  151. package/dist/worker/console/chat/pi-runtime/custom-tools/browser-tools.js +0 -89
  152. package/dist/worker/console/chat/pi-runtime/custom-tools/explore-tools.js +0 -202
  153. package/dist/worker/console/chat/pi-runtime/custom-tools/goal-tools.js +0 -79
  154. package/dist/worker/console/chat/pi-runtime/custom-tools/operator-tools.js +0 -86
  155. package/dist/worker/console/chat/pi-runtime/custom-tools/todo-write.js +0 -38
  156. package/dist/worker/console/chat/pi-runtime/inspection-types.js +0 -28
  157. package/dist/worker/console/chat/pi-runtime/inspection.js +0 -439
  158. package/dist/worker/console/chat/pi-runtime/sdk-bindings.js +0 -153
  159. package/dist/worker/console/chat/pi-runtime/sdk-session.js +0 -5
  160. package/dist/worker/console/chat/scm-routes.js +0 -217
  161. package/dist/worker/console/chat/scm-service.js +0 -283
  162. package/dist/worker/console/chat/scm-tools.js +0 -111
  163. package/dist/worker/console/chat/session-mode-view.js +0 -49
  164. package/dist/worker/console/chat/session-mode.js +0 -220
  165. package/dist/worker/console/chat/terminal-routes.js +0 -216
  166. package/dist/worker/console/chat/terminal-sessions.js +0 -348
  167. package/dist/worker/console/chat/terminal-tools.js +0 -211
  168. package/dist/worker/console/static/assets/channel-BxdTlb_5.js +0 -1
  169. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-_ByA1Nf8.js +0 -1
  170. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-_ByA1Nf8.js +0 -1
  171. package/dist/worker/console/static/assets/index-B9goN3S5.css +0 -1
  172. package/dist/worker/console/static/assets/index-wXlQohNs.js +0 -469
  173. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-nLgMZ0D3.js +0 -1
  174. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BcYqTady.js +0 -8
  175. package/dist/worker/console/static-src/operator-chat/active-turn-tail.js +0 -10
  176. package/dist/worker/console/static-src/operator-chat/chat-link.js +0 -94
  177. package/dist/worker/console/static-src/operator-chat/chat-scroll-position.js +0 -24
  178. package/dist/worker/console/static-src/operator-chat/composer-session-ledger.js +0 -192
  179. package/dist/worker/console/static-src/operator-chat/process-label.js +0 -41
  180. package/dist/worker/console/static-src/operator-chat/turn-group-equality.js +0 -13
  181. package/dist/worker/console/static-src/operator-chat/turn-process-disclosure.js +0 -10
  182. package/dist/worker/console/static-src/operator-chat/use-searchable-hidden.js +0 -51
  183. package/dist/worker/console/static-src/operator-chat/user-turn-anchor-equality.js +0 -21
  184. package/dist/worker/console/workspace-initialization.js +0 -209
  185. package/dist/workflows/dag/frontend-capacity.js +0 -9
  186. package/dist/workflows/dag/frontend-plan-completeness.js +0 -186
  187. package/dist/workflows/dag/frontend-plan-recovery-policy.js +0 -18
@@ -6,11 +6,10 @@
6
6
  "successCriteria": [
7
7
  "The contract covers every required user-visible behavior, state, and interaction.",
8
8
  "The implementation is admitted only after a concrete, narrow writeSet is reviewed.",
9
- "Build verification are recorded before final review.",
9
+ "Static and behavior verification are recorded before final review.",
10
10
  "The final closeout distinguishes passed, not-run, and residual-risk evidence."
11
11
  ],
12
12
  "globalConstraints": [
13
- "frontend-implementation plans and reviews requirement implementation coverage; npm run build and frozen existing tests are required. Update affected unit tests; do not add a framework when absent. Browser/visual checks may follow later; preserve production Mock isolation.",
14
13
  "This is a self-contained static template: do not generate, import, or merge a DAG from a runtime builder before execution.",
15
14
  "Replace every REPLACE/WITH/... placeholder with concrete repository paths or deterministic commands before execution.",
16
15
  "Do not commit runtime traces under .harness/dag-runs/.",
@@ -39,7 +38,7 @@
39
38
  {
40
39
  "id":"frontend-plan-pi", "depends_on":["frontend-scout-pi"], "complexity":"MED", "executor":"pi", "role":"planner", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
41
40
  "outputContract":"Plan record_* tools for scoped coverage, shared execution groups and UX, one mock endpoint per record, then one successful finalize_plan. Runtime derives canonical JSON and Markdown. No file writes.",
42
- "subtask_prompt":"List the requirement implementation plan: what to change and in which authorized files. Map requirements to the shared static build target. Do not require test plans or behavior correctness evidence; include affected existing test files in implementation steps."
41
+ "subtask_prompt":"Turn the contract and reconnaissance into a minimal implementation plan. Every target file and verification step must be concrete. Preserve existing design and accessibility conventions. If any behavior lacks a verifiable target, report it as blocked instead of guessing."
43
42
  },
44
43
  {
45
44
  "id":"frontend-design-policy-shell", "depends_on":["frontend-plan-pi"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
@@ -50,7 +49,7 @@
50
49
  {
51
50
  "id":"frontend-design-review-pi", "depends_on":["frontend-design-policy-shell"], "complexity":"MED", "executor":"pi", "role":"reviewer", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
52
51
  "outputContract":"record_design_finding for individual findings; approve_design or request_design_changes provides the sole committed terminal. Independently review execution-group member differences. No file writes.",
53
- "subtask_prompt":"Review the approved plan against the frontend contract and design-policy result. Reject missing visible states, interaction behavior, accessibility obligations, or unsupported design claims. Do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
52
+ "subtask_prompt":"Review the approved plan against the frontend contract and design-policy result. Reject missing visible states, interaction behavior, accessibility obligations, or unsupported design claims. Do not edit files."
54
53
  },
55
54
  {
56
55
  "id":"frontend-writer-admission-shell", "depends_on":["frontend-design-review-pi"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
@@ -61,13 +60,13 @@
61
60
  {
62
61
  "id":"frontend-implement-pi", "depends_on":["frontend-writer-admission-shell"], "complexity":"HIGH", "executor":"pi", "role":"implementer", "toolProfile":"write", "writePolicy":"exclusive", "writeSet":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
63
62
  "outputContract":"Implementation summary with changed files, contract coverage, focused checks run, and residual risks.",
64
- "subtask_prompt":"Implement only the admitted frontend changes. Preserve established component, styling, accessibility, and state-management conventions. Cover every approved behavior, state, and interaction, then report changed files and focused verification. Do not broaden writeSet or add undeclared dependencies. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
63
+ "subtask_prompt":"Implement only the admitted frontend changes. Preserve established component, styling, accessibility, and state-management conventions. Cover every approved behavior, state, and interaction, then report changed files and focused verification. Do not broaden writeSet or add undeclared dependencies."
65
64
  },
66
65
  {
67
66
  "id":"frontend-verify-shell", "depends_on":["frontend-implement-pi"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
68
- "outputContract":"Archived build verification output with command exit codes; no worktree writes.",
69
- "subtask_prompt":"Run npm run build and record the actual exit code. Missing or failed builds must fail; never substitute a no-op.",
70
- "shell":{"commands":["npm run build"],"cwd":".","timeoutMs":300000}
67
+ "outputContract":"Archived static and behavior verification output with command exit codes; no worktree writes.",
68
+ "subtask_prompt":"Run the contract-selected deterministic static and behavior verification commands. Record all exit codes. A failed required command is terminal for this DAG run; do not silently substitute a different command.",
69
+ "shell":{"preset":"loop-agent-standard-verify","cwd":".","timeoutMs":300000}
71
70
  },
72
71
  {
73
72
  "id":"frontend-review-context-shell", "depends_on":["frontend-verify-shell"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
@@ -78,7 +77,7 @@
78
77
  {
79
78
  "id":"frontend-review-pi", "depends_on":["frontend-review-context-shell"], "complexity":"MED", "executor":"pi", "role":"reviewer", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
80
79
  "outputContract":"record_review_finding for individual findings; approve_review or request_review_changes provides the sole committed terminal. No file writes.",
81
- "subtask_prompt":"Review the actual diff and archived verification evidence against the frontend contract. Do not treat missing, weak, mock-only, or not-run evidence as passed. Report explicit residual risks; do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
80
+ "subtask_prompt":"Review the actual diff and archived verification evidence against the frontend contract. Do not treat missing, weak, mock-only, or not-run evidence as passed. Report explicit residual risks; do not edit files."
82
81
  },
83
82
  {
84
83
  "id":"frontend-closeout-shell", "depends_on":["frontend-review-pi"], "complexity":"LOW", "executor":"shell", "role":"closeout", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tea-agent/loop-agent",
3
- "version": "0.43.0-next.17",
3
+ "version": "0.43.0-next.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "loop-agent": "bin/loop-agent.js",
@@ -78,12 +78,9 @@
78
78
  "@deepseek-ai/dsh-invariants": "0.1.1-rc.2",
79
79
  "@earendil-works/pi-ai": "0.83.0",
80
80
  "@earendil-works/pi-coding-agent": "0.83.0",
81
- "@xterm/addon-fit": "^0.11.0",
82
- "@xterm/xterm": "^6.0.0",
83
81
  "commander": "^12.1.0",
84
82
  "katex": "^0.16.47",
85
83
  "mermaid": "^11.16.1",
86
- "node-pty": "^1.2.0-beta.15",
87
84
  "rehype-highlight": "^7.0.2",
88
85
  "rehype-katex": "^7.0.1",
89
86
  "remark-math": "^6.0.0",
@@ -93,8 +90,8 @@
93
90
  "zod": "^3.25.76"
94
91
  },
95
92
  "optionalDependencies": {
96
- "@agent-context/sift": "0.0.1-alpha.7",
97
- "@cursor/sdk": "^1.0.7"
93
+ "@cursor/sdk": "^1.0.7",
94
+ "@agent-context/sift": "0.0.1-alpha.7"
98
95
  },
99
96
  "devDependencies": {
100
97
  "@remixicon/react": "^4.9.0",
@@ -102,7 +99,6 @@
102
99
  "@types/react": "^19.1.8",
103
100
  "@types/react-dom": "^19.1.6",
104
101
  "@types/semver": "^7.7.1",
105
- "@vitest/coverage-v8": "^4.1.11",
106
102
  "react": "^19.1.0",
107
103
  "react-dom": "^19.1.0",
108
104
  "react-markdown": "^10.1.0",
@@ -35,16 +35,15 @@ canonical targets and do not authorize additional discovery.
35
35
 
36
36
  ## Implementation Discipline
37
37
 
38
- - Implement the planned requirements without a test-first stage. Update affected existing tests and preserve unrelated files; stay inside
38
+ - Work test-first where behavior changes. Preserve unrelated files and stay inside
39
39
  `allowedPaths` and `writeSet`.
40
40
  - Implement every requirement outcome, interaction, and applicable UI state
41
41
  assigned to the writer. Keep the real request path enabled by default and use
42
42
  only the approved Mock/API strategy.
43
43
  - Do not add dependencies unless the contract approves them. Never relax lint,
44
44
  type, test, or build configuration; never add `.skip` or `.only`.
45
- - Run npm run build and frozen existing-test commands. Update affected unit tests
46
- with changed interfaces/behavior; never delete assertions just to pass. Do not
47
- install a test framework when absent. Browser/visual tests may follow later.
45
+ - Run only the focused checks already frozen by the task. Leave full verification
46
+ to downstream deterministic nodes.
48
47
 
49
48
  ## Completion Summary
50
49
 
@@ -4,16 +4,16 @@ Apply the canonical contract and the conventions visible in target files and the
4
4
  direct local dependencies. Do not reopen task sources, OpenSpec, `ai_workspace`, or
5
5
  unrelated repository areas to discover new rules or redesign approved decisions.
6
6
 
7
- - Implement requirement coverage and preserve existing tests and unrelated behavior.
7
+ - Work test-first when behavior changes and preserve unrelated behavior.
8
8
  - Reuse existing public helpers, APIs, components, tokens, schemas, and test
9
9
  patterns that are directly available from the bounded target surface.
10
10
  - Keep rendering, transitions, validation, request lifecycle, errors, and side
11
- effects clear; defer race and boundary tests to frontend-test.
11
+ effects testable; cover relevant races and boundaries.
12
12
  - Keep real API behavior enabled by default. Mock activation must follow the
13
13
  approved strategy, remain explicit and dev/test-only, and never import test mocks
14
14
  into production code.
15
15
  - Trace fixtures to the approved API/schema evidence and never store secrets.
16
16
  - Do not add unapproved dependencies, relax lint/type/test/build configuration,
17
17
  add `.skip`/`.only`, comment out real requests, or write outside `writeSet`.
18
- - Run build and frozen existing tests, updating affected unit tests; report real status. Downstream shell
18
+ - Run only frozen focused checks and report their real status. Downstream shell
19
19
  verification remains authoritative.
@@ -15,9 +15,7 @@
15
15
 
16
16
  - Register static, behavior, Mock, and real-integration evidence expectations as
17
17
  required, optional, or not-applicable. The classification follows the source and
18
- risk; it is not selected for model convenience. These are source expectations
19
- for implementation and the frontend-test handoff. Build and existing affected
20
- unit tests are required here; do not invent a test framework when absent.
18
+ risk; it is not selected for model convenience.
21
19
  - Register a non-blocking frontend-test handoff for UI-visible or interactive work.
22
20
  - Preserve exact command labels and referenced paths. Do not invent evidence,
23
21
  connector results, APIs, or verification commands.
@@ -28,17 +28,18 @@ The typed terminal is the only authoritative outcome. Do not require or emit a
28
28
  verdict. Requested changes end this run; recovery owns the bounded follow-up.
29
29
 
30
30
  Check every execution group against its members' complete outcomes. Permissions,
31
- thresholds and error paths remain independent ACs with corresponding planned implementation.
32
- The shared static build target checks buildability only.
31
+ thresholds and error paths remain independent ACs; a shared VT must prove them all.
32
+ Constraint/exclusion labels never waive source-required behavior evidence.
33
33
 
34
34
  ## Blocking Conditions
35
35
 
36
- - Any criterion lacks planned implementation; UI states lack reasons; a
36
+ - Any criterion lacks implementation/verification; UI states lack reasons; a
37
37
  dependency lacks permission; confirmed primitives/rules are ignored; design claims
38
38
  lack knowledge-base or required openspec specification evidence; paths cross
39
- write bounds; the frozen npm run build command is missing.
39
+ write bounds; commands are missing/non-deterministic; or
40
+ interaction, responsive, accessibility, data, or failure behavior requires guessing.
40
41
  - `MOCK_STRATEGY: blocked`; missing permitted target paths, endpoint/schema-to-fixture
41
- mapping or dev/test-only activation; a second Mock framework;
42
+ mapping, fixed verification, or dev/test-only activation; a second Mock framework;
42
43
  inline fake data; commented real requests; Mock-on production defaults; test-only
43
44
  production imports; or Mock evidence reported as real integration.
44
45
 
@@ -48,7 +49,7 @@ conflict, or unresolved UI decisions.
48
49
 
49
50
  ## Method And Human-readable Output
50
51
 
51
- Map criteria to planned steps/files/states, audit paths/evidence, classify Blocking
52
+ Map criteria to steps/files/states/checks, audit paths/evidence, classify Blocking
52
53
  or Advisory, and never edit files.
53
54
 
54
55
  ### Spec Evidence Rules
@@ -58,9 +59,3 @@ evidence paths bound in its upstream context. Successful paired reads are the on
58
59
  summaries do not substitute for them. A concise human-readable summary may list
59
60
  checked items and findings, but it is never a control protocol. Each requested
60
61
  change names its criterion/section, gap, and required plan change.
61
-
62
- ## Implementation workflow boundary
63
-
64
- Plan implementation files and affected existing unit tests; require frozen tests
65
- and build to pass. No new framework or separate test plan is required. Additional
66
- browser/visual checks may follow later in frontend-test.
@@ -3,7 +3,7 @@
3
3
  ## Coverage
4
4
 
5
5
  - Route/component, non-goals, assumptions, and unresolved ambiguity are explicit.
6
- - Each acceptance criterion maps to planned steps, files, UI behavior, and states.
6
+ - Each acceptance criterion maps to steps, files, UI behavior, states, and verification.
7
7
  - Success/error/loading/empty/disabled/permission/retry/stale/boundary states are handled or N/A.
8
8
 
9
9
  ## Project Fit
@@ -20,9 +20,9 @@
20
20
 
21
21
  ## Verification
22
22
 
23
- - Require npm run build and the frozen existing-test commands.
24
- - Plan must include affected existing tests; no separate test plan or new framework.
25
- - Existing test failures block completion; browser/visual checks may be deferred.
23
+ - Static/behavior commands are exact, frozen, discoverable, and deterministic.
24
+ - Tests prove changed state and flows at supported levels; browser/visual only when task/gate requires.
25
+ - Missing required verification is a blocker; optional gaps are disclosed risks.
26
26
 
27
27
  ## Mock Safety
28
28
 
@@ -31,13 +31,13 @@
31
31
  - Prefer native mock; browser intercept only for existing e2e; request adapter only for reversible local preview.
32
32
  - Real request stays default; activation is explicit, reversible, local/test-only, and production-off.
33
33
  - Plans use only DAG-frozen shell entrypoints.
34
- - Mock strategies keep production defaults off; Mock behavior tests are deferred.
35
- - `not-needed` records its rationale and preserves any Real Integration Gap.
34
+ - Mock strategies need default-real-path build with Mock off plus Mock-backed behavior evidence.
35
+ - `not-needed` needs real/no-remote evidence, or default-auto skipped-Mock rationale with Real Integration Gap preserved when no project Mock capability exists.
36
36
  - Mock-backed checks prove frontend states only; real integration remains pending until actual backend evidence exists.
37
37
 
38
38
  ## Verdict Matrix
39
39
 
40
- - Request revision for coverage gaps, unsafe scope, unauthorized deps, unresolved required interaction, missing build entrypoint, skipped local specification fallback (`openspec/schemas/`, `openspec/project-specs/`, or `ai_workspace/`), unsafe/missing Mock strategy, or Mock evidence presented as real integration.
40
+ - Request revision for coverage gaps, unsafe scope, unauthorized deps, unresolved required interaction, missing required verification, skipped local specification fallback (`openspec/schemas/`, `openspec/project-specs/`, or `ai_workspace/`), unsafe/missing Mock strategy, or Mock evidence presented as real integration.
41
41
  - Request revision for component selection non-conformance: spec-defined components silently replaced or self-invented without a declared deviation, `uiComponentChoices` missing for UI-visible work, or a `uiComponentChoices` `specReference.path` not cited in the `openspec-citations` block / not actually read.
42
42
  - Knowledge-base unavailable but relevant OpenSpec or `ai_workspace/` rules applied is advisory only.
43
43
  - Optional cleanup that cannot affect acceptance is advisory.
@@ -29,13 +29,6 @@ cite `evidencePath` of an existing file; greenfield is `decision=new`.
29
29
  Bind every file in the Contract-owned `requiredDeliverables` inventory. It records
30
30
  explicit source obligations, not every path mentioned by a requirement.
31
31
 
32
- Large UX work runs in bounded scopes against that shared registry. Complete every
33
- assigned requirement; preserve earlier scopes' shared bindings when correcting an
34
- entry. Ledger previews are incomplete. Use `read_plan_facts` to retrieve full
35
- fields, following `nextOffset` with `expectedRevision` pinned. For oversized
36
- strings use `stringOffset` and follow `nextStringOffset`; restart pagination when
37
- the revision changes. Never submit a truncated preview as a replacement payload.
38
-
39
32
  Cross-slice citations must close in the same session: when a requirement cites a
40
33
  verification target committed in another slice's session, re-commit that target
41
34
  here with the same id and `replace=true` (union backfill) before finalize. A
@@ -44,15 +37,3 @@ here with the same id and `replace=true` (union backfill) before finalize. A
44
37
  The runtime owns protected skeleton fields, path/command validation, materialization,
45
38
  and final schema checks. Finish with one successful `finalize_plan` (correct rejected facts and retry); return no Markdown
46
39
  narrative. Record a genuine evidence gap when frozen facts are insufficient.
47
-
48
- ## Implementation boundary
49
-
50
- Plan actions and files, including affected existing unit tests. Build and frozen
51
- existing tests must pass. No separate test plan or new framework is required.
52
- Browser/visual testing may follow in frontend-test.
53
-
54
- Submit `finalize_plan({implementationSteps: [{requirementIds, action}]})`.
55
- Cover every frozen ID, including constraints/exclusions (what to preserve/avoid).
56
- An action may cover related IDs and must describe changes within approved paths,
57
- not just repeat filenames or AC titles. Fix rejected missing/unknown/blank steps
58
- and retry. Runtime renders AC-linked canonical steps; no test plan is required.
@@ -6,22 +6,24 @@
6
6
  implementation paths and verification target IDs.
7
7
  - Record observable state and interaction behavior, including trigger and expected
8
8
  behavior. IDs and paths alone are not behavioral coverage.
9
- - Use a shared static build target for requirement coverage; build does not prove behavior.
10
- - List affected existing tests in implementation steps and update their assertions.
11
- No separate test plan or per-AC test titles are required; frozen test commands must pass.
9
+ - One behavior target may cover multiple related requirements when one observable
10
+ test behavior proves them together.
11
+ - Every non-static verification target `id` is the stable machine trace token and
12
+ must later appear in a real `describe` / `it` / `test` title. There is no free-form
13
+ `symbol` field.
12
14
  - Static targets are for project-wide commands and are traced by file and command
13
15
  only.
14
16
 
15
- ### Build target mapping
17
+ ### Behavior target shape (canonical example)
16
18
 
17
- Static build targets map requirements to files using the frozen commandId; they
18
- do not prove tested behavior.
19
+ Each behavior target names the requirements it proves and declared UI states it
20
+ exercises. Empty `requirementIds`, or empty `uiStates` when any state/interaction
21
+ is declared, is rejected. Copy state names verbatim; never invent synonyms.
19
22
 
20
23
  ```json
21
24
  {
22
- "id": "VT-BUILD",
23
- "commandId": "<frozen-build-commandId>",
24
- "file": "src/App.tsx",
25
+ "id": "VT-COUNTER-LOCAL-CONSTRAINTS",
26
+ "file": "src/App.test.tsx",
25
27
  "requirementIds": ["AC-FE-001", "AC-FE-005"],
26
28
  "uiStates": ["disabled-minus", "default"]
27
29
  }
@@ -45,7 +47,7 @@ carries behavior, implementation targets, and verification target ids:
45
47
  "applicable": true,
46
48
  "expectedBehavior": "minus button disabled at count 0",
47
49
  "implementationTargets": ["src/components/SmokeCounter.tsx"],
48
- "verificationTargetIds": ["VT-BUILD"]
50
+ "verificationTargetIds": ["VT-COUNTER-LOCAL-CONSTRAINTS"]
49
51
  }
50
52
  ],
51
53
  "interactions": [
@@ -54,7 +56,7 @@ carries behavior, implementation targets, and verification target ids:
54
56
  "trigger": "User clicks refresh",
55
57
  "expectedBehavior": "reloads runs",
56
58
  "implementationTargets": ["src/App.tsx"],
57
- "verificationTargetIds": ["VT-BUILD"]
59
+ "verificationTargetIds": ["VT-SMOKE-COUNTER-BEHAVIOR"]
58
60
  }
59
61
  ]
60
62
  }
@@ -74,7 +76,8 @@ non-static verification target files to the writer writeSet separately.
74
76
  "src/App.tsx"
75
77
  ],
76
78
  "verificationTargetIds": [
77
- "VT-BUILD"
79
+ "VT-SMOKE-COUNTER-BEHAVIOR",
80
+ "VT-COUNTER-LOCAL-CONSTRAINTS"
78
81
  ]
79
82
  }
80
83
  ```
@@ -110,8 +113,9 @@ One component choice may cover many states/interactions via `covers`.
110
113
  `reuse-existing` requires an existing-file `evidencePath`; greenfield uses `new`.
111
114
 
112
115
  For Mock/API, keep the real request path enabled by default. Select only a strategy
113
- allowed by the frozen task capability. Active Mock requires production-default-off activation; Mock tests are deferred. `not-needed` records the reason Mock is unnecessary or skipped and any real-integration gap;
114
- no behavior test evidence is required here.
116
+ allowed by the frozen task capability. Active Mock requires deterministic Mock-backed
117
+ verification and production-default-off activation. `not-needed` requires positive
118
+ real/no-remote evidence or records a real-integration gap.
115
119
 
116
120
  Add dependencies only when authorized. Record unsupported dependency, path, API,
117
121
  design, or verification needs as blocking evidence gaps; never invent a command or
@@ -134,20 +138,9 @@ and checked again by the policy shell.
134
138
  Use `record_plan_group_coverage` for a complete declared execution group with shared
135
139
  targets/VTs; runtime expands to all canonical members. Submit individual coverage
136
140
  for differences. Constraints/exclusions create no invented UI or tests; keep genuine
137
- source expectations and affected existing tests; no new framework is required.
141
+ evidence gaps, and never weaken behavior evidence required by the source.
138
142
 
139
143
  Submit Mock policy with `record_mock_api` and empty endpoints, then one endpoint per
140
144
  `record_mock_endpoint`. Use `replace:true` for revisions, plus `remove:true` to
141
145
  withdraw an endpoint. Use stable finding/fact identities; successful receipts mean
142
146
  durable commits. Resume missing work instead of regenerating full JSON or history.
143
-
144
- ## Implementation steps submission
145
-
146
- Submit `finalize_plan` with `implementationSteps: [{requirementIds, action}]`.
147
- Each action says what to change and where within the approved implementation
148
- paths. Cover every frozen requirement ID, including constraints and exclusions
149
- (state what to preserve or avoid). One action may cover several related IDs.
150
- Do not merely repeat file names or AC titles. Missing, unknown or blank steps
151
- return a correctable receipt; fix the steps and call finalize_plan again.
152
- The runtime renders these into canonical `implementationSteps` strings with AC
153
- references. No test plan or new tests are required by this protocol.
@@ -30,18 +30,24 @@ Requested changes end this run; the recovery controller owns follow-up.
30
30
 
31
31
  ## Review Scope
32
32
 
33
- - Map every requirement to corresponding implementation in the cumulative diff
34
- and bound target files. Report missing implementation or altered requirements.
35
- - Check allowed paths, forbidden paths, approved dependencies and source-bound
36
- design constraints. Preserve production Mock isolation and real-request defaults.
37
- - Inspect build and frozen existing-test results; required commands must pass.
38
- - Check affected existing tests were maintained with changed behavior/interfaces.
39
- Do not require a new framework or separate test plan when absent.
40
- - Broader browser/visual checks may use the frontend-test handoff. Do not defer
41
- failing existing unit tests or weaken assertions to permit approval.
42
- - Build success proves buildability only. Do not report tested behavior or real
43
- integration without actual evidence. Treat shell exit status as authoritative.
44
- - Do not edit files or perform repository-wide rediscovery.
33
+ - Compare intent, contract, plan, diff, and evidence; report altered requirements.
34
+ - Inspect every changed file against allowed, forbidden, and approved write scope.
35
+ - Map criteria to behavior, applicable UI states, tests, and shell evidence.
36
+ - Review state/data flow, validation, async/error behavior, design, responsive/a11y,
37
+ dependencies, and regression risk when applicable.
38
+ - Inspect static, behavior, and available Mock-specific artifacts directly. For Mock
39
+ strategies, compare the endpoint matrix, handler/fixture/adapter and consumer diff;
40
+ require the real request as default, contract-aligned fixtures, production isolation,
41
+ and no false real-integration claim. `not-needed` needs applicable real/no-remote
42
+ evidence, or an explicit default-auto skipped-Mock rationale with the Real
43
+ Integration Gap preserved when no project Mock capability is confirmed.
44
+ - Inspect lint assessment directly. `baseline-debt` requires intact evidence, only
45
+ baseline-matched diagnostics on unchanged files, and none on writer-changed files.
46
+ Report debt, never `lint passed`; `failed`/`unavailable` blocks. Typecheck, build,
47
+ and test still require successful final exits.
48
+ - Evaluate component/design claims against bound evidence; do not replace it with a
49
+ repository-wide search or connector query.
50
+ - Treat shell exit status as authoritative. Do not edit files.
45
51
 
46
52
  ## Evidence And Output
47
53
 
@@ -1,30 +1,49 @@
1
1
  # Frontend Review Findings Guide
2
2
 
3
- ## Scope and severity
3
+ ## Severity
4
4
 
5
- - **Critical/Important**: missing requirement implementation, unauthorized writes
6
- or dependencies, production Mock isolation violation, altered source requirements,
7
- failed/missing npm run build, or a false verification/integration claim.
8
- - **Advisory**: behavior correctness, edge cases, regression concerns and missing
9
- tests. Record these for later frontend-test work; they do not block implementation.
5
+ - **Critical**: blocks primary flow, corrupts data, violates security/privacy, writes forbidden paths, bypasses required verification.
6
+ - **Important**: acceptance/state/validation gap, material convention drift, missing behavior tests, unauthorized dependency, unsafe mock activation/import, mock-contract drift, misleading real-integration claim, or failed/missing required verification.
7
+ - **Minor**: non-blocking maintainability, copy, layout, or cleanup issue.
10
8
 
11
9
  ## Evidence
12
10
 
13
- Cite the bound contract, actual cumulative diff, tight file locations and archived
14
- build result. Never substitute an implementation summary for the diff or invent
15
- verification results. Use only evidence supplied in the canonical review context.
16
-
17
- ## Review sequence
18
-
19
- 1. Establish changed files and authorized write boundaries.
20
- 2. Map each requirement to corresponding implementation.
21
- 3. Check source-bound design constraints, dependency permission and production Mock isolation.
22
- 4. Confirm build and frozen existing tests passed and classify findings within this scope.
23
-
24
- ## Pass rules
25
-
26
- All requirements have corresponding implementation, changes stay authorized,
27
- production Mock safety is preserved, and build plus frozen existing tests passed.
28
- Affected unit tests must reflect changed behavior; do not remove assertions to pass.
29
- No new framework or separate test plan is required when absent.
30
- Behavior and real integration remain unverified unless separate evidence exists.
11
+ - Cite tight file locations, exact commands/results, or named DAG artifacts.
12
+ - Never invent evidence; name the missing check. An implementation summary is not the actual diff.
13
+ - Failed required static/behavior verification is at least Important. Lint may be
14
+ `baseline-debt` only with a valid `frontend-lint-assessment-v1`; this is not a
15
+ passed lint result. A changed-file lint diagnostic, new unmatched diagnostic,
16
+ command drift, missing baseline, timeout, or unparseable output is Important.
17
+ - Treat the design evidence already bound in the canonical review context as the
18
+ source of truth. Do not launch a connector query or repository-wide OpenSpec/
19
+ `ai_workspace` search to replace frozen evidence; label a missing bound evidence
20
+ reference accurately instead.
21
+
22
+ ## Review Sequence
23
+
24
+ 1. Establish changed-file inventory and write boundaries.
25
+ 2. Compare the bound contract with the approved constraints and cumulative diff.
26
+ 3. Map each criterion to code, states, tests, and evidence.
27
+ 4. Inspect interactions, state/data/API behavior, failure paths, and regressions.
28
+ 5. Check mock selection, contract-to-fixture mapping, activation/default path,
29
+ handler/fixture/adapter and consumer diff, verification, production imports, and
30
+ the real-integration gap.
31
+ 6. Check bound design evidence, responsive/a11y behavior, dependencies, and maintenance.
32
+ 7. Classify findings and derive the verdict mechanically.
33
+
34
+ ```text
35
+ - [Critical|Important|Minor] path:line — Problem; impact; required correction; evidence.
36
+ ```
37
+
38
+ ## Pass Rules
39
+
40
+ - No Critical or Important findings remain.
41
+ - Required static and behavior nodes ran and passed.
42
+ - Lint is `passed` or evidence-backed `baseline-debt`; typecheck, build, and test are
43
+ passed. Any debt count and affected unchanged files remain disclosed.
44
+ - Changed files are authorized.
45
+ - Criteria and applicable states have implementation and evidence.
46
+ - Required Mock-backed behavior passed; any generated Mock-specific verification also
47
+ passed; Mock is not enabled by default in production. For default-auto skipped
48
+ Mock, the real request remains default and the Real Integration Gap is preserved.
49
+ - Optional unavailable knowledge/browser/visual/manual checks remain explicit risks.