@tea-agent/loop-agent 0.26.0 → 0.26.2
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 +1056 -1020
- package/README.md +8 -3
- package/bin/loop-agent.js +21 -21
- package/dist/application/dag/generate-task-dag.js +33 -0
- package/dist/cli/command-definitions.js +25 -10
- package/dist/cli/help.js +4 -3
- package/dist/cli/program.js +43 -17
- package/dist/commands/cursor-prompt.js +6 -6
- package/dist/commands/import-prd.js +7 -2
- package/dist/commands/init.js +7 -5
- package/dist/commands/loop-benchmark.js +11 -11
- package/dist/commands/pi-reuse-benchmark.js +16 -16
- package/dist/commands/task-source-prepare.js +474 -0
- package/dist/executors/dag-pi-executor.js +40 -5
- package/dist/executors/shell-executor.js +111 -0
- package/dist/executors/shell-presets.js +12 -4
- package/dist/executors/shell-write-guard.js +161 -25
- package/dist/sidecars/cursor-prompt/executor.js +1 -1
- package/dist/task/config-types.js +6 -0
- package/dist/task/contract/constants.js +1 -0
- package/dist/task/contract/project.js +8 -0
- package/dist/task/contract/schema.js +1 -0
- package/dist/task/frontend-preflight.js +131 -0
- package/dist/task/runtime.js +2 -4
- package/dist/task/source-prepare/build-draft.js +224 -0
- package/dist/task/source-prepare/completeness.js +195 -0
- package/dist/task/source-prepare/index.js +7 -0
- package/dist/task/source-prepare/parse-intent.js +373 -0
- package/dist/task/source-prepare/path-policy.js +197 -0
- package/dist/task/source-prepare/prepare.js +506 -0
- package/dist/task/source-prepare/reference-integrity.js +274 -0
- package/dist/task/source-prepare/types.js +7 -0
- package/dist/worker/observability/read-model.js +134 -0
- package/dist/worker/observe/static/copy.js +67 -67
- package/dist/worker/observe/static/dag-layout.d.ts +31 -31
- package/dist/worker/observe/static/dag-layout.js +83 -83
- package/dist/worker/observe/static/dom.js +220 -220
- package/dist/worker/observe/static/relations.js +133 -133
- package/dist/worker/observe/static/router.js +93 -93
- package/dist/worker/observe/static/run-processing.js +148 -148
- package/dist/worker/observe/static/state.js +61 -0
- package/dist/worker/observe/static/styles.css +8 -0
- package/dist/worker/observe/static/views/batch.js +227 -227
- package/dist/worker/observe/static/views/dag-graph.js +248 -172
- package/dist/worker/observe/static/views/dag-inspector.js +374 -157
- package/dist/worker/observe/static/views/dag.js +4 -11
- package/dist/worker/observe/static/views/failures.js +143 -143
- package/dist/worker/observe/static/views/feature.js +492 -492
- package/dist/worker/observe/static/views/run.js +453 -453
- package/dist/worker/observe/static/views/shell.js +7 -7
- package/dist/worker/observe/static/views/timeline.js +163 -163
- package/dist/workflows/dag/backend-test-pytest-collection.js +277 -0
- package/dist/workflows/dag/canvas-observer.js +275 -275
- package/dist/workflows/dag/convergence/controller.js +110 -21
- package/dist/workflows/dag/frontend-implementation-contract.js +218 -17
- package/dist/workflows/dag/frontend-review-context.js +7 -1
- package/dist/workflows/dag/frontend-verification-trace.js +14 -3
- package/dist/workflows/dag/frontend-worktree-diff.js +14 -3
- package/dist/workflows/dag/init-hybrid.js +96 -34
- package/dist/workflows/dag/output-protocol.js +180 -7
- package/dist/workflows/dag/runner.js +141 -52
- package/dist/workflows/dag/types.js +4 -0
- package/dist/workflows/dag/validate.js +3 -2
- package/docs/skills/README.md +7 -7
- package/docs/templates/adr.md +60 -60
- package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
- package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
- package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
- package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
- package/docs/templates/agent-dag-report.schema.json +473 -473
- package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
- package/docs/templates/backend-test-dag.json +100 -8
- package/docs/templates/backend-test-result.schema.json +99 -99
- package/docs/templates/feature-spec.md +53 -53
- package/docs/templates/frontend-design-contract.md +42 -42
- package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -17
- package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -16
- package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -21
- package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -29
- package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -29
- package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -27
- package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -28
- package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -27
- package/docs/templates/frontend-eval/metrics.md +138 -138
- package/docs/templates/frontend-eval/smoke-targets.md +53 -53
- package/docs/templates/frontend-task-constraints.md +35 -35
- package/docs/templates/frontend-task-requirement.md +70 -70
- package/docs/templates/init-evolution-review.md +35 -35
- package/docs/templates/init-managed-agents.md +10 -5
- package/docs/templates/interactive-ui-round2-experiment.md +66 -66
- package/docs/templates/knowledge-graph-bootstrap-dag.json +118 -118
- package/docs/templates/knowledge-sync-dag.json +178 -178
- package/docs/templates/knowledge-sync-draft.schema.json +71 -71
- package/docs/templates/product-line/closeout.yaml +9 -9
- package/docs/templates/product-line/design.md +13 -13
- package/docs/templates/product-line/links.md +10 -10
- package/docs/templates/product-line/requirement.md +17 -17
- package/docs/templates/product-line/test-plan.md +7 -7
- package/docs/templates/production-readiness-checklist.md +57 -57
- package/docs/templates/project-start-checklist.md +9 -9
- package/docs/templates/qa-report.md +48 -48
- package/docs/templates/sprint-contract.md +29 -29
- package/docs/templates/worker-dogfood-evidence.md +80 -80
- package/docs/templates/worker-dogfood-setup.md +68 -68
- package/package.json +1 -1
- package/scripts/kb-bootstrap-init-skeleton.sh +0 -0
- package/scripts/kb-graph-incremental-prepare.mjs +386 -386
- package/scripts/kb-graph-materialize.mjs +105 -105
- package/scripts/kb-graph-promote.mjs +164 -164
- package/scripts/kb-query.mjs +554 -554
- package/skills/ai-engineering-context/SKILL.md +48 -48
- package/skills/analyze-product-dependencies/SKILL.md +67 -67
- package/skills/analyze-product-dependencies/agents/openai.yaml +4 -4
- package/skills/analyze-product-dependencies/references/api-documentation-schema.md +30 -30
- package/skills/analyze-product-dependencies/references/dependency-analysis-schema.md +28 -28
- package/skills/analyze-product-dependencies/references/example.md +76 -76
- package/skills/analyze-product-dependencies/references/forward-test-cases.md +35 -35
- package/skills/analyze-product-dependencies/references/input-contract.md +11 -11
- package/skills/analyze-product-dependencies/references/scouting-rules.md +61 -61
- package/skills/analyze-product-dependencies/scripts/test-validators.mjs +267 -267
- package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +101 -101
- package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +142 -142
- package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +76 -76
- package/skills/analyze-product-dependencies/scripts/validation-helpers.mjs +146 -146
- package/skills/analyze-product-requirements/SKILL.md +90 -90
- package/skills/analyze-product-requirements/agents/openai.yaml +4 -4
- package/skills/analyze-product-requirements/references/acceptance-criteria.md +91 -91
- package/skills/analyze-product-requirements/references/clarification-and-knowledge.md +56 -56
- package/skills/analyze-product-requirements/references/example.md +86 -86
- package/skills/analyze-product-requirements/references/forward-test-cases.md +66 -66
- package/skills/analyze-product-requirements/references/product-analysis-schema.md +32 -32
- package/skills/analyze-product-requirements/references/product-requirement-schema.md +33 -33
- package/skills/analyze-product-requirements/references/requirement-clarification-schema.md +35 -35
- package/skills/analyze-product-requirements/scripts/test-validators.mjs +193 -193
- package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +69 -69
- package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +97 -97
- package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +98 -98
- package/skills/analyze-product-requirements/scripts/validation-helpers.mjs +156 -156
- package/skills/browser-tools/browser-content.js +103 -103
- package/skills/browser-tools/browser-cookies.js +35 -35
- package/skills/browser-tools/browser-eval.js +53 -53
- package/skills/browser-tools/browser-hn-scraper.js +108 -108
- package/skills/browser-tools/browser-nav.js +44 -44
- package/skills/browser-tools/browser-pick.js +162 -162
- package/skills/browser-tools/browser-screenshot.js +34 -34
- package/skills/browser-tools/browser-start.js +86 -86
- package/skills/browser-tools/package-lock.json +2556 -2556
- package/skills/browser-tools/package.json +19 -19
- package/skills/code-review-core/SKILL.md +20 -20
- package/skills/codebase-scout/SKILL.md +19 -19
- package/skills/grill-me/SKILL.md +10 -10
- package/skills/loop-agent/SKILL.md +5 -2
- package/skills/loop-agent/references/README.md +67 -67
- package/skills/loop-agent/references/command-reference.md +17 -15
- package/skills/loop-agent/references/docs-converge.md +126 -126
- package/skills/loop-agent/references/harness-policy.md +3 -4
- package/skills/loop-agent/references/hybrid-dag.md +1 -1
- package/skills/loop-agent/references/learned/README.md +21 -21
- package/skills/loop-agent/references/long-running-loop.md +57 -57
- package/skills/loop-agent/references/one-shot-runs.md +85 -85
- package/skills/loop-agent/references/pi-prompt.md +23 -23
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +84 -84
- package/skills/loop-agent/references/post-implementation-and-patterns.md +1 -1
- package/skills/loop-agent/references/source-and-plan-practice.md +3 -2
- package/skills/loop-agent/references/task-workflow.md +7 -5
- package/skills/playwright-cli/SKILL.md +420 -420
- package/skills/playwright-cli/references/element-attributes.md +23 -23
- package/skills/playwright-cli/references/playwright-tests.md +39 -39
- package/skills/playwright-cli/references/request-mocking.md +87 -87
- package/skills/playwright-cli/references/running-code.md +241 -241
- package/skills/playwright-cli/references/session-management.md +225 -225
- package/skills/playwright-cli/references/storage-state.md +275 -275
- package/skills/playwright-cli/references/test-generation.md +433 -433
- package/skills/playwright-cli/references/tracing.md +139 -139
- package/skills/playwright-cli/references/video-recording.md +143 -143
- package/skills/requesting-code-review/SKILL.md +101 -101
- package/skills/requesting-code-review/code-reviewer.md +168 -168
- package/skills/systematic-debugging/CREATION-LOG.md +119 -119
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
- package/skills/systematic-debugging/condition-based-waiting.md +115 -115
- package/skills/systematic-debugging/defense-in-depth.md +122 -122
- package/skills/systematic-debugging/find-polluter.sh +63 -63
- package/skills/systematic-debugging/root-cause-tracing.md +169 -169
- package/skills/systematic-debugging/test-academic.md +14 -14
- package/skills/systematic-debugging/test-pressure-1.md +58 -58
- package/skills/systematic-debugging/test-pressure-2.md +68 -68
- package/skills/systematic-debugging/test-pressure-3.md +69 -69
- package/skills/using-git-worktrees/SKILL.md +215 -215
- package/skills/verification-before-completion/SKILL.md +154 -154
- package/skills/webapp-testing/SKILL.md +19 -19
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# Production Readiness 检查清单
|
|
2
|
-
|
|
3
|
-
声称 Production Readiness v0.1 的低/中风险单仓库 DAG 任务使用本清单。
|
|
4
|
-
|
|
5
|
-
## 范围
|
|
6
|
-
|
|
7
|
-
- [ ] 单仓库
|
|
8
|
-
- [ ] 单任务或小范围有边界任务
|
|
9
|
-
- [ ] 低或中风险
|
|
10
|
-
- [ ] 无生产 secret 或生产数据库访问
|
|
11
|
-
- [ ] 无自动 merge 或 release
|
|
12
|
-
- [ ] 无 DAG runtime 之外的第二套 runner
|
|
13
|
-
- [ ] 无可写 Dynamic Workflow sharded migration
|
|
14
|
-
|
|
15
|
-
## Task Contract
|
|
16
|
-
|
|
17
|
-
- [ ] Task source 存在于 `.harness/tasks/<task-id>/source/`
|
|
18
|
-
- [ ] `allowedPaths` 显式
|
|
19
|
-
- [ ] `forbiddenPaths` 显式
|
|
20
|
-
- [ ] `writeSet` 或预期写 scope 显式
|
|
21
|
-
- [ ] Shell 验证命令显式
|
|
22
|
-
- [ ] 非目标显式
|
|
23
|
-
|
|
24
|
-
## DAG 主路径
|
|
25
|
-
|
|
26
|
-
- [ ] 已运行 `loop-agent new-task <task-id> "Task title"` 或 task 已存在
|
|
27
|
-
- [ ] `loop-agent dag run-task <task-id> --profile auto --strict-models --output <dag-path>` 产出 DAG spec
|
|
28
|
-
- [ ] `loop-agent dag validate --dag <dag-path> --strict-models --strict-governance` 通过
|
|
29
|
-
- [ ] `loop-agent run-dag --dag <dag-path> --cwd .` 产出 run id
|
|
30
|
-
- [ ] `loop-agent dag report --run-id <run-id> --markdown` 可读
|
|
31
|
-
- [ ] `loop-agent dag doctor --run-id <run-id>` 能解释失败或 paused run
|
|
32
|
-
|
|
33
|
-
## 证据
|
|
34
|
-
|
|
35
|
-
- [ ] 记录 DAG spec path
|
|
36
|
-
- [ ] 记录 DAG validation 输出
|
|
37
|
-
- [ ] 记录 run id
|
|
38
|
-
- [ ] Shell 验证输出是新鲜的
|
|
39
|
-
- [ ] 成功路径有 promotion 与 closeout 证据
|
|
40
|
-
- [ ] 失败路径有 failure handoff 证据
|
|
41
|
-
|
|
42
|
-
## Failure Routing
|
|
43
|
-
|
|
44
|
-
- [ ] 存在时保留 raw failure category
|
|
45
|
-
- [ ] 失败 run 有 DAG normalized failure category
|
|
46
|
-
- [ ] 失败 run 有 product-line failure category
|
|
47
|
-
- [ ] 失败 run 有 recommended follow-up
|
|
48
|
-
- [ ] 派生 category 未覆盖已完成 DAG facts
|
|
49
|
-
- [ ] `Unknown` 已说明或为 fixture 有意接受
|
|
50
|
-
|
|
51
|
-
## 最终门禁
|
|
52
|
-
|
|
53
|
-
- [ ] `npm run typecheck`
|
|
54
|
-
- [ ] 相关定向 Vitest 文件
|
|
55
|
-
- [ ] `bash scripts/check-repo.sh`
|
|
56
|
-
- [ ] website/docs 变更时 `npm run docs:build`
|
|
57
|
-
- [ ] 最终 sprint closeout 前 `bash scripts/ci.sh`
|
|
1
|
+
# Production Readiness 检查清单
|
|
2
|
+
|
|
3
|
+
声称 Production Readiness v0.1 的低/中风险单仓库 DAG 任务使用本清单。
|
|
4
|
+
|
|
5
|
+
## 范围
|
|
6
|
+
|
|
7
|
+
- [ ] 单仓库
|
|
8
|
+
- [ ] 单任务或小范围有边界任务
|
|
9
|
+
- [ ] 低或中风险
|
|
10
|
+
- [ ] 无生产 secret 或生产数据库访问
|
|
11
|
+
- [ ] 无自动 merge 或 release
|
|
12
|
+
- [ ] 无 DAG runtime 之外的第二套 runner
|
|
13
|
+
- [ ] 无可写 Dynamic Workflow sharded migration
|
|
14
|
+
|
|
15
|
+
## Task Contract
|
|
16
|
+
|
|
17
|
+
- [ ] Task source 存在于 `.harness/tasks/<task-id>/source/`
|
|
18
|
+
- [ ] `allowedPaths` 显式
|
|
19
|
+
- [ ] `forbiddenPaths` 显式
|
|
20
|
+
- [ ] `writeSet` 或预期写 scope 显式
|
|
21
|
+
- [ ] Shell 验证命令显式
|
|
22
|
+
- [ ] 非目标显式
|
|
23
|
+
|
|
24
|
+
## DAG 主路径
|
|
25
|
+
|
|
26
|
+
- [ ] 已运行 `loop-agent new-task <task-id> "Task title"` 或 task 已存在
|
|
27
|
+
- [ ] `loop-agent dag run-task <task-id> --profile auto --strict-models --output <dag-path>` 产出 DAG spec
|
|
28
|
+
- [ ] `loop-agent dag validate --dag <dag-path> --strict-models --strict-governance` 通过
|
|
29
|
+
- [ ] `loop-agent run-dag --dag <dag-path> --cwd .` 产出 run id
|
|
30
|
+
- [ ] `loop-agent dag report --run-id <run-id> --markdown` 可读
|
|
31
|
+
- [ ] `loop-agent dag doctor --run-id <run-id>` 能解释失败或 paused run
|
|
32
|
+
|
|
33
|
+
## 证据
|
|
34
|
+
|
|
35
|
+
- [ ] 记录 DAG spec path
|
|
36
|
+
- [ ] 记录 DAG validation 输出
|
|
37
|
+
- [ ] 记录 run id
|
|
38
|
+
- [ ] Shell 验证输出是新鲜的
|
|
39
|
+
- [ ] 成功路径有 promotion 与 closeout 证据
|
|
40
|
+
- [ ] 失败路径有 failure handoff 证据
|
|
41
|
+
|
|
42
|
+
## Failure Routing
|
|
43
|
+
|
|
44
|
+
- [ ] 存在时保留 raw failure category
|
|
45
|
+
- [ ] 失败 run 有 DAG normalized failure category
|
|
46
|
+
- [ ] 失败 run 有 product-line failure category
|
|
47
|
+
- [ ] 失败 run 有 recommended follow-up
|
|
48
|
+
- [ ] 派生 category 未覆盖已完成 DAG facts
|
|
49
|
+
- [ ] `Unknown` 已说明或为 fixture 有意接受
|
|
50
|
+
|
|
51
|
+
## 最终门禁
|
|
52
|
+
|
|
53
|
+
- [ ] `npm run typecheck`
|
|
54
|
+
- [ ] 相关定向 Vitest 文件
|
|
55
|
+
- [ ] `bash scripts/check-repo.sh`
|
|
56
|
+
- [ ] website/docs 变更时 `npm run docs:build`
|
|
57
|
+
- [ ] 最终 sprint closeout 前 `bash scripts/ci.sh`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# 项目开工检查清单
|
|
2
|
-
|
|
3
|
-
- [ ] 确认 `pwd`
|
|
4
|
-
- [ ] 阅读 `README.md`、`harness.json`,以及 `harness.json.governanceRoot` 指向的 `README.md`
|
|
5
|
-
- [ ] 检查 `git status --short --branch`
|
|
6
|
-
- [ ] 确定单一工作块
|
|
7
|
-
- [ ] 从治理根目录下的 `verification-matrix.md` 选择验证命令
|
|
8
|
-
- [ ] 保留无关用户变更
|
|
9
|
-
- [ ] 非平凡工作时记录 handoff 证据
|
|
1
|
+
# 项目开工检查清单
|
|
2
|
+
|
|
3
|
+
- [ ] 确认 `pwd`
|
|
4
|
+
- [ ] 阅读 `README.md`、`harness.json`,以及 `harness.json.governanceRoot` 指向的 `README.md`
|
|
5
|
+
- [ ] 检查 `git status --short --branch`
|
|
6
|
+
- [ ] 确定单一工作块
|
|
7
|
+
- [ ] 从治理根目录下的 `verification-matrix.md` 选择验证命令
|
|
8
|
+
- [ ] 保留无关用户变更
|
|
9
|
+
- [ ] 非平凡工作时记录 handoff 证据
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# QA 报告模板
|
|
2
|
-
|
|
3
|
-
## 日期 / 会话
|
|
4
|
-
|
|
5
|
-
## 测试范围
|
|
6
|
-
|
|
7
|
-
## 相关 Contract / Plan
|
|
8
|
-
|
|
9
|
-
## 测试方法
|
|
10
|
-
|
|
11
|
-
- 自动化测试:
|
|
12
|
-
- 构建 / 类型检查:
|
|
13
|
-
- Smoke / 手工路径:
|
|
14
|
-
- 其他证据:
|
|
15
|
-
|
|
16
|
-
## Smoke / 手工检查
|
|
17
|
-
|
|
18
|
-
- CLI smoke:
|
|
19
|
-
- DAG smoke:
|
|
20
|
-
- Loop workflow smoke:
|
|
21
|
-
- Executor smoke:
|
|
22
|
-
- 结果:pass / blocked / fail
|
|
23
|
-
|
|
24
|
-
## 通过标准
|
|
25
|
-
|
|
26
|
-
## 发现项
|
|
27
|
-
|
|
28
|
-
| ID | Severity | Finding | Evidence | Suggested Fix |
|
|
29
|
-
|----|----------|---------|----------|---------------|
|
|
30
|
-
|
|
31
|
-
## Failure Routing
|
|
32
|
-
|
|
33
|
-
| Run / Scenario | Raw Failure | DAG Normalized Category | Product-line Category | Recommended Follow-up | Evidence |
|
|
34
|
-
|---|---|---|---|---|---|
|
|
35
|
-
| | | | | | |
|
|
36
|
-
|
|
37
|
-
## 新发现的 Bug / 漂移
|
|
38
|
-
|
|
39
|
-
- 新发现 bug:
|
|
40
|
-
- 发现的契约漂移:
|
|
41
|
-
- 发现的文档/测试不一致:
|
|
42
|
-
|
|
43
|
-
## 最终结论
|
|
44
|
-
|
|
45
|
-
- 结论:pass / partial / fail
|
|
46
|
-
- 结论依据:
|
|
47
|
-
|
|
48
|
-
## 后续项
|
|
1
|
+
# QA 报告模板
|
|
2
|
+
|
|
3
|
+
## 日期 / 会话
|
|
4
|
+
|
|
5
|
+
## 测试范围
|
|
6
|
+
|
|
7
|
+
## 相关 Contract / Plan
|
|
8
|
+
|
|
9
|
+
## 测试方法
|
|
10
|
+
|
|
11
|
+
- 自动化测试:
|
|
12
|
+
- 构建 / 类型检查:
|
|
13
|
+
- Smoke / 手工路径:
|
|
14
|
+
- 其他证据:
|
|
15
|
+
|
|
16
|
+
## Smoke / 手工检查
|
|
17
|
+
|
|
18
|
+
- CLI smoke:
|
|
19
|
+
- DAG smoke:
|
|
20
|
+
- Loop workflow smoke:
|
|
21
|
+
- Executor smoke:
|
|
22
|
+
- 结果:pass / blocked / fail
|
|
23
|
+
|
|
24
|
+
## 通过标准
|
|
25
|
+
|
|
26
|
+
## 发现项
|
|
27
|
+
|
|
28
|
+
| ID | Severity | Finding | Evidence | Suggested Fix |
|
|
29
|
+
|----|----------|---------|----------|---------------|
|
|
30
|
+
|
|
31
|
+
## Failure Routing
|
|
32
|
+
|
|
33
|
+
| Run / Scenario | Raw Failure | DAG Normalized Category | Product-line Category | Recommended Follow-up | Evidence |
|
|
34
|
+
|---|---|---|---|---|---|
|
|
35
|
+
| | | | | | |
|
|
36
|
+
|
|
37
|
+
## 新发现的 Bug / 漂移
|
|
38
|
+
|
|
39
|
+
- 新发现 bug:
|
|
40
|
+
- 发现的契约漂移:
|
|
41
|
+
- 发现的文档/测试不一致:
|
|
42
|
+
|
|
43
|
+
## 最终结论
|
|
44
|
+
|
|
45
|
+
- 结论:pass / partial / fail
|
|
46
|
+
- 结论依据:
|
|
47
|
+
|
|
48
|
+
## 后续项
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# Sprint Contract
|
|
2
|
-
|
|
3
|
-
## 目标(Objective)
|
|
4
|
-
|
|
5
|
-
描述有边界的工作块。
|
|
6
|
-
|
|
7
|
-
## 交付物(Deliverables)
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
## 非目标(Non-goals)
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
## 验证(Verification)
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
bash scripts/check-repo.sh
|
|
19
|
-
npm run typecheck
|
|
20
|
-
npm test
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Windows 上通过 Git Bash 或已配置的兼容 Bash 运行脚本。实际文件操作用平台原生路径。
|
|
24
|
-
|
|
25
|
-
## 失败条件(Failure Conditions)
|
|
26
|
-
|
|
27
|
-
- 必需验证无法运行或失败
|
|
28
|
-
- 工作需要超出本 contract 的范围
|
|
29
|
-
- 实现改动了无关文件
|
|
1
|
+
# Sprint Contract
|
|
2
|
+
|
|
3
|
+
## 目标(Objective)
|
|
4
|
+
|
|
5
|
+
描述有边界的工作块。
|
|
6
|
+
|
|
7
|
+
## 交付物(Deliverables)
|
|
8
|
+
|
|
9
|
+
-
|
|
10
|
+
|
|
11
|
+
## 非目标(Non-goals)
|
|
12
|
+
|
|
13
|
+
-
|
|
14
|
+
|
|
15
|
+
## 验证(Verification)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bash scripts/check-repo.sh
|
|
19
|
+
npm run typecheck
|
|
20
|
+
npm test
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Windows 上通过 Git Bash 或已配置的兼容 Bash 运行脚本。实际文件操作用平台原生路径。
|
|
24
|
+
|
|
25
|
+
## 失败条件(Failure Conditions)
|
|
26
|
+
|
|
27
|
+
- 必需验证无法运行或失败
|
|
28
|
+
- 工作需要超出本 contract 的范围
|
|
29
|
+
- 实现改动了无关文件
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
# Worker Dogfood Evidence
|
|
2
|
-
|
|
3
|
-
## Sample identity
|
|
4
|
-
|
|
5
|
-
| Field | Value |
|
|
6
|
-
|---|---|
|
|
7
|
-
| Date | |
|
|
8
|
-
| Feature / Task | |
|
|
9
|
-
| Target repo | disposable path or sanitized reference |
|
|
10
|
-
| Controller package/version | |
|
|
11
|
-
| Agent-worker package/version (same npm install) | |
|
|
12
|
-
| Controller requested entry / real entry | sanitized reference; keep machine-local absolute value in runtime evidence |
|
|
13
|
-
| Controller launch command / args prefix | sanitized reference |
|
|
14
|
-
| Controller binary SHA-256 | |
|
|
15
|
-
| Controller package fingerprint | `sha256:<hex>` |
|
|
16
|
-
| Expected controller version / fingerprint | n/a / exact values |
|
|
17
|
-
| Provider/model / override | |
|
|
18
|
-
| Batch ID | |
|
|
19
|
-
| Worker run ID | |
|
|
20
|
-
| Retry of worker run ID | n/a / |
|
|
21
|
-
| Candidate commit / tarball SHA-256 | n/a / |
|
|
22
|
-
|
|
23
|
-
## Baseline
|
|
24
|
-
|
|
25
|
-
- Baseline commit and `git status`:
|
|
26
|
-
- Existing failing behavior or missing capability:
|
|
27
|
-
- Preflight (`loop-agent --version`, `inspect`, `docs audit`, `check-repo`):
|
|
28
|
-
|
|
29
|
-
## Run evidence
|
|
30
|
-
|
|
31
|
-
| Artifact | Path / link | Result |
|
|
32
|
-
|---|---|---|
|
|
33
|
-
| TaskSpec / source-doc copies | | |
|
|
34
|
-
| DAG spec | | |
|
|
35
|
-
| DAG report JSON / Markdown | | |
|
|
36
|
-
| DAG skill snapshot ref / SHA-256 / mode | | |
|
|
37
|
-
| shell verification | | |
|
|
38
|
-
| diff | | |
|
|
39
|
-
| closeout or Failure Handoff | | |
|
|
40
|
-
| morning report | | |
|
|
41
|
-
| Observe snapshot / events | | |
|
|
42
|
-
| Controller identity in Worker / Task Pool / batch / Feature evidence | | |
|
|
43
|
-
|
|
44
|
-
## Candidate takeover evidence (if applicable)
|
|
45
|
-
|
|
46
|
-
| Field | Value / result |
|
|
47
|
-
|---|---|
|
|
48
|
-
| Candidate isolated slot containment | |
|
|
49
|
-
| `loop-agent` entry / binary SHA-256 / reported version | |
|
|
50
|
-
| `agent-worker` entry / binary SHA-256 / reported version | |
|
|
51
|
-
| Shared package fingerprint | |
|
|
52
|
-
| Full init / doctor / inspect / docs audit / target check-repo | |
|
|
53
|
-
| `agent-worker` skill and `.agents/skills` mirror hashes | |
|
|
54
|
-
| Feature validation / `feature run --dry-run` | |
|
|
55
|
-
| DAG executors | expected: `static`, `shell` only |
|
|
56
|
-
| PATH trap invocations | expected: none |
|
|
57
|
-
| Pi/model executor observed | expected: false; derive from actual DAG nodes |
|
|
58
|
-
| Feature dry-run executed tasks | expected: empty |
|
|
59
|
-
| Canary verdict / evidence path | |
|
|
60
|
-
|
|
61
|
-
Do not use a deterministic canary result as proof that live Pi/model/provider execution succeeded. Record run-owned skill snapshot evidence and any explicitly authorized live run separately.
|
|
62
|
-
|
|
63
|
-
## Acceptance and QA coverage
|
|
64
|
-
|
|
65
|
-
| Acceptance | Test case(s) | Test file / verification | Result |
|
|
66
|
-
|---|---|---|---|
|
|
67
|
-
| | | | |
|
|
68
|
-
|
|
69
|
-
## Failure / retry (if applicable)
|
|
70
|
-
|
|
71
|
-
| Raw failure | Product-line category | Recommended follow-up | Root cause evidence | Retry result |
|
|
72
|
-
|---|---|---|---|---|
|
|
73
|
-
| | | | | |
|
|
74
|
-
|
|
75
|
-
## Conclusion
|
|
76
|
-
|
|
77
|
-
- Verdict: pass / fail / blocked
|
|
78
|
-
- Review notes:
|
|
79
|
-
- Follow-up task(s):
|
|
80
|
-
- Evidence limitations (for example deterministic-only, no Pi executor/live takeover):
|
|
1
|
+
# Worker Dogfood Evidence
|
|
2
|
+
|
|
3
|
+
## Sample identity
|
|
4
|
+
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Date | |
|
|
8
|
+
| Feature / Task | |
|
|
9
|
+
| Target repo | disposable path or sanitized reference |
|
|
10
|
+
| Controller package/version | |
|
|
11
|
+
| Agent-worker package/version (same npm install) | |
|
|
12
|
+
| Controller requested entry / real entry | sanitized reference; keep machine-local absolute value in runtime evidence |
|
|
13
|
+
| Controller launch command / args prefix | sanitized reference |
|
|
14
|
+
| Controller binary SHA-256 | |
|
|
15
|
+
| Controller package fingerprint | `sha256:<hex>` |
|
|
16
|
+
| Expected controller version / fingerprint | n/a / exact values |
|
|
17
|
+
| Provider/model / override | |
|
|
18
|
+
| Batch ID | |
|
|
19
|
+
| Worker run ID | |
|
|
20
|
+
| Retry of worker run ID | n/a / |
|
|
21
|
+
| Candidate commit / tarball SHA-256 | n/a / |
|
|
22
|
+
|
|
23
|
+
## Baseline
|
|
24
|
+
|
|
25
|
+
- Baseline commit and `git status`:
|
|
26
|
+
- Existing failing behavior or missing capability:
|
|
27
|
+
- Preflight (`loop-agent --version`, `inspect`, `docs audit`, `check-repo`):
|
|
28
|
+
|
|
29
|
+
## Run evidence
|
|
30
|
+
|
|
31
|
+
| Artifact | Path / link | Result |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| TaskSpec / source-doc copies | | |
|
|
34
|
+
| DAG spec | | |
|
|
35
|
+
| DAG report JSON / Markdown | | |
|
|
36
|
+
| DAG skill snapshot ref / SHA-256 / mode | | |
|
|
37
|
+
| shell verification | | |
|
|
38
|
+
| diff | | |
|
|
39
|
+
| closeout or Failure Handoff | | |
|
|
40
|
+
| morning report | | |
|
|
41
|
+
| Observe snapshot / events | | |
|
|
42
|
+
| Controller identity in Worker / Task Pool / batch / Feature evidence | | |
|
|
43
|
+
|
|
44
|
+
## Candidate takeover evidence (if applicable)
|
|
45
|
+
|
|
46
|
+
| Field | Value / result |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Candidate isolated slot containment | |
|
|
49
|
+
| `loop-agent` entry / binary SHA-256 / reported version | |
|
|
50
|
+
| `agent-worker` entry / binary SHA-256 / reported version | |
|
|
51
|
+
| Shared package fingerprint | |
|
|
52
|
+
| Full init / doctor / inspect / docs audit / target check-repo | |
|
|
53
|
+
| `agent-worker` skill and `.agents/skills` mirror hashes | |
|
|
54
|
+
| Feature validation / `feature run --dry-run` | |
|
|
55
|
+
| DAG executors | expected: `static`, `shell` only |
|
|
56
|
+
| PATH trap invocations | expected: none |
|
|
57
|
+
| Pi/model executor observed | expected: false; derive from actual DAG nodes |
|
|
58
|
+
| Feature dry-run executed tasks | expected: empty |
|
|
59
|
+
| Canary verdict / evidence path | |
|
|
60
|
+
|
|
61
|
+
Do not use a deterministic canary result as proof that live Pi/model/provider execution succeeded. Record run-owned skill snapshot evidence and any explicitly authorized live run separately.
|
|
62
|
+
|
|
63
|
+
## Acceptance and QA coverage
|
|
64
|
+
|
|
65
|
+
| Acceptance | Test case(s) | Test file / verification | Result |
|
|
66
|
+
|---|---|---|---|
|
|
67
|
+
| | | | |
|
|
68
|
+
|
|
69
|
+
## Failure / retry (if applicable)
|
|
70
|
+
|
|
71
|
+
| Raw failure | Product-line category | Recommended follow-up | Root cause evidence | Retry result |
|
|
72
|
+
|---|---|---|---|---|
|
|
73
|
+
| | | | | |
|
|
74
|
+
|
|
75
|
+
## Conclusion
|
|
76
|
+
|
|
77
|
+
- Verdict: pass / fail / blocked
|
|
78
|
+
- Review notes:
|
|
79
|
+
- Follow-up task(s):
|
|
80
|
+
- Evidence limitations (for example deterministic-only, no Pi executor/live takeover):
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# Worker Dogfood Setup Template
|
|
2
|
-
|
|
3
|
-
Use this template to create a disposable target repository for a real `agent-worker` sample. It is deliberately a target-repo recipe, not a substitute for product requirements.
|
|
4
|
-
|
|
5
|
-
## Preconditions
|
|
6
|
-
|
|
7
|
-
- Install one published controller version and record it:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install -g @tea-agent/loop-agent@<version>
|
|
11
|
-
npm list -g @tea-agent/loop-agent --depth=0
|
|
12
|
-
loop-agent --version
|
|
13
|
-
agent-worker --version
|
|
14
|
-
agent-worker --help
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
- Before any write-capable Worker command, resolve one controller identity for the batch. Record its package version, absolute launch entry, binary SHA-256, and portable package fingerprint. If the run is part of a release or self-hosting train, carry the expected version/fingerprint as explicit CLI gates.
|
|
18
|
-
- Create a clean, disposable target repository. Do not use `npm link`, `npm run dev`, or a workspace controller for a real-evidence run.
|
|
19
|
-
- Put requirement, acceptance, design, test plan, and QA case matrix next to the TaskSpec. `agent-worker` materializes immutable copies into the harness task source before DAG generation.
|
|
20
|
-
|
|
21
|
-
## Setup checklist
|
|
22
|
-
|
|
23
|
-
- [ ] Target has a committed baseline and a passing `loop-agent init --profile full --merge` preflight.
|
|
24
|
-
- [ ] Existing test demonstrates the desired behavior is missing or unimplemented.
|
|
25
|
-
- [ ] TaskSpec has narrow `allowed_paths` and explicit `forbidden_paths`.
|
|
26
|
-
- [ ] Task Pool dependencies are either backed by real prior runs or intentionally recorded as pre-existing evidence.
|
|
27
|
-
- [ ] The chosen model/provider and `--pi-model` smoke override, if any, are recorded.
|
|
28
|
-
- [ ] `--loop-agent-bin` resolves to the intended published package, and expected controller version/fingerprint are recorded before target writes.
|
|
29
|
-
- [ ] If this is a self-hosting run, published N remains fixed for the whole batch; candidate N+1 is installed and verified in a separate slot.
|
|
30
|
-
|
|
31
|
-
## Execute
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
agent-worker batch run-ready \
|
|
35
|
-
--feature-dir <feature-dir> \
|
|
36
|
-
--repo <target-repo> \
|
|
37
|
-
--loop-agent-bin <published-loop-agent-entry> \
|
|
38
|
-
--expected-controller-version <version> \
|
|
39
|
-
--expected-controller-fingerprint <sha256:value> \
|
|
40
|
-
--limit 1 \
|
|
41
|
-
--check-repo \
|
|
42
|
-
[--pi-model <model>]
|
|
43
|
-
|
|
44
|
-
agent-worker observe snapshot --repo <target-repo> > <evidence-dir>/observe-snapshot.json
|
|
45
|
-
agent-worker report morning --repo <target-repo> --output <evidence-dir>/morning-report.md
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
For a failed task, do not delete state or alter JSONL evidence. Fix the external/root cause, then make the retry explicit:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
agent-worker task retry <task-id> --repo <target-repo> --reason "<root cause corrected>"
|
|
52
|
-
agent-worker batch run-ready --feature-dir <feature-dir> --repo <target-repo> --limit 1 --check-repo
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The retry run must have a distinct `workerRunId` and retain `retryOfWorkerRunId` in its Task Pool evidence.
|
|
56
|
-
|
|
57
|
-
## Versioned self-hosting takeover
|
|
58
|
-
|
|
59
|
-
From a source checkout, use the repo-maintainer deterministic canary after building or packing candidate N+1:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npm run self-host:canary -- \
|
|
63
|
-
--deterministic \
|
|
64
|
-
--tarball <candidate.tgz> \
|
|
65
|
-
--output <candidate-canary-evidence.json>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
The deterministic canary must prove isolated-slot containment, both candidate bin identities, package fingerprint, full init/governance checks, a zero-execution Feature dry-run, static/shell-only observed DAG executors, and no PATH controller fallback. It does not claim to trap every possible Pi SDK/absolute path and does not replace a separately authorized live Pi run or the DAG skill-snapshot tests.
|
|
1
|
+
# Worker Dogfood Setup Template
|
|
2
|
+
|
|
3
|
+
Use this template to create a disposable target repository for a real `agent-worker` sample. It is deliberately a target-repo recipe, not a substitute for product requirements.
|
|
4
|
+
|
|
5
|
+
## Preconditions
|
|
6
|
+
|
|
7
|
+
- Install one published controller version and record it:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @tea-agent/loop-agent@<version>
|
|
11
|
+
npm list -g @tea-agent/loop-agent --depth=0
|
|
12
|
+
loop-agent --version
|
|
13
|
+
agent-worker --version
|
|
14
|
+
agent-worker --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Before any write-capable Worker command, resolve one controller identity for the batch. Record its package version, absolute launch entry, binary SHA-256, and portable package fingerprint. If the run is part of a release or self-hosting train, carry the expected version/fingerprint as explicit CLI gates.
|
|
18
|
+
- Create a clean, disposable target repository. Do not use `npm link`, `npm run dev`, or a workspace controller for a real-evidence run.
|
|
19
|
+
- Put requirement, acceptance, design, test plan, and QA case matrix next to the TaskSpec. `agent-worker` materializes immutable copies into the harness task source before DAG generation.
|
|
20
|
+
|
|
21
|
+
## Setup checklist
|
|
22
|
+
|
|
23
|
+
- [ ] Target has a committed baseline and a passing `loop-agent init --profile full --merge` preflight.
|
|
24
|
+
- [ ] Existing test demonstrates the desired behavior is missing or unimplemented.
|
|
25
|
+
- [ ] TaskSpec has narrow `allowed_paths` and explicit `forbidden_paths`.
|
|
26
|
+
- [ ] Task Pool dependencies are either backed by real prior runs or intentionally recorded as pre-existing evidence.
|
|
27
|
+
- [ ] The chosen model/provider and `--pi-model` smoke override, if any, are recorded.
|
|
28
|
+
- [ ] `--loop-agent-bin` resolves to the intended published package, and expected controller version/fingerprint are recorded before target writes.
|
|
29
|
+
- [ ] If this is a self-hosting run, published N remains fixed for the whole batch; candidate N+1 is installed and verified in a separate slot.
|
|
30
|
+
|
|
31
|
+
## Execute
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
agent-worker batch run-ready \
|
|
35
|
+
--feature-dir <feature-dir> \
|
|
36
|
+
--repo <target-repo> \
|
|
37
|
+
--loop-agent-bin <published-loop-agent-entry> \
|
|
38
|
+
--expected-controller-version <version> \
|
|
39
|
+
--expected-controller-fingerprint <sha256:value> \
|
|
40
|
+
--limit 1 \
|
|
41
|
+
--check-repo \
|
|
42
|
+
[--pi-model <model>]
|
|
43
|
+
|
|
44
|
+
agent-worker observe snapshot --repo <target-repo> > <evidence-dir>/observe-snapshot.json
|
|
45
|
+
agent-worker report morning --repo <target-repo> --output <evidence-dir>/morning-report.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For a failed task, do not delete state or alter JSONL evidence. Fix the external/root cause, then make the retry explicit:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
agent-worker task retry <task-id> --repo <target-repo> --reason "<root cause corrected>"
|
|
52
|
+
agent-worker batch run-ready --feature-dir <feature-dir> --repo <target-repo> --limit 1 --check-repo
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The retry run must have a distinct `workerRunId` and retain `retryOfWorkerRunId` in its Task Pool evidence.
|
|
56
|
+
|
|
57
|
+
## Versioned self-hosting takeover
|
|
58
|
+
|
|
59
|
+
From a source checkout, use the repo-maintainer deterministic canary after building or packing candidate N+1:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run self-host:canary -- \
|
|
63
|
+
--deterministic \
|
|
64
|
+
--tarball <candidate.tgz> \
|
|
65
|
+
--output <candidate-canary-evidence.json>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The deterministic canary must prove isolated-slot containment, both candidate bin identities, package fingerprint, full init/governance checks, a zero-execution Feature dry-run, static/shell-only observed DAG executors, and no PATH controller fallback. It does not claim to trap every possible Pi SDK/absolute path and does not replace a separately authorized live Pi run or the DAG skill-snapshot tests.
|
package/package.json
CHANGED
|
File without changes
|