@tea-agent/loop-agent 0.9.0 → 0.10.0-alpha.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 +8 -0
- package/CHANGELOG.md +92 -11
- package/README.md +69 -5
- package/dist/application/dag/args.js +4 -14
- package/dist/application/dag/generate-task-dag.js +32 -2
- package/dist/application/dag/run-dag.js +1 -27
- package/dist/application/dag/validate-dag.js +2 -2
- package/dist/application/loop/run-action.js +0 -4
- package/dist/cli/command-definitions.js +7 -11
- package/dist/cli/program.js +9 -21
- package/dist/commands/cursor-prompt.js +42 -82
- package/dist/commands/dag-approve.js +36 -0
- package/dist/commands/dag-reconcile-run.js +118 -0
- package/dist/commands/delegate.js +75 -77
- package/dist/commands/doctor.js +0 -18
- package/dist/commands/init.js +60 -40
- package/dist/commands/instructions.js +7 -10
- package/dist/commands/loop.js +4 -20
- package/dist/executors/config-core.js +0 -51
- package/dist/executors/dag-pi-executor.js +1 -1
- package/dist/executors/dag.js +0 -1
- package/dist/executors/index.js +0 -2
- package/dist/executors/model-routing.js +9 -9
- package/dist/executors/shell-executor.js +1 -1
- package/dist/governance/checks.js +6 -3
- package/dist/governance/manifest-types.js +33 -2
- package/dist/infrastructure/harness/loop-action-store.js +0 -3
- package/dist/records/harvest.js +2 -23
- package/dist/records/one-shot-runs.js +1 -1
- package/dist/shared/artifacts-core.js +24 -5
- package/dist/shared/output-truncation.js +37 -0
- package/dist/shared/package-metadata.js +353 -0
- package/dist/{executors/cursor-executor.js → sidecars/cursor-prompt/executor.js} +2 -42
- package/dist/sidecars/cursor-prompt/index.js +3 -0
- package/dist/sidecars/cursor-prompt/stream.js +121 -0
- package/dist/task/config-types.js +29 -12
- package/dist/task/delegate.js +9 -21
- package/dist/task/runtime.js +1 -2
- package/dist/worker/cli.js +243 -0
- package/dist/worker/closeout/apply.js +73 -0
- package/dist/worker/closeout/preview.js +30 -0
- package/dist/worker/delivery/final-verification.js +194 -0
- package/dist/worker/delivery/git-transaction.js +354 -0
- package/dist/worker/delivery/package.js +502 -0
- package/dist/worker/feature/decision-loader.js +68 -0
- package/dist/worker/feature/discover.js +14 -0
- package/dist/worker/feature/next-action.js +74 -0
- package/dist/worker/feature/reducer.js +133 -0
- package/dist/worker/feature/review.js +502 -0
- package/dist/worker/feature/run.js +365 -0
- package/dist/worker/feature/types.js +1 -0
- package/dist/worker/follow-up/approve.js +270 -0
- package/dist/worker/follow-up/factory.js +234 -0
- package/dist/worker/follow-up/paths.js +25 -0
- package/dist/worker/follow-up/policy.js +26 -0
- package/dist/worker/follow-up/schema.js +93 -0
- package/dist/worker/follow-up/store.js +96 -0
- package/dist/worker/loop-agent/loop-agent-client.js +329 -126
- package/dist/worker/metrics/projector.js +139 -0
- package/dist/worker/observability/read-model.js +282 -15
- package/dist/worker/observe/paths.js +17 -5
- package/dist/worker/observe/static/app.js +443 -61
- package/dist/worker/observe/static/index.html +3 -1
- package/dist/worker/observe/static/styles.css +85 -18
- package/dist/worker/pool/run-store.js +14 -2
- package/dist/worker/pool/validation.js +59 -0
- package/dist/worker/preflight.js +49 -1
- package/dist/worker/report/morning-report.js +41 -6
- package/dist/worker/run-task/run-task.js +23 -13
- package/dist/worker/runner/run-ready.js +89 -11
- package/dist/worker/task-spec/schema.js +0 -1
- package/dist/workflows/dag/convergence/controller.js +1 -1
- package/dist/workflows/dag/executor-registry.js +0 -2
- package/dist/workflows/dag/governance-profile.js +10 -0
- package/dist/workflows/dag/init-hybrid.js +601 -26
- package/dist/workflows/dag/lifecycle.js +146 -0
- package/dist/workflows/dag/node-execution.js +64 -7
- package/dist/workflows/dag/prompt.js +16 -0
- package/dist/workflows/dag/report.js +2 -0
- package/dist/workflows/dag/runner.js +176 -119
- package/dist/workflows/dag/scheduler.js +7 -2
- package/dist/workflows/dag/skill-snapshot.js +527 -0
- package/dist/workflows/dag/types.js +45 -9
- package/dist/workflows/dag/validate.js +5 -8
- package/dist/workflows/loop/actions/dag-action.js +0 -2
- package/dist/workflows/loop/actions/shared.js +1 -1
- package/dist/workflows/loop/actions.js +14 -31
- package/dist/workflows/loop/benchmark.js +1 -1
- package/dist/workflows/loop/index.js +1 -1
- package/dist/workflows/loop/policy/auto-policy.js +22 -14
- package/dist/workflows/loop/policy/path-patterns.js +13 -0
- package/docs/README.md +35 -16
- package/docs/agent-dag-recovery-playbook.md +1 -1
- package/docs/architecture/README.md +26 -0
- package/docs/architecture/dag-execution.md +134 -0
- package/docs/architecture/evolution.md +52 -0
- package/docs/architecture/facts-and-state.md +58 -0
- package/docs/architecture/runtime-boundaries.md +41 -15
- package/docs/architecture/system-overview.md +93 -0
- package/docs/architecture/worker-and-feature.md +81 -0
- package/docs/cursor-prompt-sidecar.md +36 -0
- package/docs/decisions/README.md +13 -1
- package/docs/design/README.md +39 -13
- package/docs/development-principles.md +1 -1
- package/docs/exec-plans/active/README.md +2 -2
- package/docs/exec-plans/completed/README.md +14 -1
- package/docs/feature-workflow.md +44 -4
- package/docs/init-surface.manifest.json +63 -1
- package/docs/loop-agent-harness.md +65 -3
- package/docs/progress/README.md +27 -0
- package/docs/reports/README.md +74 -8
- package/docs/skills/README.md +2 -1
- package/docs/skills/vetted-skill-registry.md +2 -1
- package/docs/templates/agent-dag-report.schema.json +4 -2
- package/docs/templates/agent-dag.base.json +0 -5
- package/docs/templates/agent-dag.final-verification.json +0 -5
- package/docs/templates/agent-dag.schema.json +1 -2
- package/docs/templates/agent-dag.supervised-implementation.json +1 -6
- package/docs/templates/backend-test-dag.generate-pytest.prompt.md +131 -0
- package/docs/templates/backend-test-dag.json +213 -0
- package/docs/templates/backend-test-dag.retrospect.prompt.md +128 -0
- package/docs/templates/backend-test-dag.review-cases.prompt.md +85 -0
- package/docs/templates/frontend-design-contract.md +33 -0
- package/docs/templates/frontend-task-constraints.md +25 -0
- package/docs/templates/frontend-task-requirement.md +61 -0
- package/docs/templates/harness.schema.json +8 -5
- package/docs/templates/hybrid-dag.json +1 -6
- package/docs/templates/init-evolution-review.md +4 -2
- package/docs/templates/interactive-ui-round2-experiment.md +1 -1
- package/docs/templates/product-line/task.yaml +0 -1
- package/docs/templates/worker-dogfood-evidence.md +28 -0
- package/docs/templates/worker-dogfood-setup.md +20 -0
- package/docs/verification-matrix.md +17 -0
- package/examples/decision-gate-agent-dag.json +87 -33
- package/examples/example-dag.json +0 -5
- package/examples/hybrid-loop-agent-dag.json +0 -5
- package/harness.json +6 -11
- package/package.json +22 -44
- package/scripts/check-product-line-docs.sh +10 -3
- package/skills/agent-worker/SKILL.md +37 -0
- package/skills/agent-worker/references/agent-worker-operator.md +43 -0
- package/skills/frontend-design-review/SKILL.md +59 -0
- package/skills/frontend-design-review/references/review-checklist.md +37 -0
- package/skills/frontend-implementation/SKILL.md +48 -0
- package/skills/frontend-implementation/references/code-standards.md +34 -0
- package/skills/frontend-implementation/references/design-spec.md +46 -0
- package/skills/frontend-implementation/references/node-contracts.md +32 -0
- package/skills/frontend-review/SKILL.md +53 -0
- package/skills/frontend-review/references/review-findings.md +42 -0
- package/skills/frontend-verification/SKILL.md +40 -0
- package/skills/frontend-verification/references/verification-checklist.md +56 -0
- package/skills/grill-me/SKILL.md +10 -0
- package/skills/grill-with-docs/SKILL.md +88 -0
- package/skills/grill-with-docs/adr-format.md +47 -0
- package/skills/grill-with-docs/context-format.md +60 -0
- package/skills/init-capability-evolution/SKILL.md +1 -0
- package/skills/loop-agent/SKILL.md +11 -9
- package/skills/loop-agent/references/command-reference.md +28 -15
- package/skills/loop-agent/references/docs-converge.md +126 -0
- package/skills/loop-agent/references/harness-policy.md +7 -7
- package/skills/loop-agent/references/hybrid-dag.md +13 -15
- package/skills/loop-agent/references/long-running-loop.md +4 -6
- package/skills/loop-agent/references/multi-worktree.md +6 -6
- package/skills/loop-agent/references/orchestrator-and-interventions.md +3 -3
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +14 -11
- package/skills/using-git-worktrees/SKILL.md +215 -0
- package/dist/commands/cursor-worker.js +0 -43
- package/dist/cursor-worker-entry.js +0 -8
- package/dist/executors/cursor-artifacts.js +0 -33
- package/dist/executors/cursor-execution-log.js +0 -81
- package/dist/executors/cursor-executor-artifacts.js +0 -134
- package/dist/executors/cursor-run.js +0 -115
- package/dist/executors/cursor-tool.js +0 -94
- package/dist/executors/cursor-worker-client.js +0 -223
- package/dist/executors/cursor-worker-protocol.js +0 -18
- package/dist/executors/cursor-worker-server.js +0 -54
- package/dist/executors/cursor-worker.js +0 -3
- package/dist/executors/cursor.js +0 -6
- package/dist/executors/dag-cursor-executor.js +0 -87
- package/dist/workflows/loop/actions/cursor-fix.js +0 -191
- package/dist/workflows/loop/policy/cursor-fix-policy.js +0 -31
- package/docs/cursor-executor-usage.md +0 -25
- package/docs/dynamic-workflow-dag-engine-roadmap.md +0 -1749
|
@@ -10,10 +10,19 @@
|
|
|
10
10
|
"docs/README.md",
|
|
11
11
|
"docs/init-surface.manifest.json",
|
|
12
12
|
"docs/architecture/runtime-boundaries.md",
|
|
13
|
+
"docs/architecture/README.md",
|
|
14
|
+
"docs/architecture/system-overview.md",
|
|
15
|
+
"docs/architecture/dag-execution.md",
|
|
16
|
+
"docs/architecture/worker-and-feature.md",
|
|
17
|
+
"docs/architecture/facts-and-state.md",
|
|
18
|
+
"docs/architecture/evolution.md",
|
|
13
19
|
"docs/skills/README.md",
|
|
14
20
|
"docs/skills/vetted-skill-registry.md",
|
|
15
21
|
"docs/templates/init-evolution-review.md",
|
|
16
22
|
"docs/templates/production-readiness-checklist.md",
|
|
23
|
+
"docs/templates/frontend-task-requirement.md",
|
|
24
|
+
"docs/templates/frontend-task-constraints.md",
|
|
25
|
+
"docs/templates/frontend-design-contract.md",
|
|
17
26
|
"docs/templates/worker-dogfood-setup.md",
|
|
18
27
|
"docs/templates/worker-dogfood-evidence.md",
|
|
19
28
|
"docs/templates/harness.schema.json",
|
|
@@ -32,8 +41,11 @@
|
|
|
32
41
|
"scripts/check-task-pool-root.sh",
|
|
33
42
|
"docs/templates/agent-dag.schema.json",
|
|
34
43
|
"examples/example-dag.json",
|
|
44
|
+
"skills/agent-worker/SKILL.md",
|
|
45
|
+
"skills/agent-worker/references/agent-worker-operator.md",
|
|
35
46
|
"skills/loop-agent/SKILL.md",
|
|
36
47
|
"skills/loop-agent/references/command-reference.md",
|
|
48
|
+
"skills/loop-agent/references/docs-converge.md",
|
|
37
49
|
"skills/ai-engineering-context/SKILL.md",
|
|
38
50
|
"skills/verification-before-completion/SKILL.md",
|
|
39
51
|
"skills/systematic-debugging/SKILL.md",
|
|
@@ -42,7 +54,17 @@
|
|
|
42
54
|
"skills/test-driven-development/SKILL.md",
|
|
43
55
|
"skills/code-review-core/SKILL.md",
|
|
44
56
|
"skills/init-capability-evolution/SKILL.md",
|
|
45
|
-
"skills/webapp-testing/SKILL.md"
|
|
57
|
+
"skills/webapp-testing/SKILL.md",
|
|
58
|
+
"skills/frontend-implementation/SKILL.md",
|
|
59
|
+
"skills/frontend-implementation/references/node-contracts.md",
|
|
60
|
+
"skills/frontend-implementation/references/design-spec.md",
|
|
61
|
+
"skills/frontend-implementation/references/code-standards.md",
|
|
62
|
+
"skills/frontend-design-review/SKILL.md",
|
|
63
|
+
"skills/frontend-design-review/references/review-checklist.md",
|
|
64
|
+
"skills/frontend-review/SKILL.md",
|
|
65
|
+
"skills/frontend-review/references/review-findings.md",
|
|
66
|
+
"skills/frontend-verification/SKILL.md",
|
|
67
|
+
"skills/frontend-verification/references/verification-checklist.md"
|
|
46
68
|
],
|
|
47
69
|
"initFullRequired": [
|
|
48
70
|
"README.md",
|
|
@@ -56,6 +78,9 @@
|
|
|
56
78
|
"docs/loop-agent-harness.md",
|
|
57
79
|
"docs/templates/init-evolution-review.md",
|
|
58
80
|
"docs/templates/production-readiness-checklist.md",
|
|
81
|
+
"docs/templates/frontend-task-requirement.md",
|
|
82
|
+
"docs/templates/frontend-task-constraints.md",
|
|
83
|
+
"docs/templates/frontend-design-contract.md",
|
|
59
84
|
"docs/templates/worker-dogfood-setup.md",
|
|
60
85
|
"docs/templates/worker-dogfood-evidence.md",
|
|
61
86
|
"docs/templates/harness.schema.json",
|
|
@@ -70,6 +95,7 @@
|
|
|
70
95
|
"docs/templates/product-line/task.yaml",
|
|
71
96
|
"docs/templates/product-line/closeout.yaml",
|
|
72
97
|
"docs/templates/product-line/links.md",
|
|
98
|
+
"scripts/check-skill-entry.sh",
|
|
73
99
|
"scripts/check-product-line-docs.sh",
|
|
74
100
|
"scripts/check-repo.sh",
|
|
75
101
|
"scripts/ci-governance.sh",
|
|
@@ -78,8 +104,11 @@
|
|
|
78
104
|
".harness/prompts/analyze.md",
|
|
79
105
|
".harness/tasks",
|
|
80
106
|
".harness/dag-runs/active",
|
|
107
|
+
"skills/agent-worker/SKILL.md",
|
|
108
|
+
"skills/agent-worker/references/agent-worker-operator.md",
|
|
81
109
|
"skills/loop-agent/SKILL.md",
|
|
82
110
|
"skills/loop-agent/references/command-reference.md",
|
|
111
|
+
"skills/loop-agent/references/docs-converge.md",
|
|
83
112
|
"skills/ai-engineering-context/SKILL.md",
|
|
84
113
|
"skills/verification-before-completion/SKILL.md",
|
|
85
114
|
"skills/systematic-debugging/SKILL.md",
|
|
@@ -89,8 +118,21 @@
|
|
|
89
118
|
"skills/code-review-core/SKILL.md",
|
|
90
119
|
"skills/init-capability-evolution/SKILL.md",
|
|
91
120
|
"skills/webapp-testing/SKILL.md",
|
|
121
|
+
"skills/frontend-implementation/SKILL.md",
|
|
122
|
+
"skills/frontend-implementation/references/node-contracts.md",
|
|
123
|
+
"skills/frontend-implementation/references/design-spec.md",
|
|
124
|
+
"skills/frontend-implementation/references/code-standards.md",
|
|
125
|
+
"skills/frontend-design-review/SKILL.md",
|
|
126
|
+
"skills/frontend-design-review/references/review-checklist.md",
|
|
127
|
+
"skills/frontend-review/SKILL.md",
|
|
128
|
+
"skills/frontend-review/references/review-findings.md",
|
|
129
|
+
"skills/frontend-verification/SKILL.md",
|
|
130
|
+
"skills/frontend-verification/references/verification-checklist.md",
|
|
131
|
+
".agents/skills/agent-worker/SKILL.md",
|
|
132
|
+
".agents/skills/agent-worker/references/agent-worker-operator.md",
|
|
92
133
|
".agents/skills/loop-agent/SKILL.md",
|
|
93
134
|
".agents/skills/loop-agent/references/command-reference.md",
|
|
135
|
+
".agents/skills/loop-agent/references/docs-converge.md",
|
|
94
136
|
".agents/skills/ai-engineering-context/SKILL.md",
|
|
95
137
|
".agents/skills/verification-before-completion/SKILL.md",
|
|
96
138
|
".agents/skills/systematic-debugging/SKILL.md",
|
|
@@ -113,6 +155,9 @@
|
|
|
113
155
|
"docs/loop-agent-harness.md": "generated",
|
|
114
156
|
"docs/templates/init-evolution-review.md": "copied",
|
|
115
157
|
"docs/templates/production-readiness-checklist.md": "copied",
|
|
158
|
+
"docs/templates/frontend-task-requirement.md": "copied",
|
|
159
|
+
"docs/templates/frontend-task-constraints.md": "copied",
|
|
160
|
+
"docs/templates/frontend-design-contract.md": "copied",
|
|
116
161
|
"docs/templates/worker-dogfood-setup.md": "copied",
|
|
117
162
|
"docs/templates/worker-dogfood-evidence.md": "copied",
|
|
118
163
|
"docs/templates/harness.schema.json": "copied",
|
|
@@ -127,6 +172,7 @@
|
|
|
127
172
|
"docs/templates/product-line/task.yaml": "copied",
|
|
128
173
|
"docs/templates/product-line/closeout.yaml": "copied",
|
|
129
174
|
"docs/templates/product-line/links.md": "copied",
|
|
175
|
+
"scripts/check-skill-entry.sh": "generated",
|
|
130
176
|
"scripts/check-product-line-docs.sh": "copied",
|
|
131
177
|
"scripts/check-repo.sh": "generated",
|
|
132
178
|
"scripts/ci-governance.sh": "generated",
|
|
@@ -136,8 +182,11 @@
|
|
|
136
182
|
".harness/tasks": "directory",
|
|
137
183
|
".harness/dag-runs/active": "directory",
|
|
138
184
|
".harness/init-surface.json": "state",
|
|
185
|
+
"skills/agent-worker/SKILL.md": "copied",
|
|
186
|
+
"skills/agent-worker/references/agent-worker-operator.md": "copied",
|
|
139
187
|
"skills/loop-agent/SKILL.md": "copied",
|
|
140
188
|
"skills/loop-agent/references/command-reference.md": "copied",
|
|
189
|
+
"skills/loop-agent/references/docs-converge.md": "copied",
|
|
141
190
|
"skills/ai-engineering-context/SKILL.md": "copied",
|
|
142
191
|
"skills/verification-before-completion/SKILL.md": "copied",
|
|
143
192
|
"skills/systematic-debugging/SKILL.md": "copied",
|
|
@@ -147,8 +196,21 @@
|
|
|
147
196
|
"skills/code-review-core/SKILL.md": "copied",
|
|
148
197
|
"skills/init-capability-evolution/SKILL.md": "copied",
|
|
149
198
|
"skills/webapp-testing/SKILL.md": "copied",
|
|
199
|
+
"skills/frontend-implementation/SKILL.md": "copied",
|
|
200
|
+
"skills/frontend-implementation/references/node-contracts.md": "copied",
|
|
201
|
+
"skills/frontend-implementation/references/design-spec.md": "copied",
|
|
202
|
+
"skills/frontend-implementation/references/code-standards.md": "copied",
|
|
203
|
+
"skills/frontend-design-review/SKILL.md": "copied",
|
|
204
|
+
"skills/frontend-design-review/references/review-checklist.md": "copied",
|
|
205
|
+
"skills/frontend-review/SKILL.md": "copied",
|
|
206
|
+
"skills/frontend-review/references/review-findings.md": "copied",
|
|
207
|
+
"skills/frontend-verification/SKILL.md": "copied",
|
|
208
|
+
"skills/frontend-verification/references/verification-checklist.md": "copied",
|
|
209
|
+
".agents/skills/agent-worker/SKILL.md": "copied",
|
|
210
|
+
".agents/skills/agent-worker/references/agent-worker-operator.md": "copied",
|
|
150
211
|
".agents/skills/loop-agent/SKILL.md": "copied",
|
|
151
212
|
".agents/skills/loop-agent/references/command-reference.md": "copied",
|
|
213
|
+
".agents/skills/loop-agent/references/docs-converge.md": "copied",
|
|
152
214
|
".agents/skills/ai-engineering-context/SKILL.md": "copied",
|
|
153
215
|
".agents/skills/verification-before-completion/SKILL.md": "copied",
|
|
154
216
|
".agents/skills/systematic-debugging/SKILL.md": "copied",
|
|
@@ -10,21 +10,25 @@ loop-agent 提供结构化 agent 工作的本地 harness。
|
|
|
10
10
|
- `.harness/cache/` — 本地 runtime 缓存
|
|
11
11
|
- `.harness/live/` — 瞬态 live-session 文件
|
|
12
12
|
- `.harness/task-pool/` — `agent-worker` 的 Task Pool state、batch artifacts、failure handoffs 与 Observe events;它是 `.harness/` 内的独立 Worker runtime root,默认不提交
|
|
13
|
+
- `.harness/dag-runs/<lifecycle>/<run-id>/.runtime/skill-snapshot.json` — 该 run 实际使用的 resolved skill profile snapshot;由 state 中相对 ref 与原始 bytes SHA-256 锚定,随 lifecycle 目录整体迁移
|
|
13
14
|
|
|
14
15
|
## Skill 指令
|
|
15
16
|
|
|
16
17
|
- `skills/loop-agent/` — loop-agent 仓库自有的 skill 指令与参考资料
|
|
18
|
+
- `skills/agent-worker/` — Feature Packet、TaskSpec、Task Pool、controller pinning、自举 candidate canary 与 Worker recovery 的可选 outer-loop operator skill;不是 DAG node skill
|
|
17
19
|
- `skills/<skill-name>/` — DAG 模板引用的 skill 本地副本,含 supervised implementation 角色
|
|
18
20
|
- 历史 `skill/` 不再是必需仓库路径;runtime 查找仅为 `loop-agent` 保留兼容 fallback
|
|
19
21
|
|
|
20
22
|
## Package 资产
|
|
21
23
|
|
|
22
|
-
npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dist/`、`skills
|
|
24
|
+
npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dist/`、`skills/`(包括 `loop-agent` 与 `agent-worker`)、顶层 `docs/*.md`、`docs/templates/`、`examples/`、`harness.json`、`AGENTS.md`、`README.md`、`CHANGELOG.md`。
|
|
23
25
|
|
|
24
26
|
生成或历史的 task facts 不是 package 资产。`docs/progress/`、`docs/reports/`、`docs/exec-plans/`、`docs/decisions/` 下现有文件属于目标仓库历史;包只携带这些目录的 README。
|
|
25
27
|
|
|
26
28
|
从 npm 安装 `loop-agent` 并在其他项目使用时,DAG skill 指令按配置、用户或目标本地 skill 目录解析(若存在),再回退到包内 `skills/`。目标项目可添加本地 skills,但不必复制 loop-agent 源码历史或 `skills/` 目录即可使用默认 DAG 工作流。
|
|
27
29
|
|
|
30
|
+
`scripts/self-host-canary.mjs` 是源码仓库维护脚本,不进入 npm package `files`;安装后的 package 不把它作为用户命令 surface。
|
|
31
|
+
|
|
28
32
|
## harness.json Schema
|
|
29
33
|
|
|
30
34
|
`docs/templates/harness.schema.json` 是面向 IDE 的 `harness.json` JSON Schema。它用于补全字段、提示枚举值、解释 executor/model routing 配置,并尽早暴露拼写错误。
|
|
@@ -33,15 +37,73 @@ npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dis
|
|
|
33
37
|
|
|
34
38
|
`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
39
|
|
|
40
|
+
DAG run state 会记录 runner PID、hostname 和定期 heartbeat,并为节点记录最近活动时间。`loop-agent dag status` 和 `loop-agent dag doctor --run-id <run-id> --markdown` 会将同主机且 PID 已消失的运行识别为 `orphaned`,将进程仍在但 heartbeat 过期的运行识别为 `stale`,将 runner 存活但当前节点超过 5 分钟没有状态活动标记为 `node-quiet`;跨主机运行只标记为 `unknown-host`,不会据此判断远端进程死亡。Observe 使用同一组字段过滤活跃 DAG,并在详情中显示 lifecycle 与 liveness;`node-quiet` 仍视为活跃,只提示操作者检查 session events 和 executor logs。
|
|
41
|
+
|
|
42
|
+
Observe 和 `dag status` 还会给出 `effectiveStatus`、`stateConsistent` 与 `recoveryEligibility`。主状态以 lifecycle + canonical status + liveness 的综合判定为准,原始 `state.status` 只作为诊断事实展示。遇到历史 `paused/` 目录仍记录 `status=running`、或 active runner 已明确 `orphaned` 时,先运行只读检查:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
loop-agent dag reconcile-run --run-id <run-id>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
确认不应继续后,必须显式选择收口含义并填写原因:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
loop-agent dag reconcile-run --run-id <run-id> --action supersede --reason "implementation completed elsewhere"
|
|
52
|
+
loop-agent dag reconcile-run --run-id <run-id> --action abandon --reason "operator cancelled obsolete work"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
收口会保存 `reconciliation.json` 原始快照,将仍为 RUNNING 的节点标为 ERROR,并把 run 归档到 `completed/`;不会把未执行节点伪造成成功。同机 runner 仍存活、仅 `node-quiet`、heartbeat stale 但 PID 仍存在、跨主机或无法证明停止时都会拒绝收口。
|
|
56
|
+
|
|
57
|
+
DAG 节点的模型由 `executorModels[executor][complexity]` 路由。新 run 会将解析后的 Pi/Cursor 模型写入节点 state;Observe 读取历史 run 时会从 `run.json` 补算缺失模型。Shell 和 Static 节点不使用模型,因此模型列保持 `-`。
|
|
58
|
+
|
|
59
|
+
DAG agent 节点的输出语言由 `harness.json.workflowPolicy.dag.outputLanguage` 控制,支持 `zh-CN` 和 `en`。未配置时默认 `zh-CN`;`dag run-task` 会把配置写入生成的 DagSpec,手写 DagSpec 缺少该字段时 prompt envelope 同样默认中文。语言规则只约束说明、分析、报告、总结和文档正文,不翻译代码、命令、路径、标识符、JSON 字段、VERDICT 行及其他精确协议字面量。
|
|
60
|
+
|
|
61
|
+
新 DAG run(包括 dry-run 与 init-only)会在首次 state write 前冻结所有初始 Pi task、dynamic map child template 与 loop body template 的 resolved skill profiles。profile id 包含 ordered skills、learned-pattern mode 和两个 instruction budgets;后续节点只从 snapshot 建 prompt。snapshot/hash/binding/profile 不一致时节点进入 `ERROR` / `skill-snapshot-integrity`,executor 不调用,也不回退实时 skill。旧 run 只有在 ref 与 artifact 都不存在时,才可在 resume 前创建 `legacy-resume-backfill`,且该 mode 只证明剩余节点被固定。
|
|
62
|
+
|
|
36
63
|
## Command Surface
|
|
37
64
|
|
|
38
65
|
- `new-task`、`status`、`inspect`、`doctor`
|
|
39
|
-
- `dag run-task`、`dag validate`、`run-dag`、`dag report`、`dag resume`
|
|
66
|
+
- `dag run-task`、`dag validate`、`run-dag`、`dag report`、`dag resume`、`dag reconcile-run`
|
|
40
67
|
- `delegate`、`harvest`、`promote-run`、`closeout`
|
|
41
68
|
- `loop init`、`loop run`、`loop status`、`loop closeout`
|
|
42
69
|
- `pi-prompt`、`cursor-prompt`
|
|
43
70
|
- `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`
|
|
71
|
+
- `agent-worker feature review|run|verify-final|delivery|closeout|approve-followup`、`agent-worker task validate|explain-profile|retry|draft-followup`、`agent-worker batch run-ready`、`agent-worker report morning|metrics`、`agent-worker observe serve|snapshot`
|
|
72
|
+
|
|
73
|
+
## Feature Review
|
|
74
|
+
|
|
75
|
+
`agent-worker feature review --feature-dir <feature-dir> --repo <target-repo>` 是只读的 Feature 级决策入口。它复用 Feature Packet validation、task graph 和 `.harness/task-pool/` 事实,派生 `Draft`、`Ready`、`Running`、`NeedsAction`、`AwaitingQA`、`Deliverable`、`Closed`,同时展示 required AC 覆盖、阻塞、证据和唯一主行动。
|
|
76
|
+
|
|
77
|
+
默认输出按结果、原因、下一步、证据组织;`--json` 输出 schemaVersion 1 JSON。缺失或损坏的 Packet、state、JSONL 或 closeout 会暴露 validation error / projection warning,不会被误判为无数据、可交付或已关闭。该命令不写 Feature Packet、Task Pool 或 Git。
|
|
78
|
+
|
|
79
|
+
`agent-worker feature run --feature-dir <feature-dir> --repo <target-repo>` 是薄编排入口:先执行 Feature validation 和一次目标仓库 preflight,再复用 `runReadyTasks()` 推进 Ready Task,最后刷新 morning report、`.harness/task-pool/observability/snapshot.json` 与 Feature review。`--dry-run` 只读取 Packet/Task Pool 并列出 Ready IDs、步骤和预期产物。默认无 Git 授权时单次最多执行一个 Ready 写任务;checkpoint 模式可按 `--limit` 串行推进,并在每个 Task 后建立 clean boundary。
|
|
80
|
+
|
|
81
|
+
写入型 Worker 命令可传 `--expected-controller-version` 与 `--expected-controller-fingerprint`。`LoopAgentClient` 先把请求的 bin/PATH/npm shim 解析成冻结的绝对 launch spec,再校验 package name/version、binary SHA-256 和 portable package fingerprint;expected gate 在 materialize、Task Pool `Running` 或目标仓库写入前完成。预检后的命令使用该 launch spec,不会因 PATH、symlink 或安装内容变化而静默切换 controller。
|
|
82
|
+
|
|
83
|
+
`agent-worker feature verify-final` 在 clean Delivery HEAD 上以已完成的 `qa-execute` TaskSpec 运行独立最终 DAG,跳过 promotion/task closeout,避免 repo write 或 HEAD 移动,并原子生成 canonical QA aggregate 与 HEAD-bound final verification。`agent-worker feature delivery` 从同一 Git transaction 和 Task Pool facts 生成带 hash 的 manifest、Acceptance Coverage 与稳定 `PR.md`,拒绝 dirty/wrong branch、历史或 trailer 漂移、缺失 run/QA/final verification 和 required AC 缺口。`agent-worker feature closeout` 默认只读预览 gates;显式 `--apply --owner` 才原子写回 Closeout,并在 stale facts、写入或 post-validation 失败时恢复原状态。
|
|
84
|
+
|
|
85
|
+
Morning report 顶部和 Observe 首页直接消费共享 Feature read model,固定从 Status、Next Action、Why、Evidence 开始。`agent-worker report metrics --month YYYY-MM` 写入 `.harness/task-pool/artifacts/metrics/monthly-YYYY-MM.json|md`,每项指标保留分母、样本量、窗口和 missingData。
|
|
86
|
+
|
|
87
|
+
显式 `--git-mode checkpoint` 会在 clean preflight 后创建或复用受 transaction record 管理的 `agent/<feature-id>` 本地分支。成功任务只有在 changed/untracked/sensitive 与 TaskSpec allowed/forbidden audit 通过后才 commit;失败任务的 patch、inventory、untracked content 与 boundary audit 写入 `.harness/task-pool/artifacts/features/<feature-id>/git/failures/`,随后 reset/clean 到最近 checkpoint 并再次验证 clean。默认模式不触碰 Git;`--keep-failed-diff` 只保留现场并停止,不允许继续下一个写任务。任何模式都不授权 stash、push、remote PR 或 merge。
|
|
88
|
+
|
|
89
|
+
业务 Task 失败不会跳过报告与最终 review,但命令返回 `needs-action` 和非零退出码;`noReadyReason` 用于区分 Closed、Deliverable、AwaitingQA、NeedsAction、dependency blocked 与 empty。
|
|
90
|
+
|
|
91
|
+
## Versioned Self-hosting Canary
|
|
92
|
+
|
|
93
|
+
源码仓库使用下面的 repo-maintainer 命令验证隔离 candidate package 的确定性接棒:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm run self-host:canary -- --deterministic --output <evidence.json>
|
|
97
|
+
npm run self-host:canary -- --deterministic --tarball <candidate.tgz> --output <evidence.json>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
canary 会记录 tarball SHA-256、slot containment、两个 bin identity、由维护脚本独立计算并与候选实现交叉核对的 package fingerprint、每个 required check、skill mirror hashes、Feature dry-run、static/shell DAG run/report 以及 PATH trap。所有子进程都有硬超时;它删除 `HARNESS_ALLOW_ACTIVE_DAG_RUNS`,并要求 trap 中没有 `loop-agent`、`agent-worker` 或 `pi` 调用。`--live` 当前明确失败;deterministic canary 不包含 Pi/model/provider/cost 证明。
|
|
101
|
+
|
|
102
|
+
## Follow-up 决策与批准
|
|
103
|
+
|
|
104
|
+
`agent-worker task draft-followup <task-id> --worker-run-id <id> --feature-dir <feature-dir> --repo <target-repo>` 从失败 run、TaskSpec 和 task graph 生成 `FU-<parent>-NN` 决策产物。ProductBug/TestBug/FlakyTest/DependencyFailure 生成可批准 TaskDraft;连续两次 EnvFailure 生成 `ENV-CHECK-*`,单次只建议 retry;SpecUnclear/ContractMismatch/RiskyChange/NeedsHuman/Unknown 生成人工行动卡。产物与 evidence/index 位于 `.harness/task-pool/artifacts/features/<feature-id>/follow-ups/`;生成过程受 Feature lock 和 dedupe key 保护,不写 Feature Packet、Ready state 或原失败事实。新 run 会 supersede 同 parent 的旧 unresolved 产物,但不会删除历史。
|
|
105
|
+
|
|
106
|
+
人工批准只接受 TaskDraft;行动卡不能批准或进入 Ready。批准会校验 draft/evidence hash、repo/path containment、Feature baseline 和冲突,在 staging validation 后写 TaskSpec、graph、Ready、approval/index 与 event。rename、state、approval、index、event 五个故障点均有注入回滚测试;重复批准幂等复用首次结果。`--dry-run` 零写入,`--json` 失败保持 stdout JSON、stderr 无噪声和非零退出码。
|
|
45
107
|
|
|
46
108
|
## Worker Retry
|
|
47
109
|
|
package/docs/progress/README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
# 进度日志
|
|
2
2
|
|
|
3
3
|
本目录存放应超越聊天上下文的简洁 handoff 日志。
|
|
4
|
+
|
|
5
|
+
**索引职责**:本文件维护本目录**全量文件列表**。`docs/README.md` 只链到本 README。
|
|
6
|
+
|
|
7
|
+
## 近期要点(导读)
|
|
8
|
+
|
|
9
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md) — 活文档校准(Dynamic Workflow / 六个月 / ADR)
|
|
10
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md) — 文档治理与双树/索引收敛
|
|
11
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md) — Website 文档 IA 交接
|
|
12
|
+
- [`2026-07-13-dev-controller-001-implementation.md`](2026-07-13-dev-controller-001-implementation.md) — controller identity 实施
|
|
13
|
+
- [`2026-07-13-dev-snapshot-001-implementation.md`](2026-07-13-dev-snapshot-001-implementation.md) — skill snapshot 实施
|
|
14
|
+
- [`2026-07-13-dev-canary-001-implementation.md`](2026-07-13-dev-canary-001-implementation.md) — candidate canary 实施
|
|
15
|
+
|
|
16
|
+
## 全量列表(新→旧)
|
|
17
|
+
|
|
18
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md)
|
|
19
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md)
|
|
20
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md)
|
|
21
|
+
- [`2026-07-13-dev-snapshot-001-implementation.md`](2026-07-13-dev-snapshot-001-implementation.md)
|
|
22
|
+
- [`2026-07-13-dev-controller-001-implementation.md`](2026-07-13-dev-controller-001-implementation.md)
|
|
23
|
+
- [`2026-07-13-dev-canary-001-implementation.md`](2026-07-13-dev-canary-001-implementation.md)
|
|
24
|
+
- [`2026-07-12-pi-only-agent-runtime.md`](2026-07-12-pi-only-agent-runtime.md)
|
|
25
|
+
- [`2026-07-11-observe-dag-visualization.md`](2026-07-11-observe-dag-visualization.md)
|
|
26
|
+
- [`2026-07-11-m2-feature-delivery-loop.md`](2026-07-11-m2-feature-delivery-loop.md)
|
|
27
|
+
- [`2026-07-10-observe-ui-optimization.md`](2026-07-10-observe-ui-optimization.md)
|
|
28
|
+
- [`2026-07-04-dynamic-workflow-dag-engine.md`](2026-07-04-dynamic-workflow-dag-engine.md)
|
|
29
|
+
- [`2026-07-04-commander-cli-migration.md`](2026-07-04-commander-cli-migration.md)
|
|
30
|
+
- [`2026-07-02-loop-agent-subject-restructure.md`](2026-07-02-loop-agent-subject-restructure.md)
|
package/docs/reports/README.md
CHANGED
|
@@ -1,12 +1,78 @@
|
|
|
1
1
|
# 报告
|
|
2
2
|
|
|
3
|
-
本目录存放验证、审计、benchmark 与 closeout 报告。
|
|
3
|
+
本目录存放验证、审计、benchmark、init evolution 与 closeout 报告。
|
|
4
4
|
|
|
5
|
+
**索引职责**:本文件维护本目录**全量文件列表**。`docs/README.md` 只链到本 README,不再精选单篇 report。
|
|
6
|
+
|
|
7
|
+
查找约定:
|
|
8
|
+
|
|
9
|
+
- 按日期前缀浏览下方列表(新→旧)
|
|
10
|
+
- init surface 审查:文件名含 `init-evolution-review`
|
|
11
|
+
- 能力基线滚动分析:[`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md)(长文,非单次任务证据)
|
|
12
|
+
|
|
13
|
+
## 近期要点(导读,非权威全集)
|
|
14
|
+
|
|
15
|
+
- [`current-capability-summary.md`](current-capability-summary.md) — **活**能力摘要(新进展写这里 / CHANGELOG / 新 report)
|
|
16
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md) — 活文档校准(Dynamic Workflow / 六个月 / analysis 冻结 / ADR)
|
|
17
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md) — 文档治理扫描与索引/双树收敛
|
|
18
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md) — Website IA 与 docs-converge 收口
|
|
19
|
+
- [`2026-07-13-versioned-self-hosting-bootstrap.md`](2026-07-13-versioned-self-hosting-bootstrap.md) — 版本化自举证据
|
|
20
|
+
- [`2026-07-12-m2-completion-audit.md`](2026-07-12-m2-completion-audit.md) — 第二月完成审计
|
|
21
|
+
- [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md) — **已冻结**仓库能力基线快照(勿再当 CHANGELOG)
|
|
22
|
+
|
|
23
|
+
## 全量列表(新→旧)
|
|
24
|
+
|
|
25
|
+
- [`dogfood-preflight-static-20260709090443.md`](dogfood-preflight-static-20260709090443.md)
|
|
26
|
+
- [`current-capability-summary.md`](current-capability-summary.md)
|
|
27
|
+
- [`2026-07-14-website-docs-ia-init-evolution-review.md`](2026-07-14-website-docs-ia-init-evolution-review.md)
|
|
28
|
+
- [`2026-07-14-website-docs-ia-and-converge.md`](2026-07-14-website-docs-ia-and-converge.md)
|
|
29
|
+
- [`2026-07-14-docs-living-docs-calibration.md`](2026-07-14-docs-living-docs-calibration.md)
|
|
30
|
+
- [`2026-07-14-docs-governance-hygiene.md`](2026-07-14-docs-governance-hygiene.md)
|
|
31
|
+
- [`2026-07-13-versioned-self-hosting-init-evolution-review.md`](2026-07-13-versioned-self-hosting-init-evolution-review.md)
|
|
32
|
+
- [`2026-07-13-versioned-self-hosting-bootstrap.md`](2026-07-13-versioned-self-hosting-bootstrap.md)
|
|
33
|
+
- [`2026-07-13-frontend-verification-command-safety-init-evolution-review.md`](2026-07-13-frontend-verification-command-safety-init-evolution-review.md)
|
|
34
|
+
- [`2026-07-13-frontend-skill-contracts-init-evolution-review.md`](2026-07-13-frontend-skill-contracts-init-evolution-review.md)
|
|
5
35
|
- [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
|
|
6
|
-
- [`2026-07-
|
|
7
|
-
- [`2026-07-
|
|
8
|
-
- [`2026-07-
|
|
9
|
-
- [`2026-07-
|
|
10
|
-
- [`2026-07-
|
|
11
|
-
- [`2026-07-12-
|
|
12
|
-
- [`2026-07-
|
|
36
|
+
- [`2026-07-12-pi-only-agent-runtime-init-evolution-review.md`](2026-07-12-pi-only-agent-runtime-init-evolution-review.md)
|
|
37
|
+
- [`2026-07-12-observe-warm-console-redesign.md`](2026-07-12-observe-warm-console-redesign.md)
|
|
38
|
+
- [`2026-07-12-observe-dag-node-model.md`](2026-07-12-observe-dag-node-model.md)
|
|
39
|
+
- [`2026-07-12-observe-dag-node-model-init-evolution-review.md`](2026-07-12-observe-dag-node-model-init-evolution-review.md)
|
|
40
|
+
- [`2026-07-12-m2-completion-audit.md`](2026-07-12-m2-completion-audit.md)
|
|
41
|
+
- [`2026-07-12-m2-08-init-evolution-review.md`](2026-07-12-m2-08-init-evolution-review.md)
|
|
42
|
+
- [`2026-07-12-m2-08-dogfood-release-evidence.md`](2026-07-12-m2-08-dogfood-release-evidence.md)
|
|
43
|
+
- [`2026-07-12-m2-07-init-evolution-review.md`](2026-07-12-m2-07-init-evolution-review.md)
|
|
44
|
+
- [`2026-07-12-m2-06-init-evolution-review.md`](2026-07-12-m2-06-init-evolution-review.md)
|
|
45
|
+
- [`2026-07-12-m2-05-init-evolution-review.md`](2026-07-12-m2-05-init-evolution-review.md)
|
|
46
|
+
- [`2026-07-12-m2-04-init-evolution-review.md`](2026-07-12-m2-04-init-evolution-review.md)
|
|
47
|
+
- [`2026-07-12-m2-03-init-evolution-review.md`](2026-07-12-m2-03-init-evolution-review.md)
|
|
48
|
+
- [`2026-07-12-m2-02-init-evolution-review.md`](2026-07-12-m2-02-init-evolution-review.md)
|
|
49
|
+
- [`2026-07-12-init-evolution-strict-report-range.md`](2026-07-12-init-evolution-strict-report-range.md)
|
|
50
|
+
- [`2026-07-12-dag-state-reconciliation.md`](2026-07-12-dag-state-reconciliation.md)
|
|
51
|
+
- [`2026-07-12-dag-state-reconciliation-init-evolution-review.md`](2026-07-12-dag-state-reconciliation-init-evolution-review.md)
|
|
52
|
+
- [`2026-07-12-dag-output-language.md`](2026-07-12-dag-output-language.md)
|
|
53
|
+
- [`2026-07-12-dag-output-language-init-evolution-review.md`](2026-07-12-dag-output-language-init-evolution-review.md)
|
|
54
|
+
- [`2026-07-12-dag-liveness-recovery.md`](2026-07-12-dag-liveness-recovery.md)
|
|
55
|
+
- [`2026-07-12-dag-liveness-init-evolution-review.md`](2026-07-12-dag-liveness-init-evolution-review.md)
|
|
56
|
+
- [`2026-07-12-0.10.0-init-evolution-review.md`](2026-07-12-0.10.0-init-evolution-review.md)
|
|
57
|
+
- [`2026-07-11-task-pool-hard-cutover-init-evolution-review.md`](2026-07-11-task-pool-hard-cutover-init-evolution-review.md)
|
|
58
|
+
- [`2026-07-11-round3-worker-expansion.md`](2026-07-11-round3-worker-expansion.md)
|
|
59
|
+
- [`2026-07-11-round2-interactive-ui-experiment.md`](2026-07-11-round2-interactive-ui-experiment.md)
|
|
60
|
+
- [`2026-07-11-round2-init-evolution-review.md`](2026-07-11-round2-init-evolution-review.md)
|
|
61
|
+
- [`2026-07-11-observe-terminal-dag-kpi.md`](2026-07-11-observe-terminal-dag-kpi.md)
|
|
62
|
+
- [`2026-07-11-observe-dag-visualization.md`](2026-07-11-observe-dag-visualization.md)
|
|
63
|
+
- [`2026-07-11-m2-01-init-evolution-review.md`](2026-07-11-m2-01-init-evolution-review.md)
|
|
64
|
+
- [`2026-07-11-init-evolution-review.md`](2026-07-11-init-evolution-review.md)
|
|
65
|
+
- [`2026-07-11-commit-1d0f3b7-review.md`](2026-07-11-commit-1d0f3b7-review.md)
|
|
66
|
+
- [`2026-07-11-command-performance-followups.md`](2026-07-11-command-performance-followups.md)
|
|
67
|
+
- [`2026-07-11-command-performance-audit.md`](2026-07-11-command-performance-audit.md)
|
|
68
|
+
- [`2026-07-11-0.7.5-init-evolution-review.md`](2026-07-11-0.7.5-init-evolution-review.md)
|
|
69
|
+
- [`2026-07-10-session-events-dogfood.md`](2026-07-10-session-events-dogfood.md)
|
|
70
|
+
- [`2026-07-10-nightly-drill-round-1.md`](2026-07-10-nightly-drill-round-1.md)
|
|
71
|
+
- [`2026-07-10-nightly-drill-round-1-evidence.md`](2026-07-10-nightly-drill-round-1-evidence.md)
|
|
72
|
+
- [`2026-07-10-next-stage-dogfood-runs.md`](2026-07-10-next-stage-dogfood-runs.md)
|
|
73
|
+
- [`2026-07-10-init-evolution-review.md`](2026-07-10-init-evolution-review.md)
|
|
74
|
+
- [`2026-07-09-be-001-pi-real-run.md`](2026-07-09-be-001-pi-real-run.md)
|
|
75
|
+
- [`2026-07-05-website-docs-governance-multi-executor-dogfood.md`](2026-07-05-website-docs-governance-multi-executor-dogfood.md)
|
|
76
|
+
- [`2026-07-04-website-docs-dynamic-workflow-dogfood.md`](2026-07-04-website-docs-dynamic-workflow-dogfood.md)
|
|
77
|
+
- [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md)
|
|
78
|
+
- [`2026-06-06-pi-sdk-runtime-reuse-benchmark.md`](2026-06-06-pi-sdk-runtime-reuse-benchmark.md)
|
package/docs/skills/README.md
CHANGED
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
|
|
4
4
|
|
|
5
5
|
- `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
|
|
6
|
-
|
|
6
|
+
- `../../skills/agent-worker/SKILL.md` — optional outer-loop operator skill for Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canaries, and Worker recovery. Single DAG implementation or runtime repair stays with `loop-agent`; this skill is not a default DAG role skill.
|
|
7
|
+
- `../../scripts/check-skill-entry.sh` — validates both public skill entries, their required references, line budgets, and the `agent-worker` trigger vocabulary.
|
|
@@ -8,6 +8,7 @@ The entries below are local wrappers or existing local skills. They are not whol
|
|
|
8
8
|
|---|---|---|---|---|---|
|
|
9
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
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
|
+
| `agent-worker` | local operator skill | `skills/agent-worker/SKILL.md` | outer-loop operator only | never a default DAG role | Routes Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canary, and failure recovery. Must not launch recursively from DAG leaves or duplicate executor/kernel behavior. |
|
|
11
12
|
| `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
13
|
| `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
14
|
| `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
|
|
@@ -20,7 +21,7 @@ The entries below are local wrappers or existing local skills. They are not whol
|
|
|
20
21
|
## Vetting Rules
|
|
21
22
|
|
|
22
23
|
- Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
|
|
24
|
+
- `agent-worker` is explicitly outside default role mappings. Its trigger description must cover `agent-worker`, Feature Packet, TaskSpec, Task Pool, self-host/candidate and the `loop-agent` routing boundary; `scripts/check-skill-entry.sh` enforces this public entry contract.
|
|
23
25
|
- Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
|
|
24
26
|
- This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
|
|
25
27
|
- `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
|
|
26
|
-
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"order": { "type": "integer", "minimum": 0 },
|
|
329
329
|
"executor": {
|
|
330
330
|
"type": "string",
|
|
331
|
-
"enum": ["
|
|
331
|
+
"enum": ["pi", "shell", "static"]
|
|
332
332
|
},
|
|
333
333
|
"model": { "type": "string" },
|
|
334
334
|
"status": {
|
|
@@ -402,7 +402,9 @@
|
|
|
402
402
|
"finished",
|
|
403
403
|
"partial_failed",
|
|
404
404
|
"failed",
|
|
405
|
-
"paused"
|
|
405
|
+
"paused",
|
|
406
|
+
"superseded",
|
|
407
|
+
"abandoned"
|
|
406
408
|
]
|
|
407
409
|
},
|
|
408
410
|
"runDir": { "type": "string", "minLength": 1 },
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"description": "Executor-owned model routing template keyed by executor then complexity. Do not use legacy top-level models or defaults.model.",
|
|
60
60
|
"additionalProperties": false,
|
|
61
61
|
"properties": {
|
|
62
|
-
"cursor": { "$ref": "#/$defs/complexityModelMap" },
|
|
63
62
|
"pi": { "$ref": "#/$defs/complexityModelMap" }
|
|
64
63
|
}
|
|
65
64
|
},
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
"enum": ["LOW", "MED", "HIGH"]
|
|
78
77
|
},
|
|
79
78
|
"executor": {
|
|
80
|
-
"enum": ["
|
|
79
|
+
"enum": ["pi", "shell", "static"]
|
|
81
80
|
},
|
|
82
81
|
"toolProfile": {
|
|
83
82
|
"enum": ["read-only", "write"]
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"globalConstraints": [
|
|
23
23
|
"Replace every REPLACE/WITH/... placeholder with concrete repo paths before execution; do not leave template placeholders in production DAG JSON.",
|
|
24
24
|
"Do not commit from DAG nodes; main session inspects and commits after Decision Gate approval.",
|
|
25
|
-
"Use only existing executors: pi, shell, static
|
|
25
|
+
"Use only existing executors: pi, shell, static. Cursor is available only through the explicit cursor-prompt sidecar, never as a DAG executor. Pi writer nodes must set toolProfile=write.",
|
|
26
26
|
"Read-only nodes must not write repository files, including root artifacts/**.",
|
|
27
27
|
"Exclusive writer nodes must stay within declared writeSet.",
|
|
28
28
|
"Do not implement automatic retry/resume or mutate historical completed facts.",
|
|
@@ -73,11 +73,6 @@
|
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
"executorModels": {
|
|
76
|
-
"cursor": {
|
|
77
|
-
"LOW": "composer-2.5",
|
|
78
|
-
"MED": "composer-2.5",
|
|
79
|
-
"HIGH": "gpt-5.5"
|
|
80
|
-
},
|
|
81
76
|
"pi": {
|
|
82
77
|
"LOW": "gpt-5.3-codex-spark",
|
|
83
78
|
"MED": "glm-5.2",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Backend Test DAG Generate Pytest Prompt Template
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Use this prompt for a **pytest code generation** node: `executor: "pi"`, `role: "implementer"`, `toolProfile: "write"`, `writePolicy: "exclusive"`. The implementer converts reviewed backend functional test cases into pytest automation code with 1:1 traceability.
|
|
6
|
+
|
|
7
|
+
Do **not** create a new executor type. This is a standard `executor: pi` writer node.
|
|
8
|
+
|
|
9
|
+
## Recommended DAG Node Shape
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"id": "generate-backend-pytest-pi",
|
|
14
|
+
"depends_on": ["review-backend-cases-pi"],
|
|
15
|
+
"complexity": "HIGH",
|
|
16
|
+
"executor": "pi",
|
|
17
|
+
"role": "implementer",
|
|
18
|
+
"toolProfile": "write",
|
|
19
|
+
"writePolicy": "exclusive",
|
|
20
|
+
"writeSet": ["testcase/**"],
|
|
21
|
+
"allowedPaths": ["testcase/**"],
|
|
22
|
+
"forbiddenPaths": [".harness/**", "artifacts/**"],
|
|
23
|
+
"outputContract": "Pytest test files under tests/backend/ with 1:1 mapping to functional test case IDs. Summary lists generated files, test function count, and any skipped cases with reasons.",
|
|
24
|
+
"subtask_prompt_markdown": "./backend-test-dag.generate-pytest.prompt.md"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Prompt Body
|
|
29
|
+
|
|
30
|
+
You are the Backend Test DAG **pytest code generator**.
|
|
31
|
+
|
|
32
|
+
Your job is to convert reviewed backend functional test cases into pytest automation code. You are an implementer — write test files under `tests/backend/` only. Stay within `writeSet`. Do not write root `artifacts/**`.
|
|
33
|
+
|
|
34
|
+
### Mandatory First Line
|
|
35
|
+
|
|
36
|
+
The **first non-empty line** of your response must be a summary line:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Generated N pytest functions across M files under tests/backend/.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Inputs
|
|
43
|
+
|
|
44
|
+
1. **Reviewed test cases** — files under `testcase/md/` (approved by `review-backend-cases-pi` with `VERDICT: pass`).
|
|
45
|
+
2. **Source references** — `source/references/` for API specs, data models, database schemas.
|
|
46
|
+
3. **Target project conventions** — inspect `conftest.py`, `pytest.ini` / `pyproject.toml` pytest config, fixture patterns, existing test structure.
|
|
47
|
+
|
|
48
|
+
### Conversion Rules
|
|
49
|
+
|
|
50
|
+
#### File Naming
|
|
51
|
+
|
|
52
|
+
- Every test file must start with `test_` prefix (e.g. `test_order.py`, `test_user_api.py`)
|
|
53
|
+
- pytest collects tests from files matching `test_*.py` or `*_test.py` — use `test_` prefix exclusively
|
|
54
|
+
- Never create test files without the `test_` prefix
|
|
55
|
+
|
|
56
|
+
#### Write Boundary
|
|
57
|
+
|
|
58
|
+
- Only **create new** test script files under `testcase/`
|
|
59
|
+
- Do NOT modify existing files: `conftest.py`, `pytest.ini`, `pyproject.toml`, `setup.cfg`, `__init__.py`, or any other framework/config file
|
|
60
|
+
- If the project needs new fixtures, create them in new files (e.g. `testcase/conftest.py` if it does not exist), never edit existing ones
|
|
61
|
+
- Read existing framework files to understand conventions, but treat them as immutable
|
|
62
|
+
|
|
63
|
+
#### Naming Conflict Resolution
|
|
64
|
+
|
|
65
|
+
- If a file with the target name already exists under `testcase/`, add a numeric suffix: `test_order.py` → `test_order_01.py` → `test_order_02.py`
|
|
66
|
+
- Never overwrite or append to existing files — each test script must be a standalone file
|
|
67
|
+
- Check for existing files before writing; if `test_<module>.py` exists, use `test_<module>_01.py`
|
|
68
|
+
|
|
69
|
+
#### 1:1 Traceability
|
|
70
|
+
|
|
71
|
+
Every functional test case ID (`BE-<MODULE>-<NNN>`) must map to exactly one pytest function:
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
# test-cases/backend/BE-ORDER-001 → tests/backend/test_order.py
|
|
75
|
+
def test_BE_ORDER_001_create_order_with_valid_data():
|
|
76
|
+
"""BE-ORDER-001: Create order with valid request body."""
|
|
77
|
+
...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Function name: `test_<CASE_ID_with_underscores>` (e.g. `test_BE_ORDER_001_...`)
|
|
81
|
+
- Docstring first line: `<CASE_ID>: <Case Title>`
|
|
82
|
+
|
|
83
|
+
#### File Organization
|
|
84
|
+
|
|
85
|
+
- All test files go under `testcase/` directory in the host project root
|
|
86
|
+
- Group test files by MODULE segment: `BE-ORDER-*` → `testcase/test_order.py`, `BE-USER-*` → `testcase/test_user.py`
|
|
87
|
+
- Follow existing project conventions for import style, fixture scope
|
|
88
|
+
|
|
89
|
+
#### Fixture Strategy
|
|
90
|
+
|
|
91
|
+
- Reuse existing project fixtures from `conftest.py` when available
|
|
92
|
+
- Create new fixtures only when test data setup is complex or shared across cases
|
|
93
|
+
- Prefer `@pytest.fixture(scope="function")` for test isolation
|
|
94
|
+
- Use `@pytest.mark.parametrize` for boundary condition cases with multiple inputs
|
|
95
|
+
|
|
96
|
+
#### Test Integrity
|
|
97
|
+
|
|
98
|
+
- Tests verify implementation correctness — if a test fails, the implementation likely has a bug, not the test
|
|
99
|
+
- Do NOT weaken assertions, remove test cases, or modify test logic to make tests pass
|
|
100
|
+
- Do NOT add workarounds, skips, or try/except blocks to hide failures without explicit justification
|
|
101
|
+
- Report all failures honestly in the output; the downstream `execute-backend-pytest-shell` node captures exit codes and stdout/stderr as-is
|
|
102
|
+
|
|
103
|
+
#### Assertions
|
|
104
|
+
|
|
105
|
+
- Use `assert` statements, not `unittest` assertions
|
|
106
|
+
- Assert specific values, not just "no exception"
|
|
107
|
+
- For API tests: assert status code, response body keys, and specific field values
|
|
108
|
+
- For database tests: assert record state after operation
|
|
109
|
+
|
|
110
|
+
#### Markers
|
|
111
|
+
|
|
112
|
+
- `@pytest.mark.positive` — happy path cases
|
|
113
|
+
- `@pytest.mark.negative` — error/exception cases
|
|
114
|
+
- `@pytest.mark.boundary` — edge cases
|
|
115
|
+
- `@pytest.mark.<MODULE>` — module-specific marker (e.g. `@pytest.mark.order`)
|
|
116
|
+
|
|
117
|
+
#### Skip Policy
|
|
118
|
+
|
|
119
|
+
If a test case cannot be automated (requires external service not mockable, requires manual verification), add it with `@pytest.mark.skip(reason="...")` and document the reason. Do not omit the function — traceability requires it exists.
|
|
120
|
+
|
|
121
|
+
### Output Shape (after summary line)
|
|
122
|
+
|
|
123
|
+
After the mandatory summary line, provide:
|
|
124
|
+
|
|
125
|
+
1. **Generated Files** — list of files written under `tests/backend/`.
|
|
126
|
+
2. **Function Mapping Table** — `| Test Case ID | Pytest Function | File | Marker |`.
|
|
127
|
+
3. **Skipped Cases** — if any, list with reason.
|
|
128
|
+
4. **Conventions Observed** — note project fixtures/config discovered and followed.
|
|
129
|
+
5. **Residual Risks** — cases that may need manual verification or environment setup.
|
|
130
|
+
|
|
131
|
+
Do not include chain-of-thought. Do not write root `artifacts/**`.
|