@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.
- package/AGENTS.md +43 -24
- package/CHANGELOG.md +72 -44
- package/README.md +177 -164
- package/bin/loop-agent.js +21 -21
- package/dist/application/dag/args.js +6 -0
- package/dist/application/dag/generate-task-dag.js +5 -3
- package/dist/application/dag/run-dag.js +17 -1
- package/dist/application/dag/validate-dag.js +41 -0
- package/dist/cli/command-definitions.js +2 -2
- package/dist/cli/program.js +24 -4
- package/dist/commands/init.js +1036 -461
- package/dist/workflows/dag/dynamic-runtime/loop-until.js +2 -1
- package/dist/workflows/dag/dynamic-runtime/map.js +1 -0
- package/dist/workflows/dag/failure-routing.js +82 -0
- package/dist/workflows/dag/init-hybrid.js +3 -3
- package/dist/workflows/dag/lifecycle.js +95 -3
- package/dist/workflows/dag/report.js +73 -1
- package/dist/workflows/dag/skills.js +3 -3
- package/dist/workflows/dag/types.js +2 -0
- package/dist/workflows/dynamic/compile.js +11 -0
- package/dist/workflows/dynamic/spec.js +1 -0
- package/docs/README.md +50 -45
- package/docs/agent-dag-recovery-playbook.md +32 -6
- package/docs/agent-dag-runner.md +19 -17
- package/docs/architecture/runtime-boundaries.md +1 -1
- 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 +7 -9
- package/docs/exec-plans/completed/README.md +10 -8
- package/docs/feature-workflow.md +111 -109
- package/docs/harness-methodology-verification.md +18 -18
- package/docs/init-surface.manifest.json +175 -0
- 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/skills/README.md +6 -0
- package/docs/skills/vetted-skill-registry.md +26 -0
- 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/init-evolution-review.md +33 -0
- 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 +10 -8
- package/package.json +60 -58
- package/skills/code-review-core/SKILL.md +20 -0
- package/skills/codebase-scout/SKILL.md +19 -0
- package/skills/init-capability-evolution/SKILL.md +69 -0
- package/skills/loop-agent/SKILL.md +35 -35
- package/skills/loop-agent/references/command-reference.md +125 -65
- package/skills/loop-agent/references/harness-policy.md +30 -30
- package/skills/loop-agent/references/hybrid-dag.md +30 -30
- 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/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 +36 -0
- package/skills/test-driven-development/SKILL.md +20 -0
- package/skills/webapp-testing/SKILL.md +19 -0
package/docs/feature-workflow.md
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 功能工作流
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本文档区分两层:
|
|
4
4
|
|
|
5
|
-
- Session governance
|
|
6
|
-
- Runtime workflows
|
|
5
|
+
- **Session governance**:监督方(人/agent)如何组织一次工作会话
|
|
6
|
+
- **Runtime workflows**:`src/workflows/` 下代码实际执行的内容
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 默认会话协议
|
|
9
9
|
|
|
10
|
-
1. Orient
|
|
11
|
-
2. Select
|
|
12
|
-
3. Contract
|
|
13
|
-
4. Implement
|
|
14
|
-
5. Verify
|
|
15
|
-
6. Handoff
|
|
10
|
+
1. **Orient**:读 `README.md`、`harness.json` 与本 docs 索引
|
|
11
|
+
2. **Select**:选一个有限边界的工作块
|
|
12
|
+
3. **Contract**:写明交付物、非目标、完成标准、验证命令、失败条件
|
|
13
|
+
4. **Implement**:做最小连贯变更,同步更新必要文档、脚本与测试
|
|
14
|
+
5. **Verify**:按 `verification-matrix.md` 跑命令;完成声明用新鲜输出
|
|
15
|
+
6. **Handoff**:在 `docs/progress/`、`docs/reports/`、exec plan 或 ADR 中记录证据
|
|
16
16
|
|
|
17
17
|
## Orient
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
先理解当前系统,不要默认「没有」:
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
21
|
+
- 读 `harness.json` 列出的仓库入口
|
|
22
|
+
- 查 `git status --short --branch` 与最近提交
|
|
23
|
+
- 新增结构前搜索现有源码、测试、脚本、文档与模板
|
|
24
|
+
- 任务依赖健康基线时跑最小基线检查
|
|
25
|
+
- 涉及 TDD、完成声明或调试时读方法论文档
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
基线已坏时,记录失败命令,并决定当前块是修基线还是在明确范围内接受已知失败。
|
|
28
28
|
|
|
29
29
|
## Select
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
工作块要窄到可验证。避免无关重构、功能与文档迁移混在一起。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
选中的块应有:
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
35
|
+
- 单一用户可见或维护者可见结果
|
|
36
|
+
- 委托写工作时显式 allowed paths
|
|
37
|
+
- 已知非目标
|
|
38
|
+
- 能证明结果的验证命令
|
|
39
39
|
|
|
40
40
|
## Contract
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
非平凡工作应在实现前写或更新 execution plan、sprint contract、progress log 或 issue 级笔记。Contract 应包含:
|
|
43
43
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
44
|
+
- 交付物
|
|
45
|
+
- 非目标
|
|
46
|
+
- 验收标准
|
|
47
|
+
- 验证命令
|
|
48
|
+
- 失败条件
|
|
49
|
+
- 预期更新的 artifacts
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Bug 修复的 contract 应含复现路径,以及证明修复的回归测试或 smoke check。
|
|
52
52
|
|
|
53
53
|
## Implement
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
做满足 contract 的最小连贯变更。
|
|
56
56
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
57
|
+
- 优先现有 helper 与目录边界
|
|
58
|
+
- 行为变更更新测试
|
|
59
|
+
- 工作流或命令变更更新文档与示例
|
|
60
|
+
- 治理变更更新 `harness.json`、检查脚本或模板
|
|
61
|
+
- 不把占位实现当作已完成
|
|
62
|
+
- 重复约束出现时固化为持久产物
|
|
63
63
|
|
|
64
64
|
## Verify
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
验证是完成权威。
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
68
|
+
- 用 `docs/verification-matrix.md` 选最窄的证明命令
|
|
69
|
+
- 完整重跑命令
|
|
70
|
+
- 读 exit code 与输出
|
|
71
|
+
- 修失败或报告确切失败状态
|
|
72
|
+
- 不用陈旧输出或部分检查声明完成
|
|
73
73
|
|
|
74
74
|
## Agent DAG First
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
loop-agent new-task <task-id> "Task title"
|
|
80
|
-
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
81
|
-
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
82
|
-
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`<temp-dir>`
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
1. `dag run-task`
|
|
90
|
-
2. `dag validate`
|
|
91
|
-
3. `run-dag`
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```text
|
|
96
|
-
contract-pi
|
|
97
|
-
-> scout-src + scout-tests
|
|
98
|
-
-> plan-pi
|
|
99
|
-
-> implement-pi
|
|
100
|
-
-> verify-pi
|
|
101
|
-
-> closeout-pi
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
`implement-pi`
|
|
105
|
-
|
|
106
|
-
|
|
76
|
+
复杂实现优先 DAG 工作流:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
loop-agent new-task <task-id> "Task title"
|
|
80
|
+
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
81
|
+
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
82
|
+
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`<temp-dir>` 为平台原生临时目录。macOS/Windows 上实际文件操作用原生路径;`/` 仅用于稳定 repo 引用、JSON/Markdown 证据引用和 glob 约定。
|
|
86
|
+
|
|
87
|
+
这不是线性 OS-CIVH runtime 状态机。代码里 DAG 有三个命令阶段:
|
|
88
|
+
|
|
89
|
+
1. `dag run-task` 加载 `.harness/tasks/<task-id>/source/需求.md`、可选 `执行约束.md`、`task.json` 与 adapter 验证命令,写出 DAG spec
|
|
90
|
+
2. `dag validate` 校验 schema、依赖、governance profile、写边界、model routing、shell 验证元数据
|
|
91
|
+
3. `run-dag` 加载 DAG、按拓扑排序为 ranks、有界并发执行可运行节点、持久化到 `.harness/dag-runs/<lifecycle>/<run-id>/`,并转入 `completed` 或 `paused`
|
|
92
|
+
|
|
93
|
+
标准生成的 hybrid DAG 默认无 Cursor:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
contract-pi
|
|
97
|
+
-> scout-src + scout-tests
|
|
98
|
+
-> plan-pi
|
|
99
|
+
-> implement-pi
|
|
100
|
+
-> verify-pi
|
|
101
|
+
-> closeout-pi
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`implement-pi` 使用 `executor: "pi"` 与 `toolProfile: "write"`。当 `harness.json` 显式禁用 Pi 并启用 Cursor 时,实现与修复 writer 节点改用 `implement-cursor` / `repair-cursor`。
|
|
105
|
+
|
|
106
|
+
review-gated 模板插入:
|
|
107
107
|
|
|
108
108
|
```text
|
|
109
109
|
verify-pi -> review-pi -> review-gate-shell -> closeout-pi
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
supervised 模板在实现路径上增加 write-set audit、soft/hard shell 验证、process supervision、有界 repair、decision gates 与可选 convergence retry。
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
源码参考:
|
|
115
115
|
|
|
116
116
|
- `src/commands/dag-run-task.ts`
|
|
117
117
|
- `src/commands/dag-validate.ts`
|
|
@@ -119,34 +119,36 @@ Source references:
|
|
|
119
119
|
- `src/workflows/dag/init-hybrid.ts`
|
|
120
120
|
- `src/workflows/dag/runner.ts`
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
监督 agent 仍负责:
|
|
123
|
+
|
|
124
|
+
- 写 contract
|
|
125
|
+
- 限定 allowed/forbidden paths
|
|
126
|
+
- 审查 DAG/writeSet 范围
|
|
127
|
+
- 选择验证命令
|
|
128
|
+
- 记录 handoff 证据
|
|
123
129
|
|
|
124
|
-
-
|
|
125
|
-
- bounding allowed and forbidden paths
|
|
126
|
-
- reviewing DAG/writeSet scope
|
|
127
|
-
- selecting verification commands
|
|
128
|
-
- recording handoff evidence
|
|
130
|
+
声称 Production Readiness v0.1 的低/中风险单仓库任务,另须遵循 `docs/production-readiness.md` 与 `docs/templates/production-readiness-checklist.md`。该标准冻结支持范围、非目标、必需 DAG 证据、failure routing 字段与最终验证门禁。
|
|
129
131
|
|
|
130
|
-
##
|
|
132
|
+
## 已移除的顺序工作流
|
|
131
133
|
|
|
132
|
-
|
|
134
|
+
历史 Level 1 顺序 command surface 已从公开工作流移除。新工作不要用 `loop-agent run analyze|plan|spec|implement|verify|retrospective|auto|loop|continue|study`。
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
改用 DAG 路径:
|
|
135
137
|
|
|
136
|
-
```bash
|
|
137
|
-
loop-agent new-task <task-id> "Task title"
|
|
138
|
-
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
139
|
-
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
140
|
-
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
141
|
-
```
|
|
138
|
+
```bash
|
|
139
|
+
loop-agent new-task <task-id> "Task title"
|
|
140
|
+
loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
|
|
141
|
+
loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
|
|
142
|
+
loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
|
|
143
|
+
```
|
|
142
144
|
|
|
143
|
-
|
|
145
|
+
遗留 `.harness/tasks/<task-id>/.workflow_state.json` 在 task status 完全迁移到 DAG 导向读模型前仍可读,但不是新任务完成的权威。
|
|
144
146
|
|
|
145
147
|
## Outer Loop Runtime
|
|
146
148
|
|
|
147
|
-
|
|
149
|
+
`loop` 命令是长跑任务控制层,与会话治理协议不是一回事。它记录 rounds 与 signals,可跑 shell 验证、Pi review、Cursor 修复或 DAG action,并选择下一自动 action。
|
|
148
150
|
|
|
149
|
-
|
|
151
|
+
支持的 loop actions:
|
|
150
152
|
|
|
151
153
|
- `shell-verify`
|
|
152
154
|
- `pi-review`
|
|
@@ -156,29 +158,29 @@ Supported loop actions are:
|
|
|
156
158
|
- `add-signal`
|
|
157
159
|
- `closeout`
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
源码参考:
|
|
160
162
|
|
|
161
163
|
- `src/commands/loop.ts`
|
|
162
164
|
- `src/workflows/loop/actions.ts`
|
|
163
165
|
- `src/workflows/loop/state.ts`
|
|
164
166
|
- `src/workflows/loop/rounds.ts`
|
|
165
167
|
|
|
166
|
-
##
|
|
168
|
+
## 调试与 TDD
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
任务需要时使用方法论文档:
|
|
169
171
|
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
172
|
+
- 行为变更与 bug 修复:`docs/harness-methodology-tdd.md`
|
|
173
|
+
- 完成或 handoff 声明:`docs/harness-methodology-verification.md`
|
|
174
|
+
- 失败与意外行为:`docs/harness-methodology-debugging.md`
|
|
173
175
|
|
|
174
176
|
## Handoff
|
|
175
177
|
|
|
176
|
-
|
|
178
|
+
Handoff 应说明:
|
|
177
179
|
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
180
|
+
- 改了什么
|
|
181
|
+
- 有意未做什么
|
|
182
|
+
- 跑了哪些验证命令
|
|
183
|
+
- 是否影响契约、文档、测试或脚本
|
|
184
|
+
- 剩余风险或后续工作
|
|
183
185
|
|
|
184
|
-
|
|
186
|
+
较大工作应更新 `docs/progress/`、`docs/reports/`、active exec plan 或 `docs/decisions/`,以便下一会话不依赖聊天历史。
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 验证方法论
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
完成声明需要当前证据。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 门禁函数
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
2.
|
|
9
|
-
3.
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
7
|
+
1. 确定能证明声明的命令
|
|
8
|
+
2. 完整运行该命令
|
|
9
|
+
3. 读输出与 exit code
|
|
10
|
+
4. 修失败或报告确切失败状态
|
|
11
|
+
5. 然后再声明结果
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 常见门禁
|
|
14
14
|
|
|
15
|
-
|
|
|
15
|
+
| 声明 | 命令 |
|
|
16
16
|
|---|---|
|
|
17
|
-
|
|
|
18
|
-
| TypeScript
|
|
19
|
-
|
|
|
20
|
-
|
|
|
17
|
+
| 治理有效 | `bash scripts/check-repo.sh` |
|
|
18
|
+
| TypeScript 编译通过 | `npm run typecheck` |
|
|
19
|
+
| 行为有覆盖 | `npm test` |
|
|
20
|
+
| 完整本地交付有效 | `bash scripts/ci.sh` |
|
|
21
21
|
|
|
22
22
|
## Red Flags
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
24
|
+
- 凭意图声明完成
|
|
25
|
+
- 依赖陈旧命令输出
|
|
26
|
+
- 用窄检查支撑宽声明
|
|
27
|
+
- 跳过失败命令的细节
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"description": "Machine-checked contract for files that must remain available through npm packaging and target-project initialization.",
|
|
4
|
+
"packageRequired": [
|
|
5
|
+
"AGENTS.md",
|
|
6
|
+
"CHANGELOG.md",
|
|
7
|
+
"README.md",
|
|
8
|
+
"harness.json",
|
|
9
|
+
"bin/loop-agent.js",
|
|
10
|
+
"docs/README.md",
|
|
11
|
+
"docs/init-surface.manifest.json",
|
|
12
|
+
"docs/architecture/runtime-boundaries.md",
|
|
13
|
+
"docs/skills/README.md",
|
|
14
|
+
"docs/skills/vetted-skill-registry.md",
|
|
15
|
+
"docs/templates/init-evolution-review.md",
|
|
16
|
+
"docs/templates/production-readiness-checklist.md",
|
|
17
|
+
"docs/templates/agent-dag.schema.json",
|
|
18
|
+
"examples/example-dag.json",
|
|
19
|
+
"skills/loop-agent/SKILL.md",
|
|
20
|
+
"skills/loop-agent/references/command-reference.md",
|
|
21
|
+
"skills/ai-engineering-context/SKILL.md",
|
|
22
|
+
"skills/verification-before-completion/SKILL.md",
|
|
23
|
+
"skills/systematic-debugging/SKILL.md",
|
|
24
|
+
"skills/requesting-code-review/SKILL.md",
|
|
25
|
+
"skills/codebase-scout/SKILL.md",
|
|
26
|
+
"skills/test-driven-development/SKILL.md",
|
|
27
|
+
"skills/code-review-core/SKILL.md",
|
|
28
|
+
"skills/init-capability-evolution/SKILL.md",
|
|
29
|
+
"skills/webapp-testing/SKILL.md"
|
|
30
|
+
],
|
|
31
|
+
"initFullRequired": [
|
|
32
|
+
"README.md",
|
|
33
|
+
"AGENTS.md",
|
|
34
|
+
"harness.json",
|
|
35
|
+
"docs/README.md",
|
|
36
|
+
"docs/development-principles.md",
|
|
37
|
+
"docs/feature-workflow.md",
|
|
38
|
+
"docs/verification-matrix.md",
|
|
39
|
+
"docs/loop-agent-harness.md",
|
|
40
|
+
"docs/templates/init-evolution-review.md",
|
|
41
|
+
"docs/templates/production-readiness-checklist.md",
|
|
42
|
+
"scripts/check-repo.sh",
|
|
43
|
+
"scripts/ci-governance.sh",
|
|
44
|
+
"scripts/ci-tests.sh",
|
|
45
|
+
"scripts/ci.sh",
|
|
46
|
+
".harness/prompts/analyze.md",
|
|
47
|
+
".harness/tasks",
|
|
48
|
+
".harness/dag-runs/active",
|
|
49
|
+
"skills/loop-agent/SKILL.md",
|
|
50
|
+
"skills/loop-agent/references/command-reference.md",
|
|
51
|
+
"skills/ai-engineering-context/SKILL.md",
|
|
52
|
+
"skills/verification-before-completion/SKILL.md",
|
|
53
|
+
"skills/systematic-debugging/SKILL.md",
|
|
54
|
+
"skills/requesting-code-review/SKILL.md",
|
|
55
|
+
"skills/codebase-scout/SKILL.md",
|
|
56
|
+
"skills/test-driven-development/SKILL.md",
|
|
57
|
+
"skills/code-review-core/SKILL.md",
|
|
58
|
+
"skills/init-capability-evolution/SKILL.md",
|
|
59
|
+
"skills/webapp-testing/SKILL.md"
|
|
60
|
+
],
|
|
61
|
+
"initSurface": {
|
|
62
|
+
"README.md": "managed-block",
|
|
63
|
+
"AGENTS.md": "managed-block",
|
|
64
|
+
"harness.json": "generated",
|
|
65
|
+
"docs/README.md": "generated",
|
|
66
|
+
"docs/development-principles.md": "generated",
|
|
67
|
+
"docs/feature-workflow.md": "generated",
|
|
68
|
+
"docs/verification-matrix.md": "generated",
|
|
69
|
+
"docs/loop-agent-harness.md": "generated",
|
|
70
|
+
"docs/templates/init-evolution-review.md": "copied",
|
|
71
|
+
"docs/templates/production-readiness-checklist.md": "copied",
|
|
72
|
+
"scripts/check-repo.sh": "generated",
|
|
73
|
+
"scripts/ci-governance.sh": "generated",
|
|
74
|
+
"scripts/ci-tests.sh": "generated",
|
|
75
|
+
"scripts/ci.sh": "generated",
|
|
76
|
+
".harness/prompts/analyze.md": "generated",
|
|
77
|
+
".harness/tasks": "directory",
|
|
78
|
+
".harness/dag-runs/active": "directory",
|
|
79
|
+
".harness/init-surface.json": "state",
|
|
80
|
+
"skills/loop-agent/SKILL.md": "copied",
|
|
81
|
+
"skills/loop-agent/references/command-reference.md": "copied",
|
|
82
|
+
"skills/ai-engineering-context/SKILL.md": "copied",
|
|
83
|
+
"skills/verification-before-completion/SKILL.md": "copied",
|
|
84
|
+
"skills/systematic-debugging/SKILL.md": "copied",
|
|
85
|
+
"skills/requesting-code-review/SKILL.md": "copied",
|
|
86
|
+
"skills/codebase-scout/SKILL.md": "copied",
|
|
87
|
+
"skills/test-driven-development/SKILL.md": "copied",
|
|
88
|
+
"skills/code-review-core/SKILL.md": "copied",
|
|
89
|
+
"skills/init-capability-evolution/SKILL.md": "copied",
|
|
90
|
+
"skills/webapp-testing/SKILL.md": "copied"
|
|
91
|
+
},
|
|
92
|
+
"packageExcluded": [
|
|
93
|
+
"docs/progress/20*.md",
|
|
94
|
+
"docs/reports/20*.md",
|
|
95
|
+
"docs/exec-plans/active/20*.md",
|
|
96
|
+
"docs/exec-plans/completed/20*.md"
|
|
97
|
+
],
|
|
98
|
+
"initExcluded": [
|
|
99
|
+
"examples/example-dag.json",
|
|
100
|
+
"docs/skills/vetted-skill-registry.md"
|
|
101
|
+
],
|
|
102
|
+
"reviewTriggers": [
|
|
103
|
+
"AGENTS.md",
|
|
104
|
+
"README.md",
|
|
105
|
+
"CHANGELOG.md",
|
|
106
|
+
"harness.json",
|
|
107
|
+
"package.json",
|
|
108
|
+
"src/commands/init.ts",
|
|
109
|
+
"src/workflows/dag/skills.ts",
|
|
110
|
+
"src/workflows/dag/init-hybrid.ts",
|
|
111
|
+
"src/workflows/dag/skill-instructions.ts",
|
|
112
|
+
"docs/templates/**",
|
|
113
|
+
"docs/skills/**",
|
|
114
|
+
"skills/**",
|
|
115
|
+
"scripts/**"
|
|
116
|
+
],
|
|
117
|
+
"evolutionReview": {
|
|
118
|
+
"defaultMode": "advisory",
|
|
119
|
+
"strictReportGlob": "docs/reports/*-init-evolution-review.md",
|
|
120
|
+
"tiers": [
|
|
121
|
+
{
|
|
122
|
+
"name": "model-review",
|
|
123
|
+
"severity": "high",
|
|
124
|
+
"strictRequiresReport": true,
|
|
125
|
+
"description": "Changes that may alter target-project initialization behavior, default DAG role skills, skill resolution, or package/init contracts.",
|
|
126
|
+
"patterns": [
|
|
127
|
+
"src/commands/init.ts",
|
|
128
|
+
"src/workflows/dag/skills.ts",
|
|
129
|
+
"src/workflows/dag/init-hybrid.ts",
|
|
130
|
+
"src/workflows/dag/skill-instructions.ts",
|
|
131
|
+
"src/workflows/dag/prompt.ts",
|
|
132
|
+
"src/workflows/dag/node-execution.ts",
|
|
133
|
+
"docs/init-surface.manifest.json",
|
|
134
|
+
"package.json",
|
|
135
|
+
"harness.json",
|
|
136
|
+
"AGENTS.md",
|
|
137
|
+
"README.md"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "surface-check",
|
|
142
|
+
"severity": "medium",
|
|
143
|
+
"strictRequiresReport": false,
|
|
144
|
+
"description": "Asset surface changes that usually need deterministic package/init smoke checks but not a model review when the checks pass.",
|
|
145
|
+
"patterns": [
|
|
146
|
+
"skills/**",
|
|
147
|
+
"docs/templates/**",
|
|
148
|
+
"docs/skills/**",
|
|
149
|
+
"scripts/check-init-surface.sh",
|
|
150
|
+
"scripts/check-repo.sh"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "advisory",
|
|
155
|
+
"severity": "low",
|
|
156
|
+
"strictRequiresReport": false,
|
|
157
|
+
"description": "Documentation and user-facing guidance changes that should be considered but should not slow normal iteration.",
|
|
158
|
+
"patterns": [
|
|
159
|
+
"CHANGELOG.md",
|
|
160
|
+
"website/docs/**",
|
|
161
|
+
"docs/*.md",
|
|
162
|
+
"docs/architecture/**"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"modelReviewQuestions": [
|
|
167
|
+
"Does this change alter files or guidance produced by loop-agent init --profile full --merge?",
|
|
168
|
+
"Does a new or changed skill need to be bundled, projected to target projects, or documented as optional only?",
|
|
169
|
+
"Do target-project AGENTS.md, README managed blocks, governance docs, templates, or script matrix need updates?",
|
|
170
|
+
"Does package.json files include every static asset required by the runtime and init projection?",
|
|
171
|
+
"Does docs/init-surface.manifest.json still match the intended package and init surface?",
|
|
172
|
+
"Do older initialized target projects need a migration note, manual copy guidance, or future init audit/update support?"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
# loop-agent Harness
|
|
2
2
|
|
|
3
|
-
loop-agent
|
|
4
|
-
|
|
5
|
-
## Runtime
|
|
6
|
-
|
|
7
|
-
- `.harness/tasks/`
|
|
8
|
-
- `.harness/dag-runs/`
|
|
9
|
-
- `.harness/runs/`
|
|
10
|
-
- `.harness/cache/`
|
|
11
|
-
- `.harness/live/`
|
|
12
|
-
|
|
13
|
-
## Skill
|
|
14
|
-
|
|
15
|
-
- `skills/loop-agent/`
|
|
16
|
-
- `skills/<skill-name>/`
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
## Package
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Command
|
|
28
|
-
|
|
29
|
-
- `new-task
|
|
30
|
-
- `dag run-task
|
|
31
|
-
- `delegate
|
|
32
|
-
- `loop init
|
|
33
|
-
- `pi-prompt
|
|
34
|
-
- `docs audit
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
|
|
3
|
+
loop-agent 提供结构化 agent 工作的本地 harness。
|
|
4
|
+
|
|
5
|
+
## Runtime 区域
|
|
6
|
+
|
|
7
|
+
- `.harness/tasks/` — task source、约束、state、loop facts
|
|
8
|
+
- `.harness/dag-runs/` — DAG run state 与 artifacts
|
|
9
|
+
- `.harness/runs/` — one-shot tool run 证据
|
|
10
|
+
- `.harness/cache/` — 本地 runtime 缓存
|
|
11
|
+
- `.harness/live/` — 瞬态 live-session 文件
|
|
12
|
+
|
|
13
|
+
## Skill 指令
|
|
14
|
+
|
|
15
|
+
- `skills/loop-agent/` — loop-agent 仓库自有的 skill 指令与参考资料
|
|
16
|
+
- `skills/<skill-name>/` — DAG 模板引用的 skill 本地副本,含 supervised implementation 角色
|
|
17
|
+
- 历史 `skill/` 不再是必需仓库路径;runtime 查找仅为 `loop-agent` 保留兼容 fallback
|
|
18
|
+
|
|
19
|
+
## Package 资产
|
|
20
|
+
|
|
21
|
+
npm 包包含运行与说明 harness 所需的静态能力资产:`bin/`、`dist/`、`skills/`、顶层 `docs/*.md`、`docs/templates/`、`examples/`、`harness.json`、`AGENTS.md`、`README.md`、`CHANGELOG.md`。
|
|
22
|
+
|
|
23
|
+
生成或历史的 task facts 不是 package 资产。`docs/progress/`、`docs/reports/`、`docs/exec-plans/`、`docs/decisions/` 下现有文件属于目标仓库历史;包只携带这些目录的 README。
|
|
24
|
+
|
|
25
|
+
从 npm 安装 `loop-agent` 并在其他项目使用时,DAG skill 指令按配置、用户或目标本地 skill 目录解析(若存在),再回退到包内 `skills/`。目标项目可添加本地 skills,但不必复制 loop-agent 源码历史或 `skills/` 目录即可使用默认 DAG 工作流。
|
|
26
|
+
|
|
27
|
+
## Command Surface
|
|
28
|
+
|
|
29
|
+
- `new-task`、`status`、`inspect`、`doctor`
|
|
30
|
+
- `dag run-task`、`dag validate`、`run-dag`、`dag report`、`dag resume`
|
|
31
|
+
- `delegate`、`harvest`、`promote-run`、`closeout`
|
|
32
|
+
- `loop init`、`loop run`、`loop status`、`loop closeout`
|
|
33
|
+
- `pi-prompt`、`cursor-prompt`
|
|
34
|
+
- `docs audit`、`handoff check`、`spine audit`、`knowledge curate`
|
|
35
|
+
|
|
36
|
+
## 验证 Preset
|
|
37
|
+
|
|
38
|
+
Shell preset `loop-agent-standard-verify` 跑 typecheck 与聚焦 DAG 测试。完整交付仍应使用:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
bash scripts/ci.sh
|