@tea-agent/loop-agent 0.42.0-next.2 → 0.42.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 (193) hide show
  1. package/CHANGELOG.md +242 -1
  2. package/dist/application/dag/generate-task-dag.js +75 -19
  3. package/dist/application/task-lifecycle/advance.js +24 -5
  4. package/dist/application/task-lifecycle/observe.js +171 -17
  5. package/dist/application/task-lifecycle/plan-transitions.js +42 -7
  6. package/dist/application/task-lifecycle/recommendations.js +13 -2
  7. package/dist/build-stamp.json +3 -3
  8. package/dist/cli/command-definitions.js +7 -0
  9. package/dist/cli/program.js +5 -0
  10. package/dist/commands/client-recovery.js +3 -0
  11. package/dist/commands/dag-follow-up.js +138 -0
  12. package/dist/commands/init.js +27 -1
  13. package/dist/commands/task-advance.js +19 -0
  14. package/dist/executors/dag-pi-executor.js +3784 -231
  15. package/dist/executors/pi-executor.js +15 -4
  16. package/dist/executors/pi-read-budget-policy.js +239 -0
  17. package/dist/executors/shell-executor.js +942 -187
  18. package/dist/executors/shell-write-guard.js +7 -0
  19. package/dist/infrastructure/console/operation-store.js +226 -6
  20. package/dist/shared/dag-failure-category.js +12 -0
  21. package/dist/shared/openspec-spec.js +70 -4
  22. package/dist/shared/operator/capabilities.js +7 -0
  23. package/dist/task/config-types.js +34 -5
  24. package/dist/task/contract/adopt.js +4 -0
  25. package/dist/task/contract/import-revision.js +4 -0
  26. package/dist/task/contract/project.js +3 -0
  27. package/dist/task/contract/schema.js +2 -1
  28. package/dist/task/frontend-project-capability.js +203 -20
  29. package/dist/task/runtime.js +5 -2
  30. package/dist/task/source-prepare/build-draft.js +3 -3
  31. package/dist/task/source-prepare/fragment-inventory.js +15 -9
  32. package/dist/task/source-prepare/prepare.js +89 -1
  33. package/dist/task/source-prepare/semantic-intake.js +6 -2
  34. package/dist/task/source-references.js +22 -1
  35. package/dist/worker/console/chat/chat-ui-policy.js +4 -2
  36. package/dist/worker/console/chat/pi-runtime.js +173 -7
  37. package/dist/worker/console/chat/repo-browser.js +10 -3
  38. package/dist/worker/console/chat/routes.js +30 -19
  39. package/dist/worker/console/chat/session-store.js +117 -70
  40. package/dist/worker/console/chat/shortcuts.js +1 -1
  41. package/dist/worker/console/chat/turn-process.js +111 -56
  42. package/dist/worker/console/frontend-human-decision-adapter.js +19 -0
  43. package/dist/worker/console/frontend-split-operation-adapter.js +20 -0
  44. package/dist/worker/console/index.js +3 -0
  45. package/dist/worker/console/operator-actions.js +169 -7
  46. package/dist/worker/console/server.js +3 -0
  47. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DZZ8m3PO.js → abnfDiagram-N423BO3Z-CeznJ4Iw.js} +1 -1
  48. package/dist/worker/console/static/assets/{arc-D6PvaVd-.js → arc-B4u9u7SX.js} +1 -1
  49. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-B_OTOiI8.js → architectureDiagram-T3A2C74G-oghpT81p.js} +1 -1
  50. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-Bv6rqHBg.js → blockDiagram-VBNYF7ZC-BPJ5Kvcj.js} +1 -1
  51. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-B8eHr0oz.js → c4Diagram-5PPSVZJV-CoIu69pd.js} +1 -1
  52. package/dist/worker/console/static/assets/channel-DmIXqJ6B.js +1 -0
  53. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-DYwR0im2.js → chunk-2GRJ4B5K-DtgiAsSc.js} +1 -1
  54. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-D2WPGqXt.js → chunk-2Q5K7J3B-YSu_EVSD.js} +1 -1
  55. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-CQISJ_I7.js → chunk-5RXB4S5H-DaRO-NB6.js} +1 -1
  56. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-C0o2Du1e.js → chunk-5VM5RSS4-Dh0ZKiGA.js} +1 -1
  57. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-4f8kr-U7.js → chunk-6Q2QTUOP-DOrvbR-H.js} +1 -1
  58. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-D_OWvXzX.js → chunk-GF5L2VYU-C3b22LN2.js} +1 -1
  59. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-CasdPz5X.js → chunk-JWPE2WC7-CXlqO8l6.js} +1 -1
  60. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-Cj8lRrla.js → chunk-KBJHAD2P-BblTBrDu.js} +1 -1
  61. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-CUvD1FSd.js → chunk-RYQCIY6F-DswqPALe.js} +1 -1
  62. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-CqLw_eqB.js → chunk-XXDRQBXY-CfTwVOlc.js} +1 -1
  63. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-MFV5Qxb5.js +1 -0
  64. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-MFV5Qxb5.js +1 -0
  65. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-ku-WqJPx.js → cose-bilkent-JH36ORCC-bLD8jVFo.js} +1 -1
  66. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-Bq_PYDhl.js → cynefin-VYW2F7L2-BvoG1fh5.js} +1 -1
  67. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-BiGZV641.js → cynefinDiagram-MW4NZA55-DEPAdJu3.js} +1 -1
  68. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-C4JRlglF.js → dagre-VZM6K2ZE-DmrNvBLy.js} +1 -1
  69. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-B0dNeWYG.js → diagram-7IWD3JNH-CdwzIwvs.js} +1 -1
  70. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-Cj35YvYM.js → diagram-B4RE2ZJO-CJ3hj-md.js} +1 -1
  71. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-uzQoJ2-8.js → diagram-LBJQPF4R-C6YJT2a4.js} +1 -1
  72. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-D1a-Buoz.js → diagram-Q27KOJAE-C_LPfjhX.js} +1 -1
  73. package/dist/worker/console/static/assets/{diagram-UB23O5K3-XjRrLRSs.js → diagram-UB23O5K3-xvsSb5Ie.js} +1 -1
  74. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Da_O24cW.js → ebnfDiagram-BXEA7PRR-Rxp2tKcD.js} +1 -1
  75. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-BLJ8jrYU.js → erDiagram-JOGREHBK-DRyLYmZh.js} +1 -1
  76. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-B9GrLjM0.js → flowDiagram-UKHOOZJN-TLSU_D2B.js} +1 -1
  77. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-CeJ0TqiK.js → ganttDiagram-PKOTCBZU-DGqeTvHC.js} +1 -1
  78. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-Bm2eNNFX.js → gitGraphDiagram-DS77QQ5N-BZxyH2wh.js} +1 -1
  79. package/dist/worker/console/static/assets/index-C8V8K9b4.js +451 -0
  80. package/dist/worker/console/static/assets/index-Cnf_KxTQ.css +1 -0
  81. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-DB26i3d8.js → infoDiagram-6WML65LV-BsYtzx01.js} +1 -1
  82. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BOGRyeZT.js → ishikawaDiagram-WSZJBQD7-Qr-ezGv-.js} +1 -1
  83. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-CZRoBO_6.js → journeyDiagram-NVQOT4AX-DYbB3ibo.js} +1 -1
  84. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-qlWhJyoB.js → kanban-definition-27J2QSJJ-BHJHewZO.js} +1 -1
  85. package/dist/worker/console/static/assets/{linear-CfUiDDB3.js → linear-CmPIPmCG.js} +1 -1
  86. package/dist/worker/console/static/assets/{mermaid.core-BQe6fpqj.js → mermaid.core-F--C1uV0.js} +5 -5
  87. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-zFzWHw64.js → mindmap-definition-FAOFIHXS-YTXfL1st.js} +1 -1
  88. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-DFGUqjZO.js → pegDiagram-VL7TDLO6-DdDMYXP9.js} +1 -1
  89. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BB5i0l8Z.js → pieDiagram-7S7Q4E2Y-C3nH4KVd.js} +1 -1
  90. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-obbVZ_X5.js → quadrantDiagram-CIZ2JOQS-kXyxjG7Y.js} +1 -1
  91. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-BwdaNzc1.js → railroadDiagram-AXF67PYL-KNzbl-7w.js} +1 -1
  92. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-CkTJaugh.js → requirementDiagram-LRYGKXZP-CSwI6dG0.js} +1 -1
  93. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-BwJ-hIgq.js → sankeyDiagram-W5VNT64P-Bl1AyuXy.js} +1 -1
  94. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-BzSgmm7w.js → sequenceDiagram-SI44F4Z6-2y4EmXQa.js} +1 -1
  95. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-Bn3oj5Q1.js → sizeCapture-X5ZJPWSS-E8v8YrMg.js} +1 -1
  96. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-dxhGtL8K.js → stateDiagram-OKZ733FA-eGGlR856.js} +1 -1
  97. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-B8e4J3at.js +1 -0
  98. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-BLpEInya.js → swimlanes-SLNWSIFB-B7g7xc07.js} +2 -2
  99. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Do88I1Nb.js +8 -0
  100. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-ChJGYcXy.js → timeline-definition-Z64GVDOM-DR3VCHBG.js} +1 -1
  101. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-DK-qjRer.js → vennDiagram-T6HMQDX7-LUvapZIy.js} +1 -1
  102. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-3qeaWAg-.js → wardleyDiagram-T6FBY63Y-C7GDcaXq.js} +1 -1
  103. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-CootlyP9.js → xychartDiagram-ELKLHX3M-CbNAqoGK.js} +1 -1
  104. package/dist/worker/console/static/index.html +2 -2
  105. package/dist/worker/console/static-src/active-run-badge.js +17 -0
  106. package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +19 -8
  107. package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +15 -7
  108. package/dist/worker/console/workspace-context.js +111 -1
  109. package/dist/worker/materialize/frontend-split-task-materializer.js +72 -0
  110. package/dist/worker/observe/static/dag-node-purpose.js +5 -0
  111. package/dist/workflows/dag/contract-validator-registrations.js +1 -2
  112. package/dist/workflows/dag/dag-retry-schema.js +138 -0
  113. package/dist/workflows/dag/frontend-closeout.js +221 -0
  114. package/dist/workflows/dag/frontend-design-policy.js +400 -0
  115. package/dist/workflows/dag/frontend-human-decision.js +182 -0
  116. package/dist/workflows/dag/frontend-implementation-contract.js +907 -162
  117. package/dist/workflows/dag/frontend-plan-render.js +2 -1
  118. package/dist/workflows/dag/frontend-prewrite-gate.js +255 -349
  119. package/dist/workflows/dag/frontend-provider-capability-matrix.js +159 -0
  120. package/dist/workflows/dag/frontend-recovery-capsule.js +455 -0
  121. package/dist/workflows/dag/frontend-recovery-controller.js +202 -0
  122. package/dist/workflows/dag/frontend-recovery-lineage.js +178 -0
  123. package/dist/workflows/dag/frontend-recovery-plan.js +17 -10
  124. package/dist/workflows/dag/frontend-recovery-run.js +33 -20
  125. package/dist/workflows/dag/frontend-repair.js +1 -432
  126. package/dist/workflows/dag/frontend-review-context.js +261 -15
  127. package/dist/workflows/dag/frontend-review-findings.js +270 -0
  128. package/dist/workflows/dag/frontend-shadow-dual-write.js +914 -0
  129. package/dist/workflows/dag/frontend-shape-capsule-store.js +191 -0
  130. package/dist/workflows/dag/frontend-shape-facts.js +419 -0
  131. package/dist/workflows/dag/frontend-shape.js +435 -0
  132. package/dist/workflows/dag/frontend-source-fidelity-ledger.js +108 -0
  133. package/dist/workflows/dag/frontend-split-application-service.js +203 -0
  134. package/dist/workflows/dag/frontend-split-orchestrator.js +899 -0
  135. package/dist/workflows/dag/frontend-typed-event-store.js +452 -0
  136. package/dist/workflows/dag/frontend-typed-event-transaction.js +180 -0
  137. package/dist/workflows/dag/frontend-verification-trace.js +249 -24
  138. package/dist/workflows/dag/frontend-worktree-diff.js +250 -17
  139. package/dist/workflows/dag/frontend-writer-admission.js +285 -0
  140. package/dist/workflows/dag/frontend-writer-status.js +256 -0
  141. package/dist/workflows/dag/init-hybrid.js +677 -492
  142. package/dist/workflows/dag/interrupt-request.js +7 -0
  143. package/dist/workflows/dag/node-execution.js +732 -4
  144. package/dist/workflows/dag/prompt.js +34 -1
  145. package/dist/workflows/dag/recovery-lease.js +80 -0
  146. package/dist/workflows/dag/report.js +37 -1
  147. package/dist/workflows/dag/rerun-feedback.js +256 -1
  148. package/dist/workflows/dag/rerun-plan.js +17 -6
  149. package/dist/workflows/dag/rerun-run.js +23 -0
  150. package/dist/workflows/dag/rerun-task.js +29 -0
  151. package/dist/workflows/dag/retry-policy.js +214 -104
  152. package/dist/workflows/dag/runner.js +433 -126
  153. package/dist/workflows/dag/scheduler.js +114 -16
  154. package/dist/workflows/dag/types.js +239 -12
  155. package/dist/workflows/dag/validate.js +28 -12
  156. package/docs/examples/README.md +5 -0
  157. package/docs/init-surface.manifest.json +30 -12
  158. package/docs/skills/vetted-skill-registry.md +4 -2
  159. package/docs/templates/README.md +2 -0
  160. package/docs/templates/agent-dag-report.schema.json +8 -2
  161. package/docs/templates/agent-dag.schema.json +1 -1
  162. package/docs/templates/frontend-implementation-contract.schema.json +4 -1
  163. package/docs/templates/frontend-implementation-dag.json +89 -0
  164. package/docs/templates/spec-registry.schema.json +45 -0
  165. package/harness.json +1 -1
  166. package/package.json +1 -1
  167. package/skills/frontend-bounded-implement/SKILL.md +15 -14
  168. package/skills/frontend-bounded-implement/references/code-standards.md +19 -0
  169. package/skills/frontend-contract/SKILL.md +23 -0
  170. package/skills/frontend-contract/references/contract-protocol.md +34 -0
  171. package/skills/frontend-design-review/SKILL.md +22 -41
  172. package/skills/frontend-plan/SKILL.md +26 -0
  173. package/skills/frontend-plan/references/decision-contract.md +37 -0
  174. package/skills/frontend-plan/references/design-decisions.md +17 -0
  175. package/skills/frontend-review/SKILL.md +20 -15
  176. package/skills/frontend-review/references/review-findings.md +6 -7
  177. package/skills/frontend-scout/SKILL.md +25 -0
  178. package/skills/frontend-scout/references/design-evidence.md +16 -0
  179. package/skills/frontend-scout/references/scout-evidence.md +23 -0
  180. package/skills/frontend-verification/SKILL.md +1 -1
  181. package/skills/loop-agent/references/command-reference.md +1 -0
  182. package/skills/loop-agent/references/hybrid-dag.md +2 -2
  183. package/dist/worker/console/static/assets/channel-BU5gOilw.js +0 -1
  184. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DIzKJGHr.js +0 -1
  185. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DIzKJGHr.js +0 -1
  186. package/dist/worker/console/static/assets/index-H9rFJiGL.css +0 -1
  187. package/dist/worker/console/static/assets/index-xwu9GxEc.js +0 -451
  188. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Cld2qK9v.js +0 -1
  189. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-TIHpiT7w.js +0 -8
  190. package/skills/frontend-implementation/SKILL.md +0 -52
  191. package/skills/frontend-implementation/references/code-standards.md +0 -33
  192. package/skills/frontend-implementation/references/design-spec.md +0 -56
  193. package/skills/frontend-implementation/references/node-contracts.md +0 -31
@@ -34,6 +34,7 @@
34
34
  "docs/templates/worker-dogfood-setup.md",
35
35
  "docs/templates/worker-dogfood-evidence.md",
36
36
  "docs/templates/harness.schema.json",
37
+ "docs/templates/spec-registry.schema.json",
37
38
  "docs/templates/interactive-ui-round2-experiment.md",
38
39
  "docs/templates/product-line/README.md",
39
40
  "docs/templates/product-line/AGENTS.md",
@@ -77,11 +78,16 @@
77
78
  "skills/webapp-testing/SKILL.md",
78
79
  "skills/playwright-cli/SKILL.md",
79
80
  "skills/playwright-cli-case-generator/SKILL.md",
80
- "skills/frontend-implementation/SKILL.md",
81
- "skills/frontend-implementation/references/node-contracts.md",
82
- "skills/frontend-implementation/references/design-spec.md",
83
- "skills/frontend-implementation/references/code-standards.md",
81
+ "skills/frontend-contract/SKILL.md",
82
+ "skills/frontend-contract/references/contract-protocol.md",
83
+ "skills/frontend-scout/SKILL.md",
84
+ "skills/frontend-scout/references/scout-evidence.md",
85
+ "skills/frontend-scout/references/design-evidence.md",
86
+ "skills/frontend-plan/SKILL.md",
87
+ "skills/frontend-plan/references/decision-contract.md",
88
+ "skills/frontend-plan/references/design-decisions.md",
84
89
  "skills/frontend-bounded-implement/SKILL.md",
90
+ "skills/frontend-bounded-implement/references/code-standards.md",
85
91
  "skills/frontend-design-review/SKILL.md",
86
92
  "skills/frontend-design-review/references/review-checklist.md",
87
93
  "skills/frontend-review/SKILL.md",
@@ -103,6 +109,7 @@
103
109
  "docs/feature-workflow.md",
104
110
  "docs/verification-matrix.md",
105
111
  "docs/loop-agent-harness.md",
112
+ "docs/spec-registry.json",
106
113
  "docs/harness-methodology-tdd.md",
107
114
  "docs/harness-methodology-verification.md",
108
115
  "docs/harness-methodology-debugging.md",
@@ -157,11 +164,16 @@
157
164
  ".agents/skills/webapp-testing/SKILL.md",
158
165
  ".agents/skills/playwright-cli/SKILL.md",
159
166
  ".agents/skills/playwright-cli-case-generator/SKILL.md",
160
- ".agents/skills/frontend-implementation/SKILL.md",
161
- ".agents/skills/frontend-implementation/references/node-contracts.md",
162
- ".agents/skills/frontend-implementation/references/design-spec.md",
163
- ".agents/skills/frontend-implementation/references/code-standards.md",
167
+ ".agents/skills/frontend-contract/SKILL.md",
168
+ ".agents/skills/frontend-contract/references/contract-protocol.md",
169
+ ".agents/skills/frontend-scout/SKILL.md",
170
+ ".agents/skills/frontend-scout/references/scout-evidence.md",
171
+ ".agents/skills/frontend-scout/references/design-evidence.md",
172
+ ".agents/skills/frontend-plan/SKILL.md",
173
+ ".agents/skills/frontend-plan/references/decision-contract.md",
174
+ ".agents/skills/frontend-plan/references/design-decisions.md",
164
175
  ".agents/skills/frontend-bounded-implement/SKILL.md",
176
+ ".agents/skills/frontend-bounded-implement/references/code-standards.md",
165
177
  ".agents/skills/frontend-design-review/SKILL.md",
166
178
  ".agents/skills/frontend-design-review/references/review-checklist.md",
167
179
  ".agents/skills/frontend-review/SKILL.md",
@@ -178,6 +190,7 @@
178
190
  ".pi/settings.json"
179
191
  ],
180
192
  "initSurface": {
193
+ "docs/spec-registry.json": "generated",
181
194
  "README.md": "managed-block",
182
195
  "AGENTS.md": "managed-block",
183
196
  ".gitignore": "managed-block",
@@ -242,11 +255,16 @@
242
255
  ".agents/skills/webapp-testing/SKILL.md": "copied",
243
256
  ".agents/skills/playwright-cli/SKILL.md": "copied",
244
257
  ".agents/skills/playwright-cli-case-generator/SKILL.md": "copied",
245
- ".agents/skills/frontend-implementation/SKILL.md": "copied",
246
- ".agents/skills/frontend-implementation/references/node-contracts.md": "copied",
247
- ".agents/skills/frontend-implementation/references/design-spec.md": "copied",
248
- ".agents/skills/frontend-implementation/references/code-standards.md": "copied",
258
+ ".agents/skills/frontend-contract/SKILL.md": "copied",
259
+ ".agents/skills/frontend-contract/references/contract-protocol.md": "copied",
260
+ ".agents/skills/frontend-scout/SKILL.md": "copied",
261
+ ".agents/skills/frontend-scout/references/scout-evidence.md": "copied",
262
+ ".agents/skills/frontend-scout/references/design-evidence.md": "copied",
263
+ ".agents/skills/frontend-plan/SKILL.md": "copied",
264
+ ".agents/skills/frontend-plan/references/decision-contract.md": "copied",
265
+ ".agents/skills/frontend-plan/references/design-decisions.md": "copied",
249
266
  ".agents/skills/frontend-bounded-implement/SKILL.md": "copied",
267
+ ".agents/skills/frontend-bounded-implement/references/code-standards.md": "copied",
250
268
  ".agents/skills/frontend-design-review/SKILL.md": "copied",
251
269
  ".agents/skills/frontend-design-review/references/review-checklist.md": "copied",
252
270
  ".agents/skills/frontend-review/SKILL.md": "copied",
@@ -16,11 +16,13 @@ The entries below are local wrappers or existing local skills. They are not whol
16
16
  | `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
17
17
  | `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
18
18
  | `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
19
- | `frontend-implementation` | local existing (frontend hybrid DAG) | `skills/frontend-implementation/SKILL.md` | frontend plan / contract / scout / mock nodes (spec-level `skillsByRole`) | frontend-implementation DAG only | Required refs node-contracts / design-spec / code-standards; injected by `init-hybrid.ts` spec generation and `src/adapters/loop-agent.ts`; projected via init-surface manifest. Not in `DEFAULT_SKILLS_BY_ROLE`. |
19
+ | `frontend-contract` | local frontend hybrid DAG contract skill | `skills/frontend-contract/SKILL.md` | `frontend-contract-pi` only | frontend-implementation DAG only | Required contract-protocol ref stays complete under the default runtime budget; does not inject design or implementation guidance. |
20
+ | `frontend-scout` | local frontend hybrid DAG scouting skill | `skills/frontend-scout/SKILL.md` | `frontend-scout-pi` only | frontend-implementation DAG only | Required target-surface and design-evidence refs are bounded and complete; discovery does not leak into Plan. |
21
+ | `frontend-plan` | local frontend hybrid DAG planning skill | `skills/frontend-plan/SKILL.md` | `frontend-plan-pi` and legacy Mock assessment only | frontend-implementation DAG only | Required decision/design refs carry stable trace IDs, Mock/data and dependency decisions without the full lifecycle contract. |
20
22
  | `frontend-review` | local existing (frontend hybrid DAG) | `skills/frontend-review/SKILL.md` | reviewer (frontend review nodes, spec-level) | frontend-implementation / repair DAGs | Consumed by `init-hybrid.ts` / `frontend-repair.ts` / `shell-executor.ts`; required ref review-findings (maxChars 2800). |
21
23
  | `frontend-verification` | local existing (frontend hybrid DAG) | `skills/frontend-verification/SKILL.md` | verifier / closeout (frontend evidence, spec-level) | frontend DAG closeout | Consumed by `shell-executor.ts` / `frontend-repair.ts` / `frontend-review-context.ts`; required ref verification-checklist. |
22
24
  | `frontend-design-review` | local existing (frontend hybrid DAG) | `skills/frontend-design-review/SKILL.md` | design-gate reviewer (before any writer) | frontend-implementation DAG design gate | Injected by `init-hybrid.ts`; runs before the prewrite gate authorizes writers; required ref review-checklist. |
23
- | `frontend-bounded-implement` | local existing (frontend hybrid DAG) | `skills/frontend-bounded-implement/SKILL.md` | implementer (writer nodes, spec-level) | frontend writers after canonical contract gate | Injected by `init-hybrid.ts`; writers run only after the canonical contract gate accepts and only inside the frozen writeSet (ADR 0015/0016 discipline). |
25
+ | `frontend-bounded-implement` | local existing (frontend hybrid DAG) | `skills/frontend-bounded-implement/SKILL.md` | implementer (writer nodes, spec-level) | frontend writers after canonical contract gate | Injected by `init-hybrid.ts`; its required bounded code-standards ref applies only inside canonical targets and does not authorize OpenSpec/source rediscovery. |
24
26
  | `grill-with-docs` | local operator skill adapted from domain grilling + ADR/glossary discipline | `skills/grill-with-docs/SKILL.md` | explicit interactive operator only | never a default DAG role | Resolves decisions via `harness.json.governanceRoot`; required refs `context-format.md` / `adr-format.md`; respects writeSet; not in `DEFAULT_SKILLS_BY_ROLE`. |
25
27
  | `grill-me` | local interview question engine wrapper | `skills/grill-me/SKILL.md` | interview runtime dependency (not a DAG role) | never a default DAG role | Question engine lives in `src/worker/console/interview/grill-me.ts` (Console interview / operator-actions); intentionally NOT projected by init-surface manifest — runs in this repo's Console only. |
26
28
  | `analyze-product-requirements` | local org-internal Product Analysis V4 skill | `skills/analyze-product-requirements/SKILL.md` | source-prepare dependency (not a DAG role) | never a default DAG role | Loaded by `src/task/source-prepare/prepare.ts` during 任务源 preparation; IRON-LAW freeze semantics on `product-analysis.md`; intentionally NOT projected by init-surface manifest. |
@@ -38,6 +38,7 @@
38
38
 
39
39
  - `frontend-task-requirement.md`、`frontend-task-constraints.md`、`frontend-design-contract.md` — 前端任务输入与设计合同。
40
40
  - `frontend-implementation-contract.schema.json` — 前端实现合同 schema(sourceBinding v2 ledger 字段 all-or-none:任一出现则四项齐全,禁止 v1+optional 冒充 v2)。`requirements[].sourceRefs[].items` 使用合法 `$ref: #/$defs/path`(相对路径、无 `..` 逃逸、无反斜杠),模板 JSON 无非法键,运行时加载器可直接编译(AC-003)。
41
+ - `frontend-implementation-dag.json` — 自包含的前端实现 DAG 模板:契约 → 侦察 → 计划 → 设计策略/评审 → writer 准入 → 有界写入 → 验证 → 真实 diff 审查 → closeout。它不依赖 runtime builder 或其他模板;执行前必须将所有 `REPLACE/WITH/...` 路径和确定性命令替换为当前项目的具体值。
41
42
  - `frontend-test-dag.json` — frontend-test DAG 模板;其 deterministic checklist 会拒绝 alternative executable instructions,仅允许 allowlisted `playwright-cli` command。Pi generator/reviser 的 runtime writeSet 仅授权下列目标项目生成路径(不是本仓库文档索引目标):
42
43
 
43
44
  ~~~text
@@ -56,6 +57,7 @@
56
57
  - `knowledge-sync-dag.json`、`knowledge-graph-bootstrap-dag.json` — 知识同步与图谱初始化 DAG。
57
58
  - `knowledge-sync-draft.schema.json` — 知识同步草稿 schema。
58
59
  - `harness.schema.json` — `harness.json` 的 IDE JSON Schema。
60
+ - `spec-registry.schema.json` — 项目级 `ai_workspace/loop-agent/spec-registry.json` 的机器校验 schema。
59
61
 
60
62
  ## 子目录
61
63
 
@@ -176,7 +176,8 @@
176
176
  "humanEscalationJson",
177
177
  "humanEscalationMd",
178
178
  "humanApproval",
179
- "humanRejection"
179
+ "humanRejection",
180
+ "changeManifest"
180
181
  ],
181
182
  "properties": {
182
183
  "resultSummary": { "$ref": "#/$defs/dagArtifactRef" },
@@ -188,7 +189,12 @@
188
189
  "humanEscalationJson": { "$ref": "#/$defs/dagArtifactRef" },
189
190
  "humanEscalationMd": { "$ref": "#/$defs/dagArtifactRef" },
190
191
  "humanApproval": { "$ref": "#/$defs/dagArtifactRef" },
191
- "humanRejection": { "$ref": "#/$defs/dagArtifactRef" }
192
+ "humanRejection": { "$ref": "#/$defs/dagArtifactRef" },
193
+ "changeManifest": { "$ref": "#/$defs/dagArtifactRef" },
194
+ "changeManifestChangedFiles": {
195
+ "type": "array",
196
+ "items": { "type": "string" }
197
+ }
192
198
  }
193
199
  },
194
200
  "repairArtifact": {
@@ -466,7 +466,7 @@
466
466
  "retryCategories": {
467
467
  "type": "array",
468
468
  "items": {
469
- "enum": ["timeout", "network", "rate-limit", "unavailable", "empty-output", "output-too-large", "protocol-invalid", "invalid-output", "writer-empty-diff", "incomplete-write-set", "writer-clean-timeout"]
469
+ "enum": ["timeout", "network", "rate-limit", "unavailable", "empty-output", "output-too-large", "protocol-invalid", "invalid-output", "writer-empty-diff", "incomplete-write-set", "writer-clean-timeout", "read-burst", "context-overflow"]
470
470
  },
471
471
  "default": ["timeout", "network", "rate-limit", "unavailable", "empty-output"],
472
472
  "description": "Failure categories eligible for retry. quota/auth/write-guard are never eligible. invalid-output is allowed only on explicit structured/protocol policies; writer-empty-diff and incomplete-write-set are reserved for requireChangedFiles generation/completeness writers; writer-clean-timeout is reserved for standard bounded writers after explicit zero-write-tool-call and empty-diff evidence."
@@ -502,9 +502,12 @@
502
502
  ]
503
503
  },
504
504
  "then": {
505
+ "required": [
506
+ "specReference"
507
+ ],
505
508
  "properties": {
506
509
  "specReference": {
507
- "type": "null"
510
+ "$ref": "#/$defs/uiComponentSpecReference"
508
511
  }
509
512
  }
510
513
  }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "./agent-dag.schema.json",
3
+ "version": 2,
4
+ "title": "Frontend implementation independent DAG template",
5
+ "objective": "Replace with the concrete, bounded frontend implementation objective for this DAG run.",
6
+ "successCriteria": [
7
+ "The contract covers every required user-visible behavior, state, and interaction.",
8
+ "The implementation is admitted only after a concrete, narrow writeSet is reviewed.",
9
+ "Static and behavior verification are recorded before final review.",
10
+ "The final closeout distinguishes passed, not-run, and residual-risk evidence."
11
+ ],
12
+ "globalConstraints": [
13
+ "This is a self-contained static template: do not generate, import, or merge a DAG from a runtime builder before execution.",
14
+ "Replace every REPLACE/WITH/... placeholder with concrete repository paths or deterministic commands before execution.",
15
+ "Do not commit runtime traces under .harness/dag-runs/.",
16
+ "Every node must explicitly declare its executor; defaults.executor is schema-only and not a runtime fallback.",
17
+ "Only frontend-implement-pi may write project files, and only inside its concrete writeSet.",
18
+ "Read-only nodes must not write root artifacts/**; root artifacts/ is not a per-node scratchpad.",
19
+ "Do not infer missing behavior, states, interactions, design decisions, or verification commands. Stop for an explicit task-contract revision instead.",
20
+ "Do not add dependencies unless they are already declared by the project contract."
21
+ ],
22
+ "defaults": {"executor":"pi","contextProfile":"slim","skills":["ai-engineering-context"],"writePolicy":"read-only"},
23
+ "skillsByRole": {
24
+ "planner":["loop-agent"], "scout":["ai-engineering-context"], "implementer":["verification-before-completion"], "reviewer":["requesting-code-review"], "verifier":["verification-before-completion","systematic-debugging"], "closeout":["loop-agent","verification-before-completion"]
25
+ },
26
+ "executorModels": {"pi":{"LOW":"gpt-5.3-codex-spark","MED":"gpt-5.5","HIGH":"gpt-5.5"}},
27
+ "tasks": [
28
+ {
29
+ "id":"frontend-contract-pi", "depends_on":[], "complexity":"MED", "executor":"pi", "role":"planner", "writePolicy":"read-only", "allowedPaths":["**"], "forbiddenPaths":[".harness/**","artifacts/**"],
30
+ "outputContract":"Plain Markdown frontend contract: required behavior, states, interactions, non-goals, concrete verification expectations, and unresolved gaps; no file writes.",
31
+ "subtask_prompt":"Read the task inputs. Produce a concise frontend contract that maps each required behavior, UI state, and interaction to observable outcomes. Identify missing or conflicting requirements as blockers; do not infer them and do not edit files."
32
+ },
33
+ {
34
+ "id":"frontend-scout-pi", "depends_on":["frontend-contract-pi"], "complexity":"LOW", "executor":"pi", "role":"scout", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
35
+ "outputContract":"Plain Markdown source and verification reconnaissance: relevant routes, components, styles, state patterns, focused tests, and risks; no file writes.",
36
+ "subtask_prompt":"Inspect only the declared frontend source and test paths. Report reusable component, styling, accessibility, state-management, and verification patterns that satisfy the contract. Do not edit files or broaden the allowed paths."
37
+ },
38
+ {
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/**"],
40
+ "outputContract":"Plain Markdown implementation plan: ordered changes, concrete target files, behavior/state/interaction coverage, and focused verification mapping; no file writes.",
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."
42
+ },
43
+ {
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/**"],
45
+ "outputContract":"Archived deterministic design-policy result proving the plan uses declared dependencies, concrete requirements, and approved design evidence; no worktree writes.",
46
+ "subtask_prompt":"Run the project-specific deterministic design-policy check selected for this task. It must reject missing requirement coverage, unauthorized dependencies, and unresolved design conflicts.",
47
+ "shell":{"commands":["REPLACE/WITH/DESIGN-POLICY/COMMAND"],"cwd":".","timeoutMs":300000}
48
+ },
49
+ {
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/**"],
51
+ "outputContract":"Plain Markdown design review: approved plan or explicit blocking findings for behavior, state, interaction, design-system, and accessibility coverage; no file writes.",
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."
53
+ },
54
+ {
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/**"],
56
+ "outputContract":"Archived deterministic writer-admission result with a concrete, narrow writeSet and pre-write baseline; no worktree writes.",
57
+ "subtask_prompt":"Run the project-specific writer-admission check. It must derive and record a concrete writeSet from the approved plan, reject broad paths and scope drift, and capture the pre-write baseline before authorizing the writer.",
58
+ "shell":{"commands":["REPLACE/WITH/WRITER-ADMISSION/COMMAND"],"cwd":".","timeoutMs":300000}
59
+ },
60
+ {
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/**"],
62
+ "outputContract":"Implementation summary with changed files, contract coverage, focused checks run, and residual risks.",
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."
64
+ },
65
+ {
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/**"],
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}
70
+ },
71
+ {
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/**"],
73
+ "outputContract":"Archived deterministic final-review context: admitted writeSet, cumulative diff, and required verification evidence; no worktree writes.",
74
+ "subtask_prompt":"Run the project-specific review-context collector. It must bind the admitted writeSet, actual cumulative diff, and required verification results so final review cannot rely on summaries alone.",
75
+ "shell":{"commands":["REPLACE/WITH/REVIEW-CONTEXT/COMMAND"],"cwd":".","timeoutMs":300000}
76
+ },
77
+ {
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/**"],
79
+ "outputContract":"Plain Markdown final review: approved result or explicit findings for contract coverage, regression risk, accessibility, and verification gaps; no file writes.",
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."
81
+ },
82
+ {
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/**"],
84
+ "outputContract":"Archived deterministic closeout summarizing contract coverage, verification status, review findings, evidence gaps, and residual risks; no worktree writes.",
85
+ "subtask_prompt":"Run the project-specific deterministic closeout renderer. Preserve evidence status exactly: passed, failed, not-run, mock-backed, and baseline debt must never be promoted to a stronger result.",
86
+ "shell":{"commands":["REPLACE/WITH/CLOSEOUT/COMMAND"],"cwd":".","timeoutMs":300000}
87
+ }
88
+ ]
89
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://loop-agent.local/schemas/spec-registry.schema.json",
4
+ "title": "Frontend specification registry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "roots"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "roots": {
11
+ "type": "array",
12
+ "maxItems": 32,
13
+ "items": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["path"],
17
+ "properties": {
18
+ "path": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "pattern": "^(?!/)(?!.*//)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$)).+$"
22
+ },
23
+ "scope": {
24
+ "type": "array",
25
+ "items": { "type": "string", "minLength": 1 },
26
+ "uniqueItems": true
27
+ },
28
+ "mode": { "enum": ["normative", "advisory"] },
29
+ "description": { "type": "string" }
30
+ }
31
+ }
32
+ },
33
+ "discovery": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "enabled": { "type": "boolean", "default": true },
38
+ "maxDepth": { "type": "integer", "minimum": 0, "maximum": 8, "default": 3 },
39
+ "maxFiles": { "type": "integer", "minimum": 1, "maximum": 200, "default": 100 },
40
+ "maxBytes": { "type": "integer", "minimum": 1, "maximum": 10485760, "default": 1048576 },
41
+ "timeoutMs": { "type": "integer", "minimum": 1, "maximum": 10000, "default": 2000 }
42
+ }
43
+ }
44
+ }
45
+ }
package/harness.json CHANGED
@@ -87,4 +87,4 @@
87
87
  "HIGH": "wizard-local/gpt-5.6-sol"
88
88
  }
89
89
  }
90
- }
90
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tea-agent/loop-agent",
3
- "version": "0.42.0-next.2",
3
+ "version": "0.42.0-next.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "loop-agent": "bin/loop-agent.js",
@@ -1,17 +1,23 @@
1
1
  ---
2
2
  name: frontend-bounded-implement
3
3
  description: >-
4
- Use only for frontend implementation and repair writers after the canonical
4
+ Use only for frontend implementation writers after the canonical
5
5
  contract gate has authorized a bounded write set.
6
+ references:
7
+ - path: references/code-standards.md
8
+ required: true
9
+ maxChars: 2600
6
10
  ---
7
11
 
8
12
  # Frontend Bounded Implement
9
13
 
14
+ Read the bounded code standards before editing. They apply only inside the
15
+ canonical targets and do not authorize additional discovery.
16
+
10
17
  ## Authoritative Inputs
11
18
 
12
19
  - For implementation, use the run-owned
13
20
  `contracts/frontend-implementation-contract.json`.
14
- - For repair, also use `contracts/frontend-repair-assessment.json`.
15
21
  - Treat requirement `expectedOutcome`, interaction `trigger` /
16
22
  `expectedBehavior`, target files, UI states, Mock/API strategy, and verification
17
23
  targets as closed decisions. Do not rediscover or reinterpret them.
@@ -25,7 +31,7 @@ description: >-
25
31
  - Start the bounded edit after confirming the contract and targets. Optional
26
32
  context is not a reason to postpone implementation.
27
33
  - If behavior is still ambiguous or a required target is outside `writeSet`, stop
28
- with `IMPLEMENTATION_OUTCOME: blocked`; do not compensate with broader scouting.
34
+ without writing and explain the blocker; do not compensate with broader scouting.
29
35
 
30
36
  ## Implementation Discipline
31
37
 
@@ -39,15 +45,10 @@ description: >-
39
45
  - Run only the focused checks already frozen by the task. Leave full verification
40
46
  to downstream deterministic nodes.
41
47
 
42
- ## Required Outcome
43
-
44
- The first non-empty response line must be exactly one of:
45
-
46
- - `IMPLEMENTATION_OUTCOME: changed` — a non-empty bounded diff was produced.
47
- - `IMPLEMENTATION_OUTCOME: already-satisfied` — the contract was already met and
48
- no file changed.
49
- - `IMPLEMENTATION_OUTCOME: blocked` — implementation cannot proceed without
50
- guessing or exceeding the write boundary.
48
+ ## Completion Summary
51
49
 
52
- Then report changed files, requirements/interactions implemented, tests or focused
53
- checks attempted, and residual risks. Never report `changed` for an empty diff.
50
+ Briefly report changed files, implemented requirements/interactions, focused checks
51
+ attempted, blockers, and residual risks. This summary is human-readable only: the
52
+ runtime derives implementation state from persisted write events, run delta, write
53
+ guard, requirement coverage, and focused checks. Do not use a mandatory
54
+ `IMPLEMENTATION_OUTCOME:` response-text protocol.
@@ -0,0 +1,19 @@
1
+ # Bounded Frontend Code Standards
2
+
3
+ Apply the canonical contract and the conventions visible in target files and their
4
+ direct local dependencies. Do not reopen task sources, OpenSpec, `ai_workspace`, or
5
+ unrelated repository areas to discover new rules or redesign approved decisions.
6
+
7
+ - Work test-first when behavior changes and preserve unrelated behavior.
8
+ - Reuse existing public helpers, APIs, components, tokens, schemas, and test
9
+ patterns that are directly available from the bounded target surface.
10
+ - Keep rendering, transitions, validation, request lifecycle, errors, and side
11
+ effects testable; cover relevant races and boundaries.
12
+ - Keep real API behavior enabled by default. Mock activation must follow the
13
+ approved strategy, remain explicit and dev/test-only, and never import test mocks
14
+ into production code.
15
+ - Trace fixtures to the approved API/schema evidence and never store secrets.
16
+ - Do not add unapproved dependencies, relax lint/type/test/build configuration,
17
+ add `.skip`/`.only`, comment out real requests, or write outside `writeSet`.
18
+ - Run only frozen focused checks and report their real status. Downstream shell
19
+ verification remains authoritative.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: frontend-contract
3
+ description: Use only for the read-only frontend requirement contract node.
4
+ references:
5
+ - path: references/contract-protocol.md
6
+ required: true
7
+ maxChars: 4200
8
+ ---
9
+
10
+ # Frontend Contract
11
+
12
+ Use task sources, explicit references, constraints, and the frozen source-fidelity
13
+ ledger. Preserve canonical requirement IDs, source fragments, commands, paths, and
14
+ language. Do not inspect implementation files or choose components, routes, Mock
15
+ mechanisms, dependencies, or target code as requirement facts.
16
+
17
+ Submit confirmed facts incrementally with the contract `record_*` tools and finish
18
+ with exactly one `finalize_contract`. Start recording as soon as a requirement or
19
+ constraint is confirmed; do not accumulate the whole contract in one response.
20
+
21
+ Missing product semantics may be explicit assumptions only when they do not change
22
+ observable behavior. Otherwise record a blocking question or a split proposal.
23
+ This node is read-only.
@@ -0,0 +1,34 @@
1
+ # Frontend Contract Protocol
2
+
3
+ ## Requirement fidelity
4
+
5
+ - Use the frozen canonical requirement ID for every requirement. Never invent a
6
+ replacement REQ/BR/AC ID.
7
+ - Bind every requirement to exactly the source fragment IDs supplied by the
8
+ source-fidelity ledger. Do not infer fragment IDs from prose.
9
+ - Record observable outcomes, applicable UI states, runtime/environment constraints,
10
+ non-goals, risks, and verification expectations without choosing implementation.
11
+ - Classify each requirement as `explicit`, `repository-resolvable`, `assumption`, or
12
+ `blocking`. Blocking facts name their owner and evidence.
13
+
14
+ ## Evidence and handoff
15
+
16
+ - Register static, behavior, Mock, and real-integration evidence expectations as
17
+ required, optional, or not-applicable. The classification follows the source and
18
+ risk; it is not selected for model convenience.
19
+ - Register a non-blocking frontend-test handoff for UI-visible or interactive work.
20
+ - Preserve exact command labels and referenced paths. Do not invent evidence,
21
+ connector results, APIs, or verification commands.
22
+
23
+ ## OpenSpec selection
24
+
25
+ When the frozen task exposes OpenSpec candidates, record only candidates actually
26
+ used by the contract as `required` or `relevant`. Explicit required paths and task
27
+ source citations remain required. Unmentioned candidates are irrelevant; do not
28
+ enumerate or downgrade them.
29
+
30
+ ## Terminal
31
+
32
+ Commit facts in small batches and call `finalize_contract` exactly once with
33
+ `ready`, `ready-with-assumptions`, or `blocked`. If the task is too large for one
34
+ bounded writer, record a split proposal instead of broadening the contract.
@@ -9,31 +9,26 @@ references:
9
9
 
10
10
  # Frontend Design Review
11
11
 
12
- For frontend design review nodes. Read the checklist; audit contract, scout, Mock
13
- strategy, effective plan, task bounds, and traceable design evidence.
14
- Knowledge base, OpenSpec, and `ai_workspace/` are parallel sources. Query the
15
- knowledge-base connector when available; always search/read `openspec/schemas/**`,
16
- `openspec/project-specs/**`, and `ai_workspace/**` before accepting conventions.
17
- Connector format is TODO: never invent results.
12
+ For frontend design review nodes. Read the checklist and the non-blocking contract
13
+ capacity diagnostic first. Audit either the canonical contract or, when the
14
+ diagnostic recommends indexed reading, its hash-bound field sections. Check the
15
+ bound Mock strategy, task bounds, and traceable design evidence supplied by the
16
+ upstream context. Do not rediscover task sources, search specification roots, or
17
+ replace frozen evidence with nearby-code conventions. Use only exact, bound evidence
18
+ paths when additional reading is necessary; never invent connector results.
18
19
 
19
- ## Verdict Contract
20
+ ## Authoritative Terminal
20
21
 
21
- First non-empty line: exactly `VERDICT: pass` or `VERDICT: request-revision`.
22
- Any blocker requires request-revision. An initial pass is the effective verdict;
23
- there is no intermediate first-design shell gate.
22
+ Complete the review with exactly one committed typed tool call:
24
23
 
25
- In standard/full topology, revision and final review run only after initial
26
- `VERDICT: request-revision`. Verify every Required Plan Correction against the
27
- complete revision; reject remaining, incomplete, or new gaps. An initial pass uses
28
- the original plan and skips both conditional nodes.
24
+ - `approve_design` when no blocking design defect remains;
25
+ - `request_design_changes` when a blocker exists. It must include a typed
26
+ `issueCategory`, at least one `evidenceRef`, and non-empty findings.
29
27
 
30
- Small-risk topology instead removes initial review and revision, then runs
31
- `frontend-final-design-review-pi` as the sole review of the original plan. Do not
32
- expect initial findings or a revision there.
33
-
34
- The deterministic gate prefers final-review output and falls back to initial review
35
- only when no current-run final output exists. Existing malformed/non-pass primary
36
- output fails closed.
28
+ The typed terminal is the only authoritative outcome. Do not require or emit a
29
+ `VERDICT:` line, JSON verdict, revision patch, or a second final-design-review
30
+ verdict. A requested design change ends this run; the recovery controller creates
31
+ any bounded follow-up run from the appropriate phase.
37
32
 
38
33
  ## Blocking Conditions
39
34
 
@@ -51,29 +46,15 @@ Knowledge-base absence is advisory if relevant rules from either openspec
51
46
  specification directory were read and applied. Block skipped fallback, unresolved
52
47
  conflict, or unresolved UI decisions.
53
48
 
54
- ## Method And Output
49
+ ## Method And Human-readable Output
55
50
 
56
51
  Map criteria to steps/files/states/checks, audit paths/evidence, classify Blocking
57
52
  or Advisory, and never edit files.
58
53
 
59
54
  ### Spec Evidence Rules
60
55
 
61
- Run `grep`/`find`, then explicit `read` calls for applicable specs/checklist. Only
62
- successful paired reads count as “已读取规范文件”; summaries do not. List each path/
63
- section in `Checked Items`; search/read both openspec specification directories
64
- before accepting conventions.
65
-
66
- ```markdown
67
- VERDICT: pass
68
-
69
- ## Findings
70
- - None blocking.
71
-
72
- ## Required Plan Corrections
73
- - None.
74
-
75
- ## Checked Items
76
- - ...
77
- ```
78
-
79
- Each correction names its criterion/section, gap, and exact plan change.
56
+ Read only the canonical contract (or its indexed, hash-bound sections) and any exact
57
+ evidence paths bound in its upstream context. Successful paired reads are the only proof that a specification was read;
58
+ summaries do not substitute for them. A concise human-readable summary may list
59
+ checked items and findings, but it is never a control protocol. Each requested
60
+ change names its criterion/section, gap, and required plan change.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: frontend-plan
3
+ description: Use only for the tool-only frontend decision planning node.
4
+ references:
5
+ - path: references/decision-contract.md
6
+ required: true
7
+ maxChars: 5200
8
+ - path: references/design-decisions.md
9
+ required: true
10
+ maxChars: 3400
11
+ ---
12
+
13
+ # Frontend Plan
14
+
15
+ Plan only the delta between frozen Contract facts and the Scout target surface.
16
+ Do not reread task sources, Contract/Scout prose, or target files, and do not repeat
17
+ requirements or repository discovery.
18
+
19
+ Commit the smallest necessary typed decisions through the plan `record_*` tools:
20
+ requirement coverage, component/styling choices, applicable states and interactions,
21
+ data/Mock strategy, deviations, and dependency policy. Process a bounded requirement
22
+ slice and record facts immediately rather than reasoning over the whole task first.
23
+
24
+ The runtime owns protected skeleton fields, path/command validation, materialization,
25
+ and final schema checks. Finish with exactly one `finalize_plan`; return no Markdown
26
+ narrative. Record a genuine evidence gap when frozen facts are insufficient.