@tea-agent/loop-agent 0.7.5 → 0.9.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 +145 -142
- package/CHANGELOG.md +161 -158
- package/README.md +206 -204
- package/bin/agent-worker.js +22 -22
- package/bin/loop-agent.js +21 -21
- package/dist/application/dag/args.js +9 -2
- package/dist/commands/init.js +518 -488
- package/dist/commands/loop-benchmark.js +11 -11
- package/dist/commands/pi-reuse-benchmark.js +16 -16
- package/dist/executors/cursor-executor.js +1 -1
- package/dist/executors/shell-executor.js +74 -8
- package/dist/governance/manifest-types.js +1 -1
- package/dist/shared/reference-context.js +48 -22
- package/dist/task/config-types.js +1 -1
- package/dist/task/runtime.js +28 -28
- package/dist/worker/cli.js +3 -3
- package/dist/worker/loop-agent/loop-agent-client.js +51 -10
- package/dist/worker/observability/event-store.js +2 -1
- package/dist/worker/observability/read-model.js +13 -11
- package/dist/worker/observe/paths.js +2 -2
- package/dist/worker/observe/routes.js +82 -23
- package/dist/worker/observe/server.js +8 -6
- package/dist/worker/observe/static/app.js +1965 -1480
- 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/index.html +88 -63
- package/dist/worker/observe/static/styles.css +598 -722
- package/dist/worker/pool/run-store.js +7 -8
- package/dist/worker/run-task/run-task.js +11 -2
- package/dist/worker/runner/run-ready.js +1 -1
- package/dist/workflows/dag/canvas-observer.js +275 -275
- package/docs/README.md +84 -79
- package/docs/agent-dag-recovery-playbook.md +184 -184
- package/docs/agent-dag-runner.md +42 -42
- package/docs/architecture/runtime-boundaries.md +162 -162
- package/docs/cursor-executor-usage.md +25 -25
- package/docs/decisions/README.md +3 -3
- package/docs/design/README.md +49 -49
- package/docs/development-principles.md +73 -73
- package/docs/dynamic-workflow-dag-engine-roadmap.md +1749 -1749
- package/docs/exec-plans/README.md +6 -6
- package/docs/exec-plans/active/README.md +11 -11
- package/docs/exec-plans/completed/README.md +43 -34
- package/docs/feature-workflow.md +187 -187
- package/docs/harness-methodology-debugging.md +153 -153
- package/docs/harness-methodology-tdd.md +130 -130
- package/docs/harness-methodology-verification.md +27 -27
- package/docs/init-surface.manifest.json +245 -241
- package/docs/loop-agent-harness.md +63 -55
- package/docs/production-readiness.md +96 -96
- package/docs/progress/README.md +3 -3
- package/docs/reports/README.md +12 -9
- package/docs/skills/README.md +6 -6
- package/docs/skills/vetted-skill-registry.md +26 -26
- 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-dogfood-report.md +117 -117
- 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 +454 -454
- package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
- package/docs/templates/agent-dag.base.json +195 -195
- package/docs/templates/agent-dag.final-verification.json +190 -190
- package/docs/templates/agent-dag.schema.json +316 -316
- package/docs/templates/agent-dag.supervised-implementation.json +500 -500
- package/docs/templates/exec-plan.md +64 -64
- package/docs/templates/feature-spec.md +53 -53
- package/docs/templates/harness.schema.json +218 -0
- package/docs/templates/hybrid-dag.json +193 -193
- package/docs/templates/init-evolution-review.md +33 -33
- package/docs/templates/interactive-ui-round2-experiment.md +66 -66
- package/docs/templates/product-line/AGENTS.md +8 -8
- package/docs/templates/product-line/README.md +9 -9
- package/docs/templates/product-line/acceptance.yaml +14 -14
- 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/task-graph.yaml +15 -15
- package/docs/templates/product-line/task.yaml +65 -65
- package/docs/templates/product-line/test-plan.md +7 -7
- package/docs/templates/production-readiness-checklist.md +57 -57
- package/docs/templates/progress-log.md +17 -17
- 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 +52 -52
- package/docs/templates/worker-dogfood-setup.md +48 -48
- package/docs/verification-matrix.md +49 -49
- package/examples/decision-gate-agent-dag.json +123 -123
- package/examples/example-dag.json +51 -51
- package/examples/hybrid-loop-agent-dag.json +194 -194
- package/harness.json +73 -71
- package/package.json +68 -67
- package/scripts/check-product-line-docs.sh +22 -22
- package/scripts/check-task-pool-root.sh +32 -0
- package/skills/ai-engineering-context/SKILL.md +48 -48
- package/skills/code-review-core/SKILL.md +20 -20
- package/skills/codebase-scout/SKILL.md +19 -19
- package/skills/init-capability-evolution/SKILL.md +69 -69
- package/skills/loop-agent/SKILL.md +149 -149
- package/skills/loop-agent/references/README.md +67 -67
- package/skills/loop-agent/references/command-reference.md +432 -412
- package/skills/loop-agent/references/harness-policy.md +263 -263
- package/skills/loop-agent/references/hybrid-dag.md +216 -216
- package/skills/loop-agent/references/learned/README.md +21 -21
- package/skills/loop-agent/references/long-running-loop.md +59 -59
- package/skills/loop-agent/references/model-routing.md +36 -36
- package/skills/loop-agent/references/multi-worktree.md +54 -54
- package/skills/loop-agent/references/one-shot-runs.md +85 -85
- package/skills/loop-agent/references/orchestrator-and-interventions.md +169 -169
- package/skills/loop-agent/references/pi-prompt.md +23 -23
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +81 -81
- package/skills/loop-agent/references/post-implementation-and-patterns.md +44 -44
- package/skills/loop-agent/references/task-workflow.md +89 -89
- package/skills/loop-agent/references/verification-and-failure-handling.md +133 -128
- 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/SKILL.md +296 -296
- 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/test-driven-development/SKILL.md +20 -20
- package/skills/verification-before-completion/SKILL.md +154 -154
- package/skills/webapp-testing/SKILL.md +19 -19
|
@@ -1,55 +1,63 @@
|
|
|
1
|
-
# loop-agent Harness
|
|
2
|
-
|
|
3
|
-
loop-agent 提供结构化 agent 工作的本地 harness。
|
|
4
|
-
|
|
5
|
-
## Runtime 区域
|
|
6
|
-
|
|
7
|
-
- `.harness/tasks/` — task source、约束、state、loop facts
|
|
8
|
-
- `.harness/dag-runs/` — DAG run state 与 artifacts
|
|
9
|
-
- `.harness/runs/` — one-shot tool run 证据
|
|
10
|
-
- `.harness/cache/` — 本地 runtime 缓存
|
|
11
|
-
- `.harness/live/` — 瞬态 live-session 文件
|
|
12
|
-
- `.task-pool/` — `agent-worker` 的 Task Pool state、batch artifacts、failure handoffs 与 Observe events
|
|
13
|
-
|
|
14
|
-
## Skill 指令
|
|
15
|
-
|
|
16
|
-
- `skills/loop-agent/` — loop-agent 仓库自有的 skill 指令与参考资料
|
|
17
|
-
- `skills/<skill-name>/` — DAG 模板引用的 skill 本地副本,含 supervised implementation 角色
|
|
18
|
-
- 历史 `skill/` 不再是必需仓库路径;runtime 查找仅为 `loop-agent` 保留兼容 fallback
|
|
19
|
-
|
|
20
|
-
## Package 资产
|
|
21
|
-
|
|
22
|
-
npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dist/`、`skills/`、顶层 `docs/*.md`、`docs/templates/`、`examples/`、`harness.json`、`AGENTS.md`、`README.md`、`CHANGELOG.md`。
|
|
23
|
-
|
|
24
|
-
生成或历史的 task facts 不是 package 资产。`docs/progress/`、`docs/reports/`、`docs/exec-plans/`、`docs/decisions/` 下现有文件属于目标仓库历史;包只携带这些目录的 README。
|
|
25
|
-
|
|
26
|
-
从 npm 安装 `loop-agent` 并在其他项目使用时,DAG skill 指令按配置、用户或目标本地 skill 目录解析(若存在),再回退到包内 `skills/`。目标项目可添加本地 skills,但不必复制 loop-agent 源码历史或 `skills/` 目录即可使用默认 DAG 工作流。
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- `
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
agent-worker batch run-ready
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
# loop-agent Harness
|
|
2
|
+
|
|
3
|
+
loop-agent 提供结构化 agent 工作的本地 harness。
|
|
4
|
+
|
|
5
|
+
## Runtime 区域
|
|
6
|
+
|
|
7
|
+
- `.harness/tasks/` — task source、约束、state、loop facts
|
|
8
|
+
- `.harness/dag-runs/` — DAG run state 与 artifacts
|
|
9
|
+
- `.harness/runs/` — one-shot tool run 证据
|
|
10
|
+
- `.harness/cache/` — 本地 runtime 缓存
|
|
11
|
+
- `.harness/live/` — 瞬态 live-session 文件
|
|
12
|
+
- `.harness/task-pool/` — `agent-worker` 的 Task Pool state、batch artifacts、failure handoffs 与 Observe events;它是 `.harness/` 内的独立 Worker runtime root,默认不提交
|
|
13
|
+
|
|
14
|
+
## Skill 指令
|
|
15
|
+
|
|
16
|
+
- `skills/loop-agent/` — loop-agent 仓库自有的 skill 指令与参考资料
|
|
17
|
+
- `skills/<skill-name>/` — DAG 模板引用的 skill 本地副本,含 supervised implementation 角色
|
|
18
|
+
- 历史 `skill/` 不再是必需仓库路径;runtime 查找仅为 `loop-agent` 保留兼容 fallback
|
|
19
|
+
|
|
20
|
+
## Package 资产
|
|
21
|
+
|
|
22
|
+
npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dist/`、`skills/`、顶层 `docs/*.md`、`docs/templates/`、`examples/`、`harness.json`、`AGENTS.md`、`README.md`、`CHANGELOG.md`。
|
|
23
|
+
|
|
24
|
+
生成或历史的 task facts 不是 package 资产。`docs/progress/`、`docs/reports/`、`docs/exec-plans/`、`docs/decisions/` 下现有文件属于目标仓库历史;包只携带这些目录的 README。
|
|
25
|
+
|
|
26
|
+
从 npm 安装 `loop-agent` 并在其他项目使用时,DAG skill 指令按配置、用户或目标本地 skill 目录解析(若存在),再回退到包内 `skills/`。目标项目可添加本地 skills,但不必复制 loop-agent 源码历史或 `skills/` 目录即可使用默认 DAG 工作流。
|
|
27
|
+
|
|
28
|
+
## harness.json Schema
|
|
29
|
+
|
|
30
|
+
`docs/templates/harness.schema.json` 是面向 IDE 的 `harness.json` JSON Schema。它用于补全字段、提示枚举值、解释 executor/model routing 配置,并尽早暴露拼写错误。
|
|
31
|
+
|
|
32
|
+
运行时事实源仍是 `src/governance/manifest-types.ts` 中的 Zod `harnessManifestSchema`;CLI 读取 `harness.json` 时继续通过 `loadHarnessManifest()` 解析。JSON Schema 不替代运行时校验,只服务编辑体验。
|
|
33
|
+
|
|
34
|
+
`loop-agent init --profile full --merge` 会把 schema 投影到目标项目,并在生成的 `harness.json` 写入与 `governanceRoot` 匹配的 `$schema`。旧初始化项目可通过 `loop-agent init check-update` 查看缺失项,并用 `loop-agent init update --apply-safe` 安全补齐 schema 文件和 `$schema` 引用;该安全更新只允许修改 `$schema`,不会重写用户已有 harness 配置。
|
|
35
|
+
|
|
36
|
+
## Command Surface
|
|
37
|
+
|
|
38
|
+
- `new-task`、`status`、`inspect`、`doctor`
|
|
39
|
+
- `dag run-task`、`dag validate`、`run-dag`、`dag report`、`dag resume`
|
|
40
|
+
- `delegate`、`harvest`、`promote-run`、`closeout`
|
|
41
|
+
- `loop init`、`loop run`、`loop status`、`loop closeout`
|
|
42
|
+
- `pi-prompt`、`cursor-prompt`
|
|
43
|
+
- `docs audit`、`handoff check`、`spine audit`、`knowledge curate`
|
|
44
|
+
- `agent-worker task validate|explain-profile|retry`、`agent-worker batch run-ready`、`agent-worker report morning`、`agent-worker observe serve|snapshot`
|
|
45
|
+
|
|
46
|
+
## Worker Retry
|
|
47
|
+
|
|
48
|
+
失败 Task Pool task 必须显式 retry,不能删除 `.harness/task-pool/runs.jsonl` 或复用失败的 `workerRunId`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
agent-worker task retry <task-id> --repo <target-repo> --reason "provider configuration corrected"
|
|
52
|
+
agent-worker batch run-ready --feature-dir <feature-dir> --repo <target-repo>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`task retry` 只接受 `Failed` state,保留旧 run 和 failure handoff,并写入 `retryOfWorkerRunId`。下一次 `run-ready` 生成新的 `workerRunId`;`Blocked`、`Done` 或无 state 的 task 必须先由 operator 处理根因,不能盲目重试。
|
|
56
|
+
|
|
57
|
+
## 验证 Preset
|
|
58
|
+
|
|
59
|
+
Shell preset `loop-agent-standard-verify` 跑 typecheck 与聚焦 DAG 测试。完整交付仍应使用:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
bash scripts/ci.sh
|
|
63
|
+
```
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
# Production Readiness v0.1
|
|
2
|
-
|
|
3
|
-
本文档冻结 2026-07-06 至 2026-07-12 hardening sprint 的单任务 production readiness 标准。
|
|
4
|
-
|
|
5
|
-
`loop-agent` production readiness v0.1 指:低/中风险的仓库本地 DAG 任务能以稳定、可解释、可验证、可恢复的方式运行。这不是组织级平台 readiness 声明。
|
|
6
|
-
|
|
7
|
-
## 支持范围
|
|
8
|
-
|
|
9
|
-
- 单仓库
|
|
10
|
-
- 单任务或小范围有边界任务
|
|
11
|
-
- 低/中风险的代码与文档变更
|
|
12
|
-
- 显式 task source
|
|
13
|
-
- 显式 `allowedPaths`、`forbiddenPaths`、`writeSet`
|
|
14
|
-
- shell 验证命令
|
|
15
|
-
- 通过 `dag report`、`dag doctor`、`promote-run`、`closeout` 交接
|
|
16
|
-
|
|
17
|
-
## 非目标
|
|
18
|
-
|
|
19
|
-
- 自动 merge
|
|
20
|
-
- 自动 release
|
|
21
|
-
- 生产 secrets
|
|
22
|
-
- 生产数据库访问
|
|
23
|
-
- 高风险 migration
|
|
24
|
-
- 在线 Worker Pool
|
|
25
|
-
- 多仓库 feature 编排
|
|
26
|
-
- 可写的 Dynamic Workflow sharded migration
|
|
27
|
-
- DAG runtime 之外的第二套 runner
|
|
28
|
-
|
|
29
|
-
## 必需证据
|
|
30
|
-
|
|
31
|
-
每个 production-ready v0.1 任务必须保留或产出以下证据:
|
|
32
|
-
|
|
33
|
-
| 证据 | 要求 |
|
|
34
|
-
|---|---|
|
|
35
|
-
| DAG spec path | 生成的 DAG JSON 路径记录在 CLI 输出、report 或 task artifacts 中 |
|
|
36
|
-
| DAG validation result | `dag validate --strict-models --strict-governance` 有新鲜输出 |
|
|
37
|
-
| Run id | `run-dag` 打印或记录 run id |
|
|
38
|
-
| Shell verification output | 完成声明引用新鲜命令输出,而非 model 自报 |
|
|
39
|
-
| Failure category | 失败 run 在可用时具备 raw、normalized、product-line 与 recommended follow-up 字段 |
|
|
40
|
-
| Closeout 或 failure handoff | 成功 run 可 promote 并 closeout;失败 run 产出 failure handoff 证据而非成功 closeout |
|
|
41
|
-
|
|
42
|
-
## 必需命令
|
|
43
|
-
|
|
44
|
-
标准任务路径:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
loop-agent new-task <task-id> "Task title"
|
|
48
|
-
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
49
|
-
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
50
|
-
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
51
|
-
loop-agent dag report --run-id <run-id> --markdown
|
|
52
|
-
loop-agent dag doctor --run-id <run-id>
|
|
53
|
-
loop-agent promote-run <task-id> --run-id <run-id>
|
|
54
|
-
loop-agent closeout task <task-id>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`<temp-dir>` 使用平台原生临时目录。
|
|
58
|
-
|
|
59
|
-
## 必需标准
|
|
60
|
-
|
|
61
|
-
| ID | 标准 | 验收 |
|
|
62
|
-
|---|---|---|
|
|
63
|
-
| PRD-01 | 新任务仅推荐 DAG 路径 | README、docs、website、skills 不把已移除的 Level 1 顺序命令当作 fallback |
|
|
64
|
-
| PRD-02 | 写任务有显式边界 | strict DAG governance 在需要时拒绝缺失 `allowedPaths`、`forbiddenPaths` 或 `writeSet` |
|
|
65
|
-
| PRD-03 | 每次 DAG run 有可读 report | `loop-agent dag report --latest --markdown` 显示 status、failure summary 与 next step |
|
|
66
|
-
| PRD-04 | 失败 run 可诊断 | `loop-agent dag doctor` 报告 category 与 recommended follow-up |
|
|
67
|
-
| PRD-05 | Shell 验证是完成权威 | closeout 不接受 model 自报替代新鲜命令输出 |
|
|
68
|
-
| PRD-06 | Failure category 覆盖失败 fixture | validation、write guard、shell、timeout、auth、unknown fixture 均有映射 |
|
|
69
|
-
| PRD-07 | 已完成 DAG facts 不可变 | completed facts guard 仍由测试覆盖 |
|
|
70
|
-
| PRD-08 | CLI 主路径输出指引下一步 | `dag run-task`、`dag validate`、`run-dag`、`dag report` 打印 operator next commands |
|
|
71
|
-
| PRD-09 | 文档面一致 | doc 更新后 `bash scripts/check-repo.sh` 与 `npm run docs:build` 通过 |
|
|
72
|
-
| PRD-10 | sprint 完成前完整本地门禁通过 | 最终 hardening closeout 时 `bash scripts/ci.sh` 通过 |
|
|
73
|
-
|
|
74
|
-
## Failure Routing
|
|
75
|
-
|
|
76
|
-
Failure category 是路由字段,不是主任务状态。保留 raw DAG facts,仅在 report、doctor 输出、closeout draft、task artifacts 或后续 Task Pool 记录中追加派生字段。
|
|
77
|
-
|
|
78
|
-
四层结构:
|
|
79
|
-
|
|
80
|
-
```text
|
|
81
|
-
raw_failure_category
|
|
82
|
-
dag_normalized_failure_category
|
|
83
|
-
product_line_failure_category
|
|
84
|
-
recommended_follow_up
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Product-line category 事实源:`docs/design/state-and-failure-taxonomy.md`。
|
|
88
|
-
|
|
89
|
-
## Sprint Gate
|
|
90
|
-
|
|
91
|
-
2026-07-06 sprint 仅在 active execution plan 记录以下内容时视为完成:
|
|
92
|
-
|
|
93
|
-
- M1–M4 最终状态
|
|
94
|
-
- 必需验证门禁的命令输出
|
|
95
|
-
- 成功、write-guard、shell-failure 场景的 dogfood 证据
|
|
96
|
-
- 剩余风险与后续工作
|
|
1
|
+
# Production Readiness v0.1
|
|
2
|
+
|
|
3
|
+
本文档冻结 2026-07-06 至 2026-07-12 hardening sprint 的单任务 production readiness 标准。
|
|
4
|
+
|
|
5
|
+
`loop-agent` production readiness v0.1 指:低/中风险的仓库本地 DAG 任务能以稳定、可解释、可验证、可恢复的方式运行。这不是组织级平台 readiness 声明。
|
|
6
|
+
|
|
7
|
+
## 支持范围
|
|
8
|
+
|
|
9
|
+
- 单仓库
|
|
10
|
+
- 单任务或小范围有边界任务
|
|
11
|
+
- 低/中风险的代码与文档变更
|
|
12
|
+
- 显式 task source
|
|
13
|
+
- 显式 `allowedPaths`、`forbiddenPaths`、`writeSet`
|
|
14
|
+
- shell 验证命令
|
|
15
|
+
- 通过 `dag report`、`dag doctor`、`promote-run`、`closeout` 交接
|
|
16
|
+
|
|
17
|
+
## 非目标
|
|
18
|
+
|
|
19
|
+
- 自动 merge
|
|
20
|
+
- 自动 release
|
|
21
|
+
- 生产 secrets
|
|
22
|
+
- 生产数据库访问
|
|
23
|
+
- 高风险 migration
|
|
24
|
+
- 在线 Worker Pool
|
|
25
|
+
- 多仓库 feature 编排
|
|
26
|
+
- 可写的 Dynamic Workflow sharded migration
|
|
27
|
+
- DAG runtime 之外的第二套 runner
|
|
28
|
+
|
|
29
|
+
## 必需证据
|
|
30
|
+
|
|
31
|
+
每个 production-ready v0.1 任务必须保留或产出以下证据:
|
|
32
|
+
|
|
33
|
+
| 证据 | 要求 |
|
|
34
|
+
|---|---|
|
|
35
|
+
| DAG spec path | 生成的 DAG JSON 路径记录在 CLI 输出、report 或 task artifacts 中 |
|
|
36
|
+
| DAG validation result | `dag validate --strict-models --strict-governance` 有新鲜输出 |
|
|
37
|
+
| Run id | `run-dag` 打印或记录 run id |
|
|
38
|
+
| Shell verification output | 完成声明引用新鲜命令输出,而非 model 自报 |
|
|
39
|
+
| Failure category | 失败 run 在可用时具备 raw、normalized、product-line 与 recommended follow-up 字段 |
|
|
40
|
+
| Closeout 或 failure handoff | 成功 run 可 promote 并 closeout;失败 run 产出 failure handoff 证据而非成功 closeout |
|
|
41
|
+
|
|
42
|
+
## 必需命令
|
|
43
|
+
|
|
44
|
+
标准任务路径:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
loop-agent new-task <task-id> "Task title"
|
|
48
|
+
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
49
|
+
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
50
|
+
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
51
|
+
loop-agent dag report --run-id <run-id> --markdown
|
|
52
|
+
loop-agent dag doctor --run-id <run-id>
|
|
53
|
+
loop-agent promote-run <task-id> --run-id <run-id>
|
|
54
|
+
loop-agent closeout task <task-id>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`<temp-dir>` 使用平台原生临时目录。
|
|
58
|
+
|
|
59
|
+
## 必需标准
|
|
60
|
+
|
|
61
|
+
| ID | 标准 | 验收 |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| PRD-01 | 新任务仅推荐 DAG 路径 | README、docs、website、skills 不把已移除的 Level 1 顺序命令当作 fallback |
|
|
64
|
+
| PRD-02 | 写任务有显式边界 | strict DAG governance 在需要时拒绝缺失 `allowedPaths`、`forbiddenPaths` 或 `writeSet` |
|
|
65
|
+
| PRD-03 | 每次 DAG run 有可读 report | `loop-agent dag report --latest --markdown` 显示 status、failure summary 与 next step |
|
|
66
|
+
| PRD-04 | 失败 run 可诊断 | `loop-agent dag doctor` 报告 category 与 recommended follow-up |
|
|
67
|
+
| PRD-05 | Shell 验证是完成权威 | closeout 不接受 model 自报替代新鲜命令输出 |
|
|
68
|
+
| PRD-06 | Failure category 覆盖失败 fixture | validation、write guard、shell、timeout、auth、unknown fixture 均有映射 |
|
|
69
|
+
| PRD-07 | 已完成 DAG facts 不可变 | completed facts guard 仍由测试覆盖 |
|
|
70
|
+
| PRD-08 | CLI 主路径输出指引下一步 | `dag run-task`、`dag validate`、`run-dag`、`dag report` 打印 operator next commands |
|
|
71
|
+
| PRD-09 | 文档面一致 | doc 更新后 `bash scripts/check-repo.sh` 与 `npm run docs:build` 通过 |
|
|
72
|
+
| PRD-10 | sprint 完成前完整本地门禁通过 | 最终 hardening closeout 时 `bash scripts/ci.sh` 通过 |
|
|
73
|
+
|
|
74
|
+
## Failure Routing
|
|
75
|
+
|
|
76
|
+
Failure category 是路由字段,不是主任务状态。保留 raw DAG facts,仅在 report、doctor 输出、closeout draft、task artifacts 或后续 Task Pool 记录中追加派生字段。
|
|
77
|
+
|
|
78
|
+
四层结构:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
raw_failure_category
|
|
82
|
+
dag_normalized_failure_category
|
|
83
|
+
product_line_failure_category
|
|
84
|
+
recommended_follow_up
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Product-line category 事实源:`docs/design/state-and-failure-taxonomy.md`。
|
|
88
|
+
|
|
89
|
+
## Sprint Gate
|
|
90
|
+
|
|
91
|
+
2026-07-06 sprint 仅在 active execution plan 记录以下内容时视为完成:
|
|
92
|
+
|
|
93
|
+
- M1–M4 最终状态
|
|
94
|
+
- 必需验证门禁的命令输出
|
|
95
|
+
- 成功、write-guard、shell-failure 场景的 dogfood 证据
|
|
96
|
+
- 剩余风险与后续工作
|
package/docs/progress/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# 进度日志
|
|
2
|
-
|
|
3
|
-
本目录存放应超越聊天上下文的简洁 handoff 日志。
|
|
1
|
+
# 进度日志
|
|
2
|
+
|
|
3
|
+
本目录存放应超越聊天上下文的简洁 handoff 日志。
|
package/docs/reports/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
# 报告
|
|
2
|
-
|
|
3
|
-
本目录存放验证、审计、benchmark 与 closeout 报告。
|
|
4
|
-
|
|
5
|
-
- [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
|
|
6
|
-
- [`2026-07-10-next-stage-dogfood-runs.md`](2026-07-10-next-stage-dogfood-runs.md) — 发布控制器下的 BE/FE/QA Worker 样本、retry 与 Observe 证据
|
|
7
|
-
- [`2026-07-10-init-evolution-review.md`](2026-07-10-init-evolution-review.md) — Worker 初始化投影演进审查
|
|
8
|
-
- [`2026-07-10-session-events-dogfood.md`](2026-07-10-session-events-dogfood.md) — Pi SDK DAG 新 run 产生非空 `session-events.jsonl` 与 Observe 过程时间线 API 证据
|
|
9
|
-
- [`2026-07-
|
|
1
|
+
# 报告
|
|
2
|
+
|
|
3
|
+
本目录存放验证、审计、benchmark 与 closeout 报告。
|
|
4
|
+
|
|
5
|
+
- [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
|
|
6
|
+
- [`2026-07-10-next-stage-dogfood-runs.md`](2026-07-10-next-stage-dogfood-runs.md) — 发布控制器下的 BE/FE/QA Worker 样本、retry 与 Observe 证据
|
|
7
|
+
- [`2026-07-10-init-evolution-review.md`](2026-07-10-init-evolution-review.md) — Worker 初始化投影演进审查
|
|
8
|
+
- [`2026-07-10-session-events-dogfood.md`](2026-07-10-session-events-dogfood.md) — Pi SDK DAG 新 run 产生非空 `session-events.jsonl` 与 Observe 过程时间线 API 证据
|
|
9
|
+
- [`2026-07-11-command-performance-followups.md`](2026-07-11-command-performance-followups.md) — Observe 快照复用、输出缓冲和 reference index 遍历优化的验证记录
|
|
10
|
+
- [`2026-07-11-observe-terminal-dag-kpi.md`](2026-07-11-observe-terminal-dag-kpi.md) — 终态 DAG 被误计为活跃数的修复记录
|
|
11
|
+
- [`2026-07-12-observe-warm-console-redesign.md`](2026-07-12-observe-warm-console-redesign.md) — 暖白运行控制台视觉重构与桌面验证记录
|
|
12
|
+
- [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md) — 仓库能力基线分析(2026-07-10 再采样:0.5.0 + Observe UI 优化 UI-1~UI-9 / Unreleased)
|
package/docs/skills/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Skill Registry
|
|
2
|
-
|
|
3
|
-
This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
|
|
4
|
-
|
|
5
|
-
- `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
|
|
6
|
-
|
|
1
|
+
# Skill Registry
|
|
2
|
+
|
|
3
|
+
This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
|
|
4
|
+
|
|
5
|
+
- `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
|
|
6
|
+
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# Vetted Skill Registry
|
|
2
|
-
|
|
3
|
-
This registry records repo-local skills that may be referenced by default DAG role mapping or task/profile-specific `skills`.
|
|
4
|
-
|
|
5
|
-
The entries below are local wrappers or existing local skills. They are not wholesale vendored copies of third-party skill repositories.
|
|
6
|
-
|
|
7
|
-
| Skill | Source / Inspiration | Local Path | Supported Roles | Default Use | Risk Notes |
|
|
8
|
-
|---|---|---|---|---|---|
|
|
9
|
-
| `ai-engineering-context` | local existing | `skills/ai-engineering-context/SKILL.md` | scout, default context | default/scout | Read-only engineering context; not a private platform memory skill. |
|
|
10
|
-
| `loop-agent` | local existing | `skills/loop-agent/SKILL.md` | planner, supervisor, closeout | planner/closeout | Long references may be resolved by strict audit with expanded budget; executor behavior unchanged. |
|
|
11
|
-
| `verification-before-completion` | local wrapper inspired by verification discipline | `skills/verification-before-completion/SKILL.md` | implementer, verifier, closeout | implementer/verifier/closeout | Requires shell evidence before completion claims. |
|
|
12
|
-
| `systematic-debugging` | local wrapper inspired by systematic debugging discipline | `skills/systematic-debugging/SKILL.md` | implementer, verifier | verifier | Advisory prompt guidance only; does not run tools by itself. |
|
|
13
|
-
| `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
|
|
14
|
-
| `test-driven-development` | local wrapper inspired by TDD practice | `skills/test-driven-development/SKILL.md` | implementer | implementer | Does not force tests in mechanical-only docs changes; implementer still follows task contract. |
|
|
15
|
-
| `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
|
|
16
|
-
| `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
|
|
17
|
-
| `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
|
|
18
|
-
| `webapp-testing` | local wrapper inspired by frontend/browser testing practice | `skills/webapp-testing/SKILL.md` | verifier, reviewer | optional | Only applies when task explicitly involves browser-rendered behavior; no default Playwright/Semgrep execution. |
|
|
19
|
-
|
|
20
|
-
## Vetting Rules
|
|
21
|
-
|
|
22
|
-
- Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
|
|
23
|
-
- Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
|
|
24
|
-
- This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
|
|
25
|
-
- `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
|
|
26
|
-
|
|
1
|
+
# Vetted Skill Registry
|
|
2
|
+
|
|
3
|
+
This registry records repo-local skills that may be referenced by default DAG role mapping or task/profile-specific `skills`.
|
|
4
|
+
|
|
5
|
+
The entries below are local wrappers or existing local skills. They are not wholesale vendored copies of third-party skill repositories.
|
|
6
|
+
|
|
7
|
+
| Skill | Source / Inspiration | Local Path | Supported Roles | Default Use | Risk Notes |
|
|
8
|
+
|---|---|---|---|---|---|
|
|
9
|
+
| `ai-engineering-context` | local existing | `skills/ai-engineering-context/SKILL.md` | scout, default context | default/scout | Read-only engineering context; not a private platform memory skill. |
|
|
10
|
+
| `loop-agent` | local existing | `skills/loop-agent/SKILL.md` | planner, supervisor, closeout | planner/closeout | Long references may be resolved by strict audit with expanded budget; executor behavior unchanged. |
|
|
11
|
+
| `verification-before-completion` | local wrapper inspired by verification discipline | `skills/verification-before-completion/SKILL.md` | implementer, verifier, closeout | implementer/verifier/closeout | Requires shell evidence before completion claims. |
|
|
12
|
+
| `systematic-debugging` | local wrapper inspired by systematic debugging discipline | `skills/systematic-debugging/SKILL.md` | implementer, verifier | verifier | Advisory prompt guidance only; does not run tools by itself. |
|
|
13
|
+
| `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
|
|
14
|
+
| `test-driven-development` | local wrapper inspired by TDD practice | `skills/test-driven-development/SKILL.md` | implementer | implementer | Does not force tests in mechanical-only docs changes; implementer still follows task contract. |
|
|
15
|
+
| `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
|
|
16
|
+
| `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
|
|
17
|
+
| `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
|
|
18
|
+
| `webapp-testing` | local wrapper inspired by frontend/browser testing practice | `skills/webapp-testing/SKILL.md` | verifier, reviewer | optional | Only applies when task explicitly involves browser-rendered behavior; no default Playwright/Semgrep execution. |
|
|
19
|
+
|
|
20
|
+
## Vetting Rules
|
|
21
|
+
|
|
22
|
+
- Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
|
|
23
|
+
- Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
|
|
24
|
+
- This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
|
|
25
|
+
- `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
|
|
26
|
+
|
package/docs/templates/adr.md
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# ADR 模板
|
|
2
|
-
|
|
3
|
-
## 标题
|
|
4
|
-
|
|
5
|
-
> 建议文件名:`0001-<topic>.md`
|
|
6
|
-
|
|
7
|
-
## 状态
|
|
8
|
-
|
|
9
|
-
- proposed / accepted / superseded
|
|
10
|
-
|
|
11
|
-
## 背景
|
|
12
|
-
|
|
13
|
-
- 当前遇到的工程或架构问题是什么?
|
|
14
|
-
- 为什么现在必须做决定?
|
|
15
|
-
- 相关上下文、历史方案、约束有哪些?
|
|
16
|
-
|
|
17
|
-
## 决策
|
|
18
|
-
|
|
19
|
-
- 最终选择什么方案?
|
|
20
|
-
- 明确边界、适用范围、默认行为是什么?
|
|
21
|
-
|
|
22
|
-
## 备选方案
|
|
23
|
-
|
|
24
|
-
1. 方案 A:
|
|
25
|
-
2. 方案 B:
|
|
26
|
-
3. 方案 C:
|
|
27
|
-
|
|
28
|
-
## 取舍理由
|
|
29
|
-
|
|
30
|
-
- 为什么选择当前方案?
|
|
31
|
-
- 为什么不选其他方案?
|
|
32
|
-
- 主要 trade-off 是什么?
|
|
33
|
-
|
|
34
|
-
## 影响范围
|
|
35
|
-
|
|
36
|
-
- 影响的代码目录:
|
|
37
|
-
- 影响的文档/契约:
|
|
38
|
-
- 影响的测试/脚本:
|
|
39
|
-
- 影响的开发流程/harness:
|
|
40
|
-
|
|
41
|
-
## 后果
|
|
42
|
-
|
|
43
|
-
### 正面后果
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
### 负面后果 / 成本
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
## 验证与落地
|
|
52
|
-
|
|
53
|
-
- 需要补哪些实现、脚本或测试:
|
|
54
|
-
- 如何验证决策已经生效:
|
|
55
|
-
|
|
56
|
-
## 复审条件
|
|
57
|
-
|
|
58
|
-
当出现以下情况时,建议重新审视本 ADR:
|
|
59
|
-
|
|
60
|
-
-
|
|
1
|
+
# ADR 模板
|
|
2
|
+
|
|
3
|
+
## 标题
|
|
4
|
+
|
|
5
|
+
> 建议文件名:`0001-<topic>.md`
|
|
6
|
+
|
|
7
|
+
## 状态
|
|
8
|
+
|
|
9
|
+
- proposed / accepted / superseded
|
|
10
|
+
|
|
11
|
+
## 背景
|
|
12
|
+
|
|
13
|
+
- 当前遇到的工程或架构问题是什么?
|
|
14
|
+
- 为什么现在必须做决定?
|
|
15
|
+
- 相关上下文、历史方案、约束有哪些?
|
|
16
|
+
|
|
17
|
+
## 决策
|
|
18
|
+
|
|
19
|
+
- 最终选择什么方案?
|
|
20
|
+
- 明确边界、适用范围、默认行为是什么?
|
|
21
|
+
|
|
22
|
+
## 备选方案
|
|
23
|
+
|
|
24
|
+
1. 方案 A:
|
|
25
|
+
2. 方案 B:
|
|
26
|
+
3. 方案 C:
|
|
27
|
+
|
|
28
|
+
## 取舍理由
|
|
29
|
+
|
|
30
|
+
- 为什么选择当前方案?
|
|
31
|
+
- 为什么不选其他方案?
|
|
32
|
+
- 主要 trade-off 是什么?
|
|
33
|
+
|
|
34
|
+
## 影响范围
|
|
35
|
+
|
|
36
|
+
- 影响的代码目录:
|
|
37
|
+
- 影响的文档/契约:
|
|
38
|
+
- 影响的测试/脚本:
|
|
39
|
+
- 影响的开发流程/harness:
|
|
40
|
+
|
|
41
|
+
## 后果
|
|
42
|
+
|
|
43
|
+
### 正面后果
|
|
44
|
+
|
|
45
|
+
-
|
|
46
|
+
|
|
47
|
+
### 负面后果 / 成本
|
|
48
|
+
|
|
49
|
+
-
|
|
50
|
+
|
|
51
|
+
## 验证与落地
|
|
52
|
+
|
|
53
|
+
- 需要补哪些实现、脚本或测试:
|
|
54
|
+
- 如何验证决策已经生效:
|
|
55
|
+
|
|
56
|
+
## 复审条件
|
|
57
|
+
|
|
58
|
+
当出现以下情况时,建议重新审视本 ADR:
|
|
59
|
+
|
|
60
|
+
-
|