@tea-agent/loop-agent 0.41.0-next.3 → 0.41.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +264 -32
- 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 +945 -217
- package/dist/executors/shell-write-guard.js +7 -0
- 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 +34 -7
- 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/pi-runtime.js +2 -3
- package/dist/worker/console/chat/routes.js +3 -12
- package/dist/worker/console/chat/semantic-activity.js +11 -12
- package/dist/worker/console/chat/session-stats.js +0 -96
- package/dist/worker/console/chat/turn-process.js +4 -28
- 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/operation-store.js +226 -6
- package/dist/worker/console/operator-actions.js +169 -7
- package/dist/worker/console/pi-plugins.js +1 -3
- package/dist/worker/console/server.js +3 -0
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DwVJxUxz.js → abnfDiagram-N423BO3Z-Bho4we4c.js} +1 -1
- package/dist/worker/console/static/assets/{arc-DqfCcXdu.js → arc-TBDkTeK0.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-qMVtggRv.js → architectureDiagram-T3A2C74G-BF_fZrn2.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-ECrV38dh.js → blockDiagram-VBNYF7ZC-CCnPgUe2.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-DBaaLqQv.js → c4Diagram-5PPSVZJV-BCYZJLAT.js} +1 -1
- package/dist/worker/console/static/assets/channel-bnXW0U3C.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-BvfNHkAz.js → chunk-2GRJ4B5K-D8K6adhU.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-C5StiIbc.js → chunk-2Q5K7J3B-DkT1Q78b.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-HabGiJkS.js → chunk-5RXB4S5H-DuhvpIr7.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-BiTg127i.js → chunk-5VM5RSS4-BnK6dC49.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-CZsXBPuR.js → chunk-6Q2QTUOP-DPz__z7r.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-D-r1MxLK.js → chunk-GF5L2VYU-0kkppM2j.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-DQxb9plr.js → chunk-JWPE2WC7-BB41iK5t.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-DMndGvCT.js → chunk-KBJHAD2P-CiVrxKHU.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-ByL4BgOJ.js → chunk-RYQCIY6F-C2h9Xje1.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-BVe1b1gL.js → chunk-XXDRQBXY-3iOSHdbM.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-rZpq_twR.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-rZpq_twR.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BAyGzN8j.js → cose-bilkent-JH36ORCC-BN3A7tkk.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-C5yVYU7E.js → cynefin-VYW2F7L2-CTuBy0Or.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-x-MwsEm9.js → cynefinDiagram-MW4NZA55-wb6tUlMN.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-CT5Tle5F.js → dagre-VZM6K2ZE-GP1Ivx8B.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-BARERhlS.js → diagram-7IWD3JNH-ejrcK6L0.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-BwfUz0VM.js → diagram-B4RE2ZJO-YFkCCvUU.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-Mk4r2WvJ.js → diagram-LBJQPF4R-B4rrvIaL.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-KUrxuBs0.js → diagram-Q27KOJAE-C-YIZcUf.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-CjZOceZn.js → diagram-UB23O5K3-BPF5wcL1.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-rnwUCiEI.js → ebnfDiagram-BXEA7PRR-CU5SzXjO.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-DM4j23FM.js → erDiagram-JOGREHBK-CpL414DE.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-DD5HdDEs.js → flowDiagram-UKHOOZJN-MrhLzNau.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-CIAGSF47.js → ganttDiagram-PKOTCBZU-Bg4qFuUo.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-DbwFbVEL.js → gitGraphDiagram-DS77QQ5N-ColxSXLR.js} +1 -1
- package/dist/worker/console/static/assets/index-D3CC4eUz.css +1 -0
- package/dist/worker/console/static/assets/index-DLt4ZFvD.js +437 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-B-Pb0T66.js → infoDiagram-6WML65LV-Czvtm6gc.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-B9Unk-YX.js → ishikawaDiagram-WSZJBQD7-B7Xp8HyJ.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-C2F3JkPt.js → journeyDiagram-NVQOT4AX-DWYZcvph.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-Bl8-Xcoz.js → kanban-definition-27J2QSJJ-KTLZRUjx.js} +1 -1
- package/dist/worker/console/static/assets/{linear-yK4uZmC5.js → linear-_Exn7bfl.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-Bpa6PmuE.js → mermaid.core-Cxg8kX8V.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-BfGRoCSe.js → mindmap-definition-FAOFIHXS-oKrlo2Bt.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-Bz6_HtST.js → pegDiagram-VL7TDLO6-XAeteiNd.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-i0Umbsby.js → pieDiagram-7S7Q4E2Y-BTf1K-lp.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-DaVQBobe.js → quadrantDiagram-CIZ2JOQS-C0IlY0Jf.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-DMTGnSq7.js → railroadDiagram-AXF67PYL-BVbKtZhW.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-2ao_DaSq.js → requirementDiagram-LRYGKXZP-C5e4JFcr.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-2SG1lTB9.js → sankeyDiagram-W5VNT64P-Cz30hc29.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-BQYOLybR.js → sequenceDiagram-SI44F4Z6-DS33n6d0.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-C8g3yjuI.js → sizeCapture-X5ZJPWSS-46w7v-9T.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-q_F8nAQG.js → stateDiagram-OKZ733FA-pbcD5SsZ.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-zBMYiUyi.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-8LrWpH2s.js → swimlanes-SLNWSIFB-DuivYBSj.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-d_rms-5i.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-BQoY3qzl.js → timeline-definition-Z64GVDOM-Cb9VZVIl.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-BDu1UjSp.js → vennDiagram-T6HMQDX7-D2-mfOgR.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-C48M7Y0a.js → wardleyDiagram-T6FBY63Y-DeS2aC76.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-YU6FTl_F.js → xychartDiagram-ELKLHX3M-WGsrFjxH.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/app/useRunProgress.js +2 -9
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +0 -2
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +0 -6
- package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +3 -28
- package/dist/worker/console/static-src/pages/tasks/run-panel-progress.js +0 -106
- package/dist/worker/console/workspace-context.js +111 -1
- package/dist/worker/materialize/frontend-split-task-materializer.js +72 -0
- package/dist/worker/observability/read-model.js +0 -4
- package/dist/worker/observe/static/dag-node-purpose.js +5 -0
- package/dist/worker/observe/static/views/dag-inspector.js +7 -2
- package/dist/worker/observe/static/views/session-timeline.js +15 -46
- package/dist/workflows/dag/backend-test-result-contract.js +1 -1
- 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 +932 -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-read-budgets.js +12 -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 +409 -0
- package/dist/workflows/dag/frontend-shape.js +427 -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 +685 -494
- package/dist/workflows/dag/interrupt-request.js +7 -0
- package/dist/workflows/dag/node-execution.js +732 -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 +10 -2
- 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 +214 -104
- package/dist/workflows/dag/runner.js +429 -122
- 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/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/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 +3 -3
- 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-CL1NRAmS.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-PBGzzjZA.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-PBGzzjZA.js +0 -1
- package/dist/worker/console/static/assets/index-BfleX-qj.css +0 -1
- package/dist/worker/console/static/assets/index-Bih9w9h9.js +0 -451
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DrxGBDJu.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BhpDxzAf.js +0 -8
- package/dist/worker/console/static-src/operator-chat/dag-progress-link.js +0 -22
- 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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-5RXB4S5H-HabGiJkS.js";import{_ as i}from"./mermaid.core-Bpa6PmuE.js";import"./chunk-XXDRQBXY-BVe1b1gL.js";import"./chunk-KBJHAD2P-DMndGvCT.js";import"./chunk-2GRJ4B5K-BvfNHkAz.js";import"./index-Bih9w9h9.js";var u={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{c as r,s as e}from"./flowDiagram-UKHOOZJN-DD5HdDEs.js";import{_ as a}from"./mermaid.core-Bpa6PmuE.js";import"./chunk-5VM5RSS4-BiTg127i.js";import"./chunk-XXDRQBXY-BVe1b1gL.js";import"./chunk-KBJHAD2P-DMndGvCT.js";import"./chunk-2GRJ4B5K-BvfNHkAz.js";import"./channel-CL1NRAmS.js";import"./index-Bih9w9h9.js";var o=a(t=>`${e(t)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),s=o,n=r({defaultLayout:"swimlane",styles:s});export{n as diagram};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function compareOperationOrder(left, right) {
|
|
2
|
-
const leftTime = Date.parse(left.updatedAt);
|
|
3
|
-
const rightTime = Date.parse(right.updatedAt);
|
|
4
|
-
if (Number.isFinite(leftTime) && Number.isFinite(rightTime) && leftTime !== rightTime) {
|
|
5
|
-
return leftTime - rightTime;
|
|
6
|
-
}
|
|
7
|
-
return ((left.updatedSeq ?? left.eventSeq ?? 0) -
|
|
8
|
-
(right.updatedSeq ?? right.eventSeq ?? 0));
|
|
9
|
-
}
|
|
10
|
-
export function latestDagRunId(cards) {
|
|
11
|
-
let latest;
|
|
12
|
-
for (const card of cards) {
|
|
13
|
-
if (!card.dagRunId)
|
|
14
|
-
continue;
|
|
15
|
-
if (!latest || compareOperationOrder(card, latest) > 0)
|
|
16
|
-
latest = card;
|
|
17
|
-
}
|
|
18
|
-
return latest?.dagRunId ?? null;
|
|
19
|
-
}
|
|
20
|
-
export function dagRunIdForActivity(cards, activityRef) {
|
|
21
|
-
return cards.find((card) => (card.activityRef ?? `operation:${card.operationId}`) === activityRef)?.dagRunId;
|
|
22
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-implementation
|
|
3
|
-
description: >-
|
|
4
|
-
Use for frontend contract, scout, mock strategy, and plan DAG nodes.
|
|
5
|
-
references:
|
|
6
|
-
- path: references/node-contracts.md
|
|
7
|
-
required: true
|
|
8
|
-
# Compact contract index must stay under skill total budget (~10k with body + other refs).
|
|
9
|
-
# Headroom above current ~4k file; do not raise alone without checking totalMaxChars.
|
|
10
|
-
maxChars: 6000
|
|
11
|
-
- path: references/design-spec.md
|
|
12
|
-
required: true
|
|
13
|
-
maxChars: 3000
|
|
14
|
-
- path: references/code-standards.md
|
|
15
|
-
required: true
|
|
16
|
-
maxChars: 3000
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Frontend Implementation
|
|
20
|
-
|
|
21
|
-
Read all required references before running any listed frontend node.
|
|
22
|
-
|
|
23
|
-
## Source And Evidence Rules
|
|
24
|
-
|
|
25
|
-
Use task sources/references, constraints, then `task.json`. Follow `design-spec.md`:
|
|
26
|
-
query the knowledge base when available and always inspect `openspec/schemas/`,
|
|
27
|
-
`openspec/project-specs/`, and `ai_workspace/`; then use repo evidence. Cite tight paths/symbols, and never invent APIs,
|
|
28
|
-
rules, commands, or retrievals. Scout/planners locate and explicitly read applicable
|
|
29
|
-
specs; only successful paired reads count. Lockfile-only, fixture-only, or unread
|
|
30
|
-
search hits do not prove a reusable Mock service.
|
|
31
|
-
|
|
32
|
-
This broad discovery rule applies only to contract, scout, and plan phases.
|
|
33
|
-
Implementation and repair use the separate `frontend-bounded-implement` skill.
|
|
34
|
-
|
|
35
|
-
## Implementation Discipline
|
|
36
|
-
|
|
37
|
-
- Reuse confirmed specs, components, tokens, helpers, APIs, mocks, schemas, and tests.
|
|
38
|
-
- Keep real requests enabled by default; never comment them out for a mock.
|
|
39
|
-
- Prefer native Mock support; otherwise use existing browser interception for e2e or
|
|
40
|
-
a reversible request adapter/DI seam for local preview.
|
|
41
|
-
- Trace fixtures to API/schema evidence. Activation is explicit, dev/test-only,
|
|
42
|
-
production-off; Mock evidence never proves real API integration.
|
|
43
|
-
- Add dependencies only when approved. Cover applicable success/loading/empty/error/
|
|
44
|
-
permission/boundary states and justify N/A.
|
|
45
|
-
- Keep state testable. Stay in `writeSet`, preserve behavior, and update tests.
|
|
46
|
-
- Never relax lint/type/test/build config or write unauthorized generated output.
|
|
47
|
-
|
|
48
|
-
## Output And Failure Rules
|
|
49
|
-
|
|
50
|
-
- Follow `node-contracts.md`; read-only nodes never edit. Missing input blocks work
|
|
51
|
-
when proceeding would guess behavior, bounds, or verification.
|
|
52
|
-
- Preserve tokens, commands, paths, IDs, and language. Completion needs fresh shell evidence.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Frontend Code Standards
|
|
2
|
-
|
|
3
|
-
Discover rules from task constraints, `design-spec.md` source order, config, code,
|
|
4
|
-
tests, manifests, and generated types. Regardless of knowledge-base results,
|
|
5
|
-
applicable `openspec/schemas/`, `openspec/project-specs/`, and `ai_workspace/` rules are normative.
|
|
6
|
-
Preferences are not rules, and docs do not override installed APIs without an
|
|
7
|
-
explicit compatibility decision.
|
|
8
|
-
|
|
9
|
-
## Discover And Cite
|
|
10
|
-
|
|
11
|
-
- Find routing and server/client boundaries; state, forms, data/cache, and errors;
|
|
12
|
-
API/mock/UI/schema/test locations and naming; supported tests; dependency rules.
|
|
13
|
-
|
|
14
|
-
Cite representative files/config for each convention. Describe conflicts instead of
|
|
15
|
-
silently selecting one.
|
|
16
|
-
|
|
17
|
-
## Plan And Implement
|
|
18
|
-
|
|
19
|
-
- Map criteria to code and checks. Define placement, state ownership, request
|
|
20
|
-
lifecycle, validation/failures, API compatibility, mocks, and fixtures.
|
|
21
|
-
- Trace fixtures to API evidence; label gaps. Prefer native mocks, then browser
|
|
22
|
-
interception for existing e2e, then a reversible request adapter/DI preview seam.
|
|
23
|
-
- Real API stays default; mock activation is explicit, local/test-only,
|
|
24
|
-
non-production, and removable.
|
|
25
|
-
- Reuse helpers/public APIs and preserve out-of-contract behavior. Keep rendering,
|
|
26
|
-
transitions, validation, and side effects testable; cover lifecycle races/bounds
|
|
27
|
-
when relevant. Update supported tests; stay in `writeSet`.
|
|
28
|
-
|
|
29
|
-
## Prohibited
|
|
30
|
-
|
|
31
|
-
- Do not relax checks, add unapproved dependencies, comment real requests, hardcode
|
|
32
|
-
fixtures in production UI, import test mocks into production, store fixture
|
|
33
|
-
secrets, equate mock evidence with real integration, or report unrun checks as verified.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Frontend Design And Component Specification
|
|
2
|
-
|
|
3
|
-
## Required Source Sequence
|
|
4
|
-
|
|
5
|
-
Knowledge base, OpenSpec, and `ai_workspace/` are parallel specification sources:
|
|
6
|
-
|
|
7
|
-
1. Attempt the configured component/design knowledge-base query first when a
|
|
8
|
-
connector is available.
|
|
9
|
-
2. Regardless of knowledge-base success/failure/timeout/no-match, also
|
|
10
|
-
recursively search `openspec/schemas/`, `openspec/project-specs/`, and
|
|
11
|
-
`ai_workspace/` for index files and relevant content.
|
|
12
|
-
3. Treat relevant matches from both sources as the current project's
|
|
13
|
-
specification for this run.
|
|
14
|
-
4. Only then use component source, tokens, stories, tests, and pages as
|
|
15
|
-
non-normative repository fallback.
|
|
16
|
-
|
|
17
|
-
Never skip local OpenSpec or `ai_workspace/` for neighboring-code conventions,
|
|
18
|
-
even when a knowledge-base query returned results. Report source conflicts instead
|
|
19
|
-
of combining them. Explicit task requirements remain the contract.
|
|
20
|
-
|
|
21
|
-
Connector format is TODO; attempt only an available connector, otherwise record
|
|
22
|
-
`not-configured` and run the openspec fallback (never invent a connection).
|
|
23
|
-
|
|
24
|
-
## openspec Fallback Procedure
|
|
25
|
-
|
|
26
|
-
- Inspect `<repoRoot>/openspec/schemas/`, `<repoRoot>/openspec/project-specs/`,
|
|
27
|
-
and `<repoRoot>/ai_workspace/` when present; enumerate supported files recursively.
|
|
28
|
-
- Read indexes first, then search names/content using task, route, component,
|
|
29
|
-
interaction, theme, token, and state terms.
|
|
30
|
-
- Read matches in context; a filename-only hit is not a rule.
|
|
31
|
-
- Record search terms, inspected/matched paths, headings or tight line ranges,
|
|
32
|
-
applied rules, and conflicts.
|
|
33
|
-
- If both directories or relevant rules are absent, record that before using
|
|
34
|
-
repository fallback.
|
|
35
|
-
|
|
36
|
-
## Retrieval Evidence
|
|
37
|
-
|
|
38
|
-
Record source as `knowledge-base`, `openspec fallback`, `repository fallback`, or
|
|
39
|
-
`unavailable`. Knowledge-base evidence includes query, source ID/version/time, rules,
|
|
40
|
-
and conflicts. `openspec fallback` includes terms, paths/headings/lines, rules, and conflicts.
|
|
41
|
-
|
|
42
|
-
## Rules To Retrieve Or Discover
|
|
43
|
-
|
|
44
|
-
- Components, variants, props, composition, accessibility, deprecations, placement, forms, overlays, navigation, and state patterns.
|
|
45
|
-
- Tokens, typography, color, layout, breakpoints, motion, focus/keyboard/contrast, exceptions, design debt, and forbidden patterns.
|
|
46
|
-
|
|
47
|
-
## Gate Expectations
|
|
48
|
-
|
|
49
|
-
- Reuse confirmed primitives unless a new pattern is authorized.
|
|
50
|
-
- Define applicable states and responsive behavior before implementation.
|
|
51
|
-
- Cite knowledge-base or openspec spec evidence for component/token choices;
|
|
52
|
-
label weaker repo fallback.
|
|
53
|
-
- Make deviations and unresolved gaps explicit.
|
|
54
|
-
- Contract `uiComponentChoices[]` per UI purpose: `specified` needs
|
|
55
|
-
`specReference {path,section,line}`; `new` needs null ref + rationale; never
|
|
56
|
-
silently replace a spec-defined component.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Frontend Node Contracts
|
|
2
|
-
|
|
3
|
-
Pre-write nodes are read-only. Preserve IDs, labels, commands, language, required headings.
|
|
4
|
-
|
|
5
|
-
## Core nodes
|
|
6
|
-
|
|
7
|
-
- **`frontend-contract-pi`**: `Scope`, `Non-goals`, `Acceptance Criteria`, `UI States`, `Target Runtime Environment`, `Risks`, `Verification Expectations`; no guessed requirements.
|
|
8
|
-
- **`frontend-scout-pi`**: routes, components, tokens, data/API/Mock, scripts, tests, assets; fact vs inference vs gap. Search+read `openspec/schemas/`, `openspec/project-specs/`, `ai_workspace/` first. Output stack, styling, conventions, state/data, test entry points, reuse, risks.
|
|
9
|
-
- **`frontend-plan-pi` + conditional design loop**: AC → observable `expectedOutcome`; interactions → `trigger`+`expectedBehavior`; include steps, in-bound files, UI states, reuse, deps, Mock/API, frozen verify entrypoints and integration gaps. DAG freezes a protected skeleton (`schemaVersion`, `sourceBinding`, `riskLevel`, `targets.files`, `mockApi.productionDefaultOff`). Model returns a **JSON-only** editable RFC 7386 patch (`frontend-implementation-contract-plan-patch-v1`) plus one `openspec-citations` block. Runtime compiles canonical `frontend-implementation-contract-v1` and archives raw/extracted/normalized/validation candidates; unresolved optional symbols are dropped and audited. No plan prose; gate renders plan.md. IDs+paths ≠ behavior semantics. Applicable UI states need behavior/implementation/verification; non-applicable states need reasons. Active Mock needs frozen commands; `auto` without confirmed capability/command → `not-needed`; `required` without command → generation-time blocked. Only `request-revision` runs revision+final review; small-risk gets one review.
|
|
10
|
-
- `uiComponentChoices[]` (optional): `{purpose, component, decision, specReference, rationale}`; `specified` needs `specReference{path,section,line}`; `new` needs null ref+rationale.
|
|
11
|
-
- **`frontend-prewrite-gate-shell`**: sole write authorization. Resolve effective plan (revised if revision ran, else original) + review; require exact pass; retain every REQ/BR/AC id; enforce Mock policy; validate schema/source binding+writeSet containment; materialize `contracts/frontend-implementation-contract.json` from the **single** fenced contract block (multiple candidates fail closed `invalid-output`). Fallback only when conditional primary absent; malformed primary fails closed. Generation-time blocked Mock yields one blocking shell node, no writer.
|
|
12
|
-
- `verificationTarget.commandLabel` must be a **frozen command label** from `verifyEvidence.commandLabels`; others fail closed (`invalid-output`). Empty frozen set (no `run.json`) skips check.
|
|
13
|
-
- `mockApi.strategy !== "not-needed"` fails closed when `mockCommandLabels` empty (`no authorized Mock verification commands`).
|
|
14
|
-
- OpenSpec policy: `task.json.frontendOpenspec.policy` (default `cited`); candidates = `requiredReadPaths` ∪ task-source citations; effective plan must append one fenced `openspec-citations` block (one JSON `{"path","section","line"}` per line). Candidates non-empty but block missing/unparseable → `openspec-citation-block-unparseable`; candidate not cited → `openspec-not-cited`; cited path without read event → `openspec-citation-not-read` (anti-fabrication). Empty candidates skip enforcement. `scan-strict` keeps full-read semantics (`openspec-not-read`); both modes keep `candidate-missing-drift`.
|
|
15
|
-
- Component conformance: missing `uiComponentChoices` (frozen bucket non-empty + UI-visible work) → `component-choices-missing`; bad/uncited `specReference.path` → `component-spec-reference-invalid` / `component-spec-not-cited`.
|
|
16
|
-
- revisionPatch mode: revision output is an RFC 7386 merge-patch delta applied on the original canonical contract node (`planFallbackFromNodeIds[0]`); protected skeleton paths remain immutable. Legacy DAGs keep full-contract semantics. Size guard: canonical serialization >64KB → `retryable-invalid` + `contract-too-large`.
|
|
17
|
-
- **`frontend-implement-pi`**: sole regular exclusive writer; uses `frontend-bounded-implement` (not this skill). Stay in `writeSet`; real requests default-on. Atomic handler/intercept/adapter with tests. Stop on forbidden paths/guesses. First line `IMPLEMENTATION_OUTCOME: changed|already-satisfied|blocked`; runtime checks against attributed diff. Optional mock-verify when frozen; static+behavior always; behavior must prove page consumption. `not-needed` keeps real integration pending unless real backend has fresh evidence.
|
|
18
|
-
|
|
19
|
-
## Contract / trace / stages (M1–M2)
|
|
20
|
-
|
|
21
|
-
- `frontend-verify-assess-shell` runs Mock/static/behavior groups, binds `verificationTargets` to command labels+evidence, writes `frontend-verification-trace.json`+`frontend-repair-assessment.json`; browser/visual stay `not-run`.
|
|
22
|
-
- `frontend-review-context-shell` captures real diff; combines contract, effective trace, repair assessment, diff into `contracts/frontend-review-context.json`.
|
|
23
|
-
- Implement stages: (1) contract confirm (2) tests sync (3) component/UI (4) API/Mock (5) frozen checks (6) diff cleanup. Summary: Contract Ref, Changed Files, Requirements, UI States, Tests, Verification Attempts, Deviations, Residual Risks.
|
|
24
|
-
|
|
25
|
-
## Repair (M3)
|
|
26
|
-
|
|
27
|
-
Only `eligible=true` runs `frontend-repair-pi` (same writeSet; no re-spec; max 1 attempt) + `frontend-reverify-shell`. No-failure skips both. Non-repairable contract/path/dependency/credential/deploy/spec-unclear failures fail closed.
|
|
28
|
-
|
|
29
|
-
## Risk & capability (M4–M6)
|
|
30
|
-
|
|
31
|
-
Deterministic risk, no model; high-risk beats small; supervised never small. Standard/high-risk: 15 top-level nodes; small: 13 (omits revision + final review). Capability seed injects adapters; openspec specs and task sources outrank adapter guidance. A11y: static/component tools only when present; Browser a11y always not-run.
|