@tea-agent/loop-agent 0.42.0-next.1 → 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.
- package/CHANGELOG.md +260 -1
- package/dist/application/dag/generate-task-dag.js +75 -19
- package/dist/application/task-lifecycle/advance.js +24 -5
- package/dist/application/task-lifecycle/observe.js +171 -17
- package/dist/application/task-lifecycle/plan-transitions.js +42 -7
- package/dist/application/task-lifecycle/recommendations.js +13 -2
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +7 -0
- package/dist/cli/program.js +5 -0
- package/dist/commands/client-recovery.js +3 -0
- package/dist/commands/dag-follow-up.js +138 -0
- package/dist/commands/init.js +27 -1
- package/dist/commands/task-advance.js +19 -0
- package/dist/executors/dag-pi-executor.js +3784 -231
- package/dist/executors/pi-executor.js +15 -4
- package/dist/executors/pi-read-budget-policy.js +239 -0
- package/dist/executors/shell-executor.js +942 -187
- package/dist/executors/shell-write-guard.js +7 -0
- package/dist/infrastructure/console/operation-store.js +226 -6
- package/dist/shared/dag-failure-category.js +12 -0
- package/dist/shared/openspec-spec.js +70 -4
- package/dist/shared/operator/capabilities.js +7 -0
- package/dist/task/config-types.js +105 -5
- package/dist/task/contract/adopt.js +4 -0
- package/dist/task/contract/import-revision.js +4 -0
- package/dist/task/contract/project.js +3 -0
- package/dist/task/contract/schema.js +2 -1
- package/dist/task/frontend-project-capability.js +203 -20
- package/dist/task/runtime.js +5 -2
- package/dist/task/source-prepare/build-draft.js +3 -3
- package/dist/task/source-prepare/fragment-inventory.js +15 -9
- package/dist/task/source-prepare/prepare.js +89 -1
- package/dist/task/source-prepare/semantic-intake.js +6 -2
- package/dist/task/source-references.js +22 -1
- package/dist/worker/console/chat/chat-ui-policy.js +4 -2
- package/dist/worker/console/chat/pi-runtime.js +173 -7
- package/dist/worker/console/chat/repo-browser.js +10 -3
- package/dist/worker/console/chat/routes.js +30 -19
- package/dist/worker/console/chat/session-store.js +117 -70
- package/dist/worker/console/chat/shortcuts.js +1 -1
- package/dist/worker/console/chat/turn-process.js +111 -56
- package/dist/worker/console/frontend-human-decision-adapter.js +19 -0
- package/dist/worker/console/frontend-split-operation-adapter.js +20 -0
- package/dist/worker/console/index.js +3 -0
- package/dist/worker/console/operator-actions.js +169 -7
- package/dist/worker/console/server.js +3 -0
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DZZ8m3PO.js → abnfDiagram-N423BO3Z-CeznJ4Iw.js} +1 -1
- package/dist/worker/console/static/assets/{arc-D6PvaVd-.js → arc-B4u9u7SX.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-B_OTOiI8.js → architectureDiagram-T3A2C74G-oghpT81p.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-Bv6rqHBg.js → blockDiagram-VBNYF7ZC-BPJ5Kvcj.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-B8eHr0oz.js → c4Diagram-5PPSVZJV-CoIu69pd.js} +1 -1
- package/dist/worker/console/static/assets/channel-DmIXqJ6B.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-DYwR0im2.js → chunk-2GRJ4B5K-DtgiAsSc.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-D2WPGqXt.js → chunk-2Q5K7J3B-YSu_EVSD.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-CQISJ_I7.js → chunk-5RXB4S5H-DaRO-NB6.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-C0o2Du1e.js → chunk-5VM5RSS4-Dh0ZKiGA.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-4f8kr-U7.js → chunk-6Q2QTUOP-DOrvbR-H.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-D_OWvXzX.js → chunk-GF5L2VYU-C3b22LN2.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-CasdPz5X.js → chunk-JWPE2WC7-CXlqO8l6.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-Cj8lRrla.js → chunk-KBJHAD2P-BblTBrDu.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-CUvD1FSd.js → chunk-RYQCIY6F-DswqPALe.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-CqLw_eqB.js → chunk-XXDRQBXY-CfTwVOlc.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-MFV5Qxb5.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-MFV5Qxb5.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-ku-WqJPx.js → cose-bilkent-JH36ORCC-bLD8jVFo.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-Bq_PYDhl.js → cynefin-VYW2F7L2-BvoG1fh5.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-BiGZV641.js → cynefinDiagram-MW4NZA55-DEPAdJu3.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-C4JRlglF.js → dagre-VZM6K2ZE-DmrNvBLy.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-B0dNeWYG.js → diagram-7IWD3JNH-CdwzIwvs.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-Cj35YvYM.js → diagram-B4RE2ZJO-CJ3hj-md.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-uzQoJ2-8.js → diagram-LBJQPF4R-C6YJT2a4.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-D1a-Buoz.js → diagram-Q27KOJAE-C_LPfjhX.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-XjRrLRSs.js → diagram-UB23O5K3-xvsSb5Ie.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Da_O24cW.js → ebnfDiagram-BXEA7PRR-Rxp2tKcD.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-BLJ8jrYU.js → erDiagram-JOGREHBK-DRyLYmZh.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-B9GrLjM0.js → flowDiagram-UKHOOZJN-TLSU_D2B.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-CeJ0TqiK.js → ganttDiagram-PKOTCBZU-DGqeTvHC.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-Bm2eNNFX.js → gitGraphDiagram-DS77QQ5N-BZxyH2wh.js} +1 -1
- package/dist/worker/console/static/assets/index-C8V8K9b4.js +451 -0
- package/dist/worker/console/static/assets/index-Cnf_KxTQ.css +1 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-DB26i3d8.js → infoDiagram-6WML65LV-BsYtzx01.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BOGRyeZT.js → ishikawaDiagram-WSZJBQD7-Qr-ezGv-.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-CZRoBO_6.js → journeyDiagram-NVQOT4AX-DYbB3ibo.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-qlWhJyoB.js → kanban-definition-27J2QSJJ-BHJHewZO.js} +1 -1
- package/dist/worker/console/static/assets/{linear-CfUiDDB3.js → linear-CmPIPmCG.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-BQe6fpqj.js → mermaid.core-F--C1uV0.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-zFzWHw64.js → mindmap-definition-FAOFIHXS-YTXfL1st.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-DFGUqjZO.js → pegDiagram-VL7TDLO6-DdDMYXP9.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BB5i0l8Z.js → pieDiagram-7S7Q4E2Y-C3nH4KVd.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-obbVZ_X5.js → quadrantDiagram-CIZ2JOQS-kXyxjG7Y.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-BwdaNzc1.js → railroadDiagram-AXF67PYL-KNzbl-7w.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-CkTJaugh.js → requirementDiagram-LRYGKXZP-CSwI6dG0.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-BwJ-hIgq.js → sankeyDiagram-W5VNT64P-Bl1AyuXy.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-BzSgmm7w.js → sequenceDiagram-SI44F4Z6-2y4EmXQa.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-Bn3oj5Q1.js → sizeCapture-X5ZJPWSS-E8v8YrMg.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-dxhGtL8K.js → stateDiagram-OKZ733FA-eGGlR856.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-B8e4J3at.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-BLpEInya.js → swimlanes-SLNWSIFB-B7g7xc07.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Do88I1Nb.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-ChJGYcXy.js → timeline-definition-Z64GVDOM-DR3VCHBG.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-DK-qjRer.js → vennDiagram-T6HMQDX7-LUvapZIy.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-3qeaWAg-.js → wardleyDiagram-T6FBY63Y-C7GDcaXq.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-CootlyP9.js → xychartDiagram-ELKLHX3M-CbNAqoGK.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/active-run-badge.js +17 -0
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +19 -8
- package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +15 -7
- package/dist/worker/console/workspace-context.js +111 -1
- package/dist/worker/materialize/frontend-split-task-materializer.js +72 -0
- package/dist/worker/observe/static/dag-node-purpose.js +5 -0
- package/dist/workflows/dag/backend-test-case-coverage-analysis.js +99 -4
- package/dist/workflows/dag/backend-test-markdown-workflow.js +13 -1
- package/dist/workflows/dag/backend-test-writer-completeness.js +45 -3
- package/dist/workflows/dag/contract-validator-registrations.js +1 -2
- package/dist/workflows/dag/dag-retry-schema.js +138 -0
- package/dist/workflows/dag/frontend-closeout.js +221 -0
- package/dist/workflows/dag/frontend-design-policy.js +400 -0
- package/dist/workflows/dag/frontend-human-decision.js +182 -0
- package/dist/workflows/dag/frontend-implementation-contract.js +907 -162
- package/dist/workflows/dag/frontend-plan-render.js +2 -1
- package/dist/workflows/dag/frontend-prewrite-gate.js +255 -349
- package/dist/workflows/dag/frontend-provider-capability-matrix.js +159 -0
- package/dist/workflows/dag/frontend-recovery-capsule.js +455 -0
- package/dist/workflows/dag/frontend-recovery-controller.js +202 -0
- package/dist/workflows/dag/frontend-recovery-lineage.js +178 -0
- package/dist/workflows/dag/frontend-recovery-plan.js +17 -10
- package/dist/workflows/dag/frontend-recovery-run.js +33 -20
- package/dist/workflows/dag/frontend-repair.js +1 -432
- package/dist/workflows/dag/frontend-review-context.js +261 -15
- package/dist/workflows/dag/frontend-review-findings.js +270 -0
- package/dist/workflows/dag/frontend-shadow-dual-write.js +914 -0
- package/dist/workflows/dag/frontend-shape-capsule-store.js +191 -0
- package/dist/workflows/dag/frontend-shape-facts.js +419 -0
- package/dist/workflows/dag/frontend-shape.js +435 -0
- package/dist/workflows/dag/frontend-source-fidelity-ledger.js +108 -0
- package/dist/workflows/dag/frontend-split-application-service.js +203 -0
- package/dist/workflows/dag/frontend-split-orchestrator.js +899 -0
- package/dist/workflows/dag/frontend-typed-event-store.js +452 -0
- package/dist/workflows/dag/frontend-typed-event-transaction.js +180 -0
- package/dist/workflows/dag/frontend-verification-trace.js +249 -24
- package/dist/workflows/dag/frontend-worktree-diff.js +250 -17
- package/dist/workflows/dag/frontend-writer-admission.js +285 -0
- package/dist/workflows/dag/frontend-writer-status.js +256 -0
- package/dist/workflows/dag/init-hybrid.js +777 -525
- package/dist/workflows/dag/interrupt-request.js +7 -0
- package/dist/workflows/dag/node-execution.js +752 -4
- package/dist/workflows/dag/prompt.js +34 -1
- package/dist/workflows/dag/recovery-lease.js +80 -0
- package/dist/workflows/dag/report.js +37 -1
- package/dist/workflows/dag/rerun-feedback.js +256 -1
- package/dist/workflows/dag/rerun-plan.js +17 -6
- package/dist/workflows/dag/rerun-run.js +23 -0
- package/dist/workflows/dag/rerun-task.js +29 -0
- package/dist/workflows/dag/retry-policy.js +219 -104
- package/dist/workflows/dag/runner.js +433 -126
- package/dist/workflows/dag/scheduler.js +114 -16
- package/dist/workflows/dag/types.js +239 -12
- package/dist/workflows/dag/validate.js +28 -12
- package/docs/examples/README.md +5 -0
- package/docs/init-surface.manifest.json +30 -12
- package/docs/skills/vetted-skill-registry.md +4 -2
- package/docs/templates/README.md +2 -0
- package/docs/templates/agent-dag-report.schema.json +8 -2
- package/docs/templates/agent-dag.schema.json +1 -1
- package/docs/templates/backend-test-dag.json +18 -18
- package/docs/templates/frontend-implementation-contract.schema.json +4 -1
- package/docs/templates/frontend-implementation-dag.json +89 -0
- package/docs/templates/spec-registry.schema.json +45 -0
- package/harness.json +1 -1
- package/package.json +1 -1
- package/skills/frontend-bounded-implement/SKILL.md +15 -14
- package/skills/frontend-bounded-implement/references/code-standards.md +19 -0
- package/skills/frontend-contract/SKILL.md +23 -0
- package/skills/frontend-contract/references/contract-protocol.md +34 -0
- package/skills/frontend-design-review/SKILL.md +22 -41
- package/skills/frontend-plan/SKILL.md +26 -0
- package/skills/frontend-plan/references/decision-contract.md +37 -0
- package/skills/frontend-plan/references/design-decisions.md +17 -0
- package/skills/frontend-review/SKILL.md +20 -15
- package/skills/frontend-review/references/review-findings.md +6 -7
- package/skills/frontend-scout/SKILL.md +25 -0
- package/skills/frontend-scout/references/design-evidence.md +16 -0
- package/skills/frontend-scout/references/scout-evidence.md +23 -0
- package/skills/frontend-verification/SKILL.md +1 -1
- package/skills/loop-agent/references/command-reference.md +1 -0
- package/skills/loop-agent/references/hybrid-dag.md +2 -2
- package/dist/worker/console/static/assets/channel-BU5gOilw.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DIzKJGHr.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DIzKJGHr.js +0 -1
- package/dist/worker/console/static/assets/index-H9rFJiGL.css +0 -1
- package/dist/worker/console/static/assets/index-xwu9GxEc.js +0 -451
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Cld2qK9v.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-TIHpiT7w.js +0 -8
- package/skills/frontend-implementation/SKILL.md +0 -52
- package/skills/frontend-implementation/references/code-standards.md +0 -33
- package/skills/frontend-implementation/references/design-spec.md +0 -56
- package/skills/frontend-implementation/references/node-contracts.md +0 -31
|
@@ -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
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-bounded-implement
|
|
3
3
|
description: >-
|
|
4
|
-
Use only for frontend implementation
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
53
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
##
|
|
20
|
+
## Authoritative Terminal
|
|
20
21
|
|
|
21
|
-
|
|
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
|
-
|
|
26
|
-
`
|
|
27
|
-
|
|
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
|
-
|
|
31
|
-
`
|
|
32
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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.
|
|
@@ -0,0 +1,37 @@
|
|
|
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.
|
|
@@ -0,0 +1,17 @@
|
|
|
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.
|
|
@@ -9,17 +9,25 @@ references:
|
|
|
9
9
|
|
|
10
10
|
# Frontend Review
|
|
11
11
|
|
|
12
|
-
Use for `frontend-review-pi`; read the findings guide
|
|
13
|
-
|
|
14
|
-
and
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
Use for `frontend-review-pi`; read the findings guide and capacity diagnostic first.
|
|
13
|
+
Inputs are `contracts/frontend-review-context.json`, its hash-bound contract
|
|
14
|
+
reference/index and diff fragments, and only source files named by that diff. Use
|
|
15
|
+
indexed contract sections when recommended. Do not reopen task sources, plans,
|
|
16
|
+
design-review prose, OpenSpec, or `ai_workspace/`; the bound context is authoritative.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Authoritative Terminal
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
Complete the review with exactly one committed typed tool call:
|
|
21
|
+
|
|
22
|
+
- `approve_review` when no Critical/Important finding remains;
|
|
23
|
+
- `request_review_changes` for a defect, missing required evidence, forbidden
|
|
24
|
+
write, or unmet acceptance criterion. It must include a typed `issueCategory`,
|
|
25
|
+
at least one `evidenceRef`, and non-empty findings.
|
|
26
|
+
|
|
27
|
+
The typed terminal is the only authoritative outcome. Do not require or emit a
|
|
28
|
+
`VERDICT:` line or response-text JSON verdict. A request for review changes ends
|
|
29
|
+
this run and is handled by the recovery controller rather than a same-run repair
|
|
30
|
+
branch.
|
|
23
31
|
|
|
24
32
|
## Review Scope
|
|
25
33
|
|
|
@@ -27,7 +35,7 @@ required check, forbidden write, or unmet acceptance criterion forces revision.
|
|
|
27
35
|
- Inspect every changed file against allowed, forbidden, and approved write scope.
|
|
28
36
|
- Map criteria to behavior, applicable UI states, tests, and shell evidence.
|
|
29
37
|
- Review state/data flow, validation, async/error behavior, design, responsive/a11y,
|
|
30
|
-
dependencies,
|
|
38
|
+
dependencies, and regression risk when applicable.
|
|
31
39
|
- Inspect static, behavior, and available Mock-specific artifacts directly. For Mock
|
|
32
40
|
strategies, compare the endpoint matrix, handler/fixture/adapter and consumer diff;
|
|
33
41
|
require the real request as default, contract-aligned fixtures, production isolation,
|
|
@@ -38,11 +46,8 @@ required check, forbidden write, or unmet acceptance criterion forces revision.
|
|
|
38
46
|
baseline-matched diagnostics on unchanged files, and none on writer-changed files.
|
|
39
47
|
Report debt, never `lint passed`; `failed`/`unavailable` blocks. Typecheck, build,
|
|
40
48
|
and test still require successful final exits.
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
`<repoRoot>/openspec/schemas/`, `<repoRoot>/openspec/project-specs/`, and `<repoRoot>/ai_workspace/`.
|
|
44
|
-
Connector format is TODO; never invent evidence. Only successful `read` calls are
|
|
45
|
-
observable as "已读取规范文件".
|
|
49
|
+
- Evaluate component/design claims against bound evidence; do not replace it with a
|
|
50
|
+
repository-wide search or connector query.
|
|
46
51
|
- Treat shell exit status as authoritative. Do not edit files.
|
|
47
52
|
|
|
48
53
|
## Evidence And Output
|
|
@@ -14,24 +14,23 @@
|
|
|
14
14
|
`baseline-debt` only with a valid `frontend-lint-assessment-v1`; this is not a
|
|
15
15
|
passed lint result. A changed-file lint diagnostic, new unmatched diagnostic,
|
|
16
16
|
command drift, missing baseline, timeout, or unparseable output is Important.
|
|
17
|
-
- Treat
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
- Treat the design evidence already bound in the canonical review context as the
|
|
18
|
+
source of truth. Do not launch a connector query or repository-wide OpenSpec/
|
|
19
|
+
`ai_workspace` search to replace frozen evidence; label a missing bound evidence
|
|
20
|
+
reference accurately instead.
|
|
20
21
|
|
|
21
22
|
## Review Sequence
|
|
22
23
|
|
|
23
24
|
1. Establish changed-file inventory and write boundaries.
|
|
24
|
-
2. Compare
|
|
25
|
+
2. Compare the bound contract with the approved constraints and cumulative diff.
|
|
25
26
|
3. Map each criterion to code, states, tests, and evidence.
|
|
26
27
|
4. Inspect interactions, state/data/API behavior, failure paths, and regressions.
|
|
27
28
|
5. Check mock selection, contract-to-fixture mapping, activation/default path,
|
|
28
29
|
handler/fixture/adapter and consumer diff, verification, production imports, and
|
|
29
30
|
the real-integration gap.
|
|
30
|
-
6. Check design evidence, responsive/a11y behavior, dependencies, and maintenance.
|
|
31
|
+
6. Check bound design evidence, responsive/a11y behavior, dependencies, and maintenance.
|
|
31
32
|
7. Classify findings and derive the verdict mechanically.
|
|
32
33
|
|
|
33
|
-
Skipping either directory is Important when design compliance affects acceptance.
|
|
34
|
-
|
|
35
34
|
```text
|
|
36
35
|
- [Critical|Important|Minor] path:line — Problem; impact; required correction; evidence.
|
|
37
36
|
```
|
|
@@ -0,0 +1,25 @@
|
|
|
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.
|
|
@@ -0,0 +1,16 @@
|
|
|
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.
|
|
@@ -0,0 +1,23 @@
|
|
|
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.
|