@tea-agent/loop-agent 0.18.1 → 0.20.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 +2 -2
- package/CHANGELOG.md +33 -0
- package/README.md +4 -6
- package/dist/application/dag/generate-task-dag.js +12 -1
- package/dist/commands/init.js +3 -3
- package/dist/executors/shell-executor.js +188 -2
- package/dist/governance/exec-plans.js +4 -0
- package/dist/worker/cli.js +13 -12
- package/dist/worker/console/doctor.js +55 -2
- package/dist/worker/console/index.js +1 -0
- package/dist/worker/console/loopback.js +2 -2
- package/dist/worker/console/observe-link.js +7 -2
- package/dist/worker/console/operator-actions.js +30 -2
- package/dist/worker/console/operator-selection.js +92 -0
- package/dist/worker/console/operator-surface-health.js +23 -0
- package/dist/worker/console/recovery-cta.js +2 -2
- package/dist/worker/console/routes.js +45 -19
- package/dist/worker/console/security.js +29 -4
- package/dist/worker/console/server.js +106 -8
- package/dist/worker/console/static/assets/index-3vsjZJHq.js +16 -0
- package/dist/worker/console/static/assets/index-i1wV4LrY.css +1 -0
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/observe/routes.js +63 -21
- package/dist/worker/observe/server.js +3 -10
- package/dist/worker/observe/static/index.html +6 -3
- package/dist/worker/observe/static/styles.css +53 -0
- package/dist/workflows/dag/backend-test-markdown-workflow.js +163 -41
- package/dist/workflows/dag/backend-test-result-contract.js +30 -7
- package/dist/workflows/dag/frontend-prewrite-gate.js +77 -0
- package/dist/workflows/dag/frontend-repair.js +7 -1
- package/dist/workflows/dag/frontend-review-context.js +43 -0
- package/dist/workflows/dag/frontend-verification-trace.js +34 -15
- package/dist/workflows/dag/governance-profile.js +14 -6
- package/dist/workflows/dag/init-hybrid.js +143 -399
- package/dist/workflows/dag/types.js +30 -0
- package/dist/workflows/dag/validate.js +22 -1
- package/docs/README.md +4 -2
- package/docs/architecture/evolution.md +6 -6
- package/docs/architecture/worker-and-feature.md +9 -9
- package/docs/templates/agent-dag.schema.json +40 -0
- package/docs/templates/backend-test-dag.generate-pytest.prompt.md +23 -192
- package/docs/templates/backend-test-dag.json +8 -8
- package/docs/templates/backend-test-dag.review-cases.prompt.md +22 -75
- package/package.json +1 -1
- package/skills/agent-worker/references/agent-worker-operator.md +2 -2
- package/skills/frontend-implementation/references/node-contracts.md +6 -8
- package/skills/frontend-review/SKILL.md +5 -8
- package/skills/loop-agent/references/command-reference.md +4 -2
- package/skills/loop-agent/references/harness-policy.md +1 -1
- package/skills/loop-agent/references/hybrid-dag.md +2 -2
- package/dist/worker/console/static/assets/index-KUSib7aM.js +0 -16
- package/dist/worker/console/static/assets/index-ucIzpaGJ.css +0 -1
|
@@ -2,88 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
供 `review-and-revise-backend-md-cases-pi` 使用。该节点是 `executor: "pi"`、`role: "reviewer"`、`toolProfile: "write"` 的受限 reviewer,只能直接修订 `testcase/md/**`,不得生成 pytest 或修改任务源、生产代码和配置。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 当前合同
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
把 Markdown 用例视为面向测试、研发、产品与评审人员的正式文档,而不是模型中间产物。
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
"id": "review-backend-cases-pi",
|
|
14
|
-
"depends_on": ["backend-test-case-manifest-shell", "backend-test-analysis-contract-shell"],
|
|
15
|
-
"complexity": "HIGH",
|
|
16
|
-
"executor": "pi",
|
|
17
|
-
"role": "reviewer",
|
|
18
|
-
"writePolicy": "read-only",
|
|
19
|
-
"allowedPaths": ["**"],
|
|
20
|
-
"forbiddenPaths": [".harness/**", "artifacts/**"],
|
|
21
|
-
"outputContract": "Plain Markdown whose first non-empty line is VERDICT: pass or VERDICT: request-revision; followed by Findings and Coverage Assessment. No file writes.",
|
|
22
|
-
"subtask_prompt_markdown": "./backend-test-dag.review-cases.prompt.md"
|
|
23
|
-
}
|
|
24
|
-
```
|
|
11
|
+
### 阅读体验
|
|
25
12
|
|
|
26
|
-
|
|
13
|
+
- `testcase/md/README.md` 是简洁入口,包含测试目标、环境、隔离/清理策略、模块汇总和可跳转的用例索引。
|
|
14
|
+
- 模块文件采用中文用例卡片;每条以 `## BE-<MODULE>-<NNN>|<中文用例名称>` 开始。
|
|
15
|
+
- 新文档优先使用:`测试目的`、`验收标准`、`需求依据`、`前置条件`、`测试数据`、`操作步骤`、`预期结果`、`自动化映射`。
|
|
16
|
+
- validator 同时接受上述中文分节和历史英文分节;机器 ID、HTTP 方法、路径、字段、枚举、文件名、函数名与 source citation 必须保持精确。
|
|
17
|
+
- 步骤和预期可以用紧凑表格,也可以分别使用编号/项目列表;必须可执行、可独立断言。
|
|
18
|
+
- 自动化内部限制应简短或放进 `<details>`,不能淹没人类主要阅读路径。
|
|
27
19
|
|
|
28
|
-
|
|
20
|
+
### 正确性
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
- 对照每条 `需求依据` 和环境报告检查 AC、接口、字段/响应形状、状态码、错误语义、状态转换、正向/异常/边界场景。
|
|
23
|
+
- 删除无依据场景、合并重复用例、补齐有依据的遗漏;无法确认的内容写入中文证据缺口,不猜测行为或凭据。
|
|
24
|
+
- 拒绝“符合预期”“正常工作”等模糊结果,以及无意义的中英双写和大段重复 boilerplate。
|
|
25
|
+
- 若能确定脚本与函数命名,在 `自动化映射` 中写明计划脚本路径与 pytest 函数/方法名。
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
## 推荐输出
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
完成文件修订后,仅用简短中文说明:
|
|
35
30
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
31
|
+
- 修订了哪些文档;
|
|
32
|
+
- 用例数与主要模块;
|
|
33
|
+
- 修复了哪些需求一致性或阅读问题;
|
|
34
|
+
- 仍有哪些证据缺口。
|
|
38
35
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### Inputs to Review
|
|
42
|
-
|
|
43
|
-
1. **Acceptance criteria / analysis** — from the validated Backend Test Analysis v1 artifact materialized by `backend-test-analysis-contract-shell` (`contracts/backend-test-analysis.json` under the current DAG run). Do not treat free-form Markdown from `analyze-inputs-pi` as the contract.
|
|
44
|
-
2. **Case Manifest v1** — `contracts/backend-test-case-manifest.json` (schemaId `backend-test-case-manifest-v1`). Prefer `coverageSummary` and caseId↔acIds from this artifact; do not invent coverage percentages.
|
|
45
|
-
3. **Generated test cases** — files under `testcase/md/`.
|
|
46
|
-
|
|
47
|
-
Do NOT re-read source documents. Use the validated analysis artifact, case manifest, and generated cases only.
|
|
48
|
-
|
|
49
|
-
### Review Checklist
|
|
50
|
-
|
|
51
|
-
| Area | Check | Severity if Missing |
|
|
52
|
-
|------|-------|---------------------|
|
|
53
|
-
| **ID format** | Every test case ID matches `BE-<MODULE>-<NNN>` (e.g. `BE-ORDER-001`) | Critical |
|
|
54
|
-
| **Positive path coverage** | Happy-path scenarios for each acceptance criterion | Critical |
|
|
55
|
-
| **Negative path coverage** | Error/exception scenarios (invalid input, not found, state violations) | Important |
|
|
56
|
-
| **Boundary conditions** | Edge cases (empty input, max length, edge values) | Important |
|
|
57
|
-
| **State transitions** | Illegal state changes covered | Important |
|
|
58
|
-
| **Requirement traceability** | Each acceptance criterion (AC-xxx) maps to at least one test case ID (manifest coverageSummary or evidenceGaps) | Critical |
|
|
59
|
-
| **Manifest consistency** | Markdown case bodies **and** any AC matrix list the **same full** `BE-*` ids as Case Manifest v1 `caseId`→`acIds`. Never claim "all cases" / "全部用例" cover an AC unless every case maps that AC. | Critical |
|
|
60
|
-
| **Planned automation** | Missing `test_*.py` before generate-pytest is **Informational only**, not Critical | Informational |
|
|
61
|
-
| **Out-of-scope ACs** | Flyway / frontend e2e / `mvn test` etc. already in manifest `evidenceGaps` must not be treated as uncovered Critical | Informational |
|
|
62
|
-
| **Case structure** | Each case has: ID, Title, Precondition, Steps, Expected Result | Important |
|
|
63
|
-
| **No duplicate IDs** | All test case IDs are unique across files | Critical |
|
|
64
|
-
|
|
65
|
-
### Conditional Coverage (check ONLY if mentioned in upstream analysis)
|
|
66
|
-
|
|
67
|
-
- **Authentication coverage**: check ONLY if the validated analysis artifact mentions auth mechanism (JWT, OAuth2, API Key, etc.)
|
|
68
|
-
- **Timeout coverage**: check ONLY if the validated analysis artifact mentions timeout handling or degradation strategy
|
|
69
|
-
- If not mentioned in the validated analysis artifact, do NOT flag as missing
|
|
70
|
-
|
|
71
|
-
### Verdict Rules
|
|
72
|
-
|
|
73
|
-
| Condition | Verdict |
|
|
74
|
-
|-----------|---------|
|
|
75
|
-
| All Critical checks pass, Important checks have no more than 2 findings | `VERDICT: pass` |
|
|
76
|
-
| Any Critical check fails | `VERDICT: request-revision` |
|
|
77
|
-
| More than 2 Important findings | `VERDICT: request-revision` |
|
|
78
|
-
| Only Informational findings | `VERDICT: pass` (with findings listed) |
|
|
79
|
-
|
|
80
|
-
### Output Shape (after verdict line)
|
|
81
|
-
|
|
82
|
-
1. **Coverage Assessment** — table mapping each AC to covering **full** test case IDs (or "uncovered" / gap).
|
|
83
|
-
2. **Findings** — bullet list tagged `Critical`, `Important`, or `Informational`.
|
|
84
|
-
3. **Statistics** — total case count, positive/negative/boundary breakdown, module distribution.
|
|
85
|
-
4. **Required follow-up** (only when `request-revision`) — numbered, concrete MD corrections for a separate follow-up task. These findings do not authorize edits in the current run.
|
|
86
|
-
|
|
87
|
-
### Fail-fast note
|
|
88
|
-
|
|
89
|
-
There is no final review or in-run revision writer. Any `request-revision` verdict remains auditable advisory evidence and must be reported downstream; it does not stop pytest generation.
|
|
36
|
+
不得输出 JSON,不得执行测试。
|
package/package.json
CHANGED
|
@@ -52,8 +52,8 @@ Leaf DAG nodes 不得递归启动 `agent-worker`。Worker 负责 DAG 之外的 s
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
doctor 只读;migrate 默认零写入,apply 失败全回滚且不改 JSONL。
|
|
55
|
-
8. Observe
|
|
56
|
-
9. Official Console:`agent-worker console serve|doctor
|
|
55
|
+
8. Inspect(原 Observe)只读:推荐 `agent-worker console serve` 的 `/inspect/#/...`;兼容 `observe serve|snapshot`。canonical Task 路由为 `/api/features/:featureId/tasks/:taskId` 与 `#/feature/:featureId/task/:taskId`。8790 `/api/health` 为 `OperatorSurfaceHealthV1`;8787 仍为 `ObserveHealthV1`。
|
|
56
|
+
9. Official Console:`agent-worker console serve|doctor`(默认 loopback;可 `--host 0.0.0.0` / `--debug`)。Recovery CTA 为 report/doctor/decision/resume/reconcile/regenerate/打开检视;无 Cancel、无主 CTA「直接改代码」。主会话 Compatibility Assist 不得替代 Console/CLI 执法。
|
|
57
57
|
|
|
58
58
|
## Versioned Self-Hosting
|
|
59
59
|
|
|
@@ -6,22 +6,20 @@ Pre-write nodes are read-only. Preserve IDs, labels, commands, language, require
|
|
|
6
6
|
|
|
7
7
|
- **`frontend-contract-pi`**: `Scope`, `Non-goals`, `Acceptance Criteria`, `UI States`, `Target Runtime Environment`, `Risks`, `Verification Expectations`. No guessed requirements.
|
|
8
8
|
- **`frontend-scout-pi`**: routes, components, tokens, data/API/Mock, scripts, tests, assets. Fact vs inference vs gap. Knowledge base first; else search+read `<repoRoot>/openspec/**` before repo fallback. Output stack, routes, components, styling, conventions, state/data, test entry points, reuse, risks.
|
|
9
|
-
- **`frontend-
|
|
10
|
-
|
|
11
|
-
Pi output mapping promotes the first explicitly labeled Mock strategy line ahead of any preamble, including common bullet, quote, inline-code, fullwidth-colon, `Mock strategy`, and split label/value drift, without inventing or replacing its value; missing, unlabeled, malformed, or blocked strategies still fail closed. Prefer native Mock; browser intercept only with existing e2e; request-adapter only for reversible local preview. Default `auto` may select `not-needed` when contract/scout evidence confirms no project Mock capability, without adding Mock files/deps, while keeping real requests default and recording the Real Integration Gap. Other `not-needed` cases need positive no-remote/stable-backend evidence; invalid when `frontendMock.policy=required`. `blocked` for missing/conflicting contracts, unsafe paths/deps, unread specs, production-default-on, unverifiable entrypoints. Output Mock Decision, API/spec/service evidence, backend readiness, selection evidence, endpoint/fixture matrix, activation, targets, production safety, verification plan, real-integration gap, blocking issues. Never invent fields, store secrets, comment real requests, import test mocks into production, or treat Mock as real integration. Gate uses `first-non-empty` only; never authorizes writes. Unsafe required contracts → no writer.
|
|
12
|
-
- **`frontend-plan-pi` + conditional design loop**: AC → steps, in-bound files, UI states, reuse, deps, activation/rollback, frozen verify entrypoints, real-integration gap. Initial `VERDICT: pass` uses the original plan directly. Only exact `VERDICT: request-revision` runs read-only plan revision plus final review; there is no `frontend-first-design-gate-shell` or pass-path `PASS_NO_REVISION_NEEDED` node. The effective final gate prefers final review when present, otherwise initial review, and only exact pass authorizes writes; malformed/missing/request-revision fails closed → replan/rerun (not dev-fix). The plan-pi prompt includes the complete `frontend-implementation-contract-v1` JSON Schema loaded from the loop-agent package `docs/templates/` path, plus deterministic source binding, risk level, and allowed implementation targets. The model does not need to search or guess contract fields; `schemaId`, `targetFiles`, `requirementCoverage` are explicitly forbidden.
|
|
9
|
+
- **`frontend-plan-pi` + conditional design loop**: AC → steps, in-bound files, UI states, reuse, deps, Mock/API strategy, activation/rollback, frozen verify entrypoints, real-integration gap, and exactly one `frontend-implementation-contract-v1` JSON object. Prefer native Mock; browser intercept only with existing e2e; request-adapter only for a reversible seam. `auto` may select `not-needed` when no project Mock capability exists, while keeping real requests default and recording the gap; `required` cannot. Initial design pass uses the original plan; only exact `request-revision` runs read-only revision plus final review. Small-risk runs one design review only.
|
|
10
|
+
- **`frontend-prewrite-gate-shell`**: the sole write authorization. Resolve effective plan/review, require exact pass, retain every REQ/BR/AC id, enforce Mock policy, validate schema/source binding, and materialize `contracts/frontend-implementation-contract.json`. Fallback is allowed only when a conditional primary is absent; an existing malformed primary fails closed. Generation-time blocked Mock produces one deterministic blocking shell node and no writer.
|
|
13
11
|
- **`frontend-implement-pi`**: sole exclusive writer. Stay in `writeSet`; real requests default-on; Mock reversible, dev/test-only, production-off. Atomic handler/intercept/adapter with consumer+tests. Stop on forbidden paths or guesses. Output changed files, behavior, UI states, styling notes, verification attempted, residual risks. Optional mock-verify when frozen; static+behavior always; behavior must prove page consumption. Skipped-Mock `not-needed` keeps real integration pending unless the real backend path has fresh evidence.
|
|
14
12
|
|
|
15
13
|
## Contract / trace / stages (M1–M2)
|
|
16
14
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
- `frontend-verify-assess-shell` runs Mock/static/behavior command groups, binds contract `verificationTargets` to command labels and file/symbol evidence, then writes `frontend-verification-trace.json` and `frontend-repair-assessment.json`. Browser/visual remain `not-run`.
|
|
16
|
+
- `frontend-review-context-shell` captures the real diff and combines contract, effective trace, repair assessment, and diff into `contracts/frontend-review-context.json`.
|
|
19
17
|
- Implement stages: (1) contract confirm (2) tests sync (3) component/UI (4) API/Mock (5) frozen checks (6) diff cleanup. Summary: Contract Ref, Changed Files, Requirements, UI States, Tests, Verification Attempts, Deviations, Residual Risks.
|
|
20
18
|
|
|
21
19
|
## Repair (M3)
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
Only `eligible=true` runs `frontend-repair-pi` (same writeSet as implement; no re-spec; max 1 attempt) and `frontend-reverify-shell`. No failure condition-skips both. Non-repairable contract/path/dependency/credential/deploy/spec-unclear failures fail closed.
|
|
24
22
|
|
|
25
23
|
## Risk & capability (M4–M6)
|
|
26
24
|
|
|
27
|
-
Deterministic risk (no model); high-risk beats small; supervised never small.
|
|
25
|
+
Deterministic risk (no model); high-risk beats small; supervised never small. Standard/high-risk contain 15 top-level nodes; small contains 13 by omitting revision and final review. Capability seed injects adapters; openspec/task sources outrank. A11y: static/component tools only when present; Browser a11y always not-run.
|
|
@@ -10,14 +10,11 @@ references:
|
|
|
10
10
|
# Frontend Review
|
|
11
11
|
|
|
12
12
|
Use for `frontend-review-pi`; read the findings guide first. Required inputs are
|
|
13
|
-
original task/reference material,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exist, treat them as the authoritative actual diff—do not request revision solely for
|
|
19
|
-
"missing diff". Only force revision for a missing actual diff when both artifacts are
|
|
20
|
-
absent; never invent a diff from an implementation summary alone.
|
|
13
|
+
original task/reference material, effective plan/design branch, implementation summary,
|
|
14
|
+
and `contracts/frontend-review-context.json`. That canonical context binds the validated
|
|
15
|
+
implementation contract, effective initial-or-post-repair verification trace, repair
|
|
16
|
+
assessment, and run-owned actual diff. Treat its diff as authoritative; never invent a
|
|
17
|
+
diff from an implementation summary alone.
|
|
21
18
|
|
|
22
19
|
## Verdict Contract
|
|
23
20
|
|
|
@@ -531,7 +531,9 @@ agent-worker batch run-ready \
|
|
|
531
531
|
[--quiet] \
|
|
532
532
|
[--pi-model <model>] # smoke 覆盖:所有 pi 节点强制用该模型
|
|
533
533
|
agent-worker report morning --repo <repo-root> [--batch-run-id <id>] [--output <path>]
|
|
534
|
-
agent-worker
|
|
534
|
+
agent-worker console serve --repo <repo-root> [--port 8790] [--host 127.0.0.1]
|
|
535
|
+
agent-worker console doctor --repo <repo-root> [--json] [--console-url <url>]
|
|
536
|
+
agent-worker observe serve --repo <repo-root> [--port 8787] [--host 127.0.0.1] # 兼容入口;stderr 会提示 OBSERVE_SERVE_DEPRECATED
|
|
535
537
|
agent-worker observe snapshot --repo <repo-root> # 输出 GlobalSnapshot JSON 到 stdout
|
|
536
538
|
```
|
|
537
539
|
|
|
@@ -552,7 +554,7 @@ agent-worker observe snapshot --repo <repo-root> # 输出 GlobalSnapshot JSON
|
|
|
552
554
|
- `report metrics` 按 UTC 月去重投影 Feature/Failure/Follow-up/Delivery/AC/decision/recovery/boundary 指标,同时写 JSON 与 Markdown;每项保留 numerator、denominator、sampleSize 和 missingData。
|
|
553
555
|
- `task draft-followup` 会按全部 failure category 生成 TaskDraft 或人工行动卡:ProductBug/TestBug/FlakyTest/DependencyFailure 可批准;EnvFailure 连续两次后才生成 ENV-CHECK;Spec/Contract/Risk/Human/Unknown 只给行动卡。人工以 `feature approve-followup --dry-run` 预览,再带非空 `--owner` 批准 TaskDraft;行动卡不能批准。批准在 staging validation 后写 TaskSpec、graph、Ready/approval/event,原失败事实不改写,并有 rename/state/approval/index/event 回滚门禁。
|
|
554
556
|
- `task retry` 是失败 Task 的唯一重试入口。它会保留原有运行记录和 failure handoff,并让下一次 `batch run-ready` 使用新的 `workerRunId`;不要删除运行态文件或手动修改状态来重试。
|
|
555
|
-
- `
|
|
557
|
+
- **推荐** `console serve`(默认 `127.0.0.1:8790`)提供 Operate + Inspect;Inspect 路径为 `/inspect/#/...`,API 仍为根 `/api/**`。`observe serve` 为兼容入口(默认 `8787`,启动时 stderr 输出 `OBSERVE_SERVE_DEPRECATED`);`observe snapshot` 保留。两者都不会启动、暂停或重试 Task / Worker / DAG。
|
|
556
558
|
- 当前 Worker 仍是 v0(库 + CLI + dogfood),未接入定时/CI 驱动;`report morning` 只能从已有 Task Pool runs 汇总。
|
|
557
559
|
|
|
558
560
|
### 查看 duration statistics
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| Tier | Default purpose | Commands |
|
|
18
18
|
|---|---|---|
|
|
19
19
|
| Primary | Normal autonomous implementation(经 CLI) | `new-task` -> `dag run-task --profile auto` -> `dag validate --strict-models --strict-governance` -> `run-dag` |
|
|
20
|
-
| Operator | Diagnose, recover, close out, inspect facts | `status`, `instructions`, `dag status`, `dag doctor`, `dag report`, `dag reconcile-run`, `dag closeout-draft`, `dag reconcile-tasks`, `dag final-verification`, `inspect`, `doctor`, `spine audit`, `knowledge curate`, `docs audit`, `handoff check`, `loop-benchmark`;
|
|
20
|
+
| Operator | Diagnose, recover, close out, inspect facts | `status`, `instructions`, `dag status`, `dag doctor`, `dag report`, `dag reconcile-run`, `dag closeout-draft`, `dag reconcile-tasks`, `dag final-verification`, `inspect`, `doctor`, `spine audit`, `knowledge curate`, `docs audit`, `handoff check`, `loop-benchmark`;Inspect:`agent-worker console serve`(`/inspect/`)与兼容 `observe serve\|snapshot` |
|
|
21
21
|
| Compatibility (CLI helpers) | Legacy task metadata and feature-study helpers | `goal`, `reference`, `study` |
|
|
22
22
|
| Escape hatch | Isolated delegation, one-shot diagnosis or **显式** bounded repair | `delegate`, `worktree`, `harvest`, `pi-prompt`, `cursor-prompt`(不得作失败默认恢复) |
|
|
23
23
|
| Experimental | Long-running outer task state | `loop init\|status\|run\|record-round\|add-signal\|closeout` |
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
对于默认 `standard` 任务,生成器根据标题、`source/需求.md` 和结构化 `allowedPaths` 做保守、确定性的需求分类。只有高置信的前端实现需求自动选择 `frontend-implementation` DAG;后端、前后端混合、明确排除前端或证据不足的需求继续使用 governance profile 选出的模板。分类不会把普通后端实现路由到 `backend-test`,也不会替换由显式 profile、`workflowPolicy` 或 supervised quality gate 选中的 supervised 模板。
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
前端专用链保留独立 contract/scout;plan 同时选择 Mock/API 策略并输出结构化 implementation contract。design initial pass 直接使用原计划,只有 request-revision 才运行 revision/final review;small-risk 只执行一次 design review。`frontend-prewrite-gate-shell` 合并生效 verdict、REQ/BR/AC 覆盖、Mock policy 和 contract 物化,是唯一写入授权。实现后 `frontend-verify-assess-shell` 合并 Mock/static/behavior/trace/assessment;只有 `eligible=true` 才运行同 writeSet 的 repair 和 `frontend-reverify-shell`。`frontend-review-context-shell` 绑定真实 diff 与有效验证证据后再 review/closeout。standard/high-risk 为 15 个顶层节点,small-risk 为 13;绿色路径执行 11 个节点、7 次 Pi。生成期 blocked Mock 只生成一个确定性阻塞节点且没有 writer。
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
> Backend-test Markdown-first:先由确定性环境 Shell 检查 clean env 中 Python/pytest、常见配置、conftest/fixture、test root、server entry 和 HTML renderer,失败时不消耗模型调用。随后 Pi
|
|
22
|
+
> Backend-test Markdown-first:先由确定性环境 Shell 检查 clean env 中 Python/pytest、常见配置、conftest/fixture、test root、server entry 和 HTML renderer,失败时不消耗模型调用。随后 Pi 生成中文 README 索引与模块用例卡片并独立 Review `testcase/md/**`,Shell 校验 Case ID、AC/source traceability、中文或历史英文分节、步骤、可断言预期与 secret 安全;pytest writer 仅转换最终 Markdown,不重读 `source/**`。traceability 同时支持模块级函数和 pytest 测试类方法;pytest 只运行一次,生成 JUnit,并把 Markdown 名称/场景/脚本映射与同一 JUnit 合成为逐条中文 self-contained HTML 主报告和 Markdown facts。最终 Pi 只解释事实并生成 Markdown 报告和 L-5 结论。active 流程不要求模型生成 backend-test 业务 JSON。
|
|
23
23
|
|
|
24
24
|
显式专用 `taskKind` 保持兼容并优先于任务源分类。`backend-test` 选择固定 **8 个真实顶层节点**的 Markdown-first DAG:环境硬门、Markdown cases、独立 Review/修订、Markdown gate、pytest 转换、确定性 traceability、单次 pytest + JUnit/HTML/facts、最终 Markdown 报告与 L-5。历史 JSON contract/materializer 可继续读取旧 DAG,但新 runtime/template 不再生成模型业务 JSON。`knowledge-sync` 与 `knowledge-graph-bootstrap` 继续通过各自显式 taskKind 选择知识回写/图谱开荒 DAG。治理等级仍由 `minimal|standard|reviewed|supervised` 推断。
|
|
25
25
|
|