@tea-agent/loop-agent 0.24.10 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/executors/dag-pi-executor.js +74 -13
- package/dist/executors/pi-executor.js +25 -7
- package/dist/executors/pi-prompt-transport.js +198 -0
- package/dist/executors/pi-sdk-executor.js +1 -1
- package/dist/executors/process-tree.js +33 -0
- package/dist/executors/shell-executor.js +239 -47
- package/dist/executors/shell-verification.js +4 -2
- package/dist/infrastructure/harness/task-store.js +31 -0
- package/dist/shared/operator/capabilities.js +6 -0
- package/dist/verification/maven/cache.js +142 -0
- package/dist/verification/maven/index.js +120 -0
- package/dist/verification/maven/plan-commands.js +421 -0
- package/dist/verification/maven/pom-static.js +136 -0
- package/dist/verification/maven/scope-resolve.js +153 -0
- package/dist/verification/maven/stale.js +130 -0
- package/dist/verification/maven/types.js +23 -0
- package/dist/verification/maven/workspace-graph.js +322 -0
- package/dist/worker/cli.js +177 -7
- package/dist/worker/delivery/final-verification.js +12 -0
- package/dist/worker/feature/advance.js +301 -0
- package/dist/worker/feature/doctor.js +223 -0
- package/dist/worker/feature/next-action.js +11 -3
- package/dist/worker/feature/scaffold.js +798 -0
- package/dist/workflows/dag/backend-test-markdown-workflow.js +127 -0
- package/dist/workflows/dag/failure-category.js +5 -1
- package/dist/workflows/dag/frontend-implementation-contract.js +4 -0
- package/dist/workflows/dag/frontend-prewrite-gate.js +0 -17
- package/dist/workflows/dag/init-hybrid.js +208 -19
- package/dist/workflows/dag/reconcile-run.js +24 -0
- package/dist/workflows/dag/types.js +44 -0
- package/dist/workflows/dag/validate.js +16 -0
- package/docs/architecture/dag-execution.md +5 -1
- package/docs/architecture/runtime-boundaries.md +11 -1
- package/docs/architecture/worker-and-feature.md +13 -0
- package/docs/init-surface.manifest.json +3 -0
- package/docs/templates/agent-dag.schema.json +9 -0
- package/docs/templates/backend-test-dag.json +3 -3
- package/docs/templates/frontend-implementation-contract.schema.json +2 -2
- package/docs/templates/product-line/README.md +17 -1
- package/docs/templates/product-line/feature-scaffold-batch.example.yaml +31 -0
- package/docs/templates/product-line/scaffold-samples/README.md +36 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/acceptance.yaml +13 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/design.md +14 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/tasks/BE-IMPL-001.yaml +83 -0
- package/docs/templates/product-line/scaffold-samples/backend-only/tasks/task-graph.yaml +14 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/acceptance.yaml +15 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/design.md +18 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/BE-IMPL-001.yaml +84 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/CONTRACT-001.yaml +84 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/FE-IMPL-001.yaml +86 -0
- package/docs/templates/product-line/scaffold-samples/fe-with-api/tasks/task-graph.yaml +40 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/acceptance.yaml +13 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/design.md +14 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/feature.yaml +3 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/requirement.md +6 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/tasks/FE-IMPL-001.yaml +85 -0
- package/docs/templates/product-line/scaffold-samples/frontend-only/tasks/task-graph.yaml +14 -0
- package/examples/l5-report-coms-process-definition.html +322 -0
- package/package.json +1 -1
- package/skills/agent-worker/references/agent-worker-operator.md +84 -0
- package/skills/frontend-bounded-implement/SKILL.md +53 -0
- package/skills/frontend-implementation/SKILL.md +3 -7
- package/skills/frontend-implementation/references/node-contracts.md +3 -3
- package/skills/loop-agent/SKILL.md +8 -8
- package/skills/loop-agent/references/command-reference.md +14 -2
- package/skills/loop-agent/references/harness-policy.md +22 -0
- package/skills/loop-agent/references/task-workflow.md +5 -0
|
@@ -521,6 +521,15 @@
|
|
|
521
521
|
"retryOnInvalid": { "type": "boolean", "default": true }
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
|
+
"writerOutcomePolicy": {
|
|
525
|
+
"type": "object",
|
|
526
|
+
"additionalProperties": false,
|
|
527
|
+
"required": ["type"],
|
|
528
|
+
"description": "Fail-closed outcome/diff consistency protocol for bounded Pi writers. The first non-empty assistant line must be IMPLEMENTATION_OUTCOME: changed, already-satisfied, or blocked.",
|
|
529
|
+
"properties": {
|
|
530
|
+
"type": { "const": "implementation-outcome-v1" }
|
|
531
|
+
}
|
|
532
|
+
},
|
|
524
533
|
"allowedPaths": {
|
|
525
534
|
"type": "array",
|
|
526
535
|
"items": { "type": "string", "minLength": 1 },
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
".harness/dag-runs/**",
|
|
251
251
|
"artifacts/**"
|
|
252
252
|
],
|
|
253
|
-
"outputContract": "One scoped pytest execution over Markdown-mapped scripts producing a valid pytest-html report with per-case captured output, self-contained reports/backend-test.html
|
|
253
|
+
"outputContract": "One scoped pytest execution over Markdown-mapped scripts producing a valid pytest-html report with per-case captured output, self-contained reports/backend-test.html, reports/backend-test.md, reports/backend-test-facts.md, and a deterministic self-contained reports/backend-test-l5-dashboard.html (machine-computed L-5 metrics, no JSON); exit 0/1 with valid evidence continues.",
|
|
254
254
|
"subtask_prompt": "Resolve the final Markdown Automation Notes/自动化映射 to a unique, safe set of testcase/**/test_*.py targets and execute only those scripts exactly once. Prefer the deterministic module one-to-one path when a mapped script is missing but the module stem file exists. Generate a native pytest-html self-contained report, then render the primary self-contained Chinese HTML report from the same pytest-html plus final Markdown case metadata without rerun. Keep 测试结论, quality status, failure overview, and a polished per-case result card with concise scenario, automation test name, result, duration, and redacted bounded HTTP request parameters/response results for both passed and failed cases. Do not render a technical/execution evidence section in HTML; retain auditable paths and hashes in facts.",
|
|
255
255
|
"shell": {
|
|
256
256
|
"commands": [
|
|
@@ -283,8 +283,8 @@
|
|
|
283
283
|
".harness/dag-runs/**",
|
|
284
284
|
"artifacts/**"
|
|
285
285
|
],
|
|
286
|
-
"outputContract": "Final Markdown report and L-5 conclusion under docs/test-reports/**; no JSON.",
|
|
287
|
-
"subtask_prompt": "Generate the final Markdown report from upstream facts and run-owned environment, advisory case-validation, advisory traceability, pytest-html and HTML evidence. Do not emit JSON.\n\nUse this exact human-facing section order: 测试结论 → 执行概览 → 质量校验 → 失败分析 → 风险与建议 → 证据与 L-5. Put the decision and key numbers first, use compact tables/bullets, and keep headings concise. Do not paste entire upstream reports, duplicate per-case tables already present in facts, or repeat the same evidence in multiple sections; link to paths/hashes and quote only the findings needed for the conclusion.\n\nAlways state the exact PASS/FAIL status and findings from nodes 4 and 6. Their FAIL status does not block pytest, but it must remain visible as a quality/traceability risk and must never be rewritten as PASS.\n\nInclude environment, case quality/review, automation mapping, exact pytest facts, failure classification/analysis, risks, regression recommendations, evidence paths/hashes, coverage availability, and L-5 READY/NOT READY.\n\nNever override Shell/pytest-html facts. L-5 requires pass=100%, AC=100%, automation>=90%, line>=80%, branch>=70%, skipped=0 and no blocking Critical risk.\n\nWrite only under docs/test-reports/**."
|
|
286
|
+
"outputContract": "Final Markdown report and L-5 conclusion under docs/test-reports/**; the deterministic L-5 dashboard at reports/backend-test-l5-dashboard.html is the authoritative visualization and must be linked, not re-rendered; no JSON.",
|
|
287
|
+
"subtask_prompt": "Generate the final Markdown report from upstream facts and run-owned environment, advisory case-validation, advisory traceability, pytest-html and HTML evidence. Do not emit JSON.\n\nUse this exact human-facing section order: 测试结论 → 执行概览 → 质量校验 → 失败分析 → 风险与建议 → 证据与 L-5. Put the decision and key numbers first, use compact tables/bullets, and keep headings concise. Do not paste entire upstream reports, duplicate per-case tables already present in facts, or repeat the same evidence in multiple sections; link to paths/hashes and quote only the findings needed for the conclusion.\n\nThe L-5 metrics and visualization are already produced deterministically by node 7 at reports/backend-test-l5-dashboard.html (rendered from computeL5ReportMetrics). Link to that dashboard as the authoritative L-5 view; do not recompute pass/AC/automation/coverage numbers or re-render an HTML dashboard yourself. Quote its L-5 decision verbatim.\n\nAlways state the exact PASS/FAIL status and findings from nodes 4 and 6. Their FAIL status does not block pytest, but it must remain visible as a quality/traceability risk and must never be rewritten as PASS.\n\nInclude environment, case quality/review, automation mapping, exact pytest facts, failure classification/analysis, risks, regression recommendations, evidence paths/hashes, coverage availability, and L-5 READY/NOT READY.\n\nNever override Shell/pytest-html facts. L-5 requires pass=100%, AC=100%, automation>=90%, line>=80%, branch>=70%, skipped=0 and no blocking Critical risk.\n\nWrite only under docs/test-reports/**."
|
|
288
288
|
}
|
|
289
289
|
],
|
|
290
290
|
"sourceBinding": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"sourceBinding": { "$ref": "#/$defs/sourceBinding" },
|
|
11
11
|
"riskLevel": { "enum": ["small", "standard", "high-risk"] },
|
|
12
12
|
"targets": { "type": "object", "additionalProperties": false, "required": ["files"], "properties": { "files": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/path" } }, "routes": { "type": "array", "items": { "type": "string", "pattern": "^/" } }, "publicApiChanges": { "type": "array", "items": { "type": "string", "minLength": 1 } } } },
|
|
13
|
-
"requirements": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "implementationTargets", "verificationTargetIds"], "properties": { "id": { "$ref": "#/$defs/requirementId" }, "implementationTargets": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "verificationTargetIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "evidenceGap": { "$ref": "#/$defs/gap" } } } },
|
|
13
|
+
"requirements": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "expectedOutcome", "implementationTargets", "verificationTargetIds"], "properties": { "id": { "$ref": "#/$defs/requirementId" }, "expectedOutcome": { "type": "string", "minLength": 1 }, "implementationTargets": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "verificationTargetIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "evidenceGap": { "$ref": "#/$defs/gap" } } } },
|
|
14
14
|
"uiStates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name", "applicable"], "properties": { "name": { "type": "string", "minLength": 1 }, "applicable": { "type": "boolean" }, "expectedBehavior": { "type": "string", "minLength": 1 }, "implementationTargets": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "verificationTargetIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "notApplicableReason": { "type": "string", "minLength": 1 } }, "allOf": [{ "if": { "properties": { "applicable": { "const": true } }, "required": ["applicable"] }, "then": { "required": ["expectedBehavior", "implementationTargets", "verificationTargetIds"], "properties": { "implementationTargets": { "minItems": 1 }, "verificationTargetIds": { "minItems": 1 } } } }, { "if": { "properties": { "applicable": { "const": false } }, "required": ["applicable"] }, "then": { "required": ["notApplicableReason"] } }] } },
|
|
15
|
-
"interactions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name", "implementationTargets", "verificationTargetIds"], "properties": { "name": { "type": "string", "minLength": 1 }, "implementationTargets": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "verificationTargetIds": { "type": "array", "items": { "type": "string" } } } } },
|
|
15
|
+
"interactions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name", "trigger", "expectedBehavior", "implementationTargets", "verificationTargetIds"], "properties": { "name": { "type": "string", "minLength": 1 }, "trigger": { "type": "string", "minLength": 1 }, "expectedBehavior": { "type": "string", "minLength": 1 }, "implementationTargets": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "verificationTargetIds": { "type": "array", "items": { "type": "string" } } } } },
|
|
16
16
|
"mockApi": { "type": "object", "additionalProperties": false, "required": ["strategy", "productionDefaultOff", "activation", "endpoints"], "properties": { "strategy": { "enum": ["native", "browser-intercept", "request-adapter", "not-needed"] }, "productionDefaultOff": { "const": true }, "activation": { "type": "string", "minLength": 1 }, "endpoints": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["method", "path"], "properties": { "method": { "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"] }, "path": { "type": "string", "pattern": "^/" }, "fixture": { "$ref": "#/$defs/path" }, "consumer": { "$ref": "#/$defs/path" } } } } } },
|
|
17
17
|
"designEvidence": { "type": "object", "additionalProperties": false, "required": ["source", "paths", "conflicts"], "properties": { "source": { "type": "string", "minLength": 1 }, "paths": { "type": "array", "items": { "$ref": "#/$defs/path" } }, "conflicts": { "type": "array", "items": { "type": "string", "minLength": 1 } } } },
|
|
18
18
|
"verificationTargets": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["id", "type", "commandLabel", "file", "requirementIds", "uiStates"], "properties": { "id": { "type": "string", "minLength": 1 }, "type": { "enum": ["static", "unit", "component", "integration", "mock"] }, "commandLabel": { "type": "string", "minLength": 1 }, "file": { "$ref": "#/$defs/path" }, "symbol": { "type": "string", "minLength": 1 }, "requirementIds": { "type": "array", "items": { "$ref": "#/$defs/requirementId" } }, "uiStates": { "type": "array", "items": { "type": "string", "minLength": 1 } } } } },
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Product-line feature packet
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**推荐入口(确定性脚手架):**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
agent-worker feature scaffold --repo . --template backend-only \
|
|
7
|
+
--feature-id F-2026-010 --title "..." \
|
|
8
|
+
--be-path services/example/** \
|
|
9
|
+
--verify-command "npm run typecheck" --verify-command "npm test"
|
|
10
|
+
agent-worker task validate-feature features/F-2026-010
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
批量示例见 [`feature-scaffold-batch.example.yaml`](feature-scaffold-batch.example.yaml)。
|
|
14
|
+
|
|
15
|
+
**生成快照(可读、防漂移,非 dogfood)**见 [`scaffold-samples/`](scaffold-samples/):`backend-only` / `frontend-only` / `fe-with-api`。刷新:`node --import tsx/esm scripts/generate-scaffold-samples.mjs`;校验:同脚本 `--check` 或 `bash scripts/check-scaffold-samples.sh`。
|
|
16
|
+
|
|
17
|
+
操作说明以 skill 包内 `skills/agent-worker/references/agent-worker-operator.md` § Feature Packet Scaffold 为准(不依赖 website 是否随包)。
|
|
18
|
+
|
|
19
|
+
也可手工复制本目录占位文件,替换 angle-bracket placeholders,保持 IDs 稳定,然后运行:
|
|
4
20
|
|
|
5
21
|
```bash
|
|
6
22
|
agent-worker task validate-feature <feature-dir>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Example batch for: agent-worker feature scaffold --batch <this-file> --repo <repo>
|
|
2
|
+
# Every feature_id must be explicit (v1 does not auto-allocate IDs).
|
|
3
|
+
# Any invalid row fails the whole batch with zero writes.
|
|
4
|
+
|
|
5
|
+
features:
|
|
6
|
+
- feature_id: F-2026-010
|
|
7
|
+
title: Banner 拉取欢迎语
|
|
8
|
+
template: fe-with-api
|
|
9
|
+
description: 前端 Banner 调用薄 API 展示欢迎语
|
|
10
|
+
fe_paths:
|
|
11
|
+
- apps/web/src/welcome/**
|
|
12
|
+
be_paths:
|
|
13
|
+
- services/welcome/**
|
|
14
|
+
verify_commands:
|
|
15
|
+
- npm run typecheck
|
|
16
|
+
- npm test
|
|
17
|
+
acceptance:
|
|
18
|
+
- id: AC-001
|
|
19
|
+
title: 页面展示非空 message
|
|
20
|
+
given: 欢迎语接口可用
|
|
21
|
+
when: 用户打开页面
|
|
22
|
+
then: 页面展示非空 message
|
|
23
|
+
|
|
24
|
+
- feature_id: F-2026-011
|
|
25
|
+
title: 设置页主题切换
|
|
26
|
+
template: frontend-only
|
|
27
|
+
fe_paths:
|
|
28
|
+
- apps/web/src/settings/theme/**
|
|
29
|
+
verify_commands:
|
|
30
|
+
- npm run typecheck
|
|
31
|
+
- npm test
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Scaffold samples (generated snapshots)
|
|
2
|
+
|
|
3
|
+
> **身份**:由 `agent-worker feature scaffold` **同一套 typed builders** 生成的只读快照,供人阅读与防漂移对照。
|
|
4
|
+
> **不是** 运行中的 dogfood Feature,**不是** 默认模板源(生成器仍以 `src/worker/feature/scaffold.ts` 为准)。
|
|
5
|
+
> **不要** 复制进 `features/` 当业务 Feature;日常请直接跑 `feature scaffold`。
|
|
6
|
+
|
|
7
|
+
## 目录
|
|
8
|
+
|
|
9
|
+
| 子目录 | 模板 | 快照 feature_id |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `backend-only/` | pure backend | `F-2099-901` |
|
|
12
|
+
| `frontend-only/` | pure frontend | `F-2099-902` |
|
|
13
|
+
| `fe-with-api/` | contract + BE + FE | `F-2099-903` |
|
|
14
|
+
|
|
15
|
+
ID 使用 `F-2099-*` 号段,避免与 `features/F-2026-*` dogfood 混淆。
|
|
16
|
+
|
|
17
|
+
## 刷新 / 校验
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 按当前 scaffold 实现重写本目录
|
|
21
|
+
node --import tsx/esm scripts/generate-scaffold-samples.mjs
|
|
22
|
+
|
|
23
|
+
# CI / 本地:快照必须与当前 builder 一致
|
|
24
|
+
node --import tsx/esm scripts/generate-scaffold-samples.mjs --check
|
|
25
|
+
npx vitest run test/worker/feature/scaffold-samples.test.ts
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`scripts/check-repo.sh` 会调用 `--check`。若你改了 scaffold 模板语义,请先 generate 再提交快照。
|
|
29
|
+
|
|
30
|
+
## 与真实 Packet 的关系
|
|
31
|
+
|
|
32
|
+
| 路径 | 用途 |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| 本目录 | 文档可读快照 + 漂移门禁 |
|
|
35
|
+
| `features/F-2026-*` | 仓库内真实 / dogfood Feature |
|
|
36
|
+
| 用户目标仓 `features/F-YYYY-NNN/` | `feature scaffold --repo <target>` 写入处 |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-901
|
|
3
|
+
acceptance:
|
|
4
|
+
- id: AC-001
|
|
5
|
+
title: Scaffold sample — backend-only
|
|
6
|
+
priority: must
|
|
7
|
+
type: behavior
|
|
8
|
+
given: 需求与路径边界已冻结
|
|
9
|
+
when: Feature Packet 内实现任务完成
|
|
10
|
+
then: 验收目标达成且 verify.commands 通过
|
|
11
|
+
verification:
|
|
12
|
+
expected_task_refs:
|
|
13
|
+
- BE-IMPL-001
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Design — Scaffold sample — backend-only
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
|
|
5
|
+
Generated snapshot for docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
6
|
+
|
|
7
|
+
## Paths
|
|
8
|
+
|
|
9
|
+
- Backend allowed paths:
|
|
10
|
+
- `services/sample-backend/**`
|
|
11
|
+
|
|
12
|
+
## Artifacts
|
|
13
|
+
|
|
14
|
+
- `BE-IMPL-001` produces `backend-impl`
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: BE-IMPL-001
|
|
3
|
+
feature_id: F-2099-901
|
|
4
|
+
title: Scaffold sample — backend-only — 后端实现
|
|
5
|
+
description: Generated snapshot for
|
|
6
|
+
docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
7
|
+
repo:
|
|
8
|
+
name: loop-agent
|
|
9
|
+
path_ref: .
|
|
10
|
+
default_branch: main
|
|
11
|
+
type: backend-feature
|
|
12
|
+
priority: P2
|
|
13
|
+
risk_level: medium
|
|
14
|
+
depends_on: []
|
|
15
|
+
source_docs:
|
|
16
|
+
requirement: ../requirement.md
|
|
17
|
+
acceptance: ../acceptance.yaml
|
|
18
|
+
design: ../design.md
|
|
19
|
+
acceptance_refs:
|
|
20
|
+
- AC-001
|
|
21
|
+
scope:
|
|
22
|
+
goals:
|
|
23
|
+
- 实现后端变更并满足验收
|
|
24
|
+
non_goals:
|
|
25
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
26
|
+
assumptions:
|
|
27
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
28
|
+
open_questions: []
|
|
29
|
+
constraints:
|
|
30
|
+
allowed_paths:
|
|
31
|
+
- services/sample-backend/**
|
|
32
|
+
- docs/progress/F-2099-901/be/status.md
|
|
33
|
+
- docs/progress/F-2099-901/be/**
|
|
34
|
+
forbidden_paths:
|
|
35
|
+
- config/prod/**
|
|
36
|
+
- .env
|
|
37
|
+
- .env.*
|
|
38
|
+
- secrets/**
|
|
39
|
+
- apps/**
|
|
40
|
+
hard_constraints:
|
|
41
|
+
- 不读取生产密钥
|
|
42
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
43
|
+
execution:
|
|
44
|
+
workflow: agent-dag
|
|
45
|
+
verify:
|
|
46
|
+
preset: standard
|
|
47
|
+
mode: serial
|
|
48
|
+
quota: full
|
|
49
|
+
commands:
|
|
50
|
+
- id: verify-1
|
|
51
|
+
label: npm run typecheck
|
|
52
|
+
command: npm run typecheck
|
|
53
|
+
required: true
|
|
54
|
+
timeout_ms: 300000
|
|
55
|
+
- id: verify-2
|
|
56
|
+
label: npm test
|
|
57
|
+
command: npm test
|
|
58
|
+
required: true
|
|
59
|
+
timeout_ms: 300000
|
|
60
|
+
worker:
|
|
61
|
+
execution_mode: generate-validate-run
|
|
62
|
+
max_attempts: 1
|
|
63
|
+
timeout_ms: 7200000
|
|
64
|
+
require_clean_worktree: true
|
|
65
|
+
require_human_review: true
|
|
66
|
+
create_worktree: false
|
|
67
|
+
loop_agent:
|
|
68
|
+
profile_policy: mapped
|
|
69
|
+
strict_models: true
|
|
70
|
+
strict_governance: true
|
|
71
|
+
max_concurrent: 1
|
|
72
|
+
outputs:
|
|
73
|
+
required:
|
|
74
|
+
- dag_json
|
|
75
|
+
- dag_validate_json
|
|
76
|
+
- run_record
|
|
77
|
+
- dag_report_json
|
|
78
|
+
- shell_verification
|
|
79
|
+
- closeout_or_failure_handoff
|
|
80
|
+
failure_policy:
|
|
81
|
+
failed_run_promote: false
|
|
82
|
+
generate_closeout_draft: true
|
|
83
|
+
create_followup_task: true
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-901
|
|
3
|
+
nodes:
|
|
4
|
+
- id: BE-IMPL-001
|
|
5
|
+
task: BE-IMPL-001.yaml
|
|
6
|
+
type: backend-feature
|
|
7
|
+
depends_on: []
|
|
8
|
+
produces:
|
|
9
|
+
- kind: backend-impl
|
|
10
|
+
schemaId: backend-impl-v1
|
|
11
|
+
path: services/sample-backend
|
|
12
|
+
parallel_policy:
|
|
13
|
+
max_parallel_tasks: 1
|
|
14
|
+
disallow_same_file_parallel_writes: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-903
|
|
3
|
+
acceptance:
|
|
4
|
+
- id: AC-001
|
|
5
|
+
title: Scaffold sample — fe-with-api
|
|
6
|
+
priority: must
|
|
7
|
+
type: behavior
|
|
8
|
+
given: 需求与路径边界已冻结
|
|
9
|
+
when: Feature Packet 内实现任务完成
|
|
10
|
+
then: 验收目标达成且 verify.commands 通过
|
|
11
|
+
verification:
|
|
12
|
+
expected_task_refs:
|
|
13
|
+
- CONTRACT-001
|
|
14
|
+
- BE-IMPL-001
|
|
15
|
+
- FE-IMPL-001
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Design — Scaffold sample — fe-with-api
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
|
|
5
|
+
Generated snapshot for docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
6
|
+
|
|
7
|
+
## Paths
|
|
8
|
+
|
|
9
|
+
- Backend allowed paths:
|
|
10
|
+
- `services/sample-api/**`
|
|
11
|
+
- Frontend allowed paths:
|
|
12
|
+
- `apps/web/src/sample-api/**`
|
|
13
|
+
- Contract path: `docs/contracts/F-2099-903/api.md`
|
|
14
|
+
|
|
15
|
+
## Artifacts
|
|
16
|
+
|
|
17
|
+
- `CONTRACT-001` produces `api-contract`
|
|
18
|
+
- `BE-IMPL-001` / `FE-IMPL-001` consume `api-contract` (only formal consumers)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: BE-IMPL-001
|
|
3
|
+
feature_id: F-2099-903
|
|
4
|
+
title: Scaffold sample — fe-with-api — 后端实现
|
|
5
|
+
description: Generated snapshot for
|
|
6
|
+
docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
7
|
+
repo:
|
|
8
|
+
name: loop-agent
|
|
9
|
+
path_ref: .
|
|
10
|
+
default_branch: main
|
|
11
|
+
type: backend-feature
|
|
12
|
+
priority: P2
|
|
13
|
+
risk_level: medium
|
|
14
|
+
depends_on:
|
|
15
|
+
- CONTRACT-001
|
|
16
|
+
source_docs:
|
|
17
|
+
requirement: ../requirement.md
|
|
18
|
+
acceptance: ../acceptance.yaml
|
|
19
|
+
design: ../design.md
|
|
20
|
+
acceptance_refs:
|
|
21
|
+
- AC-001
|
|
22
|
+
scope:
|
|
23
|
+
goals:
|
|
24
|
+
- 按契约实现后端
|
|
25
|
+
non_goals:
|
|
26
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
27
|
+
assumptions:
|
|
28
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
29
|
+
open_questions: []
|
|
30
|
+
constraints:
|
|
31
|
+
allowed_paths:
|
|
32
|
+
- services/sample-api/**
|
|
33
|
+
- docs/progress/F-2099-903/be/status.md
|
|
34
|
+
- docs/progress/F-2099-903/be/**
|
|
35
|
+
forbidden_paths:
|
|
36
|
+
- config/prod/**
|
|
37
|
+
- .env
|
|
38
|
+
- .env.*
|
|
39
|
+
- secrets/**
|
|
40
|
+
- apps/**
|
|
41
|
+
hard_constraints:
|
|
42
|
+
- 不读取生产密钥
|
|
43
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
44
|
+
execution:
|
|
45
|
+
workflow: agent-dag
|
|
46
|
+
verify:
|
|
47
|
+
preset: standard
|
|
48
|
+
mode: serial
|
|
49
|
+
quota: full
|
|
50
|
+
commands:
|
|
51
|
+
- id: verify-1
|
|
52
|
+
label: npm run typecheck
|
|
53
|
+
command: npm run typecheck
|
|
54
|
+
required: true
|
|
55
|
+
timeout_ms: 300000
|
|
56
|
+
- id: verify-2
|
|
57
|
+
label: npm test
|
|
58
|
+
command: npm test
|
|
59
|
+
required: true
|
|
60
|
+
timeout_ms: 300000
|
|
61
|
+
worker:
|
|
62
|
+
execution_mode: generate-validate-run
|
|
63
|
+
max_attempts: 1
|
|
64
|
+
timeout_ms: 7200000
|
|
65
|
+
require_clean_worktree: true
|
|
66
|
+
require_human_review: true
|
|
67
|
+
create_worktree: false
|
|
68
|
+
loop_agent:
|
|
69
|
+
profile_policy: mapped
|
|
70
|
+
strict_models: true
|
|
71
|
+
strict_governance: true
|
|
72
|
+
max_concurrent: 1
|
|
73
|
+
outputs:
|
|
74
|
+
required:
|
|
75
|
+
- dag_json
|
|
76
|
+
- dag_validate_json
|
|
77
|
+
- run_record
|
|
78
|
+
- dag_report_json
|
|
79
|
+
- shell_verification
|
|
80
|
+
- closeout_or_failure_handoff
|
|
81
|
+
failure_policy:
|
|
82
|
+
failed_run_promote: false
|
|
83
|
+
generate_closeout_draft: true
|
|
84
|
+
create_followup_task: true
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: CONTRACT-001
|
|
3
|
+
feature_id: F-2099-903
|
|
4
|
+
title: Scaffold sample — fe-with-api — API 契约
|
|
5
|
+
description: 冻结 docs/contracts/F-2099-903/api.md;正式 consumers 仅为 BE-IMPL-001 与 FE-IMPL-001。
|
|
6
|
+
repo:
|
|
7
|
+
name: loop-agent
|
|
8
|
+
path_ref: .
|
|
9
|
+
default_branch: main
|
|
10
|
+
type: architecture
|
|
11
|
+
priority: P1
|
|
12
|
+
risk_level: low
|
|
13
|
+
depends_on: []
|
|
14
|
+
source_docs:
|
|
15
|
+
requirement: ../requirement.md
|
|
16
|
+
acceptance: ../acceptance.yaml
|
|
17
|
+
design: ../design.md
|
|
18
|
+
acceptance_refs:
|
|
19
|
+
- AC-001
|
|
20
|
+
scope:
|
|
21
|
+
goals:
|
|
22
|
+
- 冻结 API 契约文档
|
|
23
|
+
- 声明正式 consumers 仅为 BE-IMPL / FE-IMPL
|
|
24
|
+
non_goals:
|
|
25
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
26
|
+
assumptions:
|
|
27
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
28
|
+
open_questions: []
|
|
29
|
+
constraints:
|
|
30
|
+
allowed_paths:
|
|
31
|
+
- docs/contracts/F-2099-903/api.md
|
|
32
|
+
- docs/progress/F-2099-903/contract/status.md
|
|
33
|
+
- docs/progress/F-2099-903/contract/**
|
|
34
|
+
forbidden_paths:
|
|
35
|
+
- config/prod/**
|
|
36
|
+
- .env
|
|
37
|
+
- .env.*
|
|
38
|
+
- secrets/**
|
|
39
|
+
- services/**
|
|
40
|
+
- apps/**
|
|
41
|
+
hard_constraints:
|
|
42
|
+
- 不读取生产密钥
|
|
43
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
44
|
+
execution:
|
|
45
|
+
workflow: agent-dag
|
|
46
|
+
verify:
|
|
47
|
+
preset: standard
|
|
48
|
+
mode: serial
|
|
49
|
+
quota: full
|
|
50
|
+
commands:
|
|
51
|
+
- id: verify-1
|
|
52
|
+
label: npm run typecheck
|
|
53
|
+
command: npm run typecheck
|
|
54
|
+
required: true
|
|
55
|
+
timeout_ms: 300000
|
|
56
|
+
- id: verify-2
|
|
57
|
+
label: npm test
|
|
58
|
+
command: npm test
|
|
59
|
+
required: true
|
|
60
|
+
timeout_ms: 300000
|
|
61
|
+
worker:
|
|
62
|
+
execution_mode: generate-validate-run
|
|
63
|
+
max_attempts: 1
|
|
64
|
+
timeout_ms: 7200000
|
|
65
|
+
require_clean_worktree: true
|
|
66
|
+
require_human_review: true
|
|
67
|
+
create_worktree: false
|
|
68
|
+
loop_agent:
|
|
69
|
+
profile_policy: mapped
|
|
70
|
+
strict_models: true
|
|
71
|
+
strict_governance: true
|
|
72
|
+
max_concurrent: 1
|
|
73
|
+
outputs:
|
|
74
|
+
required:
|
|
75
|
+
- dag_json
|
|
76
|
+
- dag_validate_json
|
|
77
|
+
- run_record
|
|
78
|
+
- dag_report_json
|
|
79
|
+
- shell_verification
|
|
80
|
+
- closeout_or_failure_handoff
|
|
81
|
+
failure_policy:
|
|
82
|
+
failed_run_promote: false
|
|
83
|
+
generate_closeout_draft: true
|
|
84
|
+
create_followup_task: true
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
id: FE-IMPL-001
|
|
3
|
+
feature_id: F-2099-903
|
|
4
|
+
title: Scaffold sample — fe-with-api — 前端实现
|
|
5
|
+
description: Generated snapshot for
|
|
6
|
+
docs/templates/product-line/scaffold-samples. Not a live dogfood Feature.
|
|
7
|
+
repo:
|
|
8
|
+
name: loop-agent
|
|
9
|
+
path_ref: .
|
|
10
|
+
default_branch: main
|
|
11
|
+
type: frontend-feature
|
|
12
|
+
priority: P2
|
|
13
|
+
risk_level: medium
|
|
14
|
+
capabilities:
|
|
15
|
+
- interactive-ui
|
|
16
|
+
depends_on:
|
|
17
|
+
- CONTRACT-001
|
|
18
|
+
source_docs:
|
|
19
|
+
requirement: ../requirement.md
|
|
20
|
+
acceptance: ../acceptance.yaml
|
|
21
|
+
design: ../design.md
|
|
22
|
+
acceptance_refs:
|
|
23
|
+
- AC-001
|
|
24
|
+
scope:
|
|
25
|
+
goals:
|
|
26
|
+
- 按契约实现前端
|
|
27
|
+
non_goals:
|
|
28
|
+
- 不扩展到模板外的 Task 节点(无 BE-TEST/FE-TEST/FINAL-VERIFY)
|
|
29
|
+
assumptions:
|
|
30
|
+
- verify.commands 由 scaffold 调用方显式提供
|
|
31
|
+
open_questions: []
|
|
32
|
+
constraints:
|
|
33
|
+
allowed_paths:
|
|
34
|
+
- apps/web/src/sample-api/**
|
|
35
|
+
- docs/progress/F-2099-903/fe/status.md
|
|
36
|
+
- docs/progress/F-2099-903/fe/**
|
|
37
|
+
forbidden_paths:
|
|
38
|
+
- config/prod/**
|
|
39
|
+
- .env
|
|
40
|
+
- .env.*
|
|
41
|
+
- secrets/**
|
|
42
|
+
- services/**
|
|
43
|
+
hard_constraints:
|
|
44
|
+
- 不读取生产密钥
|
|
45
|
+
- 不绕过 scaffold 冻结的 depends/produces/consumes
|
|
46
|
+
execution:
|
|
47
|
+
workflow: frontend-implementation
|
|
48
|
+
verify:
|
|
49
|
+
preset: standard
|
|
50
|
+
mode: serial
|
|
51
|
+
quota: full
|
|
52
|
+
commands:
|
|
53
|
+
- id: verify-1
|
|
54
|
+
label: npm run typecheck
|
|
55
|
+
command: npm run typecheck
|
|
56
|
+
required: true
|
|
57
|
+
timeout_ms: 300000
|
|
58
|
+
- id: verify-2
|
|
59
|
+
label: npm test
|
|
60
|
+
command: npm test
|
|
61
|
+
required: true
|
|
62
|
+
timeout_ms: 300000
|
|
63
|
+
worker:
|
|
64
|
+
execution_mode: generate-validate-run
|
|
65
|
+
max_attempts: 1
|
|
66
|
+
timeout_ms: 7200000
|
|
67
|
+
require_clean_worktree: true
|
|
68
|
+
require_human_review: true
|
|
69
|
+
create_worktree: false
|
|
70
|
+
loop_agent:
|
|
71
|
+
profile_policy: mapped
|
|
72
|
+
strict_models: true
|
|
73
|
+
strict_governance: true
|
|
74
|
+
max_concurrent: 1
|
|
75
|
+
outputs:
|
|
76
|
+
required:
|
|
77
|
+
- dag_json
|
|
78
|
+
- dag_validate_json
|
|
79
|
+
- run_record
|
|
80
|
+
- dag_report_json
|
|
81
|
+
- shell_verification
|
|
82
|
+
- closeout_or_failure_handoff
|
|
83
|
+
failure_policy:
|
|
84
|
+
failed_run_promote: false
|
|
85
|
+
generate_closeout_draft: true
|
|
86
|
+
create_followup_task: true
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-903
|
|
3
|
+
nodes:
|
|
4
|
+
- id: CONTRACT-001
|
|
5
|
+
task: CONTRACT-001.yaml
|
|
6
|
+
type: architecture
|
|
7
|
+
depends_on: []
|
|
8
|
+
produces:
|
|
9
|
+
- kind: api-contract
|
|
10
|
+
schemaId: api-contract-v1
|
|
11
|
+
path: docs/contracts/F-2099-903/api.md
|
|
12
|
+
- id: BE-IMPL-001
|
|
13
|
+
task: BE-IMPL-001.yaml
|
|
14
|
+
type: backend-feature
|
|
15
|
+
depends_on:
|
|
16
|
+
- CONTRACT-001
|
|
17
|
+
consumes:
|
|
18
|
+
- kind: api-contract
|
|
19
|
+
schemaId: api-contract-v1
|
|
20
|
+
producerTaskId: CONTRACT-001
|
|
21
|
+
produces:
|
|
22
|
+
- kind: backend-impl
|
|
23
|
+
schemaId: backend-impl-v1
|
|
24
|
+
path: services/sample-api
|
|
25
|
+
- id: FE-IMPL-001
|
|
26
|
+
task: FE-IMPL-001.yaml
|
|
27
|
+
type: frontend-feature
|
|
28
|
+
depends_on:
|
|
29
|
+
- CONTRACT-001
|
|
30
|
+
consumes:
|
|
31
|
+
- kind: api-contract
|
|
32
|
+
schemaId: api-contract-v1
|
|
33
|
+
producerTaskId: CONTRACT-001
|
|
34
|
+
produces:
|
|
35
|
+
- kind: frontend-impl
|
|
36
|
+
schemaId: frontend-impl-v1
|
|
37
|
+
path: apps/web/src/sample-api
|
|
38
|
+
parallel_policy:
|
|
39
|
+
max_parallel_tasks: 1
|
|
40
|
+
disallow_same_file_parallel_writes: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
feature_id: F-2099-902
|
|
3
|
+
acceptance:
|
|
4
|
+
- id: AC-001
|
|
5
|
+
title: Scaffold sample — frontend-only
|
|
6
|
+
priority: must
|
|
7
|
+
type: behavior
|
|
8
|
+
given: 需求与路径边界已冻结
|
|
9
|
+
when: Feature Packet 内实现任务完成
|
|
10
|
+
then: 验收目标达成且 verify.commands 通过
|
|
11
|
+
verification:
|
|
12
|
+
expected_task_refs:
|
|
13
|
+
- FE-IMPL-001
|