@tea-agent/loop-agent 0.43.0-next.15 → 0.43.0-next.16

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 (81) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/build-stamp.json +3 -3
  3. package/dist/executors/dag-pi-executor.js +2 -2
  4. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-CQE0d0CU.js → abnfDiagram-N423BO3Z-C4NXyedy.js} +1 -1
  5. package/dist/worker/console/static/assets/{arc-BFYYG0Wz.js → arc-NZ3qXvBI.js} +1 -1
  6. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-B0YlJL9r.js → architectureDiagram-T3A2C74G-COZSRvml.js} +1 -1
  7. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-DN9kD3TO.js → blockDiagram-VBNYF7ZC-Ck0Gxi9C.js} +1 -1
  8. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-ChK60XBH.js → c4Diagram-5PPSVZJV-BX5HQ4Ox.js} +1 -1
  9. package/dist/worker/console/static/assets/channel-BxdTlb_5.js +1 -0
  10. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-D4AjoNa-.js → chunk-2GRJ4B5K-CoviemSL.js} +1 -1
  11. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-B2HEK_D9.js → chunk-2Q5K7J3B-DbOdOkbZ.js} +1 -1
  12. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-DXfZkTa0.js → chunk-5RXB4S5H-BsG2pmdQ.js} +1 -1
  13. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-DC1FyC_o.js → chunk-5VM5RSS4-DGdvrNm8.js} +1 -1
  14. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-U2E9RJkG.js → chunk-6Q2QTUOP-BAy7Yd6y.js} +1 -1
  15. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-BeMabzLg.js → chunk-GF5L2VYU-D9UA7hUb.js} +1 -1
  16. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-CWvf3gKN.js → chunk-JWPE2WC7-DPz7SZ8V.js} +1 -1
  17. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-BQE1P4so.js → chunk-KBJHAD2P-BmuEOIh7.js} +1 -1
  18. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-DobDWQXh.js → chunk-RYQCIY6F-CIhBWnd8.js} +1 -1
  19. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-IQe7Y7EH.js → chunk-XXDRQBXY-CScR6mDD.js} +1 -1
  20. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-_ByA1Nf8.js +1 -0
  21. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-_ByA1Nf8.js +1 -0
  22. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-CyDcJU1F.js → cose-bilkent-JH36ORCC-BjpfWaUr.js} +1 -1
  23. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-CDt8Uivk.js → cynefin-VYW2F7L2-BFQohJgT.js} +1 -1
  24. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-BmFT7svy.js → cynefinDiagram-MW4NZA55-D3gzRJnS.js} +1 -1
  25. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-hRf4KDfM.js → dagre-VZM6K2ZE-5eojkhoA.js} +1 -1
  26. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-CaDSdUs-.js → diagram-7IWD3JNH-CpD8LWu_.js} +1 -1
  27. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-Dw13MbVk.js → diagram-B4RE2ZJO-B8_4qJ2a.js} +1 -1
  28. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-TLaO5F4A.js → diagram-LBJQPF4R-HOsXf0eu.js} +1 -1
  29. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-B-YdjvlA.js → diagram-Q27KOJAE-BqwRwiWP.js} +1 -1
  30. package/dist/worker/console/static/assets/{diagram-UB23O5K3-DHR7IqG6.js → diagram-UB23O5K3-BRVCNZe1.js} +1 -1
  31. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-C5v-LKCD.js → ebnfDiagram-BXEA7PRR-Cvb1TgGh.js} +1 -1
  32. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-7tPJ992C.js → erDiagram-JOGREHBK-DS0O0qG9.js} +1 -1
  33. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-CdeV10q2.js → flowDiagram-UKHOOZJN-BHIRvRr3.js} +1 -1
  34. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-Nuod51KB.js → ganttDiagram-PKOTCBZU-DcCJ1JWx.js} +1 -1
  35. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-CiHmujkA.js → gitGraphDiagram-DS77QQ5N-B9ia5ony.js} +1 -1
  36. package/dist/worker/console/static/assets/{index-BXrp_jW4.css → index-B9goN3S5.css} +1 -1
  37. package/dist/worker/console/static/assets/{index-BnZTkOuj.js → index-wXlQohNs.js} +48 -47
  38. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-BsbKAEaZ.js → infoDiagram-6WML65LV-3ogpgegn.js} +1 -1
  39. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BMg44jAM.js → ishikawaDiagram-WSZJBQD7-4tgpQ5SL.js} +1 -1
  40. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-B2HydpC5.js → journeyDiagram-NVQOT4AX-DNfgHqFx.js} +1 -1
  41. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-Dym8tKBH.js → kanban-definition-27J2QSJJ-Dz7ngC8z.js} +1 -1
  42. package/dist/worker/console/static/assets/{linear-C2XLUUy6.js → linear-DI7Jv62E.js} +1 -1
  43. package/dist/worker/console/static/assets/{mermaid.core-CWKyfsl6.js → mermaid.core-CQA4Nzmo.js} +5 -5
  44. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-D1kp3mJa.js → mindmap-definition-FAOFIHXS-CtsMc8Mf.js} +1 -1
  45. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-yChJn9Q6.js → pegDiagram-VL7TDLO6-ByppE9yH.js} +1 -1
  46. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BL0gor4I.js → pieDiagram-7S7Q4E2Y-B5PtgFgt.js} +1 -1
  47. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-BQlU54QR.js → quadrantDiagram-CIZ2JOQS-Cq4p0k2K.js} +1 -1
  48. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-CFaiPP19.js → railroadDiagram-AXF67PYL-DjfkyljN.js} +1 -1
  49. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-3ZmKxDyQ.js → requirementDiagram-LRYGKXZP-DzynNRSl.js} +1 -1
  50. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-C6ZDqbFT.js → sankeyDiagram-W5VNT64P-Cj7TCpTJ.js} +1 -1
  51. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-DdB0hg2W.js → sequenceDiagram-SI44F4Z6-C73C6ykA.js} +1 -1
  52. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-BdaLiAnv.js → sizeCapture-X5ZJPWSS-BiNLgN2x.js} +1 -1
  53. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-D75bWtSk.js → stateDiagram-OKZ733FA-UwvjS64-.js} +1 -1
  54. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-nLgMZ0D3.js +1 -0
  55. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-BPhv358R.js → swimlanes-SLNWSIFB-CC7DH98r.js} +2 -2
  56. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BcYqTady.js +8 -0
  57. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-hrXh6Jie.js → timeline-definition-Z64GVDOM-LSBXTR70.js} +1 -1
  58. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-CxjAfZu8.js → vennDiagram-T6HMQDX7-BAuxWwGP.js} +1 -1
  59. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-C4cHKlnQ.js → wardleyDiagram-T6FBY63Y--E5_gjZx.js} +1 -1
  60. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-388ITGyq.js → xychartDiagram-ELKLHX3M-dJWNmyzF.js} +1 -1
  61. package/dist/worker/console/static/index.html +2 -2
  62. package/dist/worker/console/workspace-initialization.js +43 -8
  63. package/dist/workflows/dag/frontend-implementation-contract.js +4 -4
  64. package/dist/workflows/dag/frontend-verification-trace.js +7 -41
  65. package/dist/workflows/dag/init-hybrid.js +53 -8
  66. package/docs/templates/frontend-implementation-dag.json +5 -5
  67. package/package.json +1 -1
  68. package/skills/frontend-bounded-implement/SKILL.md +4 -3
  69. package/skills/frontend-bounded-implement/references/code-standards.md +1 -1
  70. package/skills/frontend-contract/references/contract-protocol.md +2 -2
  71. package/skills/frontend-design-review/SKILL.md +3 -3
  72. package/skills/frontend-design-review/references/review-checklist.md +3 -3
  73. package/skills/frontend-plan/SKILL.md +3 -3
  74. package/skills/frontend-plan/references/decision-contract.md +5 -4
  75. package/skills/frontend-review/SKILL.md +5 -5
  76. package/skills/frontend-review/references/review-findings.md +4 -4
  77. package/dist/worker/console/static/assets/channel-BF5AdCat.js +0 -1
  78. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BFdnxKyb.js +0 -1
  79. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BFdnxKyb.js +0 -1
  80. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-BBtfTPWx.js +0 -1
  81. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Cso4j_rK.js +0 -8
@@ -1020,6 +1020,51 @@ function extractFrontendVerifyCommandsFromMarkdown(input) {
1020
1020
  }
1021
1021
  return { staticCommands, behaviorCommands };
1022
1022
  }
1023
+ /** Reuse the project's test entrypoint; never install a runner for an untested project. */
1024
+ async function resolveFrontendExistingTests(sources) {
1025
+ const repoRoot = sources.repoRoot ?? process.cwd();
1026
+ const explicit = buildExplicitFrontendVerifyCommands(sources.taskConfig, repoRoot).behaviorCommands;
1027
+ if (explicit.length > 0)
1028
+ return explicit;
1029
+ const declared = extractFrontendVerifyCommandsFromMarkdown({ ...sources, repoRoot }).behaviorCommands;
1030
+ if (declared.length > 0)
1031
+ return declared;
1032
+ let manifest;
1033
+ try {
1034
+ manifest = JSON.parse(await readFile(path.join(repoRoot, "package.json"), "utf8"));
1035
+ }
1036
+ catch (error) {
1037
+ if (error.code === "ENOENT")
1038
+ return [];
1039
+ throw error;
1040
+ }
1041
+ const script = manifest.scripts?.test;
1042
+ if (!script || /no test specified/i.test(script))
1043
+ return [];
1044
+ // Focus concrete existing tests; unknown runners and broad scopes retain the
1045
+ // project entrypoint instead of receiving guessed filtering flags.
1046
+ const files = [];
1047
+ for (const file of sources.taskConfig.allowedPaths) {
1048
+ if (/[*?\[\]{}]/.test(file) || !/\.(?:test|spec)\.[cm]?[jt]sx?$/.test(file))
1049
+ continue;
1050
+ if (sources.taskConfig.forbiddenPaths.some((pattern) => pathMatchesPattern(file, pattern)))
1051
+ continue;
1052
+ if (existsSync(path.join(repoRoot, file)))
1053
+ files.push(file);
1054
+ }
1055
+ const runner = /(?:^|[\s/])jest(?:[\s/.]|$)/.test(script) ? "jest"
1056
+ : /(?:^|[\s/])vitest(?:[\s/.]|$)/.test(script) ? "vitest" : undefined;
1057
+ const args = ["npm", "test"];
1058
+ if (runner) {
1059
+ args.push("--");
1060
+ if (runner === "jest")
1061
+ args.push("--runInBand");
1062
+ else if (!/\b(?:run|--run)\b/.test(script))
1063
+ args.push("--run");
1064
+ args.push(...files);
1065
+ }
1066
+ return [{ label: "existing unit tests", args, cwd: repoRoot }];
1067
+ }
1023
1068
  function extractFrontendMockVerifyCommandsFromMarkdown(input) {
1024
1069
  const commands = [];
1025
1070
  const markdown = [
@@ -3038,7 +3083,7 @@ async function buildFrontendHybridDagFromTask(sources) {
3038
3083
  "- interactions[]: name, trigger, expectedBehavior, implementationTargets, verificationTargetIds",
3039
3084
  "- targets: routes, publicApiChanges (files are runtime-owned)",
3040
3085
  "- mockApi: strategy, productionDefaultOff, activation, endpoints[]",
3041
- "- verificationTargets[]: id (stable test-title trace token for behavior targets), commandId (frozen directory key), mode + commandLabel (runtime-resolved), file, requirementIds, uiStates, scope? (display-only)",
3086
+ "- verificationTargets[]: id (contract entry identifier; not a required test-title marker), commandId (frozen directory key), mode + commandLabel (runtime-resolved), file, requirementIds, uiStates, scope? (display-only)",
3042
3087
  "- designEvidence: source, paths, conflicts; evidenceGaps[] (optional)",
3043
3088
  "- optional: stylingStrategy, uiComponentChoices[], dependencyPolicy, residualRisks[], realIntegrationGap",
3044
3089
  "- uiComponentChoices[]: purpose, component, decision (specified|reuse-existing|new), specReference { path, section, line } | null, rationale",
@@ -3080,7 +3125,7 @@ async function buildFrontendHybridDagFromTask(sources) {
3080
3125
  "Frontend planning must consume the read-only Mock assessment strategy produced after scouting; MOCK_STRATEGY: blocked must not pass the deterministic Mock contract gate.",
3081
3126
  "Mock implementations must preserve the real request path as the default, require explicit test/dev activation, and never rely on commenting out the real request.",
3082
3127
  "Mock-backed behavior evidence proves only the documented frontend contract, never real API integration.",
3083
- "frontend-implementation completes requirement-to-code coverage and npm run build only. Behavior correctness and all testing are deferred to frontend-test; build success is never behavior-test success.",
3128
+ "frontend-implementation requires npm run build and existing affected unit tests. Update affected tests with the implementation; do not install a test framework when absent. Broader browser/visual testing may be deferred; build success is never test success.",
3084
3129
  "Frontend closeout renders only from committed facts; a weak status (failed / not-run / baseline-debt / mock-backed / pending) can never be rewritten into a stronger one (passed / real-integrated).",
3085
3130
  `Frontend risk classification: ${frontendRisk.selectedRisk} — ${frontendRisk.reason}`,
3086
3131
  frontendRisk.forceFullGates
@@ -3096,8 +3141,7 @@ async function buildFrontendHybridDagFromTask(sources) {
3096
3141
  : "Mock contract is blocked by deterministic generation-time Mock safety constraints.";
3097
3142
  return buildBlockedFrontendMockDag(frontendSources, readOnlyPaths, forbiddenPaths, globalConstraints, blockedReason);
3098
3143
  }
3099
- // Implementation verifies buildability only. Tests (including task-declared
3100
- // and Mock commands) belong to the independent frontend-test workflow.
3144
+ // Build is mandatory; existing or explicitly declared tests remain required.
3101
3145
  // Keep a real failing command when build is unavailable; never use a no-op.
3102
3146
  const buildCommands = [{
3103
3147
  label: "build",
@@ -3112,12 +3156,13 @@ async function buildFrontendHybridDagFromTask(sources) {
3112
3156
  commands: buildCommands, fallbackCommands: [], commandTexts: staticShellCommands,
3113
3157
  finalFullRequired: true, commandTimeoutMs: DEFAULT_VERIFY_TIMEOUT_MS,
3114
3158
  });
3115
- const behaviorShellCommands = [];
3159
+ const testCommands = await resolveFrontendExistingTests(sources);
3160
+ const behaviorShellCommands = buildVerifyShellCommands({ repoRoot: sources.repoRoot ?? process.cwd(), commands: testCommands, fallbackCommands: [] });
3116
3161
  const lintShellCommands = [];
3117
3162
  const mockShellCommands = [];
3118
3163
  const behaviorVerifyEvidence = buildVerifyEvidence({
3119
3164
  phase: "final", quota: "full", commandSource: "inline",
3120
- commands: [], fallbackCommands: [], commandTexts: [],
3165
+ commands: testCommands, fallbackCommands: [], commandTexts: behaviorShellCommands,
3121
3166
  commandTimeoutMs: DEFAULT_VERIFY_TIMEOUT_MS,
3122
3167
  });
3123
3168
  // Contract v2: the frozen command directory is the only command reference
@@ -3134,7 +3179,7 @@ async function buildFrontendHybridDagFromTask(sources) {
3134
3179
  });
3135
3180
  const fixedVerificationContext = [
3136
3181
  "## Fixed frontend verification entrypoints",
3137
- "Implementation verification is npm run build only. Map requirements to implementation files and the shared static build target. Test design, test execution, behavior correctness, edge cases, regression, accessibility and Mock-backed testing are deferred to the independent frontend-test workflow; missing test plans or test evidence never block this implementation workflow.",
3182
+ "Require npm run build. Map requirements to implementation files and the shared static build target. Include affected existing test files in implementation steps and maintain their assertions; run the frozen existing-test commands. No separate test plan, new framework, or per-AC test-title protocol is required. Browser/visual testing may be deferred to frontend-test. Missing test infrastructure alone is not a blocker; failing required commands are blockers.",
3138
3183
  "Reference frozen commands ONLY by commandId (record_plan_verification_target entry.commandId). The runtime resolves mode and label; never invent a mode or type.",
3139
3184
  ...frontendVerifyDirectory.map((entry) => ` - ${entry.commandId} [${entry.mode}]: ${JSON.stringify(entry.label)}`),
3140
3185
  `- Static command source: ${staticVerifyEvidence.commandSource}`,
@@ -3255,7 +3300,7 @@ async function buildFrontendHybridDagFromTask(sources) {
3255
3300
  "Consume the complete injected input scope and produce a concise frontend implementation contract as typed requirement facts from complete injected scopes.",
3256
3301
  "Confirm each requirement by the SAME id as the ledger canonical requirement it covers (sourceBinding.requirementIds, e.g. AC-001) — do NOT invent new REQ/BR prefixed ids for canonical requirements: the compiled contract must match the ledger canonical requirement ids exactly or schema validation rejects it (unknown requirement id). record_requirement takes the canonical id and optional execution:{groupId,kind,summary}; the runtime commits the authoritative text and sourceFragmentIds from the frozen ledger. Never pass text/statement/sourceFragmentIds yourself — model rewrites and JSON-stringified fragment arrays are rejected.",
3257
3302
  "Requirement semantics, source spans, dispositions, and fragment bindings are ledger/runtime-owned. If a canonical requirement is genuinely blocked, say so in the Markdown contract narrative and finalize with the matching disposition instead of trying to encode it in the requirement fact.",
3258
- "Register source evidence expectations without treating them as this implementation run's test gates. Always register a non-blocking frontend-test handoff intent for behavior, regression, Mock, and integration testing. This run checks requirement implementation coverage and npm run build only; test methods and results belong to the separate testing workflow.",
3303
+ "Preserve source verification requirements. This run requires build and existing affected unit tests, including maintaining their assertions. Do not require a new framework when absent. Register a non-blocking frontend-test handoff for additional browser, visual, Mock, and integration testing; no separate test plan is required.",
3259
3304
  'Use record_evidence_expectation with {requirementId,evidence:{static,behavior,mock,"real-integration"}}; every lane is required | optional | not-applicable. Requirement text and provenance remain runtime-owned.',
3260
3305
  'Before finalize_contract ready, call record_required_deliverables once with the complete {items:[{path,requirementId,sourceFragmentId}]} inventory, or {items:[]} when no file delivery is mandatory. Interpret the original source, including lists and tables: allowedPaths/only-allowed-to-modify is permission, not an obligation; do not promote prohibited files, examples or references into deliverables. Paths must occur exactly in a frozen source fragment bound to that canonical requirement. Correct the whole inventory before finalizing if needed.',
3261
3306
  "Authoritative UI states: when the task source declares a UI-state table (state id / trigger / observable outcome), extract it VERBATIM through record_ui_state, one call per state, using the source's own state ids. The planner must bind these ids later — do not rename, merge, or invent states.",
@@ -10,7 +10,7 @@
10
10
  "The final closeout distinguishes passed, not-run, and residual-risk evidence."
11
11
  ],
12
12
  "globalConstraints": [
13
- "frontend-implementation plans and reviews requirement implementation coverage; npm run build is the only verification command. Tests and behavior correctness are deferred to frontend-test, non-blocking; preserve existing tests and production Mock isolation.",
13
+ "frontend-implementation plans and reviews requirement implementation coverage; npm run build and frozen existing tests are required. Update affected unit tests; do not add a framework when absent. Browser/visual checks may follow later; preserve production Mock isolation.",
14
14
  "This is a self-contained static template: do not generate, import, or merge a DAG from a runtime builder before execution.",
15
15
  "Replace every REPLACE/WITH/... placeholder with concrete repository paths or deterministic commands before execution.",
16
16
  "Do not commit runtime traces under .harness/dag-runs/.",
@@ -39,7 +39,7 @@
39
39
  {
40
40
  "id":"frontend-plan-pi", "depends_on":["frontend-scout-pi"], "complexity":"MED", "executor":"pi", "role":"planner", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
41
41
  "outputContract":"Plan record_* tools for scoped coverage, shared execution groups and UX, one mock endpoint per record, then one successful finalize_plan. Runtime derives canonical JSON and Markdown. No file writes.",
42
- "subtask_prompt":"List the requirement implementation plan: what to change and in which authorized files. Map requirements to the shared static build target. Do not require test plans or behavior correctness evidence; tests may be added later in frontend-test."
42
+ "subtask_prompt":"List the requirement implementation plan: what to change and in which authorized files. Map requirements to the shared static build target. Do not require test plans or behavior correctness evidence; include affected existing test files in implementation steps."
43
43
  },
44
44
  {
45
45
  "id":"frontend-design-policy-shell", "depends_on":["frontend-plan-pi"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
@@ -50,7 +50,7 @@
50
50
  {
51
51
  "id":"frontend-design-review-pi", "depends_on":["frontend-design-policy-shell"], "complexity":"MED", "executor":"pi", "role":"reviewer", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/SOURCE/PATH/**","REPLACE/WITH/FRONTEND/TEST/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
52
52
  "outputContract":"record_design_finding for individual findings; approve_design or request_design_changes provides the sole committed terminal. Independently review execution-group member differences. No file writes.",
53
- "subtask_prompt":"Review the approved plan against the frontend contract and design-policy result. Reject missing visible states, interaction behavior, accessibility obligations, or unsupported design claims. Do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; do not require test plans, tests or behavior correctness evidence. Preserve existing tests. Only npm run build is required; test work is deferred to frontend-test."
53
+ "subtask_prompt":"Review the approved plan against the frontend contract and design-policy result. Reject missing visible states, interaction behavior, accessibility obligations, or unsupported design claims. Do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
54
54
  },
55
55
  {
56
56
  "id":"frontend-writer-admission-shell", "depends_on":["frontend-design-review-pi"], "complexity":"LOW", "executor":"shell", "role":"verifier", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
@@ -61,7 +61,7 @@
61
61
  {
62
62
  "id":"frontend-implement-pi", "depends_on":["frontend-writer-admission-shell"], "complexity":"HIGH", "executor":"pi", "role":"implementer", "toolProfile":"write", "writePolicy":"exclusive", "writeSet":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
63
63
  "outputContract":"Implementation summary with changed files, contract coverage, focused checks run, and residual risks.",
64
- "subtask_prompt":"Implement only the admitted frontend changes. Preserve established component, styling, accessibility, and state-management conventions. Cover every approved behavior, state, and interaction, then report changed files and focused verification. Do not broaden writeSet or add undeclared dependencies. Scope: requirement implementation coverage and authorized paths/dependencies only; do not require test plans, tests or behavior correctness evidence. Preserve existing tests. Only npm run build is required; test work is deferred to frontend-test."
64
+ "subtask_prompt":"Implement only the admitted frontend changes. Preserve established component, styling, accessibility, and state-management conventions. Cover every approved behavior, state, and interaction, then report changed files and focused verification. Do not broaden writeSet or add undeclared dependencies. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
65
65
  },
66
66
  {
67
67
  "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/**"],
@@ -78,7 +78,7 @@
78
78
  {
79
79
  "id":"frontend-review-pi", "depends_on":["frontend-review-context-shell"], "complexity":"MED", "executor":"pi", "role":"reviewer", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
80
80
  "outputContract":"record_review_finding for individual findings; approve_review or request_review_changes provides the sole committed terminal. No file writes.",
81
- "subtask_prompt":"Review the actual diff and archived verification evidence against the frontend contract. Do not treat missing, weak, mock-only, or not-run evidence as passed. Report explicit residual risks; do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; do not require test plans, tests or behavior correctness evidence. Preserve existing tests. Only npm run build is required; test work is deferred to frontend-test."
81
+ "subtask_prompt":"Review the actual diff and archived verification evidence against the frontend contract. Do not treat missing, weak, mock-only, or not-run evidence as passed. Report explicit residual risks; do not edit files. Scope: requirement implementation coverage and authorized paths/dependencies only; no separate test plan or new framework is required. Maintain affected existing tests and require frozen tests plus build to pass; browser/visual checks may be deferred."
82
82
  },
83
83
  {
84
84
  "id":"frontend-closeout-shell", "depends_on":["frontend-review-pi"], "complexity":"LOW", "executor":"shell", "role":"closeout", "writePolicy":"read-only", "allowedPaths":["REPLACE/WITH/FRONTEND/TARGET/PATH/**"], "forbiddenPaths":[".harness/**","artifacts/**"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tea-agent/loop-agent",
3
- "version": "0.43.0-next.15",
3
+ "version": "0.43.0-next.16",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "loop-agent": "bin/loop-agent.js",
@@ -35,15 +35,16 @@ canonical targets and do not authorize additional discovery.
35
35
 
36
36
  ## Implementation Discipline
37
37
 
38
- - Implement the planned requirements without a test-first stage. Preserve existing tests and unrelated files; stay inside
38
+ - Implement the planned requirements without a test-first stage. Update affected existing tests and preserve unrelated files; stay inside
39
39
  `allowedPaths` and `writeSet`.
40
40
  - Implement every requirement outcome, interaction, and applicable UI state
41
41
  assigned to the writer. Keep the real request path enabled by default and use
42
42
  only the approved Mock/API strategy.
43
43
  - Do not add dependencies unless the contract approves them. Never relax lint,
44
44
  type, test, or build configuration; never add `.skip` or `.only`.
45
- - Run only npm run build, frozen by this workflow. Do not add or run unit tests;
46
- testing can be added later in the independent frontend-test workflow.
45
+ - Run npm run build and frozen existing-test commands. Update affected unit tests
46
+ with changed interfaces/behavior; never delete assertions just to pass. Do not
47
+ install a test framework when absent. Browser/visual tests may follow later.
47
48
 
48
49
  ## Completion Summary
49
50
 
@@ -15,5 +15,5 @@ unrelated repository areas to discover new rules or redesign approved decisions.
15
15
  - Trace fixtures to the approved API/schema evidence and never store secrets.
16
16
  - Do not add unapproved dependencies, relax lint/type/test/build configuration,
17
17
  add `.skip`/`.only`, comment out real requests, or write outside `writeSet`.
18
- - Run only npm run build and report its real status. Downstream shell
18
+ - Run build and frozen existing tests, updating affected unit tests; report real status. Downstream shell
19
19
  verification remains authoritative.
@@ -16,8 +16,8 @@
16
16
  - Register static, behavior, Mock, and real-integration evidence expectations as
17
17
  required, optional, or not-applicable. The classification follows the source and
18
18
  risk; it is not selected for model convenience. These are source expectations
19
- for the non-blocking frontend-test handoff, not implementation test gates.
20
- This implementation workflow executes only npm run build.
19
+ for implementation and the frontend-test handoff. Build and existing affected
20
+ unit tests are required here; do not invent a test framework when absent.
21
21
  - Register a non-blocking frontend-test handoff for UI-visible or interactive work.
22
22
  - Preserve exact command labels and referenced paths. Do not invent evidence,
23
23
  connector results, APIs, or verification commands.
@@ -61,6 +61,6 @@ change names its criterion/section, gap, and required plan change.
61
61
 
62
62
  ## Implementation workflow boundary
63
63
 
64
- Plan lists what to implement and where. Only npm run build is executed. Missing
65
- unit tests, test frameworks, test plans, or behavior evidence never block this
66
- workflow. Existing tests are preserved; tests can be added later in frontend-test.
64
+ Plan implementation files and affected existing unit tests; require frozen tests
65
+ and build to pass. No new framework or separate test plan is required. Additional
66
+ browser/visual checks may follow later in frontend-test.
@@ -20,9 +20,9 @@
20
20
 
21
21
  ## Verification
22
22
 
23
- - The only frozen command is npm run build.
24
- - Do not require test plans, test files, a test framework, or behavior evidence.
25
- - Behavior correctness and all tests are deferred to frontend-test and non-blocking.
23
+ - Require npm run build and the frozen existing-test commands.
24
+ - Plan must include affected existing tests; no separate test plan or new framework.
25
+ - Existing test failures block completion; browser/visual checks may be deferred.
26
26
 
27
27
  ## Mock Safety
28
28
 
@@ -47,9 +47,9 @@ narrative. Record a genuine evidence gap when frozen facts are insufficient.
47
47
 
48
48
  ## Implementation boundary
49
49
 
50
- Plan implementation actions and locations; this workflow runs only npm run build.
51
- Missing tests or test plans never block it. Preserve existing tests; add tests
52
- later in frontend-test.
50
+ Plan actions and files, including affected existing unit tests. Build and frozen
51
+ existing tests must pass. No separate test plan or new framework is required.
52
+ Browser/visual testing may follow in frontend-test.
53
53
 
54
54
  Submit `finalize_plan({implementationSteps: [{requirementIds, action}]})`.
55
55
  Cover every frozen ID, including constraints/exclusions (what to preserve/avoid).
@@ -7,14 +7,15 @@
7
7
  - Record observable state and interaction behavior, including trigger and expected
8
8
  behavior. IDs and paths alone are not behavioral coverage.
9
9
  - Use a shared static build target for requirement coverage; build does not prove behavior.
10
- - Do not create behavior test targets, require test titles, or design tests.
10
+ - List affected existing tests in implementation steps and update their assertions.
11
+ No separate test plan or per-AC test titles are required; frozen test commands must pass.
11
12
  - Static targets are for project-wide commands and are traced by file and command
12
13
  only.
13
14
 
14
15
  ### Build target mapping
15
16
 
16
- Each static build target names the requirements mapped to its implementation file.
17
- Use the frozen build commandId. This mapping is not evidence of tested behavior.
17
+ Static build targets map requirements to files using the frozen commandId; they
18
+ do not prove tested behavior.
18
19
 
19
20
  ```json
20
21
  {
@@ -133,7 +134,7 @@ and checked again by the policy shell.
133
134
  Use `record_plan_group_coverage` for a complete declared execution group with shared
134
135
  targets/VTs; runtime expands to all canonical members. Submit individual coverage
135
136
  for differences. Constraints/exclusions create no invented UI or tests; keep genuine
136
- source expectations for a non-blocking frontend-test handoff; do not require tests here.
137
+ source expectations and affected existing tests; no new framework is required.
137
138
 
138
139
  Submit Mock policy with `record_mock_api` and empty endpoints, then one endpoint per
139
140
  `record_mock_endpoint`. Use `replace:true` for revisions, plus `remove:true` to
@@ -34,11 +34,11 @@ Requested changes end this run; the recovery controller owns follow-up.
34
34
  and bound target files. Report missing implementation or altered requirements.
35
35
  - Check allowed paths, forbidden paths, approved dependencies and source-bound
36
36
  design constraints. Preserve production Mock isolation and real-request defaults.
37
- - Inspect the archived npm run build result; it is the only required command.
38
- - Do not require unit tests, a test framework, test plans, lint, separate typecheck,
39
- behavior evidence or Mock tests. Existing tests are preserved.
40
- - Behavior correctness, edge cases and regressions belong to the non-blocking
41
- frontend-test handoff and may be tested later. Do not expand into a correctness audit.
37
+ - Inspect build and frozen existing-test results; required commands must pass.
38
+ - Check affected existing tests were maintained with changed behavior/interfaces.
39
+ Do not require a new framework or separate test plan when absent.
40
+ - Broader browser/visual checks may use the frontend-test handoff. Do not defer
41
+ failing existing unit tests or weaken assertions to permit approval.
42
42
  - Build success proves buildability only. Do not report tested behavior or real
43
43
  integration without actual evidence. Treat shell exit status as authoritative.
44
44
  - Do not edit files or perform repository-wide rediscovery.
@@ -19,12 +19,12 @@ verification results. Use only evidence supplied in the canonical review context
19
19
  1. Establish changed files and authorized write boundaries.
20
20
  2. Map each requirement to corresponding implementation.
21
21
  3. Check source-bound design constraints, dependency permission and production Mock isolation.
22
- 4. Confirm npm run build passed and classify findings within this scope.
22
+ 4. Confirm build and frozen existing tests passed and classify findings within this scope.
23
23
 
24
24
  ## Pass rules
25
25
 
26
26
  All requirements have corresponding implementation, changes stay authorized,
27
- production Mock safety is preserved, and npm run build passed. No blocking finding
28
- within this scope remains. Missing unit tests, test frameworks, test plans, lint,
29
- separate typecheck or behavior evidence are not blockers. Existing tests are kept.
27
+ production Mock safety is preserved, and build plus frozen existing tests passed.
28
+ Affected unit tests must reflect changed behavior; do not remove assertions to pass.
29
+ No new framework or separate test plan is required when absent.
30
30
  Behavior and real integration remain unverified unless separate evidence exists.
@@ -1 +0,0 @@
1
- import{ag as o,ah as n}from"./mermaid.core-CWKyfsl6.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-BeMabzLg.js";import{_ as i}from"./mermaid.core-CWKyfsl6.js";import"./chunk-5VM5RSS4-DC1FyC_o.js";import"./chunk-XXDRQBXY-IQe7Y7EH.js";import"./chunk-KBJHAD2P-BQE1P4so.js";import"./chunk-2GRJ4B5K-D4AjoNa-.js";import"./index-BnZTkOuj.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-BeMabzLg.js";import{_ as i}from"./mermaid.core-CWKyfsl6.js";import"./chunk-5VM5RSS4-DC1FyC_o.js";import"./chunk-XXDRQBXY-IQe7Y7EH.js";import"./chunk-KBJHAD2P-BQE1P4so.js";import"./chunk-2GRJ4B5K-D4AjoNa-.js";import"./index-BnZTkOuj.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as r,b as e,a,S as s}from"./chunk-5RXB4S5H-DXfZkTa0.js";import{_ as i}from"./mermaid.core-CWKyfsl6.js";import"./chunk-XXDRQBXY-IQe7Y7EH.js";import"./chunk-KBJHAD2P-BQE1P4so.js";import"./chunk-2GRJ4B5K-D4AjoNa-.js";import"./index-BnZTkOuj.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-CdeV10q2.js";import{_ as a}from"./mermaid.core-CWKyfsl6.js";import"./chunk-5VM5RSS4-DC1FyC_o.js";import"./chunk-XXDRQBXY-IQe7Y7EH.js";import"./chunk-KBJHAD2P-BQE1P4so.js";import"./chunk-2GRJ4B5K-D4AjoNa-.js";import"./channel-BF5AdCat.js";import"./index-BnZTkOuj.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};