@tea-agent/loop-agent 0.39.0-next.9 → 0.39.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/AGENTS.md +4 -1
- package/CHANGELOG.md +262 -69
- package/README.md +11 -5
- package/bin/loop-agent.js +7 -3
- package/dist/application/dag/generate-task-dag.js +9 -0
- package/dist/application/task-lifecycle/advance.js +4 -0
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +16 -5
- package/dist/cli/program.js +16 -2
- package/dist/cli/update/notifier.js +2 -2
- package/dist/cli.js +2 -1
- package/dist/commands/dag-rerun.js +55 -1
- package/dist/commands/init-model-catalog.js +464 -0
- package/dist/commands/init-upgrade.js +265 -97
- package/dist/commands/init.js +428 -27
- package/dist/commands/inspect-next.js +8 -0
- package/dist/commands/task-advance.js +31 -0
- package/dist/executors/dag-pi-executor.js +124 -18
- package/dist/executors/pi-event-serializer.js +42 -1
- package/dist/executors/pi-executor.js +51 -0
- package/dist/executors/pi-extension-resolver.js +233 -0
- package/dist/executors/pi-playwright-cli-tool.js +74 -28
- package/dist/executors/pi-sdk-executor.js +187 -59
- package/dist/executors/shell-executor.js +554 -33
- package/dist/executors/shell-write-guard.js +7 -0
- package/dist/shared/dag-failure-category.js +138 -0
- package/dist/shared/dag-prompt-override.js +28 -0
- package/dist/shared/operator/capabilities.js +181 -27
- package/dist/shared/playwright-cli-command-policy.js +15 -0
- package/dist/shared/update/console-notifier.js +100 -0
- package/dist/{cli → shared}/update/npm-client.js +41 -8
- package/dist/{cli → shared}/update/state.js +41 -13
- package/dist/task/config-types.js +28 -0
- package/dist/task/contract/constants.js +1 -0
- package/dist/task/contract/diff.js +26 -0
- package/dist/task/contract/project.js +5 -0
- package/dist/task/contract/schema.js +6 -1
- package/dist/task/source-prepare/build-draft.js +15 -0
- package/dist/task/source-prepare/parse-intent.js +24 -4
- package/dist/worker/cli.js +31 -1
- package/dist/worker/console/chat/deferred-turn.js +91 -0
- package/dist/worker/console/chat/mcp-inventory.js +221 -0
- package/dist/worker/console/chat/operation-card.js +8 -1
- package/dist/worker/console/chat/pi-console-config.js +81 -10
- package/dist/worker/console/chat/pi-runtime.js +165 -83
- package/dist/worker/console/chat/repo-walk.js +10 -1
- package/dist/worker/console/chat/routes.js +480 -55
- package/dist/worker/console/chat/semantic-activity.js +20 -8
- package/dist/worker/console/chat/session-store.js +146 -2
- package/dist/worker/console/chat/turn-process.js +10 -10
- package/dist/worker/console/dag-execution-receipt.js +33 -0
- package/dist/worker/console/inspect-split.js +18 -0
- package/dist/worker/console/operation-run-facts.js +19 -3
- package/dist/worker/console/operator-actions.js +195 -4
- package/dist/worker/console/operator-user-error.js +2 -2
- package/dist/worker/console/pi-readiness.js +5 -4
- package/dist/worker/console/recovery-cta.js +4 -4
- package/dist/worker/console/recovery-error-copy.js +4 -4
- package/dist/worker/console/routes.js +43 -2
- package/dist/worker/console/security.js +63 -9
- package/dist/worker/console/server.js +42 -6
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-BLXFe4qI.js → abnfDiagram-N423BO3Z-Br92EGb7.js} +1 -1
- package/dist/worker/console/static/assets/{arc-7iOJeqho.js → arc-oulImtQq.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-CYoyj5K7.js → architectureDiagram-T3A2C74G-tyHc6aqO.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-fK01JNlR.js → blockDiagram-VBNYF7ZC-CY86BSpT.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-bzbw5D_Z.js → c4Diagram-5PPSVZJV-BKKsDmNs.js} +1 -1
- package/dist/worker/console/static/assets/channel-TY36zt-i.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-Cf6hJFFG.js → chunk-2GRJ4B5K-CXZdjl3B.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-DSFXR-et.js → chunk-2Q5K7J3B-B-aIFDQ5.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-BagJechl.js → chunk-5RXB4S5H-BDgAW_B2.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-E7QNMFaW.js → chunk-5VM5RSS4-DABa4UPR.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-BG_eOBrC.js → chunk-6Q2QTUOP-aGbysVOx.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-Bo42dqol.js → chunk-GF5L2VYU-B8MSZDVs.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-dibM-87v.js → chunk-JWPE2WC7-CpelV73g.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-Bytrp3Oe.js → chunk-KBJHAD2P-BE04ty3z.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-DBABILrr.js → chunk-RYQCIY6F-BUxTkaaR.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-DCUk5Pf9.js → chunk-XXDRQBXY-CYYBVKfX.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-Dk7QCChM.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-Dk7QCChM.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BlGE9v6E.js → cose-bilkent-JH36ORCC-CEQF_xmQ.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-DGl5ewph.js → cynefin-VYW2F7L2-CqpxN5IT.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-DsJ_SVH_.js → cynefinDiagram-MW4NZA55-B3PzanVi.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-BIhjFdzv.js → dagre-VZM6K2ZE-BSUGCNx1.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-Dmy1ctTb.js → diagram-7IWD3JNH-CdLevU5T.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-DYCtWUF3.js → diagram-B4RE2ZJO-BjpF_Kok.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-BMZFHVd2.js → diagram-LBJQPF4R-C4I6NJny.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-b_U8gfaO.js → diagram-Q27KOJAE-C8hecCr5.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-Dzy_bn-I.js → diagram-UB23O5K3-Daod6tOS.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-DJCiMNEI.js → ebnfDiagram-BXEA7PRR-BvvmazGv.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-28lD016B.js → erDiagram-JOGREHBK-DeN_vfV4.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-DGyHJmIw.js → flowDiagram-UKHOOZJN-D6dq1t9z.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-CzdwUjrO.js → ganttDiagram-PKOTCBZU-DziIdNY4.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-D9bGwuo8.js → gitGraphDiagram-DS77QQ5N-Dy4s5CXr.js} +1 -1
- package/dist/worker/console/static/assets/index-C3GgHg-g.css +1 -0
- package/dist/worker/console/static/assets/index-Ci8ksvBm.js +406 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-LJgJUQFC.js → infoDiagram-6WML65LV-Czv5eYx2.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-98LaB8zb.js → ishikawaDiagram-WSZJBQD7-Bsk3nFRT.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-D-ISzwlQ.js → journeyDiagram-NVQOT4AX-DxGmNj5K.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-gfYOI-EL.js → kanban-definition-27J2QSJJ-CYCFqkO_.js} +1 -1
- package/dist/worker/console/static/assets/{linear-CyntZgKV.js → linear-B0YzRwrd.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-BBOR7dg0.js → mermaid.core-t3EZtIGh.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-CQAgwPMk.js → mindmap-definition-FAOFIHXS-BTXpTv0T.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-DkMiZFuV.js → pegDiagram-VL7TDLO6-DU8UkKqA.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-DLNXa_0J.js → pieDiagram-7S7Q4E2Y-DP4y8ohp.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-Dc7bdzjm.js → quadrantDiagram-CIZ2JOQS-B07vNaYR.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-BxMB0QqW.js → railroadDiagram-AXF67PYL-xDWktb2i.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-FjumoKn4.js → requirementDiagram-LRYGKXZP-BLNMKqeS.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-CkhKc_E3.js → sankeyDiagram-W5VNT64P-n0adalxH.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-DoBWqTTH.js → sequenceDiagram-SI44F4Z6-BbnS-2DL.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-CQeh_YeE.js → sizeCapture-X5ZJPWSS-B4uPpCLu.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-LuHmFW-I.js → stateDiagram-OKZ733FA--MMbB0fX.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-BqOigMQ4.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-CHwbDctY.js → swimlanes-SLNWSIFB-BXUgp2QY.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Caxz9UA2.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-CoMngk0X.js → timeline-definition-Z64GVDOM-CsaMxki7.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-CURYbtbO.js → vennDiagram-T6HMQDX7-C2IuG9iH.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-BdqSECjU.js → wardleyDiagram-T6FBY63Y-CmEWOXCW.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-DbMUYuAg.js → xychartDiagram-ELKLHX3M-D_9LE0MG.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/app/useOperatorActions.js +1 -1
- package/dist/worker/console/static-src/app/useRecoveryActions.js +2 -2
- package/dist/worker/console/static-src/app/useRecoveryConsole.js +38 -2
- package/dist/worker/console/static-src/app/useRunProgress.js +46 -0
- package/dist/worker/console/static-src/operator-chat/cards/failure-category-advice.js +25 -0
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +74 -26
- package/dist/worker/console/static-src/operator-chat/input-history.js +76 -0
- package/dist/worker/console/static-src/operator-chat/mutation-gate.js +1 -1
- package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +328 -0
- package/dist/worker/console/static-src/operator-chat/resource-diagnostics.js +204 -0
- package/dist/worker/console/static-src/operator-chat/turn-stream-controller.js +8 -1
- package/dist/worker/console/static-src/operator-chat/turn-submission.js +54 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +3 -0
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +237 -11
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +50 -22
- package/dist/worker/console/static-src/operator-chat/useComposer.js +32 -0
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +26 -1
- package/dist/worker/console/static-src/pages/tasks/run-id-resolution.js +79 -0
- package/dist/worker/console/static-src/pages/tasks/run-ownership-verify.js +23 -0
- package/dist/worker/console/static-src/pages/tasks/run-panel-progress.js +110 -0
- package/dist/worker/loop-agent/loop-agent-client.js +7 -3
- package/dist/worker/materialize/harness-task-lineage.js +5 -2
- package/dist/worker/observability/read-model.js +22 -0
- package/dist/worker/observe/node-input.js +74 -3
- package/dist/worker/observe/node-process.js +377 -0
- package/dist/worker/observe/routes.js +36 -3
- package/dist/worker/observe/shell-handler-keys.js +34 -0
- package/dist/worker/observe/static/api.js +66 -0
- package/dist/worker/observe/static/constants.js +8 -1
- package/dist/worker/observe/static/dag-history-labels.js +4 -0
- package/dist/worker/observe/static/format.js +23 -0
- package/dist/worker/observe/static/markdown-render.js +20 -1
- package/dist/worker/observe/static/operator-chrome.js +4 -0
- package/dist/worker/observe/static/state.js +13 -2
- package/dist/worker/observe/static/styles.css +73 -0
- package/dist/worker/observe/static/views/dag-inspector.js +612 -8
- package/dist/worker/observe/static/views/dag.js +8 -1
- package/dist/worker/observe/static/views/failures.js +5 -2
- package/dist/worker/observe/static/views/session-timeline.js +78 -9
- package/dist/workflows/dag/backend-test-case-coverage-analysis.js +827 -53
- package/dist/workflows/dag/backend-test-case-manifest.js +4 -0
- package/dist/workflows/dag/backend-test-execution-contract.js +18 -9
- package/dist/workflows/dag/backend-test-gap-fill.js +205 -0
- package/dist/workflows/dag/backend-test-intake-context.js +32 -0
- package/dist/workflows/dag/backend-test-layout.js +133 -0
- package/dist/workflows/dag/backend-test-markdown-workflow.js +167 -32
- package/dist/workflows/dag/backend-test-module-stem.js +5 -0
- package/dist/workflows/dag/backend-test-pytest-collection.js +368 -33
- package/dist/workflows/dag/backend-test-result-contract.js +1 -1
- package/dist/workflows/dag/backend-test-scenario-param.js +884 -140
- package/dist/workflows/dag/backend-test-scenario-partitions.js +321 -0
- package/dist/workflows/dag/backend-test-writer-completeness.js +100 -56
- package/dist/workflows/dag/contract-output-registry.js +15 -0
- package/dist/workflows/dag/contract-validator-registrations.js +3 -1
- package/dist/workflows/dag/convergence/controller.js +141 -0
- package/dist/workflows/dag/dynamic-runtime/loop-until.js +1 -1
- package/dist/workflows/dag/dynamic-runtime/map.js +25 -9
- package/dist/workflows/dag/dynamic-runtime/shared.js +1 -1
- package/dist/workflows/dag/failure-category.js +7 -116
- package/dist/workflows/dag/frontend-implementation-contract.js +377 -4
- package/dist/workflows/dag/frontend-prewrite-gate.js +96 -84
- package/dist/workflows/dag/frontend-repair.js +14 -0
- package/dist/workflows/dag/frontend-risk.js +15 -2
- package/dist/workflows/dag/frontend-test-case-checklist.js +30 -4
- package/dist/workflows/dag/frontend-test-case-manifest.js +11 -4
- package/dist/workflows/dag/frontend-test-case-quality.js +11 -16
- package/dist/workflows/dag/frontend-test-environment-probe.js +230 -0
- package/dist/workflows/dag/frontend-test-html-report.js +3 -1
- package/dist/workflows/dag/frontend-test-l5-report.js +3 -1
- package/dist/workflows/dag/frontend-test-layout.js +159 -0
- package/dist/workflows/dag/frontend-test-markdown.js +61 -0
- package/dist/workflows/dag/frontend-test-result-contract.js +188 -42
- package/dist/workflows/dag/frontend-test-standard-scenarios.js +70 -0
- package/dist/workflows/dag/frontend-verification-trace.js +29 -4
- package/dist/workflows/dag/init-hybrid.js +894 -205
- package/dist/workflows/dag/node-execution.js +183 -15
- package/dist/workflows/dag/prompt.js +60 -1
- package/dist/workflows/dag/rerun-feedback.js +212 -0
- package/dist/workflows/dag/rerun-plan.js +224 -27
- package/dist/workflows/dag/rerun-run.js +61 -6
- package/dist/workflows/dag/rerun-task.js +61 -2
- package/dist/workflows/dag/retry-policy.js +109 -0
- package/dist/workflows/dag/structured-output-repair.js +712 -0
- package/dist/workflows/dag/types.js +143 -1
- package/dist/workflows/dag/validate.js +64 -20
- package/docs/init-surface.manifest.json +5 -0
- package/docs/operations/README.md +1 -1
- package/docs/operations/local-development-environment.md +1 -5
- package/docs/skills/vetted-skill-registry.md +14 -0
- package/docs/templates/README.md +1 -1
- package/docs/templates/agent-dag.schema.json +44 -0
- package/docs/templates/backend-test-dag.json +60 -35
- package/docs/templates/frontend-test-case-checklist.md +2 -2
- package/docs/templates/frontend-test-dag.json +8 -10
- package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +1 -1
- package/docs/templates/init-managed-agents.md +13 -3
- package/harness.json +6 -4
- package/package.json +12 -4
- package/scripts/next-info.mjs +356 -0
- package/scripts/next-publish-gate.mjs +238 -0
- package/scripts/release-source-binding.mjs +251 -0
- package/skills/analyze-product-requirements/SKILL.md +8 -5
- package/skills/analyze-product-requirements/references/acceptance-criteria.md +1 -1
- package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +10 -6
- package/skills/analyze-product-requirements/references/example.md +50 -0
- package/skills/analyze-product-requirements/references/forward-test-cases.md +11 -7
- package/skills/analyze-product-requirements/references/kb-integration.md +5 -5
- package/skills/analyze-product-requirements/references/product-analysis-schema.md +8 -4
- package/skills/analyze-product-requirements/references/product-requirement-schema.md +2 -2
- package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +1 -1
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +11 -1
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +20 -1
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +9 -0
- package/skills/codebase-scout/SKILL.md +1 -1
- package/skills/fe-test-ui-scout/SKILL.md +65 -0
- package/skills/fe-test-ui-scout/references/ledger-schema.md +62 -0
- package/skills/fe-test-ui-scout/references/recon-protocol.md +54 -0
- package/skills/frontend-implementation/references/node-contracts.md +2 -2
- package/skills/improve-codebase-architecture/SKILL.md +81 -0
- package/skills/improve-codebase-architecture/deepening.md +37 -0
- package/skills/improve-codebase-architecture/html-report.md +123 -0
- package/skills/improve-codebase-architecture/interface-design.md +44 -0
- package/skills/improve-codebase-architecture/language.md +53 -0
- package/skills/loop-agent/references/command-reference.md +11 -4
- package/skills/playwright-cli/SKILL.md +23 -1
- package/skills/playwright-cli-case-generator/SKILL.md +29 -8
- package/dist/worker/console/static/assets/channel-BBOTJHvD.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-Cm8Yf8tD.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-Cm8Yf8tD.js +0 -1
- package/dist/worker/console/static/assets/index-B-qWGThd.js +0 -325
- package/dist/worker/console/static/assets/index-C-xRgY_0.css +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DZihfdKc.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-CKnXCjHX.js +0 -8
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { isOpenspecSpecFilePath } from "../../shared/openspec-spec.js";
|
|
3
3
|
import { campaignBudgetSchema, } from "../../application/evaluation/budget.js";
|
|
4
4
|
import { assertDagPromptSourceRule } from "./prompt-source.js";
|
|
5
|
-
import { dagRetryPolicySchema } from "./retry-policy.js";
|
|
5
|
+
import { dagRetryPolicySchema, TARGET_TEMPLATE_TRANSIENT_RETRY_PROFILE, } from "./retry-policy.js";
|
|
6
6
|
import { dagLivenessPolicySchema, } from "./liveness-policy.js";
|
|
7
7
|
import { dagOutputProtocolSchema } from "./output-protocol.js";
|
|
8
8
|
export const dagComplexitySchema = z.enum(["HIGH", "MED", "LOW"]);
|
|
@@ -10,6 +10,18 @@ export const dagNodeExecutorSchema = z.enum(["pi", "shell", "static"]);
|
|
|
10
10
|
export const CURSOR_DAG_EXECUTOR_REMOVED_ERROR = 'executor "cursor" is no longer supported; regenerate the DAG with Pi-only writers (implement-pi / repair-pi)';
|
|
11
11
|
export const CURSOR_EXECUTOR_MODELS_REMOVED_ERROR = "executorModels.cursor is no longer supported; use executorModels.pi only";
|
|
12
12
|
export const dagToolProfileSchema = z.enum(["read-only", "write"]);
|
|
13
|
+
/**
|
|
14
|
+
* Frozen Pi extension short ids for backend implementation DAGs (plan
|
|
15
|
+
* 2026-08-21 D2): the DAG carries only these ids; the executor resolves them
|
|
16
|
+
* against the Pi settings package inventory at run time. Adding a package
|
|
17
|
+
* requires changing this enum and the plan.
|
|
18
|
+
*/
|
|
19
|
+
export const dagPiExtensionIdSchema = z.enum(["pi-codegraph", "pi-lens"]);
|
|
20
|
+
/** Node-level explicit Pi extension allowlist (omitted = all off, R8.1). */
|
|
21
|
+
export const dagPiExtensionsSchema = z
|
|
22
|
+
.array(dagPiExtensionIdSchema)
|
|
23
|
+
.min(1)
|
|
24
|
+
.transform((ids) => Array.from(new Set(ids)));
|
|
13
25
|
/** Static command capabilities only; tasks cannot inject executables or shell prefixes. */
|
|
14
26
|
export const dagCommandCapabilitySchema = z.enum(["playwright-cli"]);
|
|
15
27
|
export const dagCommandPolicySchema = z.discriminatedUnion("mode", [
|
|
@@ -423,8 +435,12 @@ export const dagBackendTestPipelineSchema = z.enum([
|
|
|
423
435
|
"markdown-scenario-param",
|
|
424
436
|
"markdown-execute-html",
|
|
425
437
|
"markdown-manifest",
|
|
438
|
+
"markdown-report",
|
|
439
|
+
"ingest-backend-test-gap",
|
|
426
440
|
]);
|
|
427
441
|
export const dagFrontendBrowserToolPreflightSchema = z.object({}).strict();
|
|
442
|
+
export const dagFrontendTestStandardScenariosSchema = z.object({}).strict();
|
|
443
|
+
export const dagFrontendTestEnvironmentProbeSchema = z.object({}).strict();
|
|
428
444
|
export const dagFrontendTestEvidenceValidationSchema = z.object({}).strict();
|
|
429
445
|
export const dagFrontendTestCaseChecklistSchema = z.object({}).strict();
|
|
430
446
|
export const dagFrontendTestHtmlReportSchema = z.object({}).strict();
|
|
@@ -515,6 +531,8 @@ export const dagShellConfigSchema = z.object({
|
|
|
515
531
|
frontendReviewContext: dagFrontendReviewContextSchema.optional(),
|
|
516
532
|
frontendTestCaseChecklist: dagFrontendTestCaseChecklistSchema.optional(),
|
|
517
533
|
frontendBrowserToolPreflight: dagFrontendBrowserToolPreflightSchema.optional(),
|
|
534
|
+
frontendTestStandardScenarios: dagFrontendTestStandardScenariosSchema.optional(),
|
|
535
|
+
frontendTestEnvironmentProbe: dagFrontendTestEnvironmentProbeSchema.optional(),
|
|
518
536
|
frontendTestEvidenceValidation: dagFrontendTestEvidenceValidationSchema.optional(),
|
|
519
537
|
finalWriteSetApprovalGate: dagFinalWriteSetApprovalGateSchema.optional(),
|
|
520
538
|
frontendTestL5Report: z.object({}).strict().optional(),
|
|
@@ -600,6 +618,13 @@ export const dagDynamicExpansionSchema = z.object({
|
|
|
600
618
|
maxTotalTokens: z.number().int().positive().optional(),
|
|
601
619
|
})
|
|
602
620
|
.optional(),
|
|
621
|
+
/**
|
|
622
|
+
* When true, any child blocked by the aggregate token budget fails the map
|
|
623
|
+
* barrier instead of being retained as a case-level blocked outcome.
|
|
624
|
+
* Backend-test enables this because partial Markdown/pytest module sets are
|
|
625
|
+
* invalid generation assets; frontend-test keeps the default false.
|
|
626
|
+
*/
|
|
627
|
+
failOnTokenBudgetExhaustion: z.boolean().optional(),
|
|
603
628
|
/**
|
|
604
629
|
* When true, map child ERROR/auth/timeout is recorded as case-level
|
|
605
630
|
* failed/blocked evidence and the map barrier still succeeds (frontend-test).
|
|
@@ -704,6 +729,8 @@ export const dagConvergenceSpecSchema = z
|
|
|
704
729
|
*/
|
|
705
730
|
export const structuredContractOutputSchemaIds = [
|
|
706
731
|
"frontend-implementation-contract-v1",
|
|
732
|
+
"frontend-implementation-contract-plan-patch-v1",
|
|
733
|
+
"frontend-implementation-contract-revision-patch-v1",
|
|
707
734
|
];
|
|
708
735
|
export const dagTaskSchema = z.object({ id: z.string().regex(/^[a-z][a-z0-9-]*$/, "task id must be kebab-case"),
|
|
709
736
|
depends_on: z.array(z.string()).default([]),
|
|
@@ -738,6 +765,13 @@ export const dagTaskSchema = z.object({ id: z.string().regex(/^[a-z][a-z0-9-]*$/
|
|
|
738
765
|
role: dagRoleSchema.optional(),
|
|
739
766
|
skills: z.array(z.string()).optional(),
|
|
740
767
|
toolProfile: dagToolProfileSchema.optional(),
|
|
768
|
+
/**
|
|
769
|
+
* Explicit Pi extension allowlist (backend implementation DAGs only):
|
|
770
|
+
* frozen short ids resolved at run time against the Pi settings package
|
|
771
|
+
* inventory. Omitted = extension discovery stays fully closed (R8.1).
|
|
772
|
+
* Only `executor: "pi"` nodes may declare it (validated fail-closed).
|
|
773
|
+
*/
|
|
774
|
+
piExtensions: dagPiExtensionsSchema.optional(),
|
|
741
775
|
/** Default deny: file write (toolProfile=write) does not grant command execution. */
|
|
742
776
|
commandPolicy: dagCommandPolicySchema.optional(),
|
|
743
777
|
writePolicy: dagWritePolicySchema.optional(),
|
|
@@ -765,8 +799,25 @@ export const dagTaskSchema = z.object({ id: z.string().regex(/^[a-z][a-z0-9-]*$/
|
|
|
765
799
|
.object({
|
|
766
800
|
schemaId: z.enum(structuredContractOutputSchemaIds),
|
|
767
801
|
retryOnInvalid: z.boolean().default(true),
|
|
802
|
+
/**
|
|
803
|
+
* Optional deterministic base object for patch-producing structured
|
|
804
|
+
* nodes. The frontend plan patch validator applies the model delta to
|
|
805
|
+
* this run-owned skeleton before strict contract validation.
|
|
806
|
+
*/
|
|
807
|
+
skeleton: z.record(z.string(), z.unknown()).optional(),
|
|
768
808
|
})
|
|
769
809
|
.strict()
|
|
810
|
+
.superRefine((value, ctx) => {
|
|
811
|
+
if (value.schemaId ===
|
|
812
|
+
"frontend-implementation-contract-plan-patch-v1" &&
|
|
813
|
+
!value.skeleton) {
|
|
814
|
+
ctx.addIssue({
|
|
815
|
+
code: "custom",
|
|
816
|
+
message: "frontend plan patch output requires a runtime skeleton",
|
|
817
|
+
path: ["skeleton"],
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
})
|
|
770
821
|
.optional(),
|
|
771
822
|
/**
|
|
772
823
|
* Fail-closed outcome/diff consistency contract for bounded Pi writers.
|
|
@@ -798,6 +849,14 @@ export const dagTaskSchema = z.object({ id: z.string().regex(/^[a-z][a-z0-9-]*$/
|
|
|
798
849
|
forbiddenPaths: z.array(z.string()).optional().default([]),
|
|
799
850
|
decisionGate: dagDecisionGateSchema.optional(),
|
|
800
851
|
retryPolicy: dagRetryPolicySchema.optional(),
|
|
852
|
+
/**
|
|
853
|
+
* Generation-path stamp for implicit same-run transient retry. Only the
|
|
854
|
+
* three target templates stamp canonical final verify shells and
|
|
855
|
+
* exclusive `implement-pi`. Zod-declared so parseDagSpec does not strip it.
|
|
856
|
+
*/
|
|
857
|
+
transientRetryProfile: z
|
|
858
|
+
.literal(TARGET_TEMPLATE_TRANSIENT_RETRY_PROFILE)
|
|
859
|
+
.optional(),
|
|
801
860
|
/** Optional per-node adaptive liveness override (merged over defaults). */
|
|
802
861
|
livenessPolicy: dagLivenessPolicySchema,
|
|
803
862
|
dynamicExpansion: dagDynamicExpansionSchema.optional(),
|
|
@@ -845,6 +904,55 @@ export const dagSourceBindingSchema = z.object({
|
|
|
845
904
|
.min(1),
|
|
846
905
|
requirementIds: z.array(z.string().regex(/^(?:REQ|BR|AC)-[A-Z0-9]+(?:-[A-Z0-9]+)*$/)),
|
|
847
906
|
});
|
|
907
|
+
const dagRerunFeedbackEvidencePathSchema = z
|
|
908
|
+
.string()
|
|
909
|
+
.min(1)
|
|
910
|
+
.refine((value) => !/^(?:[A-Za-z]:[\\/]|[\\/]{2}|\/)/.test(value), "rerun feedback evidence paths must be repository-relative");
|
|
911
|
+
/**
|
|
912
|
+
* Bounded unresolved verify/review feedback carried by a full task rerun.
|
|
913
|
+
* This is recovery context, not a mutation of the original task contract.
|
|
914
|
+
*/
|
|
915
|
+
export const dagRerunFeedbackSchema = z
|
|
916
|
+
.object({
|
|
917
|
+
schemaVersion: z.literal(1),
|
|
918
|
+
kind: z.literal("unresolved-terminal-feedback"),
|
|
919
|
+
parentRunId: z.string().min(1),
|
|
920
|
+
taskId: z.string().min(1),
|
|
921
|
+
sourceNodeId: z.string().min(1),
|
|
922
|
+
verdict: z.enum(["request-revision", "fail"]).optional(),
|
|
923
|
+
failureCategory: z.string().min(1).optional(),
|
|
924
|
+
feedbackText: z.string().min(1).max(12_000),
|
|
925
|
+
evidenceRefs: z
|
|
926
|
+
.array(z
|
|
927
|
+
.object({
|
|
928
|
+
nodeId: z.string().min(1),
|
|
929
|
+
preservedNodeRecordPath: dagRerunFeedbackEvidencePathSchema,
|
|
930
|
+
})
|
|
931
|
+
.strict())
|
|
932
|
+
.max(8),
|
|
933
|
+
attemptSummary: z
|
|
934
|
+
.object({
|
|
935
|
+
completedPasses: z.number().int().positive(),
|
|
936
|
+
maxPasses: z.number().int().positive(),
|
|
937
|
+
terminalReason: z.string().min(1).optional(),
|
|
938
|
+
})
|
|
939
|
+
.strict(),
|
|
940
|
+
binding: z
|
|
941
|
+
.object({
|
|
942
|
+
sourceCanonicalHash: z
|
|
943
|
+
.string()
|
|
944
|
+
.regex(/^[a-f0-9]{64}$/)
|
|
945
|
+
.optional(),
|
|
946
|
+
taskContractCanonicalHash: z
|
|
947
|
+
.string()
|
|
948
|
+
.regex(/^[a-f0-9]{64}$/)
|
|
949
|
+
.optional(),
|
|
950
|
+
status: z.enum(["exact", "changed", "unknown"]),
|
|
951
|
+
})
|
|
952
|
+
.strict(),
|
|
953
|
+
digest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
954
|
+
})
|
|
955
|
+
.strict();
|
|
848
956
|
export const dagSpecSchema = z
|
|
849
957
|
.object({
|
|
850
958
|
version: dagVersionSchema,
|
|
@@ -856,6 +964,40 @@ export const dagSpecSchema = z
|
|
|
856
964
|
sourceBinding: dagSourceBindingSchema.optional(),
|
|
857
965
|
/** v4 managed Task Contract binding; only valid on version 4. */
|
|
858
966
|
taskContractBinding: dagTaskContractBindingSchema.optional(),
|
|
967
|
+
/** Optional unresolved parent-run feedback for a full task rerun. */
|
|
968
|
+
rerunFeedback: dagRerunFeedbackSchema.optional(),
|
|
969
|
+
/** Frozen backend-test artifact layout (plan A); absent = historical default testcase/ layout. */
|
|
970
|
+
backendTestLayout: z
|
|
971
|
+
.object({
|
|
972
|
+
testRoot: z.string(),
|
|
973
|
+
markdownRel: z.string(),
|
|
974
|
+
scriptRel: z.string(),
|
|
975
|
+
markdownDir: z.string(),
|
|
976
|
+
scriptDir: z.string(),
|
|
977
|
+
readmePath: z.string(),
|
|
978
|
+
isDefault: z.boolean(),
|
|
979
|
+
})
|
|
980
|
+
.optional(),
|
|
981
|
+
/** Frozen frontend-test artifact layout; absent = historical testcase/frontend/ layout. */
|
|
982
|
+
frontendTestLayout: z
|
|
983
|
+
.object({
|
|
984
|
+
testRoot: z.string(),
|
|
985
|
+
ragDir: z.string(),
|
|
986
|
+
casesDir: z.string(),
|
|
987
|
+
evidenceDir: z.string(),
|
|
988
|
+
reportsDir: z.string(),
|
|
989
|
+
fixturesDir: z.string(),
|
|
990
|
+
isDefault: z.boolean(),
|
|
991
|
+
})
|
|
992
|
+
.optional(),
|
|
993
|
+
/** Bound user shared-setup document (plan B); absent = no shared setup references expected. */
|
|
994
|
+
backendTestSharedSetup: z
|
|
995
|
+
.object({
|
|
996
|
+
path: z.string(),
|
|
997
|
+
readPath: z.string(),
|
|
998
|
+
sha256: z.string(),
|
|
999
|
+
})
|
|
1000
|
+
.optional(),
|
|
859
1001
|
outputLanguage: dagOutputLanguageSchema.optional(),
|
|
860
1002
|
objective: z.string().optional(),
|
|
861
1003
|
successCriteria: z.array(z.string()).optional(),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { DEFAULT_DAG_EXECUTOR_MODELS, ENV_VAR_NAME_PATTERN, dagCommandPolicyAllows, resolveDagCommandPolicy, } from "./types.js";
|
|
1
|
+
import { DEFAULT_DAG_EXECUTOR_MODELS, ENV_VAR_NAME_PATTERN, dagCommandPolicyAllows, dagPiExtensionIdSchema, resolveDagCommandPolicy, } from "./types.js";
|
|
2
2
|
import { resolveShellCommands } from "../../executors/shell-executor.js";
|
|
3
3
|
import { pathMatchesPattern } from "../../shared/git-progress.js";
|
|
4
4
|
import { resolveRepairTaskForGate } from "./repair-artifact.js";
|
|
5
5
|
import { topoSortToRanks } from "./topo.js";
|
|
6
6
|
import { isSafeReadOnlyPiRetryCandidate, isWriterEmptyDiffRetryCandidate, isWriterTransportRetryCandidate, INCOMPLETE_WRITE_SET_RETRY_CATEGORY, WRITER_CLEAN_TIMEOUT_RETRY_CATEGORY, WRITER_EMPTY_DIFF_RETRY_CATEGORY, } from "./retry-policy.js";
|
|
7
7
|
import { isBackendTestCompletenessRetryCandidate } from "./backend-test-writer-completeness.js";
|
|
8
|
+
import { defaultFrontendTestLayout, frontendTestLayoutFromSpec, } from "./frontend-test-layout.js";
|
|
8
9
|
const GOVERNANCE_WARNING_TYPES = new Set([
|
|
9
10
|
"read-only-missing-artifacts-forbidden",
|
|
10
11
|
"read-only-prompt-mentions-artifact-writes",
|
|
@@ -465,6 +466,8 @@ function validateShellTaskConfig(task, spec, issues) {
|
|
|
465
466
|
!shell.backendTestPipeline &&
|
|
466
467
|
!shell.frontendPrewriteGate &&
|
|
467
468
|
!shell.frontendBrowserToolPreflight &&
|
|
469
|
+
!shell.frontendTestStandardScenarios &&
|
|
470
|
+
!shell.frontendTestEnvironmentProbe &&
|
|
468
471
|
!shell.frontendVerificationBundle &&
|
|
469
472
|
!shell.frontendReviewContext &&
|
|
470
473
|
!shell.frontendTestCaseChecklist &&
|
|
@@ -678,22 +681,23 @@ function validateWriterOutcomePolicyTaskConfig(task, issues) {
|
|
|
678
681
|
});
|
|
679
682
|
}
|
|
680
683
|
}
|
|
681
|
-
function isFrontendEvidenceWriteSet(writeSet) {
|
|
684
|
+
function isFrontendEvidenceWriteSet(writeSet, layout = defaultFrontendTestLayout()) {
|
|
682
685
|
const entries = writeSet ?? [];
|
|
683
686
|
if (entries.length === 0)
|
|
684
687
|
return false;
|
|
688
|
+
const prefix = `${layout.evidenceDir}/`;
|
|
689
|
+
const glob = `${layout.evidenceDir}/**`;
|
|
685
690
|
return entries.every((entry) => {
|
|
686
691
|
const normalized = entry.trim().replace(/\\/g, "/").replace(/^\.\//, "");
|
|
687
|
-
return
|
|
688
|
-
normalized.startsWith("testcase/frontend/evidence/"));
|
|
692
|
+
return normalized === glob || normalized.startsWith(prefix);
|
|
689
693
|
});
|
|
690
694
|
}
|
|
691
|
-
function isFrontendBrowserExecutorTask(task) {
|
|
695
|
+
function isFrontendBrowserExecutorTask(task, layout = defaultFrontendTestLayout()) {
|
|
692
696
|
const skills = task.skills ?? [];
|
|
693
697
|
return (task.executor === "pi" &&
|
|
694
698
|
task.toolProfile === "write" &&
|
|
695
699
|
skills.includes("playwright-cli") &&
|
|
696
|
-
isFrontendEvidenceWriteSet(task.writeSet));
|
|
700
|
+
isFrontendEvidenceWriteSet(task.writeSet, layout));
|
|
697
701
|
}
|
|
698
702
|
function taskMentionsPlaywrightCliContract(task) {
|
|
699
703
|
const prompt = `${task.subtask_prompt}\n${task.outputContract ?? ""}`;
|
|
@@ -705,10 +709,11 @@ function taskMentionsPlaywrightCliContract(task) {
|
|
|
705
709
|
* - capability is granted without skill/prompt contract or outside evidence writeSet
|
|
706
710
|
* - non-browser nodes receive command capability
|
|
707
711
|
*/
|
|
708
|
-
function validateCommandPolicyTaskConfig(task, issues) {
|
|
712
|
+
function validateCommandPolicyTaskConfig(task, issues, spec) {
|
|
713
|
+
const layout = frontendTestLayoutFromSpec(spec);
|
|
709
714
|
const policy = resolveDagCommandPolicy(task.commandPolicy);
|
|
710
715
|
const allowsPlaywright = dagCommandPolicyAllows(task.commandPolicy, "playwright-cli");
|
|
711
|
-
const isBrowserExecutor = isFrontendBrowserExecutorTask(task);
|
|
716
|
+
const isBrowserExecutor = isFrontendBrowserExecutorTask(task, layout);
|
|
712
717
|
if (isBrowserExecutor && !allowsPlaywright) {
|
|
713
718
|
issues.push({
|
|
714
719
|
type: "invalid-command-policy",
|
|
@@ -739,10 +744,10 @@ function validateCommandPolicyTaskConfig(task, issues) {
|
|
|
739
744
|
message: `task ${task.id} playwright-cli command capability requires prompt/outputContract to reference playwright_cli`,
|
|
740
745
|
});
|
|
741
746
|
}
|
|
742
|
-
if (!isFrontendEvidenceWriteSet(task.writeSet)) {
|
|
747
|
+
if (!isFrontendEvidenceWriteSet(task.writeSet, layout)) {
|
|
743
748
|
issues.push({
|
|
744
749
|
type: "invalid-command-policy",
|
|
745
|
-
message: `task ${task.id} playwright-cli command capability requires frontend evidence writeSet under
|
|
750
|
+
message: `task ${task.id} playwright-cli command capability requires frontend evidence writeSet under ${layout.evidenceDir}/`,
|
|
746
751
|
});
|
|
747
752
|
}
|
|
748
753
|
if (task.toolProfile !== "write") {
|
|
@@ -753,7 +758,7 @@ function validateCommandPolicyTaskConfig(task, issues) {
|
|
|
753
758
|
}
|
|
754
759
|
}
|
|
755
760
|
}
|
|
756
|
-
function validateDynamicChildCommandPolicy(task, issues) {
|
|
761
|
+
function validateDynamicChildCommandPolicy(task, issues, spec) {
|
|
757
762
|
const expansion = task.dynamicExpansion;
|
|
758
763
|
if (!expansion)
|
|
759
764
|
return;
|
|
@@ -774,7 +779,7 @@ function validateDynamicChildCommandPolicy(task, issues) {
|
|
|
774
779
|
writeSet: child.writeSet,
|
|
775
780
|
outputContract: child.outputContract,
|
|
776
781
|
};
|
|
777
|
-
validateCommandPolicyTaskConfig(synthetic, issues);
|
|
782
|
+
validateCommandPolicyTaskConfig(synthetic, issues, spec);
|
|
778
783
|
}
|
|
779
784
|
function validateDecisionGateTaskConfig(task, issues) {
|
|
780
785
|
if (!task.decisionGate?.enabled) {
|
|
@@ -881,12 +886,13 @@ export function collectForbiddenExecutorIssues(spec, forbiddenExecutors) {
|
|
|
881
886
|
}));
|
|
882
887
|
}
|
|
883
888
|
/** Revalidate a rendered dynamic child before it enters state or executes. */
|
|
884
|
-
export function assertValidMaterializedDagTask(task) {
|
|
889
|
+
export function assertValidMaterializedDagTask(task, parentSpec) {
|
|
885
890
|
const issues = [];
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
891
|
+
const spec = {
|
|
892
|
+
version: 2,
|
|
893
|
+
tasks: [task],
|
|
894
|
+
frontendTestLayout: parentSpec?.frontendTestLayout,
|
|
895
|
+
};
|
|
890
896
|
validateTaskWritePolicy(task, spec, issues);
|
|
891
897
|
validateShellTaskConfig(task, spec, issues);
|
|
892
898
|
validateStaticTaskConfig(task, issues);
|
|
@@ -894,7 +900,7 @@ export function assertValidMaterializedDagTask(task) {
|
|
|
894
900
|
validateRetryPolicyTaskConfig(task, issues);
|
|
895
901
|
validateOutputProtocolTaskConfig(task, issues);
|
|
896
902
|
validateWriterOutcomePolicyTaskConfig(task, issues);
|
|
897
|
-
validateCommandPolicyTaskConfig(task, issues);
|
|
903
|
+
validateCommandPolicyTaskConfig(task, issues, spec);
|
|
898
904
|
if (issues.length > 0) {
|
|
899
905
|
throw new Error(`invalid materialized dynamic child ${task.id}: ${issues.map((issue) => issue.message).join("; ")}`);
|
|
900
906
|
}
|
|
@@ -950,9 +956,10 @@ export function validateDagSpec(spec) {
|
|
|
950
956
|
validateRetryPolicyTaskConfig(task, issues);
|
|
951
957
|
validateOutputProtocolTaskConfig(task, issues);
|
|
952
958
|
validateWriterOutcomePolicyTaskConfig(task, issues);
|
|
953
|
-
validateCommandPolicyTaskConfig(task, issues);
|
|
954
|
-
validateDynamicChildCommandPolicy(task, issues);
|
|
959
|
+
validateCommandPolicyTaskConfig(task, issues, spec);
|
|
960
|
+
validateDynamicChildCommandPolicy(task, issues, spec);
|
|
955
961
|
validateProjectGovernanceTaskConfig(task, spec, issues);
|
|
962
|
+
validatePiExtensionsTaskConfig(task, issues);
|
|
956
963
|
validateFailureAwareDependsOn(task, spec, issues);
|
|
957
964
|
}
|
|
958
965
|
validateSameRankWriteSetConflicts(spec, ranks, issues);
|
|
@@ -963,6 +970,43 @@ export function validateDagSpec(spec) {
|
|
|
963
970
|
}
|
|
964
971
|
return issues;
|
|
965
972
|
}
|
|
973
|
+
/**
|
|
974
|
+
* Fail-closed `piExtensions` validation (plan 2026-08-21 D1/D2):
|
|
975
|
+
* - only `executor: "pi"` nodes may declare it (shell/static reject);
|
|
976
|
+
* - unknown ids outside the frozen enum are rejected at parse time by zod,
|
|
977
|
+
* and here for task objects that bypass schema parsing;
|
|
978
|
+
* - closeout nodes must stay fully closed (extension-free) — the two-bucket
|
|
979
|
+
* generator never assigns it there, so any appearance is contract drift.
|
|
980
|
+
*/
|
|
981
|
+
function validatePiExtensionsTaskConfig(task, issues) {
|
|
982
|
+
const ids = task.piExtensions;
|
|
983
|
+
if (ids === undefined)
|
|
984
|
+
return;
|
|
985
|
+
if (task.executor !== "pi") {
|
|
986
|
+
issues.push({
|
|
987
|
+
type: "invalid-pi-extensions-config",
|
|
988
|
+
message: `task ${task.id} piExtensions requires executor "pi" (found ${task.executor})`,
|
|
989
|
+
});
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
const allowed = new Set(dagPiExtensionIdSchema.options);
|
|
993
|
+
for (const id of ids) {
|
|
994
|
+
if (!allowed.has(id)) {
|
|
995
|
+
issues.push({
|
|
996
|
+
type: "invalid-pi-extensions-config",
|
|
997
|
+
message: `task ${task.id} piExtensions has unknown id "${id}"; allowed: ${[
|
|
998
|
+
...allowed,
|
|
999
|
+
].join(", ")}`,
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
if (task.id === "closeout-pi" && ids.length > 0) {
|
|
1004
|
+
issues.push({
|
|
1005
|
+
type: "invalid-pi-extensions-config",
|
|
1006
|
+
message: "closeout-pi must stay extension-free (read buckets exclude closeout)",
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
966
1010
|
function validateProjectGovernanceTaskConfig(task, spec, issues) {
|
|
967
1011
|
if (task.governanceStandardReview) {
|
|
968
1012
|
if (task.executor !== "pi" ||
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"scripts/kb-graph-materialize.mjs",
|
|
51
51
|
"scripts/kb-graph-promote.mjs",
|
|
52
52
|
"scripts/kb-graph-incremental-prepare.mjs",
|
|
53
|
+
"scripts/next-info.mjs",
|
|
54
|
+
"scripts/next-publish-gate.mjs",
|
|
55
|
+
"scripts/release-source-binding.mjs",
|
|
53
56
|
"docs/templates/agent-dag.schema.json",
|
|
54
57
|
"examples/example-dag.json",
|
|
55
58
|
"skills/agent-worker/SKILL.md",
|
|
@@ -277,6 +280,7 @@
|
|
|
277
280
|
"harness.json",
|
|
278
281
|
"package.json",
|
|
279
282
|
"src/commands/init.ts",
|
|
283
|
+
"src/commands/init-model-catalog.ts",
|
|
280
284
|
"src/commands/client-recovery.ts",
|
|
281
285
|
"src/commands/init-upgrade.ts",
|
|
282
286
|
"src/cli.ts",
|
|
@@ -302,6 +306,7 @@
|
|
|
302
306
|
"description": "Changes that may alter target-project initialization behavior, default DAG role skills, skill resolution, or package/init contracts.",
|
|
303
307
|
"patterns": [
|
|
304
308
|
"src/commands/init.ts",
|
|
309
|
+
"src/commands/init-model-catalog.ts",
|
|
305
310
|
"src/commands/client-recovery.ts",
|
|
306
311
|
"src/commands/init-upgrade.ts",
|
|
307
312
|
"src/cli.ts",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- [`local-development-environment.md`](local-development-environment.md):本地环境、Windows 差异和常见排障。
|
|
8
8
|
- [`branch-merge-guideline.md`](branch-merge-guideline.md):按风险选择合并模式并留下 source-SHA 证据。
|
|
9
9
|
- [`github-collaboration.md`](github-collaboration.md):仓库内 GitHub 协作约定及发布通道。
|
|
10
|
-
- [`version-and-release-management.md`](version-and-release-management.md):版本发布管理——next / release-x.y / latest
|
|
10
|
+
- [`version-and-release-management.md`](version-and-release-management.md):版本发布管理——next / release-x.y / latest 渠道、移动式 `npm-next` ref、`inspect next` 查询入口、workflow 与 promote 手册。
|
|
11
11
|
- [`production-readiness.md`](production-readiness.md):交付前的生产就绪判断。
|
|
12
12
|
- [`agent-worker-production-readiness.md`](agent-worker-production-readiness.md):agent-worker Feature/Task Pool 外层编排的 Production Readiness v1 操作合同。
|
|
13
13
|
- [`backend-test-jacoco-coverage.md`](backend-test-jacoco-coverage.md):Java 被测服务挂载 JaCoCo tcpserver agent 的 Maven、`java -jar` 与 Docker 操作手册。
|
|
@@ -29,11 +29,7 @@ Cursor Cloud VM 当前有两个需要特别注意的环境问题。
|
|
|
29
29
|
|
|
30
30
|
### Node.js 版本
|
|
31
31
|
|
|
32
|
-
VM 默认 `node`(`/exec-daemon/node`)可能是 v22.14.0
|
|
33
|
-
|
|
34
|
-
```text
|
|
35
|
-
Cannot find module '@earendil-works/...'
|
|
36
|
-
```
|
|
32
|
+
VM 默认 `node`(`/exec-daemon/node`)可能是 v22.14.0,但根包与运行时依赖 `@earendil-works/pi-ai` / `@earendil-works/pi-coding-agent` 都要求 Node.js `>=22.19.0`。版本过低时,npm 默认模式会报告 `EBADENGINE` 警告;启用 `engine-strict` 时,`npm install` / `npm ci` 会直接失败。即使默认模式完成安装,也不应在不受支持的 Node.js 版本上继续执行 typecheck、build 或 runtime 命令。
|
|
37
33
|
|
|
38
34
|
在 Cursor Cloud 中执行安装或验证前,先切换到已配置的 Node.js 22:
|
|
39
35
|
|
|
@@ -16,10 +16,22 @@ The entries below are local wrappers or existing local skills. They are not whol
|
|
|
16
16
|
| `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
|
|
17
17
|
| `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
|
|
18
18
|
| `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
|
|
19
|
+
| `frontend-implementation` | local existing (frontend hybrid DAG) | `skills/frontend-implementation/SKILL.md` | frontend plan / contract / scout / mock nodes (spec-level `skillsByRole`) | frontend-implementation DAG only | Required refs node-contracts / design-spec / code-standards; injected by `init-hybrid.ts` spec generation and `src/adapters/loop-agent.ts`; projected via init-surface manifest. Not in `DEFAULT_SKILLS_BY_ROLE`. |
|
|
20
|
+
| `frontend-review` | local existing (frontend hybrid DAG) | `skills/frontend-review/SKILL.md` | reviewer (frontend review nodes, spec-level) | frontend-implementation / repair DAGs | Consumed by `init-hybrid.ts` / `frontend-repair.ts` / `shell-executor.ts`; required ref review-findings (maxChars 2800). |
|
|
21
|
+
| `frontend-verification` | local existing (frontend hybrid DAG) | `skills/frontend-verification/SKILL.md` | verifier / closeout (frontend evidence, spec-level) | frontend DAG closeout | Consumed by `shell-executor.ts` / `frontend-repair.ts` / `frontend-review-context.ts`; required ref verification-checklist. |
|
|
22
|
+
| `frontend-design-review` | local existing (frontend hybrid DAG) | `skills/frontend-design-review/SKILL.md` | design-gate reviewer (before any writer) | frontend-implementation DAG design gate | Injected by `init-hybrid.ts`; runs before the prewrite gate authorizes writers; required ref review-checklist. |
|
|
23
|
+
| `frontend-bounded-implement` | local existing (frontend hybrid DAG) | `skills/frontend-bounded-implement/SKILL.md` | implementer (writer nodes, spec-level) | frontend writers after canonical contract gate | Injected by `init-hybrid.ts`; writers run only after the canonical contract gate accepts and only inside the frozen writeSet (ADR 0015/0016 discipline). |
|
|
19
24
|
| `grill-with-docs` | local operator skill adapted from domain grilling + ADR/glossary discipline | `skills/grill-with-docs/SKILL.md` | explicit interactive operator only | never a default DAG role | Resolves decisions via `harness.json.governanceRoot`; required refs `context-format.md` / `adr-format.md`; respects writeSet; not in `DEFAULT_SKILLS_BY_ROLE`. |
|
|
25
|
+
| `grill-me` | local interview question engine wrapper | `skills/grill-me/SKILL.md` | interview runtime dependency (not a DAG role) | never a default DAG role | Question engine lives in `src/worker/console/interview/grill-me.ts` (Console interview / operator-actions); intentionally NOT projected by init-surface manifest — runs in this repo's Console only. |
|
|
26
|
+
| `analyze-product-requirements` | local org-internal Product Analysis V4 skill | `skills/analyze-product-requirements/SKILL.md` | source-prepare dependency (not a DAG role) | never a default DAG role | Loaded by `src/task/source-prepare/prepare.ts` during 任务源 preparation; IRON-LAW freeze semantics on `product-analysis.md`; intentionally NOT projected by init-surface manifest. |
|
|
20
27
|
| `webapp-testing` | local wrapper inspired by frontend/browser testing practice | `skills/webapp-testing/SKILL.md` | verifier, reviewer | optional | Only applies when task explicitly involves browser-rendered behavior; no default Playwright/Semgrep execution. |
|
|
21
28
|
| `playwright-cli` | repo-local Playwright CLI instructions | `skills/playwright-cli/SKILL.md` | FE-test case executor | FE-test only | Direct browser commands require isolated test environments, per-case evidence paths, and explicit credential/data handling. |
|
|
22
29
|
| `playwright-cli-case-generator` | adapted from the repo-local playwright CLI case-generator contract | `skills/playwright-cli-case-generator/SKILL.md` | FE-test case generator | FE-test only | Generates Markdown cases and a compact manifest from RAG facts; does not execute browsers, create test code, or invent API/data constraints. |
|
|
30
|
+
| `analyze-product-dependencies` | local org-internal product dependency analysis | `skills/analyze-product-dependencies/SKILL.md` | explicit interactive operator only | never a default DAG role | PRD → code/API mapping analysis; read-only; no runtime references; not projected. |
|
|
31
|
+
| `browser-tools` | local operator skill (CDP automation) | `skills/browser-tools/SKILL.md` | explicit interactive operator only | never a default DAG role | Requires user-visible Chrome with remote debugging (:9222); credential/data handling reviewed per use; not projected. |
|
|
32
|
+
| `local-jacoco-coverage` | local operator orchestration skill | `skills/local-jacoco-coverage/SKILL.md` | explicit interactive operator only | never a default DAG role | Orchestrates backend-test DAGs with a JaCoCo agent — it drives DAGs, so it must never be loaded by one (no recursion); not projected. |
|
|
33
|
+
| `using-git-worktrees` | local wrapper | `skills/using-git-worktrees/SKILL.md` | explicit interactive operator only | never a default DAG role | Workspace isolation guidance only; no runtime references; not projected. |
|
|
34
|
+
| `improve-codebase-architecture` | local operator skill (copied from shared agent platform 2026-08-21) | `skills/improve-codebase-architecture/SKILL.md` | explicit interactive operator only | never a default DAG role | Interactive architecture review producing a temp HTML report; reads CONTEXT.md glossary + `docs/decisions/` ADRs; cross-directory refs `../grill-with-docs/{context,adr}-format.md` are exempt (see Vetting Rules); not projected. |
|
|
23
35
|
|
|
24
36
|
## Verification placement taxonomy
|
|
25
37
|
|
|
@@ -42,6 +54,8 @@ Authoring vocabulary for where a check or verification skill should live. Prefer
|
|
|
42
54
|
- Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
|
|
43
55
|
- `agent-worker` is explicitly outside default role mappings. Its trigger description must cover `agent-worker`, Feature Packet, TaskSpec, Task Pool, self-host/candidate and the `loop-agent` routing boundary; `scripts/check-skill-entry.sh` enforces this public entry contract.
|
|
44
56
|
- `grill-with-docs` is an explicit interactive operator skill only; it must stay outside `DEFAULT_SKILLS_BY_ROLE`.
|
|
57
|
+
- Registry ↔ disk sync: every `skills/*/SKILL.md` in the repo must have a row above. Operator-local skills are recorded with `never a default DAG role` instead of being omitted, so an audit cannot mistake them for drift.
|
|
58
|
+
- `improve-codebase-architecture` is exempt from the "references stay within the skill directory" rule: it is operator-only, never resolved by DAG skill snapshots, and reuses `grill-with-docs` context/ADR formats by relative path.
|
|
45
59
|
- Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
|
|
46
60
|
- This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
|
|
47
61
|
- `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
|
package/docs/templates/README.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
## Backend-test
|
|
32
32
|
|
|
33
|
-
- `backend-test-dag.json` — backend-test DAG 模板;其中 `generate-backend-md-cases-pi` 是唯一允许 `writer-empty-diff` 重试的 writer(总共两次,仅限 post-write-guard attribution 确认的空 diff
|
|
33
|
+
- `backend-test-dag.json` — backend-test DAG 模板;其中 `generate-backend-md-cases-pi` 是唯一允许 `writer-empty-diff` 重试的 writer(总共两次,仅限 post-write-guard attribution 确认的空 diff);N2/N5 合同限定 Scenario Partition 必须有源有限域。
|
|
34
34
|
- `backend-test-dag.classify.prompt.md`、`backend-test-dag.generate-pytest.prompt.md`、`backend-test-dag.review-cases.prompt.md`、`backend-test-dag.retrospect.prompt.md` — 分类、生成、审查和复盘提示。
|
|
35
35
|
- `backend-test-analysis.schema.json`、`backend-test-execution.schema.json`、`backend-test-result.schema.json`、`backend-test-case-manifest.schema.json` — 分析、执行、结果与用例清单 schema。
|
|
36
36
|
|
|
@@ -130,6 +130,18 @@
|
|
|
130
130
|
"toolProfile": {
|
|
131
131
|
"enum": ["read-only", "write"]
|
|
132
132
|
},
|
|
133
|
+
"piExtensionId": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": ["pi-codegraph", "pi-lens"],
|
|
136
|
+
"description": "Frozen Pi extension short id resolved at run time against the Pi settings package inventory. Adding a package requires changing the plan and this enum."
|
|
137
|
+
},
|
|
138
|
+
"piExtensions": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"minItems": 1,
|
|
141
|
+
"uniqueItems": true,
|
|
142
|
+
"items": { "$ref": "#/$defs/piExtensionId" },
|
|
143
|
+
"description": "Node-level explicit Pi extension allowlist (backend implementation DAGs only). Omitted = extension discovery stays fully closed (R8.1). Only executor 'pi' nodes may declare it."
|
|
144
|
+
},
|
|
133
145
|
"role": {
|
|
134
146
|
"enum": ["planner", "scout", "implementer", "reviewer", "supervisor", "verifier", "closeout"]
|
|
135
147
|
},
|
|
@@ -356,6 +368,31 @@
|
|
|
356
368
|
"properties": { "schemaVersion": { "const": 1 }, "requireBaseline": { "const": true } }
|
|
357
369
|
},
|
|
358
370
|
"frontendTestCaseChecklist": { "type": "object", "additionalProperties": false },
|
|
371
|
+
"frontendBrowserToolPreflight": { "type": "object", "additionalProperties": false },
|
|
372
|
+
"frontendTestStandardScenarios": { "type": "object", "additionalProperties": false },
|
|
373
|
+
"frontendTestEnvironmentProbe": { "type": "object", "additionalProperties": false },
|
|
374
|
+
"frontendTestCaseManifest": {
|
|
375
|
+
"type": "object",
|
|
376
|
+
"additionalProperties": false,
|
|
377
|
+
"properties": {
|
|
378
|
+
"maxCases": { "type": "integer", "minimum": 1 },
|
|
379
|
+
"declaredAcIds": { "type": "array", "items": { "type": "string" } }
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"frontendTestResultFinalize": {
|
|
383
|
+
"type": "object",
|
|
384
|
+
"additionalProperties": false,
|
|
385
|
+
"properties": {
|
|
386
|
+
"declaredAcIds": { "type": "array", "items": { "type": "string" } }
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"frontendTestReports": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"additionalProperties": false,
|
|
392
|
+
"properties": {
|
|
393
|
+
"l5": { "type": "boolean" }
|
|
394
|
+
}
|
|
395
|
+
},
|
|
359
396
|
"frontendTestEvidenceValidation": { "type": "object", "additionalProperties": false },
|
|
360
397
|
"frontendTestHtmlReport": { "type": "object", "additionalProperties": false },
|
|
361
398
|
"backendTestPipeline": {
|
|
@@ -383,6 +420,12 @@
|
|
|
383
420
|
{ "required": ["frontendVerificationBundle"] },
|
|
384
421
|
{ "required": ["frontendReviewContext"] },
|
|
385
422
|
{ "required": ["frontendTestCaseChecklist"] },
|
|
423
|
+
{ "required": ["frontendBrowserToolPreflight"] },
|
|
424
|
+
{ "required": ["frontendTestStandardScenarios"] },
|
|
425
|
+
{ "required": ["frontendTestEnvironmentProbe"] },
|
|
426
|
+
{ "required": ["frontendTestCaseManifest"] },
|
|
427
|
+
{ "required": ["frontendTestResultFinalize"] },
|
|
428
|
+
{ "required": ["frontendTestReports"] },
|
|
386
429
|
{ "required": ["frontendTestEvidenceValidation"] },
|
|
387
430
|
{ "required": ["frontendTestHtmlReport"] },
|
|
388
431
|
{ "required": ["backendTestPipeline"] }
|
|
@@ -485,6 +528,7 @@
|
|
|
485
528
|
"items": { "type": "string", "minLength": 1 }
|
|
486
529
|
},
|
|
487
530
|
"toolProfile": { "$ref": "#/$defs/toolProfile" },
|
|
531
|
+
"piExtensions": { "$ref": "#/$defs/piExtensions" },
|
|
488
532
|
"governanceStandardReview": {
|
|
489
533
|
"type": "boolean",
|
|
490
534
|
"description": "Explicitly opts this node into writer-change-scoped AGENTS.md and repository-local code-standard review. Never inferred from node id or role."
|