@tea-agent/loop-agent 0.41.1-beta.0 → 0.42.0-next.1

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 (273) hide show
  1. package/CHANGELOG.md +61 -207
  2. package/dist/adapters/context-transfer/optional-pi-handoff.js +31 -0
  3. package/dist/adapters/context-transfer/pi-session.js +61 -0
  4. package/dist/application/dag/generate-task-dag.js +19 -75
  5. package/dist/application/task-lifecycle/advance.js +5 -24
  6. package/dist/application/task-lifecycle/observe.js +17 -171
  7. package/dist/application/task-lifecycle/plan-transitions.js +7 -42
  8. package/dist/application/task-lifecycle/recommendations.js +2 -13
  9. package/dist/build-stamp.json +3 -3
  10. package/dist/cli/command-definitions.js +12 -7
  11. package/dist/cli/program.js +23 -6
  12. package/dist/commands/client-recovery.js +0 -3
  13. package/dist/commands/dag-artifact.js +284 -0
  14. package/dist/commands/dag-context.js +184 -0
  15. package/dist/commands/dag-rerun.js +206 -1
  16. package/dist/commands/init.js +1 -27
  17. package/dist/commands/task-advance.js +0 -19
  18. package/dist/executors/dag-pi-executor.js +266 -3792
  19. package/dist/executors/pi-executor.js +4 -15
  20. package/dist/executors/pi-sdk-executor.js +3 -0
  21. package/dist/executors/shell-executor.js +217 -945
  22. package/dist/executors/shell-write-guard.js +0 -7
  23. package/dist/{worker → infrastructure}/console/app-data.js +4 -0
  24. package/dist/infrastructure/console/artifact-revision-store.js +430 -0
  25. package/dist/infrastructure/console/context-export-store.js +160 -0
  26. package/dist/infrastructure/console/dir-lock.js +132 -0
  27. package/dist/infrastructure/console/operation-store.js +197 -0
  28. package/dist/infrastructure/harness/artifact-store.js +10 -1
  29. package/dist/infrastructure/harness/atomic-write.js +12 -2
  30. package/dist/shared/context-transfer/artifact-revision.js +172 -0
  31. package/dist/shared/context-transfer.js +418 -0
  32. package/dist/shared/dag-failure-category.js +0 -12
  33. package/dist/shared/openspec-spec.js +4 -70
  34. package/dist/shared/operator/capabilities.js +14 -7
  35. package/dist/shared/operator/safe-run-summary.js +1 -0
  36. package/dist/shared/path-safety.js +93 -0
  37. package/dist/shared/preview.js +28 -4
  38. package/dist/task/config-types.js +9 -35
  39. package/dist/task/contract/adopt.js +0 -4
  40. package/dist/task/contract/import-revision.js +0 -4
  41. package/dist/task/contract/project.js +0 -3
  42. package/dist/task/contract/schema.js +1 -2
  43. package/dist/task/frontend-project-capability.js +20 -203
  44. package/dist/task/runtime.js +2 -5
  45. package/dist/task/source-prepare/build-draft.js +3 -3
  46. package/dist/task/source-prepare/fragment-inventory.js +9 -15
  47. package/dist/task/source-prepare/prepare.js +1 -89
  48. package/dist/task/source-prepare/semantic-intake.js +2 -6
  49. package/dist/task/source-references.js +1 -22
  50. package/dist/task/task-demand-routing.js +3 -0
  51. package/dist/worker/console/chat/chat-event-store.js +2 -2
  52. package/dist/worker/console/chat/pi-runtime.js +3 -2
  53. package/dist/worker/console/chat/resource-preferences-store.js +1 -1
  54. package/dist/worker/console/chat/routes.js +13 -4
  55. package/dist/worker/console/chat/semantic-activity.js +12 -11
  56. package/dist/worker/console/chat/session-stats.js +96 -0
  57. package/dist/worker/console/chat/session-store.js +1 -1
  58. package/dist/worker/console/chat/turn-process.js +28 -4
  59. package/dist/worker/console/chat/user-questions.js +1 -1
  60. package/dist/worker/console/console-update-runtime.js +1 -1
  61. package/dist/worker/console/context-transfer-diagnostics.js +198 -0
  62. package/dist/worker/console/dag-confirmation.js +1 -1
  63. package/dist/worker/console/dag-execution-receipt.js +1 -1
  64. package/dist/worker/console/doctor.js +1 -1
  65. package/dist/worker/console/draft-store.js +1 -1
  66. package/dist/worker/console/human-gate-token.js +1 -1
  67. package/dist/worker/console/index.js +3 -6
  68. package/dist/worker/console/interview/assessment.js +1 -1
  69. package/dist/worker/console/interview/session.js +1 -1
  70. package/dist/worker/console/operation-runner.js +45 -4
  71. package/dist/worker/console/operation-sse.js +1 -1
  72. package/dist/worker/console/operation-wait.js +1 -1
  73. package/dist/worker/console/operator-actions.js +107 -168
  74. package/dist/worker/console/operator-surface-health.js +1 -1
  75. package/dist/worker/console/operator-user-error.js +169 -0
  76. package/dist/worker/console/pi-plugins.js +60 -1
  77. package/dist/worker/console/routes.js +637 -8
  78. package/dist/worker/console/security.js +35 -0
  79. package/dist/worker/console/server.js +6 -6
  80. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-Bho4we4c.js → abnfDiagram-N423BO3Z-DZZ8m3PO.js} +1 -1
  81. package/dist/worker/console/static/assets/{arc-TBDkTeK0.js → arc-D6PvaVd-.js} +1 -1
  82. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-BF_fZrn2.js → architectureDiagram-T3A2C74G-B_OTOiI8.js} +1 -1
  83. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-CCnPgUe2.js → blockDiagram-VBNYF7ZC-Bv6rqHBg.js} +1 -1
  84. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-BCYZJLAT.js → c4Diagram-5PPSVZJV-B8eHr0oz.js} +1 -1
  85. package/dist/worker/console/static/assets/channel-BU5gOilw.js +1 -0
  86. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-D8K6adhU.js → chunk-2GRJ4B5K-DYwR0im2.js} +1 -1
  87. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-DkT1Q78b.js → chunk-2Q5K7J3B-D2WPGqXt.js} +1 -1
  88. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-DuhvpIr7.js → chunk-5RXB4S5H-CQISJ_I7.js} +1 -1
  89. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-BnK6dC49.js → chunk-5VM5RSS4-C0o2Du1e.js} +1 -1
  90. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-DPz__z7r.js → chunk-6Q2QTUOP-4f8kr-U7.js} +1 -1
  91. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-0kkppM2j.js → chunk-GF5L2VYU-D_OWvXzX.js} +1 -1
  92. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-BB41iK5t.js → chunk-JWPE2WC7-CasdPz5X.js} +1 -1
  93. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-CiVrxKHU.js → chunk-KBJHAD2P-Cj8lRrla.js} +1 -1
  94. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-C2h9Xje1.js → chunk-RYQCIY6F-CUvD1FSd.js} +1 -1
  95. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-3iOSHdbM.js → chunk-XXDRQBXY-CqLw_eqB.js} +1 -1
  96. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DIzKJGHr.js +1 -0
  97. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DIzKJGHr.js +1 -0
  98. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BN3A7tkk.js → cose-bilkent-JH36ORCC-ku-WqJPx.js} +1 -1
  99. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-CTuBy0Or.js → cynefin-VYW2F7L2-Bq_PYDhl.js} +1 -1
  100. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-wb6tUlMN.js → cynefinDiagram-MW4NZA55-BiGZV641.js} +1 -1
  101. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-GP1Ivx8B.js → dagre-VZM6K2ZE-C4JRlglF.js} +1 -1
  102. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-ejrcK6L0.js → diagram-7IWD3JNH-B0dNeWYG.js} +1 -1
  103. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-YFkCCvUU.js → diagram-B4RE2ZJO-Cj35YvYM.js} +1 -1
  104. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-B4rrvIaL.js → diagram-LBJQPF4R-uzQoJ2-8.js} +1 -1
  105. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-C-YIZcUf.js → diagram-Q27KOJAE-D1a-Buoz.js} +1 -1
  106. package/dist/worker/console/static/assets/{diagram-UB23O5K3-BPF5wcL1.js → diagram-UB23O5K3-XjRrLRSs.js} +1 -1
  107. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-CU5SzXjO.js → ebnfDiagram-BXEA7PRR-Da_O24cW.js} +1 -1
  108. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-CpL414DE.js → erDiagram-JOGREHBK-BLJ8jrYU.js} +1 -1
  109. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-MrhLzNau.js → flowDiagram-UKHOOZJN-B9GrLjM0.js} +1 -1
  110. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-Bg4qFuUo.js → ganttDiagram-PKOTCBZU-CeJ0TqiK.js} +1 -1
  111. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-ColxSXLR.js → gitGraphDiagram-DS77QQ5N-Bm2eNNFX.js} +1 -1
  112. package/dist/worker/console/static/assets/index-H9rFJiGL.css +1 -0
  113. package/dist/worker/console/static/assets/index-xwu9GxEc.js +451 -0
  114. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-Czvtm6gc.js → infoDiagram-6WML65LV-DB26i3d8.js} +1 -1
  115. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-B7Xp8HyJ.js → ishikawaDiagram-WSZJBQD7-BOGRyeZT.js} +1 -1
  116. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-DWYZcvph.js → journeyDiagram-NVQOT4AX-CZRoBO_6.js} +1 -1
  117. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-KTLZRUjx.js → kanban-definition-27J2QSJJ-qlWhJyoB.js} +1 -1
  118. package/dist/worker/console/static/assets/{linear-_Exn7bfl.js → linear-CfUiDDB3.js} +1 -1
  119. package/dist/worker/console/static/assets/{mermaid.core-Cxg8kX8V.js → mermaid.core-BQe6fpqj.js} +5 -5
  120. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-oKrlo2Bt.js → mindmap-definition-FAOFIHXS-zFzWHw64.js} +1 -1
  121. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-XAeteiNd.js → pegDiagram-VL7TDLO6-DFGUqjZO.js} +1 -1
  122. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BTf1K-lp.js → pieDiagram-7S7Q4E2Y-BB5i0l8Z.js} +1 -1
  123. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-C0IlY0Jf.js → quadrantDiagram-CIZ2JOQS-obbVZ_X5.js} +1 -1
  124. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-BVbKtZhW.js → railroadDiagram-AXF67PYL-BwdaNzc1.js} +1 -1
  125. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-C5e4JFcr.js → requirementDiagram-LRYGKXZP-CkTJaugh.js} +1 -1
  126. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-Cz30hc29.js → sankeyDiagram-W5VNT64P-BwJ-hIgq.js} +1 -1
  127. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-DS33n6d0.js → sequenceDiagram-SI44F4Z6-BzSgmm7w.js} +1 -1
  128. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-46w7v-9T.js → sizeCapture-X5ZJPWSS-Bn3oj5Q1.js} +1 -1
  129. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-pbcD5SsZ.js → stateDiagram-OKZ733FA-dxhGtL8K.js} +1 -1
  130. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Cld2qK9v.js +1 -0
  131. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-DuivYBSj.js → swimlanes-SLNWSIFB-BLpEInya.js} +2 -2
  132. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-TIHpiT7w.js +8 -0
  133. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-Cb9VZVIl.js → timeline-definition-Z64GVDOM-ChJGYcXy.js} +1 -1
  134. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-D2-mfOgR.js → vennDiagram-T6HMQDX7-DK-qjRer.js} +1 -1
  135. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-DeS2aC76.js → wardleyDiagram-T6FBY63Y-3qeaWAg-.js} +1 -1
  136. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-WGsrFjxH.js → xychartDiagram-ELKLHX3M-CootlyP9.js} +1 -1
  137. package/dist/worker/console/static/index.html +7 -2
  138. package/dist/worker/console/static-src/app/useOperatorActions.js +3 -2
  139. package/dist/worker/console/static-src/app/useRunProgress.js +9 -2
  140. package/dist/worker/console/static-src/operator-chat/dag-progress-link.js +22 -0
  141. package/dist/worker/console/static-src/operator-chat/useChatSessions.js +2 -0
  142. package/dist/worker/console/static-src/operator-chat/useChatThread.js +6 -0
  143. package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +28 -3
  144. package/dist/worker/console/static-src/pages/tasks/run-panel-progress.js +106 -0
  145. package/dist/worker/console/static-src/shell/console-update-reload.js +25 -0
  146. package/dist/worker/console/workspace-context.js +28 -112
  147. package/dist/worker/console/workspace-registry.js +2 -2
  148. package/dist/worker/continuation/worker-continuation.js +278 -0
  149. package/dist/worker/observability/read-model.js +4 -0
  150. package/dist/worker/observe/health.js +1 -1
  151. package/dist/worker/observe/node-transparency.js +572 -0
  152. package/dist/worker/observe/routes.js +51 -1
  153. package/dist/worker/observe/static/api.js +69 -5
  154. package/dist/worker/observe/static/dag-context-reason-labels.d.ts +9 -0
  155. package/dist/worker/observe/static/dag-context-reason-labels.js +120 -0
  156. package/dist/worker/observe/static/dag-node-purpose.js +0 -5
  157. package/dist/worker/observe/static/state.js +3 -1
  158. package/dist/worker/observe/static/styles.css +1037 -126
  159. package/dist/worker/observe/static/views/dag-inspector.js +1217 -65
  160. package/dist/worker/observe/static/views/session-timeline.js +121 -25
  161. package/dist/worker/outcomes/adapters.js +19 -0
  162. package/dist/worker/outcomes/types.js +1 -0
  163. package/dist/worker/pool/attempt-lease.js +97 -66
  164. package/dist/worker/pool/begin-attempt-with-lease.js +1 -0
  165. package/dist/worker/pool/reconcile.js +46 -1
  166. package/dist/worker/pool/run-store.js +2 -0
  167. package/dist/worker/pool/state-projection.js +2 -0
  168. package/dist/worker/task-spec/workflow-routing.js +8 -3
  169. package/dist/workflows/dag/artifact-bindings.js +149 -0
  170. package/dist/workflows/dag/artifact-revision-schema-registry.js +31 -0
  171. package/dist/workflows/dag/backend-test-result-contract.js +1 -1
  172. package/dist/workflows/dag/budget-enforcement.js +10 -0
  173. package/dist/workflows/dag/context-receipt.js +305 -0
  174. package/dist/workflows/dag/context-transfer/context-bundle.js +423 -0
  175. package/dist/workflows/dag/context-transfer/operator-actions.js +61 -0
  176. package/dist/workflows/dag/context-transfer/renderers.js +93 -0
  177. package/dist/workflows/dag/contract-validator-registrations.js +2 -1
  178. package/dist/workflows/dag/frontend-implementation-contract.js +162 -932
  179. package/dist/workflows/dag/frontend-plan-render.js +1 -2
  180. package/dist/workflows/dag/frontend-prewrite-gate.js +349 -255
  181. package/dist/workflows/dag/frontend-recovery-plan.js +10 -17
  182. package/dist/workflows/dag/frontend-recovery-run.js +20 -33
  183. package/dist/workflows/dag/frontend-repair.js +432 -1
  184. package/dist/workflows/dag/frontend-review-context.js +15 -261
  185. package/dist/workflows/dag/frontend-verification-trace.js +24 -249
  186. package/dist/workflows/dag/frontend-worktree-diff.js +17 -250
  187. package/dist/workflows/dag/frontend-writer-rollback.js +32 -0
  188. package/dist/workflows/dag/init-hybrid.js +640 -685
  189. package/dist/workflows/dag/interrupt-request.js +0 -7
  190. package/dist/workflows/dag/node-execution.js +116 -759
  191. package/dist/workflows/dag/path-safety.js +1 -0
  192. package/dist/workflows/dag/prompt.js +30 -38
  193. package/dist/workflows/dag/report.js +1 -37
  194. package/dist/workflows/dag/rerun-feedback.js +1 -256
  195. package/dist/workflows/dag/rerun-plan.js +557 -11
  196. package/dist/workflows/dag/rerun-run.js +601 -38
  197. package/dist/workflows/dag/rerun-task.js +0 -29
  198. package/dist/workflows/dag/retry-policy.js +104 -214
  199. package/dist/workflows/dag/runner.js +142 -430
  200. package/dist/workflows/dag/scheduler.js +16 -114
  201. package/dist/workflows/dag/skill-snapshot.js +17 -0
  202. package/dist/workflows/dag/types.js +195 -246
  203. package/dist/workflows/dag/validate.js +12 -28
  204. package/docs/architecture/runtime-boundaries.md +6 -6
  205. package/docs/architecture/worker-and-feature.md +1 -1
  206. package/docs/init-surface.manifest.json +12 -30
  207. package/docs/skills/vetted-skill-registry.md +2 -4
  208. package/docs/templates/README.md +0 -2
  209. package/docs/templates/agent-dag-report.schema.json +2 -8
  210. package/docs/templates/agent-dag.schema.json +33 -1
  211. package/docs/templates/frontend-implementation-contract.schema.json +1 -4
  212. package/docs/templates/product-line/task.yaml +1 -1
  213. package/harness.json +3 -3
  214. package/package.json +3 -1
  215. package/skills/frontend-bounded-implement/SKILL.md +14 -15
  216. package/skills/frontend-design-review/SKILL.md +41 -22
  217. package/skills/frontend-implementation/SKILL.md +52 -0
  218. package/skills/frontend-implementation/references/code-standards.md +33 -0
  219. package/skills/frontend-implementation/references/design-spec.md +56 -0
  220. package/skills/frontend-implementation/references/node-contracts.md +31 -0
  221. package/skills/frontend-review/SKILL.md +15 -20
  222. package/skills/frontend-review/references/review-findings.md +7 -6
  223. package/skills/frontend-verification/SKILL.md +1 -1
  224. package/skills/loop-agent/references/command-reference.md +6 -1
  225. package/skills/loop-agent/references/hybrid-dag.md +2 -2
  226. package/dist/commands/dag-follow-up.js +0 -138
  227. package/dist/executors/pi-read-budget-policy.js +0 -239
  228. package/dist/worker/console/frontend-human-decision-adapter.js +0 -19
  229. package/dist/worker/console/frontend-split-operation-adapter.js +0 -20
  230. package/dist/worker/console/operation-store.js +0 -389
  231. package/dist/worker/console/static/assets/channel-bnXW0U3C.js +0 -1
  232. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-rZpq_twR.js +0 -1
  233. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-rZpq_twR.js +0 -1
  234. package/dist/worker/console/static/assets/index-D3CC4eUz.css +0 -1
  235. package/dist/worker/console/static/assets/index-DLt4ZFvD.js +0 -437
  236. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-zBMYiUyi.js +0 -1
  237. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-d_rms-5i.js +0 -8
  238. package/dist/worker/console/static-src/active-run-badge.js +0 -17
  239. package/dist/worker/materialize/frontend-split-task-materializer.js +0 -72
  240. package/dist/workflows/dag/dag-retry-schema.js +0 -138
  241. package/dist/workflows/dag/frontend-closeout.js +0 -221
  242. package/dist/workflows/dag/frontend-design-policy.js +0 -400
  243. package/dist/workflows/dag/frontend-human-decision.js +0 -182
  244. package/dist/workflows/dag/frontend-provider-capability-matrix.js +0 -159
  245. package/dist/workflows/dag/frontend-read-budgets.js +0 -12
  246. package/dist/workflows/dag/frontend-recovery-capsule.js +0 -455
  247. package/dist/workflows/dag/frontend-recovery-controller.js +0 -202
  248. package/dist/workflows/dag/frontend-recovery-lineage.js +0 -178
  249. package/dist/workflows/dag/frontend-review-findings.js +0 -270
  250. package/dist/workflows/dag/frontend-shadow-dual-write.js +0 -914
  251. package/dist/workflows/dag/frontend-shape-capsule-store.js +0 -191
  252. package/dist/workflows/dag/frontend-shape-facts.js +0 -409
  253. package/dist/workflows/dag/frontend-shape.js +0 -427
  254. package/dist/workflows/dag/frontend-source-fidelity-ledger.js +0 -108
  255. package/dist/workflows/dag/frontend-split-application-service.js +0 -203
  256. package/dist/workflows/dag/frontend-split-orchestrator.js +0 -899
  257. package/dist/workflows/dag/frontend-typed-event-store.js +0 -452
  258. package/dist/workflows/dag/frontend-typed-event-transaction.js +0 -180
  259. package/dist/workflows/dag/frontend-writer-admission.js +0 -285
  260. package/dist/workflows/dag/frontend-writer-status.js +0 -256
  261. package/dist/workflows/dag/recovery-lease.js +0 -80
  262. package/docs/templates/frontend-implementation-dag.json +0 -89
  263. package/docs/templates/spec-registry.schema.json +0 -45
  264. package/skills/frontend-bounded-implement/references/code-standards.md +0 -19
  265. package/skills/frontend-contract/SKILL.md +0 -23
  266. package/skills/frontend-contract/references/contract-protocol.md +0 -34
  267. package/skills/frontend-plan/SKILL.md +0 -26
  268. package/skills/frontend-plan/references/decision-contract.md +0 -37
  269. package/skills/frontend-plan/references/design-decisions.md +0 -17
  270. package/skills/frontend-scout/SKILL.md +0 -25
  271. package/skills/frontend-scout/references/design-evidence.md +0 -16
  272. package/skills/frontend-scout/references/scout-evidence.md +0 -23
  273. /package/dist/{worker → infrastructure}/console/repo-fingerprint.js +0 -0
@@ -1,89 +0,0 @@
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
- }
@@ -1,45 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
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.
@@ -1,23 +0,0 @@
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.
@@ -1,34 +0,0 @@
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.
@@ -1,26 +0,0 @@
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.
@@ -1,37 +0,0 @@
1
- # Frontend Plan Decision Contract
2
-
3
- ## Requirement-local decisions
4
-
5
- - Cover each frozen requirement exactly once and map it to Scout-confirmed
6
- implementation paths and verification target IDs.
7
- - Record observable state and interaction behavior, including trigger and expected
8
- behavior. IDs and paths alone are not behavioral coverage.
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.
14
- - Static targets are for project-wide commands and are traced by file and command
15
- only.
16
-
17
- ## Global decisions
18
-
19
- Keep route/component placement, Mock/data strategy, and dependency/deviation policy
20
- as explicit global decisions rather than duplicating them across each requirement.
21
- Use only frozen command labels and Scout-confirmed paths.
22
-
23
- For Mock/API, keep the real request path enabled by default. Select only a strategy
24
- allowed by the frozen task capability. Active Mock requires deterministic Mock-backed
25
- verification and production-default-off activation. `not-needed` requires positive
26
- real/no-remote evidence or records a real-integration gap.
27
-
28
- Add dependencies only when authorized. Record unsupported dependency, path, API,
29
- design, or verification needs as blocking evidence gaps; never invent a command or
30
- widen the write set.
31
-
32
- ## Runtime-owned fields and terminal
33
-
34
- The runtime owns `schemaVersion`, `sourceBinding`, risk, canonical target files,
35
- aliases, command allowlisting, path containment, and final validation. Submit only
36
- editable decision facts, then call `finalize_plan` exactly once. The deterministic
37
- design policy materializes the canonical implementation contract.
@@ -1,17 +0,0 @@
1
- # Frontend Design Decisions
2
-
3
- Use only design evidence already committed by Scout and frozen selections from
4
- Contract. Do not search specification roots or nearby code from Plan.
5
-
6
- - Reuse confirmed components, variants, tokens, helpers, and state patterns unless
7
- the task authorizes a new pattern.
8
- - Record `uiComponentChoices` per UI purpose. `purpose` is the stable coverage key
9
- matching an interaction or UI state; behavior remains in the corresponding
10
- expected behavior and rationale.
11
- - `specified` requires an exact bound OpenSpec reference. `reuse-existing` identifies
12
- the proven existing component/path. Task-mandated `new` choices bind the frozen
13
- source requirement/fragment so the runtime can derive the PRD citation.
14
- - Define applicable success, loading, empty, error, permission, disabled, boundary,
15
- responsive, and accessibility behavior; use not-applicable only with a reason.
16
- - Record styling strategy, deviations, conflicts, and unresolved gaps explicitly.
17
- Never silently replace a spec-defined component or claim unread evidence.
@@ -1,25 +0,0 @@
1
- ---
2
- name: frontend-scout
3
- description: Use only for read-only frontend target-surface and design-evidence scouting.
4
- references:
5
- - path: references/scout-evidence.md
6
- required: true
7
- maxChars: 4200
8
- - path: references/design-evidence.md
9
- required: true
10
- maxChars: 3600
11
- ---
12
-
13
- # Frontend Scout
14
-
15
- Inspect only enough repository evidence to prove the target surface and applicable
16
- design rules. Separate facts, inferences, and unresolved gaps. Reuse the frozen
17
- capability context and contract selections before running bounded task-term searches.
18
-
19
- Submit findings incrementally through `record_target_surface` and
20
- `record_design_evidence`. A complete surface names proven entrypoints, routes or
21
- mounts, implementation paths, test paths, data sources, and any allowed-path
22
- conflicts. If ownership remains unresolved, commit `completeness=blocked` with the
23
- specific gaps rather than guessing.
24
-
25
- This node is read-only and does not make plan decisions.
@@ -1,16 +0,0 @@
1
- # Frontend Design Evidence
2
-
3
- Use the generation-frozen component/design capability context and cited candidate
4
- set. When a connector is available, query the configured knowledge base; regardless
5
- of its result, inspect relevant frozen OpenSpec or `ai_workspace` candidates. Search
6
- local specification roots only for unresolved task terms and never recursively read
7
- all supported files.
8
-
9
- Record evidence as `knowledge-base`, `openspec fallback`, `repository fallback`, or
10
- `unavailable`. Include query/search terms, paths, headings or tight line ranges,
11
- applied rules, and conflicts. Filename-only and unread search matches are not rules.
12
-
13
- Look for components, variants, composition, tokens, layout, responsive behavior,
14
- accessibility, state patterns, data/Mock conventions, deprecations, exceptions, and
15
- forbidden patterns. Explicit task requirements remain authoritative; report source
16
- conflicts instead of merging them silently.
@@ -1,23 +0,0 @@
1
- # Frontend Scout Evidence
2
-
3
- ## Target surface
4
-
5
- Prove the current frontend stack and the files that own the requested behavior:
6
-
7
- - entrypoint, route or mount;
8
- - page/component/style implementation paths;
9
- - state and data/API/Mock flow;
10
- - supported scripts and test entrypoints;
11
- - reusable components, tokens, helpers, fixtures, and assets;
12
- - paths discovered outside task `allowedPaths`;
13
- - unresolved ownership or missing evidence.
14
-
15
- Use repository-relative POSIX paths. A search hit, lockfile, fixture, or filename is
16
- not proof by itself. Read the relevant surrounding code or configuration and report
17
- the exact evidence. Do not recursively inspect unrelated directories.
18
-
19
- ## Completeness
20
-
21
- Commit `complete` only when the target surface is sufficiently proven for Plan to
22
- reuse without repository discovery. Otherwise commit `blocked` and list every
23
- unresolved path or ownership question. Do not shift discovery work into Plan.