@tea-agent/loop-agent 0.2.0 → 0.3.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.
Files changed (77) hide show
  1. package/AGENTS.md +43 -24
  2. package/CHANGELOG.md +72 -44
  3. package/README.md +177 -164
  4. package/bin/loop-agent.js +21 -21
  5. package/dist/application/dag/args.js +6 -0
  6. package/dist/application/dag/generate-task-dag.js +5 -3
  7. package/dist/application/dag/run-dag.js +17 -1
  8. package/dist/application/dag/validate-dag.js +41 -0
  9. package/dist/cli/command-definitions.js +2 -2
  10. package/dist/cli/program.js +24 -4
  11. package/dist/commands/init.js +1036 -461
  12. package/dist/workflows/dag/dynamic-runtime/loop-until.js +2 -1
  13. package/dist/workflows/dag/dynamic-runtime/map.js +1 -0
  14. package/dist/workflows/dag/failure-routing.js +82 -0
  15. package/dist/workflows/dag/init-hybrid.js +3 -3
  16. package/dist/workflows/dag/lifecycle.js +95 -3
  17. package/dist/workflows/dag/report.js +73 -1
  18. package/dist/workflows/dag/skills.js +3 -3
  19. package/dist/workflows/dag/types.js +2 -0
  20. package/dist/workflows/dynamic/compile.js +11 -0
  21. package/dist/workflows/dynamic/spec.js +1 -0
  22. package/docs/README.md +50 -45
  23. package/docs/agent-dag-recovery-playbook.md +32 -6
  24. package/docs/agent-dag-runner.md +19 -17
  25. package/docs/architecture/runtime-boundaries.md +1 -1
  26. package/docs/cursor-executor-usage.md +5 -5
  27. package/docs/decisions/README.md +2 -2
  28. package/docs/design/README.md +24 -24
  29. package/docs/development-principles.md +50 -50
  30. package/docs/dynamic-workflow-dag-engine-roadmap.md +6 -6
  31. package/docs/exec-plans/README.md +4 -4
  32. package/docs/exec-plans/active/README.md +7 -9
  33. package/docs/exec-plans/completed/README.md +10 -8
  34. package/docs/feature-workflow.md +111 -109
  35. package/docs/harness-methodology-verification.md +18 -18
  36. package/docs/init-surface.manifest.json +175 -0
  37. package/docs/loop-agent-harness.md +36 -36
  38. package/docs/production-readiness.md +96 -0
  39. package/docs/progress/README.md +2 -2
  40. package/docs/reports/README.md +4 -2
  41. package/docs/skills/README.md +6 -0
  42. package/docs/skills/vetted-skill-registry.md +26 -0
  43. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +1 -1
  44. package/docs/templates/agent-dag-process-supervisor.prompt.md +2 -2
  45. package/docs/templates/agent-dag-report.schema.json +33 -2
  46. package/docs/templates/agent-dag-review-verdict.prompt.md +1 -1
  47. package/docs/templates/agent-dag.base.json +195 -195
  48. package/docs/templates/agent-dag.final-verification.json +190 -190
  49. package/docs/templates/agent-dag.schema.json +17 -17
  50. package/docs/templates/agent-dag.supervised-implementation.json +500 -500
  51. package/docs/templates/hybrid-dag.json +193 -193
  52. package/docs/templates/init-evolution-review.md +33 -0
  53. package/docs/templates/production-readiness-checklist.md +57 -0
  54. package/docs/templates/progress-log.md +7 -7
  55. package/docs/templates/project-start-checklist.md +8 -8
  56. package/docs/templates/qa-report.md +17 -11
  57. package/docs/templates/sprint-contract.md +19 -19
  58. package/docs/verification-matrix.md +37 -26
  59. package/examples/example-dag.json +51 -51
  60. package/examples/hybrid-loop-agent-dag.json +194 -194
  61. package/harness.json +10 -8
  62. package/package.json +60 -58
  63. package/skills/code-review-core/SKILL.md +20 -0
  64. package/skills/codebase-scout/SKILL.md +19 -0
  65. package/skills/init-capability-evolution/SKILL.md +69 -0
  66. package/skills/loop-agent/SKILL.md +35 -35
  67. package/skills/loop-agent/references/command-reference.md +125 -65
  68. package/skills/loop-agent/references/harness-policy.md +30 -30
  69. package/skills/loop-agent/references/hybrid-dag.md +30 -30
  70. package/skills/loop-agent/references/model-routing.md +1 -1
  71. package/skills/loop-agent/references/orchestrator-and-interventions.md +1 -1
  72. package/skills/loop-agent/references/pi-prompt.md +9 -9
  73. package/skills/loop-agent/references/post-implementation-and-patterns.md +7 -7
  74. package/skills/loop-agent/references/task-workflow.md +19 -19
  75. package/skills/loop-agent/references/verification-and-failure-handling.md +36 -0
  76. package/skills/test-driven-development/SKILL.md +20 -0
  77. package/skills/webapp-testing/SKILL.md +19 -0
@@ -1,30 +1,41 @@
1
- # Verification Matrix
1
+ # 验证矩阵
2
2
 
3
- Use the narrowest command that proves the claim.
3
+ 用能证明声明的最窄命令。
4
4
 
5
- | Change type | Minimum verification | Stronger verification |
5
+ | 变更类型 | 最低验证 | 更强验证 |
6
6
  |---|---|---|
7
- | Docs or governance only | `bash scripts/check-repo.sh` | `bash scripts/ci.sh` |
7
+ | 仅文档或治理 | `bash scripts/check-repo.sh` | `bash scripts/ci.sh` |
8
8
  | TypeScript runtime | `npm run typecheck` | `npm test` |
9
- | CLI behavior | `npm run typecheck` + targeted Vitest | `npm test` + CLI smoke |
10
- | DAG workflow | targeted DAG tests | `npm test` |
11
- | Scripts or CI | run the changed script | `bash scripts/ci.sh` |
12
- | Package / publish entry | `npm run build` + `node bin/loop-agent.js --help` | `npm pack --dry-run` |
13
- | Full delivery | `bash scripts/ci.sh` | CLI smoke plus relevant manual checks |
14
-
15
- Common commands:
16
-
17
- ```bash
18
- npm run typecheck
19
- npm test
20
- npm run build
21
- bash scripts/check-repo.sh
22
- bash scripts/ci.sh
23
- node bin/loop-agent.js --help
24
- npm run dev -- --help
25
- npm pack --dry-run
26
- ```
27
-
28
- On Windows, run `scripts/*.sh` through Git Bash or a configured compatible Bash. Cross-platform CLI code should use native paths for real file operations and `/` only for stable repo refs, JSON/Markdown evidence refs, and glob conventions.
29
-
30
- Never claim completion without fresh command output for the relevant gate.
9
+ | CLI 行为 | `npm run typecheck` + 定向 Vitest | `npm test` + CLI smoke |
10
+ | DAG 工作流 | 定向 DAG 测试 | `npm test` |
11
+ | Production readiness hardening | `bash scripts/check-repo.sh` + 定向 DAG/CLI 测试 | `bash scripts/ci.sh` + docs build + package smoke |
12
+ | 脚本或 CI | 运行变更的脚本 | `bash scripts/ci.sh` |
13
+ | Package / publish 入口 | `npm run build` + `node bin/loop-agent.js --help` | `npm pack --dry-run` |
14
+ | 完整交付 | `bash scripts/ci.sh` | CLI smoke + 相关手工检查 |
15
+
16
+ 常用命令:
17
+
18
+ ```bash
19
+ npm run typecheck
20
+ npm test
21
+ npm run build
22
+ bash scripts/check-repo.sh
23
+ bash scripts/ci.sh
24
+ node bin/loop-agent.js --help
25
+ npm run dev -- --help
26
+ npm pack --dry-run
27
+ ```
28
+
29
+ Windows 上通过 Git Bash 或已配置的兼容 Bash 运行 `scripts/*.sh`。跨平台 CLI 代码对真实文件操作用原生路径;`/` 仅用于稳定 repo 引用、JSON/Markdown 证据引用和 glob 约定。
30
+
31
+ 没有相关门禁的新鲜命令输出,不得声明完成。
32
+
33
+ Production Readiness v0.1 工作以 `docs/production-readiness.md` 与 `docs/templates/production-readiness-checklist.md` 为验收契约。最终 hardening closeout 需要:
34
+
35
+ ```bash
36
+ bash scripts/ci.sh
37
+ npm run docs:build
38
+ npm run build
39
+ node bin/loop-agent.js --help
40
+ npm pack --dry-run
41
+ ```
@@ -1,51 +1,51 @@
1
- {
2
- "version": 2,
3
- "title": "示例:审计并行 + 汇总串行",
4
- "executorModels": {
5
- "cursor": {
6
- "LOW": "composer-2.5",
7
- "MED": "composer-2.5",
8
- "HIGH": "composer-2.5"
9
- },
10
- "pi": {
11
- "LOW": "gpt-5.3-codex-spark",
12
- "MED": "glm-5.2",
13
- "HIGH": "gpt-5.5"
14
- }
15
- },
16
- "tasks": [
17
- {
18
- "id": "audit-src",
19
- "depends_on": [],
20
- "complexity": "LOW",
21
- "forbiddenPaths": [
22
- ".harness/**"
23
- ],
24
- "outputContract": "Plain Markdown module inventory; no file writes.",
25
- "subtask_prompt": "只读审计 ./src/workflows/dag/ 目录结构,输出模块清单(不要改文件)。"
26
- },
27
- {
28
- "id": "audit-tests",
29
- "depends_on": [],
30
- "complexity": "LOW",
31
- "forbiddenPaths": [
32
- ".harness/**"
33
- ],
34
- "outputContract": "Plain Markdown test gap recommendations; no file writes.",
35
- "subtask_prompt": "只读审计 ./test/ 中与 dag 相关的测试缺口,输出建议(不要改文件)。"
36
- },
37
- {
38
- "id": "synthesize-plan",
39
- "depends_on": [
40
- "audit-src",
41
- "audit-tests"
42
- ],
43
- "complexity": "MED",
44
- "forbiddenPaths": [
45
- ".harness/**"
46
- ],
47
- "outputContract": "Plain Markdown improvement plan (<=10 lines); no file writes.",
48
- "subtask_prompt": "基于上游审计结果,输出一份 10 行以内的改进计划 Markdown(仍不要改代码)。"
49
- }
50
- ]
51
- }
1
+ {
2
+ "version": 2,
3
+ "title": "示例:审计并行 + 汇总串行",
4
+ "executorModels": {
5
+ "cursor": {
6
+ "LOW": "composer-2.5",
7
+ "MED": "composer-2.5",
8
+ "HIGH": "composer-2.5"
9
+ },
10
+ "pi": {
11
+ "LOW": "gpt-5.3-codex-spark",
12
+ "MED": "glm-5.2",
13
+ "HIGH": "gpt-5.5"
14
+ }
15
+ },
16
+ "tasks": [
17
+ {
18
+ "id": "audit-src",
19
+ "depends_on": [],
20
+ "complexity": "LOW",
21
+ "forbiddenPaths": [
22
+ ".harness/**"
23
+ ],
24
+ "outputContract": "Plain Markdown module inventory; no file writes.",
25
+ "subtask_prompt": "只读审计 ./src/workflows/dag/ 目录结构,输出模块清单(不要改文件)。"
26
+ },
27
+ {
28
+ "id": "audit-tests",
29
+ "depends_on": [],
30
+ "complexity": "LOW",
31
+ "forbiddenPaths": [
32
+ ".harness/**"
33
+ ],
34
+ "outputContract": "Plain Markdown test gap recommendations; no file writes.",
35
+ "subtask_prompt": "只读审计 ./test/ 中与 dag 相关的测试缺口,输出建议(不要改文件)。"
36
+ },
37
+ {
38
+ "id": "synthesize-plan",
39
+ "depends_on": [
40
+ "audit-src",
41
+ "audit-tests"
42
+ ],
43
+ "complexity": "MED",
44
+ "forbiddenPaths": [
45
+ ".harness/**"
46
+ ],
47
+ "outputContract": "Plain Markdown improvement plan (<=10 lines); no file writes.",
48
+ "subtask_prompt": "基于上游审计结果,输出一份 10 行以内的改进计划 Markdown(仍不要改代码)。"
49
+ }
50
+ ]
51
+ }
@@ -1,194 +1,194 @@
1
- {
2
- "version": 2,
3
- "title": "Hybrid DAG 示例:Pi 只读契约 + 并行侦察 + Pi 写入实现",
4
- "objective": "演示 v2 hybrid DAG:Pi 节点返回只读契约/审查结论,Pi 节点并行只读侦察,Pi writer 节点通过 toolProfile=write 独占实现。",
5
- "successCriteria": [
6
- "contract-pi 返回可审计的只读实现契约摘要",
7
- "scout-src 与 scout-tests 并行只读侦察且互不写冲突",
8
- "implement-core 仅在声明的 writeSet 内修改代码",
9
- "review-pi 基于上游输出完成只读审查",
10
- "verify-shell 归档确定性验证命令输出",
11
- "dag validate 校验通过且 ranks 符合依赖拓扑"
12
- ],
13
- "globalConstraints": [
14
- "Do not commit runtime traces under .harness/dag-runs/",
15
- "Do not enable cross-node Pi runtime reuse by default",
16
- "Preserve CODE_AGENT_PI_BACKEND=cli-only rollback for Pi nodes",
17
- "Every task must explicitly declare executor; defaults.executor is schema-only and not a runtime fallback",
18
- "Prefer same-rank parallel read-only scouts over serial chains when outputs are independent",
19
- "Add depends_on only when a child truly needs upstream output; challenge single-chain topologies during review",
20
- "Same-rank exclusive writeSet entries must be disjoint",
21
- "exclusive implementer nodes must use narrow, concrete writeSet paths; never use ** or repo root",
22
- "Cursor is optional; no-Cursor environments should use Pi read-only scouts and Pi writer nodes with toolProfile=write",
23
- "Read-only nodes must not write root artifacts/**; root artifacts/ is reserved for Level 1/current-work summaries or explicit exclusive write nodes"
24
- ],
25
- "defaults": {
26
- "executor": "pi",
27
- "piBackend": "sdk-first",
28
- "contextProfile": "slim",
29
- "skills": [
30
- "ai-engineering-context"
31
- ],
32
- "writePolicy": "read-only"
33
- },
34
- "skillsByRole": {
35
- "planner": [
36
- "loop-agent"
37
- ],
38
- "scout": [
39
- "ai-engineering-context"
40
- ],
41
- "implementer": [
42
- "verification-before-completion"
43
- ],
44
- "reviewer": [
45
- "requesting-code-review"
46
- ],
47
- "verifier": [
48
- "verification-before-completion",
49
- "systematic-debugging"
50
- ],
51
- "closeout": [
52
- "loop-agent",
53
- "verification-before-completion"
54
- ]
55
- },
56
- "executorModels": {
57
- "cursor": {
58
- "LOW": "composer-2.5",
59
- "MED": "composer-2.5",
60
- "HIGH": "composer-2.5"
61
- },
62
- "pi": {
63
- "LOW": "gpt-5.3-codex-spark",
64
- "MED": "glm-5.2",
65
- "HIGH": "gpt-5.5"
66
- }
67
- },
68
- "tasks": [
69
- {
70
- "id": "contract-pi",
71
- "depends_on": [],
72
- "role": "planner",
73
- "executor": "pi",
74
- "complexity": "MED",
75
- "writePolicy": "read-only",
76
- "allowedPaths": [
77
- "./**",
78
- "docs/**"
79
- ],
80
- "forbiddenPaths": [
81
- ".harness/**",
82
- "artifacts/**"
83
- ],
84
- "outputContract": "Plain Markdown implementation contract summary; no file writes.",
85
- "subtask_prompt": "阅读 ./README.md 与 docs/agent-dag-runner.md,返回 10 行以内的实现契约摘要(只读分析 + 文档建议,不改代码/文档/artifacts)。指出是否适合并行 scout 与窄 writeSet。"
86
- },
87
- {
88
- "id": "scout-src",
89
- "depends_on": [
90
- "contract-pi"
91
- ],
92
- "role": "scout",
93
- "executor": "pi",
94
- "complexity": "LOW",
95
- "writePolicy": "read-only",
96
- "allowedPaths": [
97
- "./src/workflows/dag/**"
98
- ],
99
- "forbiddenPaths": [
100
- ".harness/**",
101
- "artifacts/**"
102
- ],
103
- "outputContract": "Plain Markdown reconnaissance summary of DAG-related source modules; no file writes.",
104
- "subtask_prompt": "只读审计 ./src/workflows/dag/ 中与 DAG 相关的模块,列出关键文件与职责(不要改文件)。"
105
- },
106
- {
107
- "id": "scout-tests",
108
- "depends_on": [
109
- "contract-pi"
110
- ],
111
- "role": "scout",
112
- "executor": "pi",
113
- "complexity": "LOW",
114
- "writePolicy": "read-only",
115
- "allowedPaths": [
116
- "./test/**"
117
- ],
118
- "forbiddenPaths": [
119
- ".harness/**",
120
- "artifacts/**"
121
- ],
122
- "outputContract": "Plain Markdown test coverage gap summary; no file writes.",
123
- "subtask_prompt": "只读审计 ./test/ 中与 dag-runner 相关的测试覆盖,列出缺口建议(不要改文件)。"
124
- },
125
- {
126
- "id": "implement-core",
127
- "depends_on": [
128
- "scout-src",
129
- "scout-tests"
130
- ],
131
- "role": "implementer",
132
- "executor": "pi",
133
- "complexity": "HIGH",
134
- "writePolicy": "exclusive",
135
- "writeSet": [
136
- "./src/workflows/dag/runner.ts"
137
- ],
138
- "allowedPaths": [
139
- "./src/workflows/dag/**"
140
- ],
141
- "forbiddenPaths": [
142
- ".harness/**",
143
- "artifacts/**"
144
- ],
145
- "outputContract": "Implementation summary with changed files, tests run, and residual risks.",
146
- "subtask_prompt": "基于上游侦察结果,在 writeSet 范围内做最小必要改动并说明风险(若无需改动则输出 no-op 理由)。",
147
- "toolProfile": "write"
148
- },
149
- {
150
- "id": "review-pi",
151
- "depends_on": [
152
- "implement-core"
153
- ],
154
- "role": "reviewer",
155
- "executor": "pi",
156
- "complexity": "MED",
157
- "writePolicy": "read-only",
158
- "allowedPaths": [
159
- "./**",
160
- "docs/**"
161
- ],
162
- "forbiddenPaths": [
163
- ".harness/**",
164
- "artifacts/**"
165
- ],
166
- "outputContract": "Plain Markdown review summary; no file writes.",
167
- "subtask_prompt": "审查上游实现与侦察结论是否一致,列出范围漂移、验证缺口与残余风险(只读,不改文件/文档/artifacts)。"
168
- },
169
- {
170
- "id": "verify-shell",
171
- "depends_on": [
172
- "implement-core"
173
- ],
174
- "role": "verifier",
175
- "executor": "shell",
176
- "complexity": "LOW",
177
- "writePolicy": "read-only",
178
- "allowedPaths": [
179
- "./**"
180
- ],
181
- "forbiddenPaths": [
182
- ".harness/**",
183
- "artifacts/**"
184
- ],
185
- "outputContract": "Archived shell verification stdout/stderr with exit codes; no worktree writes.",
186
- "subtask_prompt": "Run deterministic loop-agent verification and archive command outputs.",
187
- "shell": {
188
- "preset": "loop-agent-standard-verify",
189
- "cwd": ".",
190
- "timeoutMs": 300000
191
- }
192
- }
193
- ]
194
- }
1
+ {
2
+ "version": 2,
3
+ "title": "Hybrid DAG 示例:Pi 只读契约 + 并行侦察 + Pi 写入实现",
4
+ "objective": "演示 v2 hybrid DAG:Pi 节点返回只读契约/审查结论,Pi 节点并行只读侦察,Pi writer 节点通过 toolProfile=write 独占实现。",
5
+ "successCriteria": [
6
+ "contract-pi 返回可审计的只读实现契约摘要",
7
+ "scout-src 与 scout-tests 并行只读侦察且互不写冲突",
8
+ "implement-core 仅在声明的 writeSet 内修改代码",
9
+ "review-pi 基于上游输出完成只读审查",
10
+ "verify-shell 归档确定性验证命令输出",
11
+ "dag validate 校验通过且 ranks 符合依赖拓扑"
12
+ ],
13
+ "globalConstraints": [
14
+ "Do not commit runtime traces under .harness/dag-runs/",
15
+ "Do not enable cross-node Pi runtime reuse by default",
16
+ "Preserve CODE_AGENT_PI_BACKEND=cli-only rollback for Pi nodes",
17
+ "Every task must explicitly declare executor; defaults.executor is schema-only and not a runtime fallback",
18
+ "Prefer same-rank parallel read-only scouts over serial chains when outputs are independent",
19
+ "Add depends_on only when a child truly needs upstream output; challenge single-chain topologies during review",
20
+ "Same-rank exclusive writeSet entries must be disjoint",
21
+ "exclusive implementer nodes must use narrow, concrete writeSet paths; never use ** or repo root",
22
+ "Cursor is optional; no-Cursor environments should use Pi read-only scouts and Pi writer nodes with toolProfile=write",
23
+ "Read-only nodes must not write root artifacts/**; root artifacts/ is reserved for Level 1/current-work summaries or explicit exclusive write nodes"
24
+ ],
25
+ "defaults": {
26
+ "executor": "pi",
27
+ "piBackend": "sdk-first",
28
+ "contextProfile": "slim",
29
+ "skills": [
30
+ "ai-engineering-context"
31
+ ],
32
+ "writePolicy": "read-only"
33
+ },
34
+ "skillsByRole": {
35
+ "planner": [
36
+ "loop-agent"
37
+ ],
38
+ "scout": [
39
+ "ai-engineering-context"
40
+ ],
41
+ "implementer": [
42
+ "verification-before-completion"
43
+ ],
44
+ "reviewer": [
45
+ "requesting-code-review"
46
+ ],
47
+ "verifier": [
48
+ "verification-before-completion",
49
+ "systematic-debugging"
50
+ ],
51
+ "closeout": [
52
+ "loop-agent",
53
+ "verification-before-completion"
54
+ ]
55
+ },
56
+ "executorModels": {
57
+ "cursor": {
58
+ "LOW": "composer-2.5",
59
+ "MED": "composer-2.5",
60
+ "HIGH": "composer-2.5"
61
+ },
62
+ "pi": {
63
+ "LOW": "gpt-5.3-codex-spark",
64
+ "MED": "glm-5.2",
65
+ "HIGH": "gpt-5.5"
66
+ }
67
+ },
68
+ "tasks": [
69
+ {
70
+ "id": "contract-pi",
71
+ "depends_on": [],
72
+ "role": "planner",
73
+ "executor": "pi",
74
+ "complexity": "MED",
75
+ "writePolicy": "read-only",
76
+ "allowedPaths": [
77
+ "./**",
78
+ "docs/**"
79
+ ],
80
+ "forbiddenPaths": [
81
+ ".harness/**",
82
+ "artifacts/**"
83
+ ],
84
+ "outputContract": "Plain Markdown implementation contract summary; no file writes.",
85
+ "subtask_prompt": "阅读 ./README.md 与 docs/agent-dag-runner.md,返回 10 行以内的实现契约摘要(只读分析 + 文档建议,不改代码/文档/artifacts)。指出是否适合并行 scout 与窄 writeSet。"
86
+ },
87
+ {
88
+ "id": "scout-src",
89
+ "depends_on": [
90
+ "contract-pi"
91
+ ],
92
+ "role": "scout",
93
+ "executor": "pi",
94
+ "complexity": "LOW",
95
+ "writePolicy": "read-only",
96
+ "allowedPaths": [
97
+ "./src/workflows/dag/**"
98
+ ],
99
+ "forbiddenPaths": [
100
+ ".harness/**",
101
+ "artifacts/**"
102
+ ],
103
+ "outputContract": "Plain Markdown reconnaissance summary of DAG-related source modules; no file writes.",
104
+ "subtask_prompt": "只读审计 ./src/workflows/dag/ 中与 DAG 相关的模块,列出关键文件与职责(不要改文件)。"
105
+ },
106
+ {
107
+ "id": "scout-tests",
108
+ "depends_on": [
109
+ "contract-pi"
110
+ ],
111
+ "role": "scout",
112
+ "executor": "pi",
113
+ "complexity": "LOW",
114
+ "writePolicy": "read-only",
115
+ "allowedPaths": [
116
+ "./test/**"
117
+ ],
118
+ "forbiddenPaths": [
119
+ ".harness/**",
120
+ "artifacts/**"
121
+ ],
122
+ "outputContract": "Plain Markdown test coverage gap summary; no file writes.",
123
+ "subtask_prompt": "只读审计 ./test/ 中与 dag-runner 相关的测试覆盖,列出缺口建议(不要改文件)。"
124
+ },
125
+ {
126
+ "id": "implement-core",
127
+ "depends_on": [
128
+ "scout-src",
129
+ "scout-tests"
130
+ ],
131
+ "role": "implementer",
132
+ "executor": "pi",
133
+ "complexity": "HIGH",
134
+ "writePolicy": "exclusive",
135
+ "writeSet": [
136
+ "./src/workflows/dag/runner.ts"
137
+ ],
138
+ "allowedPaths": [
139
+ "./src/workflows/dag/**"
140
+ ],
141
+ "forbiddenPaths": [
142
+ ".harness/**",
143
+ "artifacts/**"
144
+ ],
145
+ "outputContract": "Implementation summary with changed files, tests run, and residual risks.",
146
+ "subtask_prompt": "基于上游侦察结果,在 writeSet 范围内做最小必要改动并说明风险(若无需改动则输出 no-op 理由)。",
147
+ "toolProfile": "write"
148
+ },
149
+ {
150
+ "id": "review-pi",
151
+ "depends_on": [
152
+ "implement-core"
153
+ ],
154
+ "role": "reviewer",
155
+ "executor": "pi",
156
+ "complexity": "MED",
157
+ "writePolicy": "read-only",
158
+ "allowedPaths": [
159
+ "./**",
160
+ "docs/**"
161
+ ],
162
+ "forbiddenPaths": [
163
+ ".harness/**",
164
+ "artifacts/**"
165
+ ],
166
+ "outputContract": "Plain Markdown review summary; no file writes.",
167
+ "subtask_prompt": "审查上游实现与侦察结论是否一致,列出范围漂移、验证缺口与残余风险(只读,不改文件/文档/artifacts)。"
168
+ },
169
+ {
170
+ "id": "verify-shell",
171
+ "depends_on": [
172
+ "implement-core"
173
+ ],
174
+ "role": "verifier",
175
+ "executor": "shell",
176
+ "complexity": "LOW",
177
+ "writePolicy": "read-only",
178
+ "allowedPaths": [
179
+ "./**"
180
+ ],
181
+ "forbiddenPaths": [
182
+ ".harness/**",
183
+ "artifacts/**"
184
+ ],
185
+ "outputContract": "Archived shell verification stdout/stderr with exit codes; no worktree writes.",
186
+ "subtask_prompt": "Run deterministic loop-agent verification and archive command outputs.",
187
+ "shell": {
188
+ "preset": "loop-agent-standard-verify",
189
+ "cwd": ".",
190
+ "timeoutMs": 300000
191
+ }
192
+ }
193
+ ]
194
+ }
package/harness.json CHANGED
@@ -46,9 +46,11 @@
46
46
  "checkStructure": "scripts/check-engineering-structure.sh",
47
47
  "checkDocIndex": "scripts/check-doc-index.sh",
48
48
  "checkDocLinks": "scripts/check-doc-links.sh",
49
- "checkHarnessRuntimeClean": "scripts/check-harness-runtime-clean.sh",
50
- "ci": "scripts/ci.sh"
51
- },
49
+ "checkHarnessRuntimeClean": "scripts/check-harness-runtime-clean.sh",
50
+ "checkInitEvolutionNeeded": "scripts/check-init-evolution-needed.sh",
51
+ "checkInitSurface": "scripts/check-init-surface.sh",
52
+ "ci": "scripts/ci.sh"
53
+ },
52
54
  "models": {
53
55
  "analyze": {
54
56
  "provider": "wizard-local",
@@ -77,11 +79,11 @@
77
79
  }
78
80
  },
79
81
  "executors": {
80
- "pi": {
81
- "description": "Pi planning, review, diagnosis, and bounded writing when DAG toolProfile=write",
82
- "defaultModel": "gpt-5.3-codex-spark",
83
- "requiresApiKey": ""
84
- },
82
+ "pi": {
83
+ "description": "Pi planning, review, diagnosis, and bounded writing when DAG toolProfile=write",
84
+ "defaultModel": "gpt-5.3-codex-spark",
85
+ "requiresApiKey": ""
86
+ },
85
87
  "cursor": {
86
88
  "description": "Cursor via @cursor/sdk (default model: account default)",
87
89
  "enabled": false,