@tea-agent/loop-agent 0.10.0 → 0.12.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 +10 -2
- package/CHANGELOG.md +91 -24
- package/README.md +84 -12
- package/dist/application/dag/args.js +1 -12
- package/dist/application/dag/generate-task-dag.js +38 -2
- package/dist/application/dag/run-dag.js +11 -27
- package/dist/application/dag/validate-dag.js +13 -2
- package/dist/application/loop/run-action.js +0 -4
- package/dist/cli/command-definitions.js +44 -16
- package/dist/cli/program.js +40 -23
- package/dist/cli/update/notifier.js +117 -0
- package/dist/cli/update/npm-client.js +151 -0
- package/dist/cli/update/policy.js +58 -0
- package/dist/cli/update/state.js +68 -0
- package/dist/cli.js +33 -0
- package/dist/commands/cursor-prompt.js +42 -82
- package/dist/commands/dag-approve.js +36 -0
- package/dist/commands/delegate.js +75 -77
- package/dist/commands/doctor.js +0 -18
- package/dist/commands/init.js +547 -95
- package/dist/commands/instructions.js +7 -10
- package/dist/commands/loop.js +4 -20
- package/dist/commands/plan.js +50 -0
- package/dist/executors/config-core.js +0 -51
- package/dist/executors/dag-pi-executor.js +1 -1
- package/dist/executors/dag.js +0 -1
- package/dist/executors/index.js +0 -2
- package/dist/executors/model-routing.js +9 -9
- package/dist/executors/shell-executor.js +1 -1
- package/dist/governance/checks.js +6 -3
- package/dist/governance/exec-plans.js +545 -0
- package/dist/governance/manifest-types.js +24 -2
- package/dist/infrastructure/harness/loop-action-store.js +0 -3
- package/dist/records/harvest.js +2 -23
- package/dist/records/one-shot-runs.js +1 -1
- package/dist/shared/artifacts-core.js +24 -5
- package/dist/shared/output-truncation.js +37 -0
- package/dist/shared/package-metadata.js +488 -0
- package/dist/{executors/cursor-executor.js → sidecars/cursor-prompt/executor.js} +2 -42
- package/dist/sidecars/cursor-prompt/index.js +3 -0
- package/dist/sidecars/cursor-prompt/stream.js +121 -0
- package/dist/task/config-types.js +29 -12
- package/dist/task/delegate.js +9 -21
- package/dist/task/runtime.js +1 -2
- package/dist/worker/cli.js +32 -3
- package/dist/worker/delivery/final-verification.js +47 -11
- package/dist/worker/delivery/package.js +63 -10
- package/dist/worker/feature/run.js +60 -8
- package/dist/worker/loop-agent/loop-agent-client.js +329 -126
- package/dist/worker/observability/event-history.js +216 -0
- package/dist/worker/observability/read-model.js +338 -83
- package/dist/worker/observe/paths.js +17 -0
- package/dist/worker/observe/routes.js +165 -21
- package/dist/worker/observe/server.js +59 -1
- package/dist/worker/observe/static/api.js +27 -0
- package/dist/worker/observe/static/app.js +120 -2317
- package/dist/worker/observe/static/constants.js +148 -0
- package/dist/worker/observe/static/copy.js +67 -0
- package/dist/worker/observe/static/dag-helpers.js +172 -0
- package/dist/worker/observe/static/dag-model.js +72 -0
- package/dist/worker/observe/static/dom.js +61 -0
- package/dist/worker/observe/static/format-pool.js +67 -0
- package/dist/worker/observe/static/format.js +292 -0
- package/dist/worker/observe/static/index.html +300 -82
- package/dist/worker/observe/static/kpi.js +94 -0
- package/dist/worker/observe/static/relations.js +128 -0
- package/dist/worker/observe/static/router.js +85 -0
- package/dist/worker/observe/static/run-processing.js +148 -0
- package/dist/worker/observe/static/shell-chrome.js +68 -0
- package/dist/worker/observe/static/state.js +253 -0
- package/dist/worker/observe/static/styles.css +1720 -495
- package/dist/worker/observe/static/views/batch.js +226 -0
- package/dist/worker/observe/static/views/dag-graph.js +172 -0
- package/dist/worker/observe/static/views/dag-inspector.js +477 -0
- package/dist/worker/observe/static/views/dag.js +362 -0
- package/dist/worker/observe/static/views/dashboard.js +442 -0
- package/dist/worker/observe/static/views/failures.js +143 -0
- package/dist/worker/observe/static/views/feature.js +453 -0
- package/dist/worker/observe/static/views/pool.js +347 -0
- package/dist/worker/observe/static/views/run.js +453 -0
- package/dist/worker/observe/static/views/session-timeline.js +205 -0
- package/dist/worker/observe/static/views/shell.js +7 -0
- package/dist/worker/observe/static/views/task.js +260 -0
- package/dist/worker/observe/static/views/timeline.js +163 -0
- package/dist/worker/preflight.js +49 -1
- package/dist/worker/run-task/run-task.js +22 -12
- package/dist/worker/runner/run-ready.js +76 -12
- package/dist/worker/task-spec/schema.js +0 -1
- package/dist/workflows/dag/controller-identity.js +104 -0
- package/dist/workflows/dag/convergence/controller.js +1 -1
- package/dist/workflows/dag/executor-registry.js +0 -2
- package/dist/workflows/dag/init-hybrid.js +797 -27
- package/dist/workflows/dag/node-execution.js +183 -35
- package/dist/workflows/dag/repair-artifact.js +91 -0
- package/dist/workflows/dag/report.js +50 -0
- package/dist/workflows/dag/retry-policy.js +138 -0
- package/dist/workflows/dag/runner.js +77 -17
- package/dist/workflows/dag/runtime-contract.js +87 -0
- package/dist/workflows/dag/scheduler.js +7 -2
- package/dist/workflows/dag/sdd-embedded.js +128 -0
- package/dist/workflows/dag/skill-instructions.js +5 -4
- package/dist/workflows/dag/skill-snapshot.js +529 -0
- package/dist/workflows/dag/types.js +86 -10
- package/dist/workflows/dag/validate.js +73 -12
- package/dist/workflows/loop/actions/dag-action.js +0 -2
- package/dist/workflows/loop/actions/shared.js +1 -1
- package/dist/workflows/loop/actions.js +14 -31
- package/dist/workflows/loop/benchmark.js +1 -1
- package/dist/workflows/loop/index.js +1 -1
- package/dist/workflows/loop/policy/auto-policy.js +22 -14
- package/dist/workflows/loop/policy/path-patterns.js +13 -0
- package/docs/README.md +36 -33
- package/docs/agent-dag-recovery-playbook.md +1 -1
- package/docs/agent-dag-runner.md +28 -3
- package/docs/architecture/README.md +26 -0
- package/docs/architecture/dag-execution.md +140 -0
- package/docs/architecture/evolution.md +53 -0
- package/docs/architecture/facts-and-state.md +58 -0
- package/docs/architecture/runtime-boundaries.md +45 -17
- package/docs/architecture/system-overview.md +93 -0
- package/docs/architecture/worker-and-feature.md +81 -0
- package/docs/cursor-prompt-sidecar.md +36 -0
- package/docs/decisions/README.md +13 -1
- package/docs/design/README.md +43 -21
- package/docs/development-principles.md +2 -2
- package/docs/exec-plans/active/README.md +1 -3
- package/docs/exec-plans/completed/README.md +23 -0
- package/docs/feature-workflow.md +78 -4
- package/docs/harness-methodology-debugging.md +1 -1
- package/docs/harness-methodology-tdd.md +3 -3
- package/docs/init-surface.manifest.json +60 -25
- package/docs/loop-agent-harness.md +28 -4
- package/docs/progress/README.md +50 -1
- package/docs/reports/README.md +90 -18
- package/docs/skills/README.md +2 -1
- package/docs/skills/vetted-skill-registry.md +2 -1
- package/docs/templates/agent-dag-report.schema.json +23 -6
- package/docs/templates/agent-dag.base.json +0 -5
- package/docs/templates/agent-dag.final-verification.json +0 -5
- package/docs/templates/agent-dag.schema.json +70 -3
- package/docs/templates/agent-dag.supervised-implementation.json +9 -8
- package/docs/templates/backend-test-dag.generate-pytest.prompt.md +139 -0
- package/docs/templates/backend-test-dag.json +276 -0
- package/docs/templates/backend-test-dag.retrospect.prompt.md +125 -0
- package/docs/templates/backend-test-dag.review-cases.prompt.md +81 -0
- package/docs/templates/frontend-design-contract.md +33 -0
- package/docs/templates/frontend-task-constraints.md +25 -0
- package/docs/templates/frontend-task-requirement.md +61 -0
- package/docs/templates/harness.schema.json +10 -12
- package/docs/templates/hybrid-dag.json +1 -6
- package/docs/templates/interactive-ui-round2-experiment.md +1 -1
- package/docs/templates/product-line/task.yaml +0 -1
- package/docs/templates/project-start-checklist.md +2 -2
- package/docs/templates/worker-dogfood-evidence.md +28 -0
- package/docs/templates/worker-dogfood-setup.md +20 -0
- package/docs/verification-matrix.md +10 -0
- package/examples/decision-gate-agent-dag.json +87 -33
- package/examples/example-dag.json +0 -5
- package/examples/hybrid-loop-agent-dag.json +0 -5
- package/harness.json +7 -15
- package/package.json +22 -46
- package/scripts/check-product-line-docs.sh +10 -7
- package/skills/agent-worker/SKILL.md +37 -0
- package/skills/agent-worker/references/agent-worker-operator.md +43 -0
- package/skills/frontend-design-review/SKILL.md +59 -0
- package/skills/frontend-design-review/references/review-checklist.md +37 -0
- package/skills/frontend-implementation/SKILL.md +51 -0
- package/skills/frontend-implementation/references/code-standards.md +34 -0
- package/skills/frontend-implementation/references/design-spec.md +46 -0
- package/skills/frontend-implementation/references/node-contracts.md +32 -0
- package/skills/frontend-review/SKILL.md +53 -0
- package/skills/frontend-review/references/review-findings.md +42 -0
- package/skills/frontend-verification/SKILL.md +40 -0
- package/skills/frontend-verification/references/verification-checklist.md +56 -0
- package/skills/grill-me/SKILL.md +10 -0
- package/skills/grill-with-docs/SKILL.md +88 -0
- package/skills/grill-with-docs/adr-format.md +47 -0
- package/skills/grill-with-docs/context-format.md +60 -0
- package/skills/loop-agent/SKILL.md +11 -9
- package/skills/loop-agent/references/command-reference.md +14 -15
- package/skills/loop-agent/references/docs-converge.md +126 -0
- package/skills/loop-agent/references/harness-policy.md +7 -7
- package/skills/loop-agent/references/hybrid-dag.md +36 -20
- package/skills/loop-agent/references/long-running-loop.md +4 -6
- package/skills/loop-agent/references/multi-worktree.md +6 -6
- package/skills/loop-agent/references/orchestrator-and-interventions.md +3 -3
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +14 -11
- package/skills/loop-agent/references/task-workflow.md +1 -1
- package/skills/loop-agent/references/verification-and-failure-handling.md +6 -0
- package/skills/using-git-worktrees/SKILL.md +215 -0
- package/dist/commands/cursor-worker.js +0 -43
- package/dist/cursor-worker-entry.js +0 -8
- package/dist/executors/cursor-artifacts.js +0 -33
- package/dist/executors/cursor-execution-log.js +0 -81
- package/dist/executors/cursor-executor-artifacts.js +0 -134
- package/dist/executors/cursor-run.js +0 -115
- package/dist/executors/cursor-tool.js +0 -94
- package/dist/executors/cursor-worker-client.js +0 -223
- package/dist/executors/cursor-worker-protocol.js +0 -18
- package/dist/executors/cursor-worker-server.js +0 -54
- package/dist/executors/cursor-worker.js +0 -3
- package/dist/executors/cursor.js +0 -6
- package/dist/executors/dag-cursor-executor.js +0 -87
- package/dist/workflows/loop/actions/cursor-fix.js +0 -191
- package/dist/workflows/loop/policy/cursor-fix-policy.js +0 -31
- package/docs/cursor-executor-usage.md +0 -25
- package/docs/dynamic-workflow-dag-engine-roadmap.md +0 -1749
package/docs/progress/README.md
CHANGED
|
@@ -2,4 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
本目录存放应超越聊天上下文的简洁 handoff 日志。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**索引职责**:本文件维护本目录**全量文件列表**。`docs/README.md` 只链到本 README。
|
|
6
|
+
|
|
7
|
+
## 近期要点(导读)
|
|
8
|
+
|
|
9
|
+
- [`2026-07-15-init-update-surface-coverage.md`](2026-07-15-init-update-surface-coverage.md) — 修复初始化 surface 升级漏检(自动发现 copied 文件、blockedTargetPaths fail-safe、drift gate)实施交接(已验证)
|
|
10
|
+
- [`2026-07-15-readonly-node-retry.md`](2026-07-15-readonly-node-retry.md) — 只读 Pi DAG 节点安全重试(默认策略、attempt 证据、validation 门禁)实施交接(已验证)
|
|
11
|
+
- [`2026-07-15-repair-artifact-gate-runtime-contract-implementation.md`](2026-07-15-repair-artifact-gate-runtime-contract-implementation.md) — 显式 repairNodeId、runtime contract preflight 与 run-owned controller identity 实施交接(已验证)
|
|
12
|
+
- [`2026-07-14-observe-ui-r5-boundary-final.md`](2026-07-14-observe-ui-r5-boundary-final.md) — R5 轻量入口与显式模块边界 DAG closeout
|
|
13
|
+
- [`2026-07-14-observe-ui-r5-remediation.md`](2026-07-14-observe-ui-r5-remediation.md) — R5 浏览器状态所有权修复 DAG closeout
|
|
14
|
+
- [`2026-07-14-observe-ui-r5.md`](2026-07-14-observe-ui-r5.md) — Observe 前端模块化与体验收敛(已验证)
|
|
15
|
+
- [`2026-07-14-observe-ui-r4.md`](2026-07-14-observe-ui-r4.md) — Observe 事件时间线、有界 JSONL 与投影健康(已验证)
|
|
16
|
+
- [`2026-07-14-observe-ui-r3.md`](2026-07-14-observe-ui-r3.md) — Observe Feature 决策详情与对象关联导航(已验证)
|
|
17
|
+
- [`2026-07-14-observe-ui-r2.md`](2026-07-14-observe-ui-r2.md) — Observe Batch / Worker Run 证据化详情收口
|
|
18
|
+
- [`2026-07-14-init-canonical-layout-handoff.md`](2026-07-14-init-canonical-layout-handoff.md) — 目标项目初始化布局迁移到 `ai_workspace/loop-agent/` 与 `.agents/skills/` 的跨会话交接
|
|
19
|
+
- [`2026-07-14-self-update-notifier-implementation.md`](2026-07-14-self-update-notifier-implementation.md) — loop-agent CLI 自更新提醒实现、TDD 验证和 bounded DAG fallback 交接
|
|
20
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md) — 活文档校准(Dynamic Workflow / 六个月 / ADR)
|
|
21
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md) — 文档治理与双树/索引收敛
|
|
22
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md) — Website 文档 IA 交接
|
|
23
|
+
- [`2026-07-13-sdd-embedded-skills.md`](2026-07-13-sdd-embedded-skills.md) — 目标项目 repo-local SDD skills 的可选 DAG 节点嵌入、验证与基线风险交接
|
|
24
|
+
- [`2026-07-13-dev-controller-001-implementation.md`](2026-07-13-dev-controller-001-implementation.md) — controller identity 实施
|
|
25
|
+
- [`2026-07-13-dev-snapshot-001-implementation.md`](2026-07-13-dev-snapshot-001-implementation.md) — skill snapshot 实施
|
|
26
|
+
- [`2026-07-13-dev-canary-001-implementation.md`](2026-07-13-dev-canary-001-implementation.md) — candidate canary 实施
|
|
27
|
+
|
|
28
|
+
## 全量列表(新→旧)
|
|
29
|
+
|
|
30
|
+
- [`2026-07-15-init-update-surface-coverage.md`](2026-07-15-init-update-surface-coverage.md)
|
|
31
|
+
- [`2026-07-15-readonly-node-retry.md`](2026-07-15-readonly-node-retry.md)
|
|
32
|
+
- [`2026-07-15-repair-artifact-gate-runtime-contract-implementation.md`](2026-07-15-repair-artifact-gate-runtime-contract-implementation.md)
|
|
33
|
+
- [`2026-07-14-observe-ui-r5-boundary-final.md`](2026-07-14-observe-ui-r5-boundary-final.md)
|
|
34
|
+
- [`2026-07-14-observe-ui-r5-remediation.md`](2026-07-14-observe-ui-r5-remediation.md)
|
|
35
|
+
- [`2026-07-14-observe-ui-r5.md`](2026-07-14-observe-ui-r5.md)
|
|
36
|
+
- [`2026-07-14-observe-ui-r4.md`](2026-07-14-observe-ui-r4.md)
|
|
37
|
+
- [`2026-07-14-observe-ui-r3.md`](2026-07-14-observe-ui-r3.md)
|
|
38
|
+
- [`2026-07-14-observe-ui-r2.md`](2026-07-14-observe-ui-r2.md)
|
|
39
|
+
- [`2026-07-14-init-canonical-layout-handoff.md`](2026-07-14-init-canonical-layout-handoff.md)
|
|
40
|
+
- [`2026-07-14-self-update-notifier-implementation.md`](2026-07-14-self-update-notifier-implementation.md)
|
|
41
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md)
|
|
42
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md)
|
|
43
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md)
|
|
44
|
+
- [`2026-07-13-sdd-embedded-skills.md`](2026-07-13-sdd-embedded-skills.md)
|
|
45
|
+
- [`2026-07-13-dev-snapshot-001-implementation.md`](2026-07-13-dev-snapshot-001-implementation.md)
|
|
46
|
+
- [`2026-07-13-dev-controller-001-implementation.md`](2026-07-13-dev-controller-001-implementation.md)
|
|
47
|
+
- [`2026-07-13-dev-canary-001-implementation.md`](2026-07-13-dev-canary-001-implementation.md)
|
|
48
|
+
- [`2026-07-12-pi-only-agent-runtime.md`](2026-07-12-pi-only-agent-runtime.md)
|
|
49
|
+
- [`2026-07-11-observe-dag-visualization.md`](2026-07-11-observe-dag-visualization.md)
|
|
50
|
+
- [`2026-07-11-m2-feature-delivery-loop.md`](2026-07-11-m2-feature-delivery-loop.md)
|
|
51
|
+
- [`2026-07-10-observe-ui-optimization.md`](2026-07-10-observe-ui-optimization.md)
|
|
52
|
+
- [`2026-07-04-dynamic-workflow-dag-engine.md`](2026-07-04-dynamic-workflow-dag-engine.md)
|
|
53
|
+
- [`2026-07-04-commander-cli-migration.md`](2026-07-04-commander-cli-migration.md)
|
|
54
|
+
- [`2026-07-02-loop-agent-subject-restructure.md`](2026-07-02-loop-agent-subject-restructure.md)
|
package/docs/reports/README.md
CHANGED
|
@@ -1,22 +1,94 @@
|
|
|
1
1
|
# 报告
|
|
2
2
|
|
|
3
|
-
本目录存放验证、审计、benchmark 与 closeout 报告。
|
|
3
|
+
本目录存放验证、审计、benchmark、init evolution 与 closeout 报告。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
**索引职责**:本文件维护本目录**全量文件列表**。`docs/README.md` 只链到本 README,不再精选单篇 report。
|
|
6
|
+
|
|
7
|
+
查找约定:
|
|
8
|
+
|
|
9
|
+
- 按日期前缀浏览下方列表(新→旧)
|
|
10
|
+
- init surface 审查:文件名含 `init-evolution-review`
|
|
11
|
+
- 能力基线滚动分析:[`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md)(**已冻结**;2026-07-15 最终再采样关闭 0.11.0;非第二 CHANGELOG)
|
|
12
|
+
|
|
13
|
+
## 近期要点(导读,非权威全集)
|
|
14
|
+
|
|
15
|
+
- [`current-capability-summary.md`](current-capability-summary.md) — **活**能力摘要(新进展写这里 / CHANGELOG / 新 report)
|
|
16
|
+
- [`2026-07-15-init-update-surface-coverage-init-evolution-review.md`](2026-07-15-init-update-surface-coverage-init-evolution-review.md) — 初始化 surface 升级漏检修复的 init surface 审查(init update required)
|
|
17
|
+
- [`2026-07-15-readonly-node-retry-init-evolution-review.md`](2026-07-15-readonly-node-retry-init-evolution-review.md) — 只读 Pi DAG 节点安全重试的 init surface 审查(surface check only,无需 init evolution)
|
|
18
|
+
- [`2026-07-15-backend-test-dag-init-evolution-review.md`](2026-07-15-backend-test-dag-init-evolution-review.md) — 后端测试专用 DAG 的 package/init surface 审查
|
|
19
|
+
- [`2026-07-15-init-canonical-layout-init-evolution-review.md`](2026-07-15-init-canonical-layout-init-evolution-review.md) — init canonical layout、旧布局安全迁移和废弃 harness 字段清理审查
|
|
20
|
+
- [`2026-07-14-self-update-notifier-implementation.md`](2026-07-14-self-update-notifier-implementation.md) — loop-agent CLI 自更新提醒实现、DAG 边界、TDD 与 init surface 非影响证据
|
|
21
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md) — 活文档校准(Dynamic Workflow / 六个月 / analysis 冻结 / ADR)
|
|
22
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md) — 文档治理扫描与索引/双树收敛
|
|
23
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md) — Website IA 与 docs-converge 收口
|
|
24
|
+
- [`2026-07-13-sdd-embedded-skills.md`](2026-07-13-sdd-embedded-skills.md) — repo-local SDD skill 嵌入增强的 DAG、TDD、独立审查、验证和基线风险证据
|
|
25
|
+
- [`2026-07-13-versioned-self-hosting-bootstrap.md`](2026-07-13-versioned-self-hosting-bootstrap.md) — 版本化自举证据
|
|
26
|
+
- [`2026-07-12-m2-completion-audit.md`](2026-07-12-m2-completion-audit.md) — 第二月完成审计
|
|
27
|
+
- [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md) — **已冻结**仓库能力基线快照(2026-07-15 最终再采样至 0.11.0;勿再当 CHANGELOG)
|
|
28
|
+
|
|
29
|
+
## 全量列表(新→旧)
|
|
30
|
+
|
|
31
|
+
- [`2026-07-15-init-update-surface-coverage-init-evolution-review.md`](2026-07-15-init-update-surface-coverage-init-evolution-review.md)
|
|
32
|
+
- [`2026-07-15-readonly-node-retry-init-evolution-review.md`](2026-07-15-readonly-node-retry-init-evolution-review.md)
|
|
33
|
+
- [`2026-07-15-backend-test-dag-init-evolution-review.md`](2026-07-15-backend-test-dag-init-evolution-review.md)
|
|
34
|
+
- [`2026-07-15-init-canonical-layout-init-evolution-review.md`](2026-07-15-init-canonical-layout-init-evolution-review.md)
|
|
35
|
+
- [`dogfood-preflight-static-20260709090443.md`](dogfood-preflight-static-20260709090443.md)
|
|
36
|
+
- [`current-capability-summary.md`](current-capability-summary.md)
|
|
37
|
+
- [`2026-07-14-website-docs-ia-init-evolution-review.md`](2026-07-14-website-docs-ia-init-evolution-review.md)
|
|
38
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md)
|
|
39
|
+
- [`2026-07-14-self-update-notifier-implementation.md`](2026-07-14-self-update-notifier-implementation.md)
|
|
40
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md)
|
|
41
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md)
|
|
42
|
+
- [`2026-07-13-versioned-self-hosting-init-evolution-review.md`](2026-07-13-versioned-self-hosting-init-evolution-review.md)
|
|
43
|
+
- [`2026-07-13-versioned-self-hosting-bootstrap.md`](2026-07-13-versioned-self-hosting-bootstrap.md)
|
|
44
|
+
- [`2026-07-13-test-environment-stability.md`](2026-07-13-test-environment-stability.md)
|
|
45
|
+
- [`2026-07-13-sdd-embedded-skills-init-evolution-review.md`](2026-07-13-sdd-embedded-skills-init-evolution-review.md)
|
|
46
|
+
- [`2026-07-13-sdd-embedded-skills.md`](2026-07-13-sdd-embedded-skills.md)
|
|
47
|
+
- [`2026-07-13-frontend-verification-command-safety-init-evolution-review.md`](2026-07-13-frontend-verification-command-safety-init-evolution-review.md)
|
|
48
|
+
- [`2026-07-13-frontend-skill-contracts-init-evolution-review.md`](2026-07-13-frontend-skill-contracts-init-evolution-review.md)
|
|
49
|
+
- [`2026-07-13-exec-plan-lifecycle-init-evolution-review.md`](2026-07-13-exec-plan-lifecycle-init-evolution-review.md)
|
|
50
|
+
- [`2026-07-13-exec-plan-lifecycle.md`](2026-07-13-exec-plan-lifecycle.md)
|
|
8
51
|
- [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
|
|
9
|
-
- [`2026-07-
|
|
10
|
-
- [`2026-07-12-
|
|
11
|
-
- [`2026-07-12-
|
|
12
|
-
- [`2026-07-12-
|
|
13
|
-
- [`2026-07-12-m2-
|
|
14
|
-
- [`2026-07-12-m2-
|
|
15
|
-
- [`2026-07-12-m2-
|
|
16
|
-
- [`2026-07-
|
|
17
|
-
- [`2026-07-
|
|
18
|
-
- [`2026-07-
|
|
19
|
-
- [`2026-07-
|
|
20
|
-
- [`2026-07-
|
|
21
|
-
- [`2026-07-12-
|
|
22
|
-
- [`2026-07-
|
|
52
|
+
- [`2026-07-12-pi-only-agent-runtime-init-evolution-review.md`](2026-07-12-pi-only-agent-runtime-init-evolution-review.md)
|
|
53
|
+
- [`2026-07-12-observe-warm-console-redesign.md`](2026-07-12-observe-warm-console-redesign.md)
|
|
54
|
+
- [`2026-07-12-observe-dag-node-model.md`](2026-07-12-observe-dag-node-model.md)
|
|
55
|
+
- [`2026-07-12-observe-dag-node-model-init-evolution-review.md`](2026-07-12-observe-dag-node-model-init-evolution-review.md)
|
|
56
|
+
- [`2026-07-12-m2-completion-audit.md`](2026-07-12-m2-completion-audit.md)
|
|
57
|
+
- [`2026-07-12-m2-08-init-evolution-review.md`](2026-07-12-m2-08-init-evolution-review.md)
|
|
58
|
+
- [`2026-07-12-m2-08-dogfood-release-evidence.md`](2026-07-12-m2-08-dogfood-release-evidence.md)
|
|
59
|
+
- [`2026-07-12-m2-07-init-evolution-review.md`](2026-07-12-m2-07-init-evolution-review.md)
|
|
60
|
+
- [`2026-07-12-m2-06-init-evolution-review.md`](2026-07-12-m2-06-init-evolution-review.md)
|
|
61
|
+
- [`2026-07-12-m2-05-init-evolution-review.md`](2026-07-12-m2-05-init-evolution-review.md)
|
|
62
|
+
- [`2026-07-12-m2-04-init-evolution-review.md`](2026-07-12-m2-04-init-evolution-review.md)
|
|
63
|
+
- [`2026-07-12-m2-03-init-evolution-review.md`](2026-07-12-m2-03-init-evolution-review.md)
|
|
64
|
+
- [`2026-07-12-m2-02-init-evolution-review.md`](2026-07-12-m2-02-init-evolution-review.md)
|
|
65
|
+
- [`2026-07-12-init-evolution-strict-report-range.md`](2026-07-12-init-evolution-strict-report-range.md)
|
|
66
|
+
- [`2026-07-12-dag-state-reconciliation.md`](2026-07-12-dag-state-reconciliation.md)
|
|
67
|
+
- [`2026-07-12-dag-state-reconciliation-init-evolution-review.md`](2026-07-12-dag-state-reconciliation-init-evolution-review.md)
|
|
68
|
+
- [`2026-07-12-dag-output-language.md`](2026-07-12-dag-output-language.md)
|
|
69
|
+
- [`2026-07-12-dag-output-language-init-evolution-review.md`](2026-07-12-dag-output-language-init-evolution-review.md)
|
|
70
|
+
- [`2026-07-12-dag-liveness-recovery.md`](2026-07-12-dag-liveness-recovery.md)
|
|
71
|
+
- [`2026-07-12-dag-liveness-init-evolution-review.md`](2026-07-12-dag-liveness-init-evolution-review.md)
|
|
72
|
+
- [`2026-07-12-0.10.0-init-evolution-review.md`](2026-07-12-0.10.0-init-evolution-review.md)
|
|
73
|
+
- [`2026-07-11-task-pool-hard-cutover-init-evolution-review.md`](2026-07-11-task-pool-hard-cutover-init-evolution-review.md)
|
|
74
|
+
- [`2026-07-11-round3-worker-expansion.md`](2026-07-11-round3-worker-expansion.md)
|
|
75
|
+
- [`2026-07-11-round2-interactive-ui-experiment.md`](2026-07-11-round2-interactive-ui-experiment.md)
|
|
76
|
+
- [`2026-07-11-round2-init-evolution-review.md`](2026-07-11-round2-init-evolution-review.md)
|
|
77
|
+
- [`2026-07-11-observe-terminal-dag-kpi.md`](2026-07-11-observe-terminal-dag-kpi.md)
|
|
78
|
+
- [`2026-07-11-observe-dag-visualization.md`](2026-07-11-observe-dag-visualization.md)
|
|
79
|
+
- [`2026-07-11-m2-01-init-evolution-review.md`](2026-07-11-m2-01-init-evolution-review.md)
|
|
80
|
+
- [`2026-07-11-init-evolution-review.md`](2026-07-11-init-evolution-review.md)
|
|
81
|
+
- [`2026-07-11-commit-1d0f3b7-review.md`](2026-07-11-commit-1d0f3b7-review.md)
|
|
82
|
+
- [`2026-07-11-command-performance-followups.md`](2026-07-11-command-performance-followups.md)
|
|
83
|
+
- [`2026-07-11-command-performance-audit.md`](2026-07-11-command-performance-audit.md)
|
|
84
|
+
- [`2026-07-11-0.7.5-init-evolution-review.md`](2026-07-11-0.7.5-init-evolution-review.md)
|
|
85
|
+
- [`2026-07-10-session-events-dogfood.md`](2026-07-10-session-events-dogfood.md)
|
|
86
|
+
- [`2026-07-10-nightly-drill-round-1.md`](2026-07-10-nightly-drill-round-1.md)
|
|
87
|
+
- [`2026-07-10-nightly-drill-round-1-evidence.md`](2026-07-10-nightly-drill-round-1-evidence.md)
|
|
88
|
+
- [`2026-07-10-next-stage-dogfood-runs.md`](2026-07-10-next-stage-dogfood-runs.md)
|
|
89
|
+
- [`2026-07-10-init-evolution-review.md`](2026-07-10-init-evolution-review.md)
|
|
90
|
+
- [`2026-07-09-be-001-pi-real-run.md`](2026-07-09-be-001-pi-real-run.md)
|
|
91
|
+
- [`2026-07-05-website-docs-governance-multi-executor-dogfood.md`](2026-07-05-website-docs-governance-multi-executor-dogfood.md)
|
|
92
|
+
- [`2026-07-04-website-docs-dynamic-workflow-dogfood.md`](2026-07-04-website-docs-dynamic-workflow-dogfood.md)
|
|
93
|
+
- [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md)
|
|
94
|
+
- [`2026-06-06-pi-sdk-runtime-reuse-benchmark.md`](2026-06-06-pi-sdk-runtime-reuse-benchmark.md)
|
package/docs/skills/README.md
CHANGED
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
|
|
4
4
|
|
|
5
5
|
- `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
|
|
6
|
-
|
|
6
|
+
- `../../skills/agent-worker/SKILL.md` — optional outer-loop operator skill for Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canaries, and Worker recovery. Single DAG implementation or runtime repair stays with `loop-agent`; this skill is not a default DAG role skill.
|
|
7
|
+
- `../../scripts/check-skill-entry.sh` — validates both public skill entries, their required references, line budgets, and the `agent-worker` trigger vocabulary.
|
|
@@ -8,6 +8,7 @@ The entries below are local wrappers or existing local skills. They are not whol
|
|
|
8
8
|
|---|---|---|---|---|---|
|
|
9
9
|
| `ai-engineering-context` | local existing | `skills/ai-engineering-context/SKILL.md` | scout, default context | default/scout | Read-only engineering context; not a private platform memory skill. |
|
|
10
10
|
| `loop-agent` | local existing | `skills/loop-agent/SKILL.md` | planner, supervisor, closeout | planner/closeout | Long references may be resolved by strict audit with expanded budget; executor behavior unchanged. |
|
|
11
|
+
| `agent-worker` | local operator skill | `skills/agent-worker/SKILL.md` | outer-loop operator only | never a default DAG role | Routes Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canary, and failure recovery. Must not launch recursively from DAG leaves or duplicate executor/kernel behavior. |
|
|
11
12
|
| `verification-before-completion` | local wrapper inspired by verification discipline | `skills/verification-before-completion/SKILL.md` | implementer, verifier, closeout | implementer/verifier/closeout | Requires shell evidence before completion claims. |
|
|
12
13
|
| `systematic-debugging` | local wrapper inspired by systematic debugging discipline | `skills/systematic-debugging/SKILL.md` | implementer, verifier | verifier | Advisory prompt guidance only; does not run tools by itself. |
|
|
13
14
|
| `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
|
|
@@ -20,7 +21,7 @@ The entries below are local wrappers or existing local skills. They are not whol
|
|
|
20
21
|
## Vetting Rules
|
|
21
22
|
|
|
22
23
|
- Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
|
|
24
|
+
- `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.
|
|
23
25
|
- Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
|
|
24
26
|
- This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
|
|
25
27
|
- `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
|
|
26
|
-
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"order": { "type": "integer", "minimum": 0 },
|
|
329
329
|
"executor": {
|
|
330
330
|
"type": "string",
|
|
331
|
-
"enum": ["
|
|
331
|
+
"enum": ["pi", "shell", "static"]
|
|
332
332
|
},
|
|
333
333
|
"model": { "type": "string" },
|
|
334
334
|
"status": {
|
|
@@ -400,11 +400,11 @@
|
|
|
400
400
|
"pending",
|
|
401
401
|
"running",
|
|
402
402
|
"finished",
|
|
403
|
-
"partial_failed",
|
|
404
|
-
"failed",
|
|
405
|
-
"paused",
|
|
406
|
-
"superseded",
|
|
407
|
-
"abandoned"
|
|
403
|
+
"partial_failed",
|
|
404
|
+
"failed",
|
|
405
|
+
"paused",
|
|
406
|
+
"superseded",
|
|
407
|
+
"abandoned"
|
|
408
408
|
]
|
|
409
409
|
},
|
|
410
410
|
"runDir": { "type": "string", "minLength": 1 },
|
|
@@ -444,6 +444,23 @@
|
|
|
444
444
|
},
|
|
445
445
|
"pausedByNodeId": { "type": "string" },
|
|
446
446
|
"pauseReason": { "type": "string" },
|
|
447
|
+
"controllerIdentity": {
|
|
448
|
+
"type": "object",
|
|
449
|
+
"additionalProperties": false,
|
|
450
|
+
"required": ["status", "capturedAt", "runtimeContractCompatibility"],
|
|
451
|
+
"properties": {
|
|
452
|
+
"status": { "enum": ["pinned", "legacy-unpinned"] },
|
|
453
|
+
"capturedAt": { "type": "string" },
|
|
454
|
+
"packageName": { "type": "string" },
|
|
455
|
+
"packageVersion": { "type": "string" },
|
|
456
|
+
"packageFingerprint": { "type": "string" },
|
|
457
|
+
"binarySha256": { "type": "string" },
|
|
458
|
+
"runtimeContractCompatibility": {
|
|
459
|
+
"enum": ["compatible", "incompatible", "legacy-unspecified"]
|
|
460
|
+
},
|
|
461
|
+
"runtimeContractReason": { "type": "string" }
|
|
462
|
+
}
|
|
463
|
+
},
|
|
447
464
|
"executorJsonl": { "$ref": "#/$defs/dagArtifactRef" },
|
|
448
465
|
"convergence": { "$ref": "#/$defs/dagConvergence" },
|
|
449
466
|
"nodes": {
|
|
@@ -5,18 +5,29 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["version", "title", "tasks"],
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"if": { "properties": { "version": { "const": 3 } }, "required": ["version"] },
|
|
11
|
+
"then": { "required": ["runtimeContract"] }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"if": { "required": ["runtimeContract"] },
|
|
15
|
+
"then": { "properties": { "version": { "const": 3 } } }
|
|
16
|
+
}
|
|
17
|
+
],
|
|
8
18
|
"properties": {
|
|
9
19
|
"$schema": {
|
|
10
20
|
"type": "string"
|
|
11
21
|
},
|
|
12
22
|
"version": {
|
|
13
|
-
"enum": [1, 2],
|
|
23
|
+
"enum": [1, 2, 3],
|
|
14
24
|
"default": 1
|
|
15
25
|
},
|
|
16
26
|
"title": {
|
|
17
27
|
"type": "string",
|
|
18
28
|
"minLength": 1
|
|
19
29
|
},
|
|
30
|
+
"runtimeContract": { "$ref": "#/$defs/runtimeContract" },
|
|
20
31
|
"objective": {
|
|
21
32
|
"type": "string"
|
|
22
33
|
},
|
|
@@ -59,7 +70,6 @@
|
|
|
59
70
|
"description": "Executor-owned model routing template keyed by executor then complexity. Do not use legacy top-level models or defaults.model.",
|
|
60
71
|
"additionalProperties": false,
|
|
61
72
|
"properties": {
|
|
62
|
-
"cursor": { "$ref": "#/$defs/complexityModelMap" },
|
|
63
73
|
"pi": { "$ref": "#/$defs/complexityModelMap" }
|
|
64
74
|
}
|
|
65
75
|
},
|
|
@@ -73,11 +83,26 @@
|
|
|
73
83
|
"required": ["models"]
|
|
74
84
|
},
|
|
75
85
|
"$defs": {
|
|
86
|
+
"runtimeContract": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["schemaVersion", "agentRuntime", "repairWriterProtocol"],
|
|
90
|
+
"description": "DagSpec v3 controller capability handshake. Compatibility is decided by capability fields first; minimumControllerVersion is enforced when present. Legacy v1/v2 DAGs may omit this block.",
|
|
91
|
+
"properties": {
|
|
92
|
+
"schemaVersion": { "const": 1 },
|
|
93
|
+
"agentRuntime": { "const": "pi-only" },
|
|
94
|
+
"repairWriterProtocol": { "const": "explicit-node-v1" },
|
|
95
|
+
"minimumControllerVersion": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+([-+].+)?$"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
76
101
|
"complexity": {
|
|
77
102
|
"enum": ["LOW", "MED", "HIGH"]
|
|
78
103
|
},
|
|
79
104
|
"executor": {
|
|
80
|
-
"enum": ["
|
|
105
|
+
"enum": ["pi", "shell", "static"]
|
|
81
106
|
},
|
|
82
107
|
"toolProfile": {
|
|
83
108
|
"enum": ["read-only", "write"]
|
|
@@ -141,6 +166,11 @@
|
|
|
141
166
|
"fromNodeId": {
|
|
142
167
|
"type": "string",
|
|
143
168
|
"pattern": "^[a-z][a-z0-9-]*$"
|
|
169
|
+
},
|
|
170
|
+
"repairNodeId": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
173
|
+
"description": "Explicit governed Pi repair writer this gate feeds (executor=pi, toolProfile=write, writePolicy=exclusive, non-empty allowedPaths+writeSet, depends_on the gate). New DAGs must set this; legacy DAGs are only accepted when a unique safe downstream Pi writer can be derived."
|
|
144
174
|
}
|
|
145
175
|
}
|
|
146
176
|
},
|
|
@@ -212,6 +242,39 @@
|
|
|
212
242
|
"status": { "enum": ["success", "error"] }
|
|
213
243
|
}
|
|
214
244
|
},
|
|
245
|
+
"retryPolicy": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": ["maxAttempts"],
|
|
249
|
+
"description": "Retry policy for safe read-only planner/scout/reviewer/verifier/closeout Pi nodes. Total attempts include the first try and are capped at five. Supervisors, implementers, and side-effecting nodes are ineligible. Only the categories listed in retryCategories are retried; quota/auth/invalid-output/write-guard are never retried.",
|
|
250
|
+
"properties": {
|
|
251
|
+
"maxAttempts": {
|
|
252
|
+
"type": "integer",
|
|
253
|
+
"minimum": 1,
|
|
254
|
+
"maximum": 5,
|
|
255
|
+
"description": "Total attempts including the first try. 1 disables retry."
|
|
256
|
+
},
|
|
257
|
+
"backoff": { "const": "exponential", "default": "exponential" },
|
|
258
|
+
"initialDelayMs": {
|
|
259
|
+
"type": "integer",
|
|
260
|
+
"minimum": 0,
|
|
261
|
+
"default": 2000
|
|
262
|
+
},
|
|
263
|
+
"maxDelayMs": {
|
|
264
|
+
"type": "integer",
|
|
265
|
+
"minimum": 0,
|
|
266
|
+
"default": 30000
|
|
267
|
+
},
|
|
268
|
+
"retryCategories": {
|
|
269
|
+
"type": "array",
|
|
270
|
+
"items": {
|
|
271
|
+
"enum": ["timeout", "network", "rate-limit", "unavailable"]
|
|
272
|
+
},
|
|
273
|
+
"default": ["timeout", "network", "rate-limit", "unavailable"],
|
|
274
|
+
"description": "Failure categories eligible for retry. quota is never eligible."
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
215
278
|
"promptSource": {
|
|
216
279
|
"type": "object",
|
|
217
280
|
"additionalProperties": false,
|
|
@@ -297,6 +360,10 @@
|
|
|
297
360
|
"default": "record-only"
|
|
298
361
|
}
|
|
299
362
|
}
|
|
363
|
+
},
|
|
364
|
+
"retryPolicy": {
|
|
365
|
+
"$ref": "#/$defs/retryPolicy",
|
|
366
|
+
"description": "Opt-in retry policy. Allowed only on safe read-only planner/scout/reviewer/verifier/closeout non-dynamic Pi nodes; validation rejects it on supervisors, implementers, writers, dynamic, shell, static, docs-only, and decision-gate nodes. Generated DAGs declare the default policy on eligible nodes automatically."
|
|
300
367
|
}
|
|
301
368
|
},
|
|
302
369
|
"oneOf": [
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./agent-dag.schema.json",
|
|
3
|
-
"version":
|
|
3
|
+
"version": 3,
|
|
4
4
|
"title": "Agent DAG supervised implementation template",
|
|
5
|
+
"runtimeContract": {
|
|
6
|
+
"schemaVersion": 1,
|
|
7
|
+
"agentRuntime": "pi-only",
|
|
8
|
+
"repairWriterProtocol": "explicit-node-v1"
|
|
9
|
+
},
|
|
5
10
|
"objective": "Demonstrate a reusable supervised implementation DAG: contract → parallel scouts → plan → write-set audit → write-set gate → implement → soft verify → process supervisor → repair → hard verify → review verdict → review gate → decision gate → closeout. Write-set, process, and review verdict nodes emit first-line VERDICT for deterministic gates, reducing main-session intervention.",
|
|
6
11
|
"successCriteria": [
|
|
7
12
|
"contract-pi returns a read-only implementation contract with narrow write boundaries",
|
|
@@ -22,7 +27,7 @@
|
|
|
22
27
|
"globalConstraints": [
|
|
23
28
|
"Replace every REPLACE/WITH/... placeholder with concrete repo paths before execution; do not leave template placeholders in production DAG JSON.",
|
|
24
29
|
"Do not commit from DAG nodes; main session inspects and commits after Decision Gate approval.",
|
|
25
|
-
"Use only existing executors: pi, shell, static
|
|
30
|
+
"Use only existing executors: pi, shell, static. Cursor is available only through the explicit cursor-prompt sidecar, never as a DAG executor. Pi writer nodes must set toolProfile=write.",
|
|
26
31
|
"Read-only nodes must not write repository files, including root artifacts/**.",
|
|
27
32
|
"Exclusive writer nodes must stay within declared writeSet.",
|
|
28
33
|
"Do not implement automatic retry/resume or mutate historical completed facts.",
|
|
@@ -73,11 +78,6 @@
|
|
|
73
78
|
]
|
|
74
79
|
},
|
|
75
80
|
"executorModels": {
|
|
76
|
-
"cursor": {
|
|
77
|
-
"LOW": "composer-2.5",
|
|
78
|
-
"MED": "composer-2.5",
|
|
79
|
-
"HIGH": "gpt-5.5"
|
|
80
|
-
},
|
|
81
81
|
"pi": {
|
|
82
82
|
"LOW": "gpt-5.3-codex-spark",
|
|
83
83
|
"MED": "glm-5.2",
|
|
@@ -323,7 +323,8 @@
|
|
|
323
323
|
"lineMode": "first-verdict-line"
|
|
324
324
|
},
|
|
325
325
|
"repairArtifactGate": {
|
|
326
|
-
"fromNodeId": "process-supervisor-pi"
|
|
326
|
+
"fromNodeId": "process-supervisor-pi",
|
|
327
|
+
"repairNodeId": "repair-pi"
|
|
327
328
|
},
|
|
328
329
|
"cwd": ".",
|
|
329
330
|
"timeoutMs": 60000
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Backend Test DAG Generate Pytest Prompt Template
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Use this prompt for a **pytest code generation** node: `executor: "pi"`, `role: "implementer"`, `toolProfile: "write"`, `writePolicy: "exclusive"`. The implementer converts reviewed backend functional test cases into pytest automation code with 1:1 traceability.
|
|
6
|
+
|
|
7
|
+
Do **not** create a new executor type. This is a standard `executor: pi` writer node.
|
|
8
|
+
|
|
9
|
+
## Recommended DAG Node Shape
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"id": "generate-backend-pytest-pi",
|
|
14
|
+
"depends_on": ["review-backend-cases-gate-shell"],
|
|
15
|
+
"complexity": "HIGH",
|
|
16
|
+
"executor": "pi",
|
|
17
|
+
"role": "implementer",
|
|
18
|
+
"toolProfile": "write",
|
|
19
|
+
"writePolicy": "exclusive",
|
|
20
|
+
"writeSet": ["testcase/**/test_*.py"],
|
|
21
|
+
"allowedPaths": ["testcase/**/test_*.py"],
|
|
22
|
+
"forbiddenPaths": [".harness/**", "artifacts/**"],
|
|
23
|
+
"outputContract": "Pytest test files under tests/backend/ with 1:1 mapping to functional test case IDs. Summary lists generated files, test function count, and any skipped cases with reasons.",
|
|
24
|
+
"subtask_prompt_markdown": "./backend-test-dag.generate-pytest.prompt.md"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Prompt Body
|
|
29
|
+
|
|
30
|
+
You are the Backend Test DAG **pytest code generator**.
|
|
31
|
+
|
|
32
|
+
Your job is to convert reviewed test cases under `testcase/md/` into pytest automation code. Write test files under `testcase/` only. Stay within `writeSet`. Do not write root `artifacts/**`.
|
|
33
|
+
|
|
34
|
+
### Output Steps (do in order)
|
|
35
|
+
|
|
36
|
+
1. First, output a brief summary: how many files, how many test functions planned
|
|
37
|
+
2. Then write each test file under `testcase/`
|
|
38
|
+
|
|
39
|
+
### Inputs
|
|
40
|
+
|
|
41
|
+
1. **Reviewed test cases** — files under `testcase/md/` (approved by `review-backend-cases-pi`).
|
|
42
|
+
2. **Target project conventions** — read `conftest.py`, `pytest.ini` / `pyproject.toml` to understand conventions, but do NOT modify them.
|
|
43
|
+
|
|
44
|
+
Do NOT re-read source documents. Use the reviewed cases only.
|
|
45
|
+
|
|
46
|
+
### Conversion Rules
|
|
47
|
+
|
|
48
|
+
#### File Naming
|
|
49
|
+
|
|
50
|
+
- Every test file must start with `test_` prefix (e.g. `test_order.py`, `test_user_api.py`)
|
|
51
|
+
- pytest collects tests from files matching `test_*.py` or `*_test.py` — use `test_` prefix exclusively
|
|
52
|
+
- Never create test files without the `test_` prefix
|
|
53
|
+
|
|
54
|
+
#### Write Boundary
|
|
55
|
+
|
|
56
|
+
- Only **create new** test script files under `testcase/`
|
|
57
|
+
- Do NOT modify existing files: `conftest.py`, `pytest.ini`, `pyproject.toml`, `setup.cfg`, `__init__.py`, or any other framework/config file
|
|
58
|
+
- Reuse existing fixtures; if required fixtures do not exist, report the gap instead of creating or modifying framework files
|
|
59
|
+
- Read existing framework files to understand conventions, but treat them as immutable
|
|
60
|
+
|
|
61
|
+
#### Naming Conflict Resolution
|
|
62
|
+
|
|
63
|
+
- If a file with the target name already exists under `testcase/`, add a numeric suffix: `test_order.py` → `test_order_01.py` → `test_order_02.py`
|
|
64
|
+
- Never overwrite or append to existing files — each test script must be a standalone file
|
|
65
|
+
- Check for existing files before writing; if `test_<module>.py` exists, use `test_<module>_01.py`
|
|
66
|
+
|
|
67
|
+
#### 1:1 Traceability
|
|
68
|
+
|
|
69
|
+
Every functional test case ID (`BE-<MODULE>-<NNN>`) must map to exactly one pytest function:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
# testcase/md/BE-ORDER-001 → testcase/test_order.py
|
|
73
|
+
def test_BE_ORDER_001_create_order_with_valid_data():
|
|
74
|
+
"""BE-ORDER-001: Create order with valid request body."""
|
|
75
|
+
...
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- Function name: `test_<CASE_ID_with_underscores>` (e.g. `test_BE_ORDER_001_...`)
|
|
79
|
+
- Docstring first line: `<CASE_ID>: <Case Title>`
|
|
80
|
+
|
|
81
|
+
#### File Organization
|
|
82
|
+
|
|
83
|
+
- All test files go under `testcase/` directory in the host project root
|
|
84
|
+
- Group test files by MODULE segment: `BE-ORDER-*` → `testcase/test_order.py`, `BE-USER-*` → `testcase/test_user.py`
|
|
85
|
+
- Follow existing project conventions for import style, fixture scope
|
|
86
|
+
|
|
87
|
+
#### Fixture Strategy
|
|
88
|
+
|
|
89
|
+
- Reuse existing project fixtures from `conftest.py` when available
|
|
90
|
+
- Do not create or modify fixture/configuration files in this node
|
|
91
|
+
- Prefer `@pytest.fixture(scope="function")` for test isolation
|
|
92
|
+
- Use `@pytest.mark.parametrize` for boundary condition cases with multiple inputs
|
|
93
|
+
|
|
94
|
+
#### Test Integrity
|
|
95
|
+
|
|
96
|
+
- Tests verify implementation correctness — if a test fails, the implementation likely has a bug, not the test
|
|
97
|
+
- Do NOT weaken assertions, remove test cases, or modify test logic to make tests pass
|
|
98
|
+
- Do NOT add workarounds, skips, or try/except blocks to hide failures without explicit justification
|
|
99
|
+
- Report all failures honestly in the output; the downstream `execute-backend-pytest-shell` node captures exit codes and stdout/stderr as-is
|
|
100
|
+
|
|
101
|
+
#### Assertions
|
|
102
|
+
|
|
103
|
+
- Use `assert` statements, not `unittest` assertions
|
|
104
|
+
- Assert specific values, not just "no exception"
|
|
105
|
+
- For API tests: assert status code, response body keys, and specific field values
|
|
106
|
+
- For database tests: assert record state after operation
|
|
107
|
+
|
|
108
|
+
#### Conditional Test Implementation (include ONLY if test cases exist)
|
|
109
|
+
|
|
110
|
+
- **Authentication tests**: implement ONLY if `testcase/md/` contains auth-related cases
|
|
111
|
+
- Use `@pytest.mark.auth` marker
|
|
112
|
+
- Test no token, expired token, invalid token, insufficient permissions, cross-user access
|
|
113
|
+
- **Timeout tests**: implement ONLY if `testcase/md/` contains timeout-related cases
|
|
114
|
+
- Use `@pytest.mark.timeout` marker
|
|
115
|
+
- Use `unittest.mock.patch` or `pytest-mock` to simulate slow responses
|
|
116
|
+
- If no such cases exist in the reviewed test cases, do NOT add these tests
|
|
117
|
+
|
|
118
|
+
#### Markers
|
|
119
|
+
|
|
120
|
+
- `@pytest.mark.positive` — happy path cases
|
|
121
|
+
- `@pytest.mark.negative` — error/exception cases
|
|
122
|
+
- `@pytest.mark.boundary` — edge cases
|
|
123
|
+
- `@pytest.mark.<MODULE>` — module-specific marker (e.g. `@pytest.mark.order`)
|
|
124
|
+
|
|
125
|
+
#### Skip Policy
|
|
126
|
+
|
|
127
|
+
If a test case cannot be automated (requires external service not mockable, requires manual verification), add it with `@pytest.mark.skip(reason="...")` and document the reason. Do not omit the function — traceability requires it exists.
|
|
128
|
+
|
|
129
|
+
### Output Shape (after summary line)
|
|
130
|
+
|
|
131
|
+
After the mandatory summary line, provide:
|
|
132
|
+
|
|
133
|
+
1. **Generated Files** — list of files written under `tests/backend/`.
|
|
134
|
+
2. **Function Mapping Table** — `| Test Case ID | Pytest Function | File | Marker |`.
|
|
135
|
+
3. **Skipped Cases** — if any, list with reason.
|
|
136
|
+
4. **Conventions Observed** — note project fixtures/config discovered and followed.
|
|
137
|
+
5. **Residual Risks** — cases that may need manual verification or environment setup.
|
|
138
|
+
|
|
139
|
+
Do not include chain-of-thought. Do not write root `artifacts/**`.
|