@tea-agent/loop-agent 0.1.0 → 0.2.1
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 +62 -45
- package/CHANGELOG.md +60 -28
- package/README.md +160 -124
- package/bin/loop-agent.js +21 -21
- package/dist/adapters/index.js +3 -2
- package/dist/adapters/loop-agent.js +44 -2
- package/dist/application/dag/args.js +420 -0
- package/dist/application/dag/generate-task-dag.js +280 -0
- package/dist/application/dag/report-dag.js +14 -0
- package/dist/application/dag/run-dag.js +106 -0
- package/dist/application/dag/validate-dag.js +102 -0
- package/dist/application/loop/run-action.js +23 -0
- package/dist/cli/catalog.js +2 -237
- package/dist/cli/command-definitions.js +571 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/program.js +65 -1
- package/dist/cli/router.js +13 -0
- package/dist/cli-governance/active-residue-check.js +38 -0
- package/dist/commands/dag-report.js +6 -107
- package/dist/commands/dag-run-task.js +8 -466
- package/dist/commands/dag-validate.js +7 -179
- package/dist/commands/examples.js +90 -0
- package/dist/commands/init.js +1518 -0
- package/dist/commands/loop.js +57 -31
- package/dist/commands/pi-prompt.js +2 -9
- package/dist/commands/run-dag.js +7 -180
- package/dist/executors/cursor-executor-artifacts.js +3 -4
- package/dist/executors/cursor-worker-client.js +13 -3
- package/dist/executors/dag-cursor-executor.js +2 -3
- package/dist/executors/dag-pi-executor.js +3 -4
- package/dist/executors/dag-static-executor.js +2 -5
- package/dist/executors/pi-defaults.js +9 -0
- package/dist/executors/shell-executor.js +12 -20
- package/dist/governance/manifest-types.js +1 -0
- package/dist/infrastructure/harness/active-residue-policy.js +73 -0
- package/dist/infrastructure/harness/artifact-store.js +72 -0
- package/dist/infrastructure/harness/atomic-write.js +49 -0
- package/dist/infrastructure/harness/completed-facts-guard.js +40 -0
- package/dist/infrastructure/harness/loop-action-store.js +23 -0
- package/dist/infrastructure/harness/loop-store.js +41 -0
- package/dist/infrastructure/harness/one-shot-run-store.js +94 -0
- package/dist/infrastructure/harness/task-store.js +77 -0
- package/dist/records/one-shot-runs.js +26 -61
- package/dist/records/promotion.js +3 -4
- package/dist/shared/artifacts-core.js +5 -5
- package/dist/shared/logger.js +9 -15
- package/dist/task/delegate.js +4 -4
- package/dist/task/runtime.js +5 -7
- package/dist/task/state.js +6 -20
- package/dist/workflows/dag/convergence/controller.js +277 -0
- package/dist/workflows/dag/dynamic-runtime/condition.js +48 -0
- package/dist/workflows/dag/dynamic-runtime/loop-until.js +156 -0
- package/dist/workflows/dag/dynamic-runtime/map.js +185 -0
- package/dist/workflows/dag/dynamic-runtime/reduction.js +72 -0
- package/dist/workflows/dag/dynamic-runtime/shared.js +133 -0
- package/dist/workflows/dag/failure-routing.js +82 -0
- package/dist/workflows/dag/lifecycle.js +101 -8
- package/dist/workflows/dag/node-execution.js +262 -0
- package/dist/workflows/dag/report.js +73 -1
- package/dist/workflows/dag/run-store.js +36 -0
- package/dist/workflows/dag/runner.js +82 -1341
- package/dist/workflows/dag/scheduler.js +84 -0
- package/dist/workflows/dag/upstream-artifacts.js +20 -18
- package/dist/workflows/loop/actions/cursor-fix.js +191 -0
- package/dist/workflows/loop/actions/dag-action.js +130 -0
- package/dist/workflows/loop/actions/pi-review.js +267 -0
- package/dist/workflows/loop/actions/shared.js +157 -0
- package/dist/workflows/loop/actions/shell-verify.js +82 -0
- package/dist/workflows/loop/actions/types.js +1 -0
- package/dist/workflows/loop/actions/workflow-action.js +255 -0
- package/dist/workflows/loop/actions.js +55 -1212
- package/dist/workflows/loop/closeout.js +5 -4
- package/dist/workflows/loop/context.js +2 -3
- package/dist/workflows/loop/events.js +3 -2
- package/dist/workflows/loop/policy/auto-policy.js +104 -0
- package/dist/workflows/loop/policy/cursor-fix-policy.js +31 -0
- package/dist/workflows/loop/rounds.js +3 -3
- package/dist/workflows/loop/signals.js +4 -7
- package/dist/workflows/loop/state.js +11 -11
- package/docs/README.md +47 -44
- package/docs/agent-dag-recovery-playbook.md +32 -6
- package/docs/agent-dag-runner.md +17 -17
- package/docs/architecture/runtime-boundaries.md +147 -0
- package/docs/cursor-executor-usage.md +5 -5
- package/docs/decisions/README.md +2 -2
- package/docs/design/README.md +24 -24
- package/docs/development-principles.md +50 -50
- package/docs/dynamic-workflow-dag-engine-roadmap.md +6 -6
- package/docs/exec-plans/README.md +4 -4
- package/docs/exec-plans/active/README.md +10 -5
- package/docs/exec-plans/completed/README.md +9 -5
- package/docs/feature-workflow.md +111 -109
- package/docs/harness-methodology-verification.md +18 -18
- package/docs/loop-agent-harness.md +36 -36
- package/docs/production-readiness.md +96 -0
- package/docs/progress/README.md +2 -2
- package/docs/reports/README.md +4 -2
- package/docs/templates/agent-dag-decision-gate-dogfood-report.md +1 -1
- package/docs/templates/agent-dag-process-supervisor.prompt.md +2 -2
- package/docs/templates/agent-dag-report.schema.json +33 -2
- package/docs/templates/agent-dag-review-verdict.prompt.md +1 -1
- 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 +17 -17
- package/docs/templates/agent-dag.supervised-implementation.json +500 -500
- package/docs/templates/hybrid-dag.json +193 -193
- package/docs/templates/production-readiness-checklist.md +57 -0
- package/docs/templates/progress-log.md +7 -7
- package/docs/templates/project-start-checklist.md +8 -8
- package/docs/templates/qa-report.md +17 -11
- package/docs/templates/sprint-contract.md +19 -19
- package/docs/verification-matrix.md +37 -26
- package/examples/example-dag.json +51 -51
- package/examples/hybrid-loop-agent-dag.json +194 -194
- package/harness.json +5 -5
- package/package.json +62 -61
- package/skills/ai-engineering-context/SKILL.md +21 -21
- package/skills/loop-agent/SKILL.md +56 -171
- package/skills/loop-agent/references/README.md +6 -2
- package/skills/loop-agent/references/command-reference.md +107 -65
- package/skills/loop-agent/references/harness-policy.md +115 -115
- package/skills/loop-agent/references/hybrid-dag.md +30 -30
- package/skills/loop-agent/references/learned/README.md +13 -13
- package/skills/loop-agent/references/long-running-loop.md +59 -0
- package/skills/loop-agent/references/model-routing.md +1 -1
- package/skills/loop-agent/references/orchestrator-and-interventions.md +1 -1
- package/skills/loop-agent/references/pi-prompt.md +9 -9
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +0 -2
- package/skills/loop-agent/references/post-implementation-and-patterns.md +7 -7
- package/skills/loop-agent/references/task-workflow.md +19 -19
- package/skills/loop-agent/references/verification-and-failure-handling.md +54 -0
- package/skills/requesting-code-review/SKILL.md +40 -40
- package/skills/requesting-code-review/code-reviewer.md +4 -4
- package/skills/systematic-debugging/CREATION-LOG.md +43 -43
- package/skills/systematic-debugging/SKILL.md +113 -113
- package/skills/systematic-debugging/condition-based-waiting.md +20 -20
- package/skills/systematic-debugging/defense-in-depth.md +27 -27
- package/skills/systematic-debugging/root-cause-tracing.md +38 -38
- package/skills/systematic-debugging/test-academic.md +6 -6
- package/skills/systematic-debugging/test-pressure-1.md +6 -6
- package/skills/systematic-debugging/test-pressure-2.md +2 -2
- package/skills/systematic-debugging/test-pressure-3.md +6 -6
- package/skills/verification-before-completion/SKILL.md +37 -37
|
@@ -1,193 +1,193 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"title": "Hybrid DAG 示例:Pi 只读契约 + 并行侦察 + Pi 写入配置实现",
|
|
4
|
-
"objective": "演示 v2 hybrid DAG:Pi 节点返回只读契约/审查结论,Pi writer 节点通过 toolProfile=write 执行受控独占实现,shell 节点负责确定性验证。",
|
|
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 remains an explicit optional executor; no-Cursor environments 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 explicit exclusive write nodes"
|
|
24
|
-
],
|
|
25
|
-
"defaults": {
|
|
26
|
-
"executor": "pi",
|
|
27
|
-
"contextProfile": "slim",
|
|
28
|
-
"skills": [
|
|
29
|
-
"ai-engineering-context"
|
|
30
|
-
],
|
|
31
|
-
"writePolicy": "read-only"
|
|
32
|
-
},
|
|
33
|
-
"skillsByRole": {
|
|
34
|
-
"planner": [
|
|
35
|
-
"loop-agent"
|
|
36
|
-
],
|
|
37
|
-
"scout": [
|
|
38
|
-
"ai-engineering-context"
|
|
39
|
-
],
|
|
40
|
-
"implementer": [
|
|
41
|
-
"verification-before-completion"
|
|
42
|
-
],
|
|
43
|
-
"reviewer": [
|
|
44
|
-
"requesting-code-review"
|
|
45
|
-
],
|
|
46
|
-
"verifier": [
|
|
47
|
-
"verification-before-completion",
|
|
48
|
-
"systematic-debugging"
|
|
49
|
-
],
|
|
50
|
-
"closeout": [
|
|
51
|
-
"loop-agent",
|
|
52
|
-
"verification-before-completion"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"executorModels": {
|
|
56
|
-
"cursor": {
|
|
57
|
-
"LOW": "composer-2.5",
|
|
58
|
-
"MED": "composer-2.5",
|
|
59
|
-
"HIGH": "composer-2.5"
|
|
60
|
-
},
|
|
61
|
-
"pi": {
|
|
62
|
-
"LOW": "gpt-5.3-codex-spark",
|
|
63
|
-
"MED": "glm-5.2",
|
|
64
|
-
"HIGH": "gpt-5.5"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"tasks": [
|
|
68
|
-
{
|
|
69
|
-
"id": "contract-pi",
|
|
70
|
-
"depends_on": [],
|
|
71
|
-
"role": "planner",
|
|
72
|
-
"executor": "pi",
|
|
73
|
-
"complexity": "MED",
|
|
74
|
-
"writePolicy": "read-only",
|
|
75
|
-
"allowedPaths": [
|
|
76
|
-
"./**",
|
|
77
|
-
"docs/**"
|
|
78
|
-
],
|
|
79
|
-
"forbiddenPaths": [
|
|
80
|
-
".harness/**",
|
|
81
|
-
"artifacts/**"
|
|
82
|
-
],
|
|
83
|
-
"outputContract": "Plain Markdown implementation contract summary; no file writes.",
|
|
84
|
-
"subtask_prompt": "阅读 ./README.md 与 docs/agent-dag-runner.md,返回 10 行以内的实现契约摘要(只读分析 + 文档建议,不改代码/文档/artifacts)。指出是否适合并行 scout 与窄 writeSet。"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"id": "scout-src",
|
|
88
|
-
"depends_on": [
|
|
89
|
-
"contract-pi"
|
|
90
|
-
],
|
|
91
|
-
"role": "scout",
|
|
92
|
-
"executor": "pi",
|
|
93
|
-
"complexity": "LOW",
|
|
94
|
-
"writePolicy": "read-only",
|
|
95
|
-
"allowedPaths": [
|
|
96
|
-
"./src/workflows/dag/**"
|
|
97
|
-
],
|
|
98
|
-
"forbiddenPaths": [
|
|
99
|
-
".harness/**",
|
|
100
|
-
"artifacts/**"
|
|
101
|
-
],
|
|
102
|
-
"outputContract": "Plain Markdown reconnaissance summary of DAG-related source modules; no file writes.",
|
|
103
|
-
"subtask_prompt": "只读审计 ./src/workflows/dag/ 中与 DAG 相关的模块,列出关键文件与职责(不要改文件)。"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"id": "scout-tests",
|
|
107
|
-
"depends_on": [
|
|
108
|
-
"contract-pi"
|
|
109
|
-
],
|
|
110
|
-
"role": "scout",
|
|
111
|
-
"executor": "pi",
|
|
112
|
-
"complexity": "LOW",
|
|
113
|
-
"writePolicy": "read-only",
|
|
114
|
-
"allowedPaths": [
|
|
115
|
-
"./test/**"
|
|
116
|
-
],
|
|
117
|
-
"forbiddenPaths": [
|
|
118
|
-
".harness/**",
|
|
119
|
-
"artifacts/**"
|
|
120
|
-
],
|
|
121
|
-
"outputContract": "Plain Markdown test coverage gap summary; no file writes.",
|
|
122
|
-
"subtask_prompt": "只读审计 ./test/ 中与 dag-runner 相关的测试覆盖,列出缺口建议(不要改文件)。"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"id": "implement-core",
|
|
126
|
-
"depends_on": [
|
|
127
|
-
"scout-src",
|
|
128
|
-
"scout-tests"
|
|
129
|
-
],
|
|
130
|
-
"role": "implementer",
|
|
131
|
-
"executor": "pi",
|
|
132
|
-
"complexity": "HIGH",
|
|
133
|
-
"writePolicy": "exclusive",
|
|
134
|
-
"writeSet": [
|
|
135
|
-
"./src/workflows/dag/runner.ts"
|
|
136
|
-
],
|
|
137
|
-
"allowedPaths": [
|
|
138
|
-
"./src/workflows/dag/**"
|
|
139
|
-
],
|
|
140
|
-
"forbiddenPaths": [
|
|
141
|
-
".harness/**",
|
|
142
|
-
"artifacts/**"
|
|
143
|
-
],
|
|
144
|
-
"outputContract": "Implementation summary with changed files, tests run, and residual risks.",
|
|
145
|
-
"subtask_prompt": "基于上游侦察结果,在 writeSet 范围内做最小必要改动并说明风险(若无需改动则输出 no-op 理由)。",
|
|
146
|
-
"toolProfile": "write"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"id": "review-pi",
|
|
150
|
-
"depends_on": [
|
|
151
|
-
"implement-core"
|
|
152
|
-
],
|
|
153
|
-
"role": "reviewer",
|
|
154
|
-
"executor": "pi",
|
|
155
|
-
"complexity": "MED",
|
|
156
|
-
"writePolicy": "read-only",
|
|
157
|
-
"allowedPaths": [
|
|
158
|
-
"./**",
|
|
159
|
-
"docs/**"
|
|
160
|
-
],
|
|
161
|
-
"forbiddenPaths": [
|
|
162
|
-
".harness/**",
|
|
163
|
-
"artifacts/**"
|
|
164
|
-
],
|
|
165
|
-
"outputContract": "Plain Markdown review summary; no file writes.",
|
|
166
|
-
"subtask_prompt": "审查上游实现与侦察结论是否一致,列出范围漂移、验证缺口与残余风险(只读,不改文件/文档/artifacts)。"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"id": "verify-shell",
|
|
170
|
-
"depends_on": [
|
|
171
|
-
"implement-core"
|
|
172
|
-
],
|
|
173
|
-
"role": "verifier",
|
|
174
|
-
"executor": "shell",
|
|
175
|
-
"complexity": "LOW",
|
|
176
|
-
"writePolicy": "read-only",
|
|
177
|
-
"allowedPaths": [
|
|
178
|
-
"./**"
|
|
179
|
-
],
|
|
180
|
-
"forbiddenPaths": [
|
|
181
|
-
".harness/**",
|
|
182
|
-
"artifacts/**"
|
|
183
|
-
],
|
|
184
|
-
"outputContract": "Archived shell verification stdout/stderr with exit codes; no worktree writes.",
|
|
185
|
-
"subtask_prompt": "Run deterministic loop-agent verification and archive command outputs.",
|
|
186
|
-
"shell": {
|
|
187
|
-
"preset": "loop-agent-standard-verify",
|
|
188
|
-
"cwd": ".",
|
|
189
|
-
"timeoutMs": 300000
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
]
|
|
193
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"title": "Hybrid DAG 示例:Pi 只读契约 + 并行侦察 + Pi 写入配置实现",
|
|
4
|
+
"objective": "演示 v2 hybrid DAG:Pi 节点返回只读契约/审查结论,Pi writer 节点通过 toolProfile=write 执行受控独占实现,shell 节点负责确定性验证。",
|
|
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 remains an explicit optional executor; no-Cursor environments 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 explicit exclusive write nodes"
|
|
24
|
+
],
|
|
25
|
+
"defaults": {
|
|
26
|
+
"executor": "pi",
|
|
27
|
+
"contextProfile": "slim",
|
|
28
|
+
"skills": [
|
|
29
|
+
"ai-engineering-context"
|
|
30
|
+
],
|
|
31
|
+
"writePolicy": "read-only"
|
|
32
|
+
},
|
|
33
|
+
"skillsByRole": {
|
|
34
|
+
"planner": [
|
|
35
|
+
"loop-agent"
|
|
36
|
+
],
|
|
37
|
+
"scout": [
|
|
38
|
+
"ai-engineering-context"
|
|
39
|
+
],
|
|
40
|
+
"implementer": [
|
|
41
|
+
"verification-before-completion"
|
|
42
|
+
],
|
|
43
|
+
"reviewer": [
|
|
44
|
+
"requesting-code-review"
|
|
45
|
+
],
|
|
46
|
+
"verifier": [
|
|
47
|
+
"verification-before-completion",
|
|
48
|
+
"systematic-debugging"
|
|
49
|
+
],
|
|
50
|
+
"closeout": [
|
|
51
|
+
"loop-agent",
|
|
52
|
+
"verification-before-completion"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"executorModels": {
|
|
56
|
+
"cursor": {
|
|
57
|
+
"LOW": "composer-2.5",
|
|
58
|
+
"MED": "composer-2.5",
|
|
59
|
+
"HIGH": "composer-2.5"
|
|
60
|
+
},
|
|
61
|
+
"pi": {
|
|
62
|
+
"LOW": "gpt-5.3-codex-spark",
|
|
63
|
+
"MED": "glm-5.2",
|
|
64
|
+
"HIGH": "gpt-5.5"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"tasks": [
|
|
68
|
+
{
|
|
69
|
+
"id": "contract-pi",
|
|
70
|
+
"depends_on": [],
|
|
71
|
+
"role": "planner",
|
|
72
|
+
"executor": "pi",
|
|
73
|
+
"complexity": "MED",
|
|
74
|
+
"writePolicy": "read-only",
|
|
75
|
+
"allowedPaths": [
|
|
76
|
+
"./**",
|
|
77
|
+
"docs/**"
|
|
78
|
+
],
|
|
79
|
+
"forbiddenPaths": [
|
|
80
|
+
".harness/**",
|
|
81
|
+
"artifacts/**"
|
|
82
|
+
],
|
|
83
|
+
"outputContract": "Plain Markdown implementation contract summary; no file writes.",
|
|
84
|
+
"subtask_prompt": "阅读 ./README.md 与 docs/agent-dag-runner.md,返回 10 行以内的实现契约摘要(只读分析 + 文档建议,不改代码/文档/artifacts)。指出是否适合并行 scout 与窄 writeSet。"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "scout-src",
|
|
88
|
+
"depends_on": [
|
|
89
|
+
"contract-pi"
|
|
90
|
+
],
|
|
91
|
+
"role": "scout",
|
|
92
|
+
"executor": "pi",
|
|
93
|
+
"complexity": "LOW",
|
|
94
|
+
"writePolicy": "read-only",
|
|
95
|
+
"allowedPaths": [
|
|
96
|
+
"./src/workflows/dag/**"
|
|
97
|
+
],
|
|
98
|
+
"forbiddenPaths": [
|
|
99
|
+
".harness/**",
|
|
100
|
+
"artifacts/**"
|
|
101
|
+
],
|
|
102
|
+
"outputContract": "Plain Markdown reconnaissance summary of DAG-related source modules; no file writes.",
|
|
103
|
+
"subtask_prompt": "只读审计 ./src/workflows/dag/ 中与 DAG 相关的模块,列出关键文件与职责(不要改文件)。"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "scout-tests",
|
|
107
|
+
"depends_on": [
|
|
108
|
+
"contract-pi"
|
|
109
|
+
],
|
|
110
|
+
"role": "scout",
|
|
111
|
+
"executor": "pi",
|
|
112
|
+
"complexity": "LOW",
|
|
113
|
+
"writePolicy": "read-only",
|
|
114
|
+
"allowedPaths": [
|
|
115
|
+
"./test/**"
|
|
116
|
+
],
|
|
117
|
+
"forbiddenPaths": [
|
|
118
|
+
".harness/**",
|
|
119
|
+
"artifacts/**"
|
|
120
|
+
],
|
|
121
|
+
"outputContract": "Plain Markdown test coverage gap summary; no file writes.",
|
|
122
|
+
"subtask_prompt": "只读审计 ./test/ 中与 dag-runner 相关的测试覆盖,列出缺口建议(不要改文件)。"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "implement-core",
|
|
126
|
+
"depends_on": [
|
|
127
|
+
"scout-src",
|
|
128
|
+
"scout-tests"
|
|
129
|
+
],
|
|
130
|
+
"role": "implementer",
|
|
131
|
+
"executor": "pi",
|
|
132
|
+
"complexity": "HIGH",
|
|
133
|
+
"writePolicy": "exclusive",
|
|
134
|
+
"writeSet": [
|
|
135
|
+
"./src/workflows/dag/runner.ts"
|
|
136
|
+
],
|
|
137
|
+
"allowedPaths": [
|
|
138
|
+
"./src/workflows/dag/**"
|
|
139
|
+
],
|
|
140
|
+
"forbiddenPaths": [
|
|
141
|
+
".harness/**",
|
|
142
|
+
"artifacts/**"
|
|
143
|
+
],
|
|
144
|
+
"outputContract": "Implementation summary with changed files, tests run, and residual risks.",
|
|
145
|
+
"subtask_prompt": "基于上游侦察结果,在 writeSet 范围内做最小必要改动并说明风险(若无需改动则输出 no-op 理由)。",
|
|
146
|
+
"toolProfile": "write"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "review-pi",
|
|
150
|
+
"depends_on": [
|
|
151
|
+
"implement-core"
|
|
152
|
+
],
|
|
153
|
+
"role": "reviewer",
|
|
154
|
+
"executor": "pi",
|
|
155
|
+
"complexity": "MED",
|
|
156
|
+
"writePolicy": "read-only",
|
|
157
|
+
"allowedPaths": [
|
|
158
|
+
"./**",
|
|
159
|
+
"docs/**"
|
|
160
|
+
],
|
|
161
|
+
"forbiddenPaths": [
|
|
162
|
+
".harness/**",
|
|
163
|
+
"artifacts/**"
|
|
164
|
+
],
|
|
165
|
+
"outputContract": "Plain Markdown review summary; no file writes.",
|
|
166
|
+
"subtask_prompt": "审查上游实现与侦察结论是否一致,列出范围漂移、验证缺口与残余风险(只读,不改文件/文档/artifacts)。"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "verify-shell",
|
|
170
|
+
"depends_on": [
|
|
171
|
+
"implement-core"
|
|
172
|
+
],
|
|
173
|
+
"role": "verifier",
|
|
174
|
+
"executor": "shell",
|
|
175
|
+
"complexity": "LOW",
|
|
176
|
+
"writePolicy": "read-only",
|
|
177
|
+
"allowedPaths": [
|
|
178
|
+
"./**"
|
|
179
|
+
],
|
|
180
|
+
"forbiddenPaths": [
|
|
181
|
+
".harness/**",
|
|
182
|
+
"artifacts/**"
|
|
183
|
+
],
|
|
184
|
+
"outputContract": "Archived shell verification stdout/stderr with exit codes; no worktree writes.",
|
|
185
|
+
"subtask_prompt": "Run deterministic loop-agent verification and archive command outputs.",
|
|
186
|
+
"shell": {
|
|
187
|
+
"preset": "loop-agent-standard-verify",
|
|
188
|
+
"cwd": ".",
|
|
189
|
+
"timeoutMs": 300000
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
@@ -0,0 +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,17 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 进度日志模板
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 日期 / 会话
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 变更内容
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 已验证项
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 新发现的 Bug / 技术债 / 漂移
|
|
10
10
|
|
|
11
11
|
- Bugs:
|
|
12
12
|
- Debt:
|
|
13
13
|
- Drift:
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## 已知缺口 / 风险
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## 推荐下一步
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 项目开工检查清单
|
|
2
2
|
|
|
3
|
-
- [ ]
|
|
4
|
-
- [ ]
|
|
5
|
-
- [ ]
|
|
6
|
-
- [ ]
|
|
7
|
-
- [ ]
|
|
8
|
-
- [ ]
|
|
9
|
-
- [ ]
|
|
3
|
+
- [ ] 确认 `pwd`
|
|
4
|
+
- [ ] 阅读 `README.md`、`harness.json`、`docs/README.md`
|
|
5
|
+
- [ ] 检查 `git status --short --branch`
|
|
6
|
+
- [ ] 确定单一工作块
|
|
7
|
+
- [ ] 从 `docs/verification-matrix.md` 选择验证命令
|
|
8
|
+
- [ ] 保留无关用户变更
|
|
9
|
+
- [ ] 非平凡工作时记录 handoff 证据
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# QA
|
|
1
|
+
# QA 报告模板
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 日期 / 会话
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 测试范围
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 相关 Contract / Plan
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 测试方法
|
|
10
10
|
|
|
11
11
|
- 自动化测试:
|
|
12
12
|
- 构建 / 类型检查:
|
|
13
13
|
- Smoke / 手工路径:
|
|
14
14
|
- 其他证据:
|
|
15
15
|
|
|
16
|
-
## Smoke /
|
|
16
|
+
## Smoke / 手工检查
|
|
17
17
|
|
|
18
18
|
- CLI smoke:
|
|
19
19
|
- DAG smoke:
|
|
@@ -21,22 +21,28 @@
|
|
|
21
21
|
- Executor smoke:
|
|
22
22
|
- 结果:pass / blocked / fail
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## 通过标准
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## 发现项
|
|
27
27
|
|
|
28
28
|
| ID | Severity | Finding | Evidence | Suggested Fix |
|
|
29
29
|
|----|----------|---------|----------|---------------|
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Failure Routing
|
|
32
|
+
|
|
33
|
+
| Run / Scenario | Raw Failure | DAG Normalized Category | Product-line Category | Recommended Follow-up | Evidence |
|
|
34
|
+
|---|---|---|---|---|---|
|
|
35
|
+
| | | | | | |
|
|
36
|
+
|
|
37
|
+
## 新发现的 Bug / 漂移
|
|
32
38
|
|
|
33
39
|
- 新发现 bug:
|
|
34
40
|
- 发现的契约漂移:
|
|
35
41
|
- 发现的文档/测试不一致:
|
|
36
42
|
|
|
37
|
-
##
|
|
43
|
+
## 最终结论
|
|
38
44
|
|
|
39
45
|
- 结论:pass / partial / fail
|
|
40
46
|
- 结论依据:
|
|
41
47
|
|
|
42
|
-
##
|
|
48
|
+
## 后续项
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# Sprint Contract
|
|
2
2
|
|
|
3
|
-
## Objective
|
|
3
|
+
## 目标(Objective)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
描述有边界的工作块。
|
|
6
6
|
|
|
7
|
-
## Deliverables
|
|
7
|
+
## 交付物(Deliverables)
|
|
8
8
|
|
|
9
9
|
-
|
|
10
10
|
|
|
11
|
-
## Non-goals
|
|
11
|
+
## 非目标(Non-goals)
|
|
12
12
|
|
|
13
13
|
-
|
|
14
14
|
|
|
15
|
-
## Verification
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
bash scripts/check-repo.sh
|
|
19
|
-
npm run typecheck
|
|
20
|
-
npm test
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Failure Conditions
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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
|
+
- 实现改动了无关文件
|