@tea-agent/loop-agent 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/AGENTS.md +43 -24
  2. package/CHANGELOG.md +72 -44
  3. package/README.md +177 -164
  4. package/bin/loop-agent.js +21 -21
  5. package/dist/application/dag/args.js +6 -0
  6. package/dist/application/dag/generate-task-dag.js +5 -3
  7. package/dist/application/dag/run-dag.js +17 -1
  8. package/dist/application/dag/validate-dag.js +41 -0
  9. package/dist/cli/command-definitions.js +2 -2
  10. package/dist/cli/program.js +24 -4
  11. package/dist/commands/init.js +1036 -461
  12. package/dist/workflows/dag/dynamic-runtime/loop-until.js +2 -1
  13. package/dist/workflows/dag/dynamic-runtime/map.js +1 -0
  14. package/dist/workflows/dag/failure-routing.js +82 -0
  15. package/dist/workflows/dag/init-hybrid.js +3 -3
  16. package/dist/workflows/dag/lifecycle.js +95 -3
  17. package/dist/workflows/dag/report.js +73 -1
  18. package/dist/workflows/dag/skills.js +3 -3
  19. package/dist/workflows/dag/types.js +2 -0
  20. package/dist/workflows/dynamic/compile.js +11 -0
  21. package/dist/workflows/dynamic/spec.js +1 -0
  22. package/docs/README.md +50 -45
  23. package/docs/agent-dag-recovery-playbook.md +32 -6
  24. package/docs/agent-dag-runner.md +19 -17
  25. package/docs/architecture/runtime-boundaries.md +1 -1
  26. package/docs/cursor-executor-usage.md +5 -5
  27. package/docs/decisions/README.md +2 -2
  28. package/docs/design/README.md +24 -24
  29. package/docs/development-principles.md +50 -50
  30. package/docs/dynamic-workflow-dag-engine-roadmap.md +6 -6
  31. package/docs/exec-plans/README.md +4 -4
  32. package/docs/exec-plans/active/README.md +7 -9
  33. package/docs/exec-plans/completed/README.md +10 -8
  34. package/docs/feature-workflow.md +111 -109
  35. package/docs/harness-methodology-verification.md +18 -18
  36. package/docs/init-surface.manifest.json +175 -0
  37. package/docs/loop-agent-harness.md +36 -36
  38. package/docs/production-readiness.md +96 -0
  39. package/docs/progress/README.md +2 -2
  40. package/docs/reports/README.md +4 -2
  41. package/docs/skills/README.md +6 -0
  42. package/docs/skills/vetted-skill-registry.md +26 -0
  43. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +1 -1
  44. package/docs/templates/agent-dag-process-supervisor.prompt.md +2 -2
  45. package/docs/templates/agent-dag-report.schema.json +33 -2
  46. package/docs/templates/agent-dag-review-verdict.prompt.md +1 -1
  47. package/docs/templates/agent-dag.base.json +195 -195
  48. package/docs/templates/agent-dag.final-verification.json +190 -190
  49. package/docs/templates/agent-dag.schema.json +17 -17
  50. package/docs/templates/agent-dag.supervised-implementation.json +500 -500
  51. package/docs/templates/hybrid-dag.json +193 -193
  52. package/docs/templates/init-evolution-review.md +33 -0
  53. package/docs/templates/production-readiness-checklist.md +57 -0
  54. package/docs/templates/progress-log.md +7 -7
  55. package/docs/templates/project-start-checklist.md +8 -8
  56. package/docs/templates/qa-report.md +17 -11
  57. package/docs/templates/sprint-contract.md +19 -19
  58. package/docs/verification-matrix.md +37 -26
  59. package/examples/example-dag.json +51 -51
  60. package/examples/hybrid-loop-agent-dag.json +194 -194
  61. package/harness.json +10 -8
  62. package/package.json +60 -58
  63. package/skills/code-review-core/SKILL.md +20 -0
  64. package/skills/codebase-scout/SKILL.md +19 -0
  65. package/skills/init-capability-evolution/SKILL.md +69 -0
  66. package/skills/loop-agent/SKILL.md +35 -35
  67. package/skills/loop-agent/references/command-reference.md +125 -65
  68. package/skills/loop-agent/references/harness-policy.md +30 -30
  69. package/skills/loop-agent/references/hybrid-dag.md +30 -30
  70. package/skills/loop-agent/references/model-routing.md +1 -1
  71. package/skills/loop-agent/references/orchestrator-and-interventions.md +1 -1
  72. package/skills/loop-agent/references/pi-prompt.md +9 -9
  73. package/skills/loop-agent/references/post-implementation-and-patterns.md +7 -7
  74. package/skills/loop-agent/references/task-workflow.md +19 -19
  75. package/skills/loop-agent/references/verification-and-failure-handling.md +36 -0
  76. package/skills/test-driven-development/SKILL.md +20 -0
  77. package/skills/webapp-testing/SKILL.md +19 -0
@@ -1,117 +1,117 @@
1
- # Feature Workflow
1
+ # 功能工作流
2
2
 
3
- This document separates two layers:
3
+ 本文档区分两层:
4
4
 
5
- - Session governance: how the supervising human/agent should structure a work session.
6
- - Runtime workflows: what the code actually executes under `src/workflows/`.
5
+ - **Session governance**:监督方(人/agent)如何组织一次工作会话
6
+ - **Runtime workflows**:`src/workflows/` 下代码实际执行的内容
7
7
 
8
- ## Default Session Protocol
8
+ ## 默认会话协议
9
9
 
10
- 1. Orient: read `README.md`, `harness.json`, and this docs index.
11
- 2. Select: choose one bounded work block.
12
- 3. Contract: state deliverables, non-goals, completion criteria, verification commands, and failure conditions.
13
- 4. Implement: make the smallest coherent change and update required docs, scripts, and tests.
14
- 5. Verify: run commands from `verification-matrix.md`; use fresh output for any completion claim.
15
- 6. Handoff: record evidence in `docs/progress/`, `docs/reports/`, an exec plan, or an ADR when useful.
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
- Start by understanding the current system rather than assuming absence:
19
+ 先理解当前系统,不要默认「没有」:
20
20
 
21
- - read the repository entrypoints listed in `harness.json`
22
- - check `git status --short --branch` and recent commits
23
- - search existing source, tests, scripts, docs, and templates before adding new structure
24
- - run the smallest baseline check if the task depends on a healthy baseline
25
- - read methodology docs when the task involves TDD, verification claims, or debugging
21
+ - `harness.json` 列出的仓库入口
22
+ - `git status --short --branch` 与最近提交
23
+ - 新增结构前搜索现有源码、测试、脚本、文档与模板
24
+ - 任务依赖健康基线时跑最小基线检查
25
+ - 涉及 TDD、完成声明或调试时读方法论文档
26
26
 
27
- If the baseline is already broken, record the failing command and decide whether the current work block is to repair the baseline or to proceed with a clearly scoped known failure.
27
+ 基线已坏时,记录失败命令,并决定当前块是修基线还是在明确范围内接受已知失败。
28
28
 
29
29
  ## Select
30
30
 
31
- Keep a work block narrow enough to verify. Avoid combining unrelated refactors, features, and documentation migrations.
31
+ 工作块要窄到可验证。避免无关重构、功能与文档迁移混在一起。
32
32
 
33
- A selected block should have:
33
+ 选中的块应有:
34
34
 
35
- - a single user-visible or maintainer-visible outcome
36
- - explicit allowed paths when delegating write work
37
- - known non-goals
38
- - a verification command that can prove the result
35
+ - 单一用户可见或维护者可见结果
36
+ - 委托写工作时显式 allowed paths
37
+ - 已知非目标
38
+ - 能证明结果的验证命令
39
39
 
40
40
  ## Contract
41
41
 
42
- For non-trivial work, write or update an execution plan, sprint contract, progress log, or issue-sized note before implementation. The contract should state:
42
+ 非平凡工作应在实现前写或更新 execution plansprint contractprogress log issue 级笔记。Contract 应包含:
43
43
 
44
- - deliverables
45
- - non-goals
46
- - acceptance criteria
47
- - verification commands
48
- - failure conditions
49
- - expected artifacts to update
44
+ - 交付物
45
+ - 非目标
46
+ - 验收标准
47
+ - 验证命令
48
+ - 失败条件
49
+ - 预期更新的 artifacts
50
50
 
51
- For bug fixes, the contract should include the reproduction path and the regression test or smoke check that proves the fix.
51
+ Bug 修复的 contract 应含复现路径,以及证明修复的回归测试或 smoke check
52
52
 
53
53
  ## Implement
54
54
 
55
- Make the smallest coherent change that satisfies the contract.
55
+ 做满足 contract 的最小连贯变更。
56
56
 
57
- - Prefer existing helpers and directory boundaries.
58
- - Update tests for behavior changes.
59
- - Update docs and examples for workflow or command changes.
60
- - Update `harness.json`, check scripts, or templates for governance changes.
61
- - Do not submit placeholder implementations as completed work.
62
- - When a repeated constraint appears, promote it into a durable artifact.
57
+ - 优先现有 helper 与目录边界
58
+ - 行为变更更新测试
59
+ - 工作流或命令变更更新文档与示例
60
+ - 治理变更更新 `harness.json`、检查脚本或模板
61
+ - 不把占位实现当作已完成
62
+ - 重复约束出现时固化为持久产物
63
63
 
64
64
  ## Verify
65
65
 
66
- Verification is the completion authority.
66
+ 验证是完成权威。
67
67
 
68
- - Use `docs/verification-matrix.md` to choose the narrowest proving command.
69
- - Run the full command fresh.
70
- - Read the exit code and output.
71
- - Fix failures or report the exact failing state.
72
- - Do not claim completion from stale output or partial checks.
68
+ - `docs/verification-matrix.md` 选最窄的证明命令
69
+ - 完整重跑命令
70
+ - exit code 与输出
71
+ - 修失败或报告确切失败状态
72
+ - 不用陈旧输出或部分检查声明完成
73
73
 
74
74
  ## Agent DAG First
75
75
 
76
- For complex implementation work, prefer the DAG workflow:
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>` means the platform-native temp directory. Use native paths for actual file operations on macOS and Windows; use `/` only for stable repo refs, JSON/Markdown evidence refs, and glob conventions.
86
-
87
- This is not a linear OS-CIVH runtime state machine. In code, DAG has three command phases:
88
-
89
- 1. `dag run-task` loads `.harness/tasks/<task-id>/source/需求.md`, optional `执行约束.md`, `task.json`, and adapter verification commands, then writes a DAG spec.
90
- 2. `dag validate` validates schema, dependencies, governance profile, write boundaries, model routing, and shell verification metadata.
91
- 3. `run-dag` loads the DAG, topologically sorts tasks into ranks, executes runnable nodes with bounded concurrency, persists `.harness/dag-runs/<lifecycle>/<run-id>/`, and transfers the run to `completed` or `paused`.
92
-
93
- The standard generated hybrid DAG defaults to no-Cursor execution:
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` uses `executor: "pi"` with `toolProfile: "write"`. When `harness.json` explicitly disables Pi and enables Cursor, the implementation and repair writer nodes use `implement-cursor` / `repair-cursor` instead.
105
-
106
- The review-gated template inserts:
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 routingshell 验证元数据
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
- The supervised template adds write-set audit, soft/hard shell verification, process supervision, bounded repair, decision gates, and optional convergence retry passes around the implementation path.
112
+ supervised 模板在实现路径上增加 write-set auditsoft/hard shell 验证、process supervision、有界 repairdecision gates 与可选 convergence retry
113
113
 
114
- Source references:
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
- The supervising agent remains responsible for:
122
+ 监督 agent 仍负责:
123
+
124
+ - 写 contract
125
+ - 限定 allowed/forbidden paths
126
+ - 审查 DAG/writeSet 范围
127
+ - 选择验证命令
128
+ - 记录 handoff 证据
123
129
 
124
- - writing the contract
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
- ## Removed Sequential Workflow
132
+ ## 已移除的顺序工作流
131
133
 
132
- The historical Level 1 sequential command surface has been removed from the public workflow. Do not use `loop-agent run analyze|plan|spec|implement|verify|retrospective|auto|loop|continue|study` for new work.
134
+ 历史 Level 1 顺序 command surface 已从公开工作流移除。新工作不要用 `loop-agent run analyze|plan|spec|implement|verify|retrospective|auto|loop|continue|study`。
133
135
 
134
- Use the DAG path instead:
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
- Legacy `.harness/tasks/<task-id>/.workflow_state.json` files may still be read for compatibility until task status is fully migrated to the DAG-oriented read model. They are not the authority for new task completion.
145
+ 遗留 `.harness/tasks/<task-id>/.workflow_state.json` task status 完全迁移到 DAG 导向读模型前仍可读,但不是新任务完成的权威。
144
146
 
145
147
  ## Outer Loop Runtime
146
148
 
147
- The `loop` command is a long-running task-control layer, not the same thing as the session governance protocol. It records rounds and signals, can run shell verification, Pi review, Cursor fixes, or DAG actions, and can choose the next automatic action.
149
+ `loop` 命令是长跑任务控制层,与会话治理协议不是一回事。它记录 rounds signals,可跑 shell 验证、Pi reviewCursor 修复或 DAG action,并选择下一自动 action
148
150
 
149
- Supported loop actions are:
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
- Source references:
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
- ## Debugging And TDD
168
+ ## 调试与 TDD
167
169
 
168
- Use the methodology docs when the task demands it:
170
+ 任务需要时使用方法论文档:
169
171
 
170
- - behavior changes and bug fixes: `docs/harness-methodology-tdd.md`
171
- - completion or handoff claims: `docs/harness-methodology-verification.md`
172
- - failures and unexpected behavior: `docs/harness-methodology-debugging.md`
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
- A handoff should state:
178
+ Handoff 应说明:
177
179
 
178
- - what changed
179
- - what was intentionally left out
180
- - which verification commands ran
181
- - whether contracts, docs, tests, or scripts were affected
182
- - any remaining risks or follow-up work
180
+ - 改了什么
181
+ - 有意未做什么
182
+ - 跑了哪些验证命令
183
+ - 是否影响契约、文档、测试或脚本
184
+ - 剩余风险或后续工作
183
185
 
184
- For substantial work, update `docs/progress/`, `docs/reports/`, the active exec plan, or `docs/decisions/` so the next session can resume without relying on chat history.
186
+ 较大工作应更新 `docs/progress/`、`docs/reports/`、active exec plan `docs/decisions/`,以便下一会话不依赖聊天历史。
@@ -1,27 +1,27 @@
1
- # Verification Methodology
1
+ # 验证方法论
2
2
 
3
- Completion claims require current evidence.
3
+ 完成声明需要当前证据。
4
4
 
5
- ## Gate Function
5
+ ## 门禁函数
6
6
 
7
- 1. Identify the command that proves the claim.
8
- 2. Run the full command.
9
- 3. Read the output and exit code.
10
- 4. Fix failures or report the exact failing state.
11
- 5. Only then claim the result.
7
+ 1. 确定能证明声明的命令
8
+ 2. 完整运行该命令
9
+ 3. 读输出与 exit code
10
+ 4. 修失败或报告确切失败状态
11
+ 5. 然后再声明结果
12
12
 
13
- ## Common Gates
13
+ ## 常见门禁
14
14
 
15
- | Claim | Command |
15
+ | 声明 | 命令 |
16
16
  |---|---|
17
- | Governance is valid | `bash scripts/check-repo.sh` |
18
- | TypeScript compiles | `npm run typecheck` |
19
- | Behavior is covered | `npm test` |
20
- | Full local delivery is valid | `bash scripts/ci.sh` |
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
- - claiming completion from intent
25
- - relying on stale command output
26
- - using a narrow check for a broad claim
27
- - skipping failed command details
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 provides a local harness for structured agent work.
4
-
5
- ## Runtime Areas
6
-
7
- - `.harness/tasks/` stores task source, constraints, state, and loop facts.
8
- - `.harness/dag-runs/` stores DAG run state and artifacts.
9
- - `.harness/runs/` stores one-shot tool run evidence.
10
- - `.harness/cache/` stores local runtime cache.
11
- - `.harness/live/` stores transient live-session files.
12
-
13
- ## Skill Instructions
14
-
15
- - `skills/loop-agent/` stores loop-agent's repo-owned skill instructions and references.
16
- - `skills/<skill-name>/` stores local copies of skills referenced by DAG templates, including supervised implementation roles.
17
- - Historical `skill/` is no longer a required repository path; runtime lookup keeps it only as a compatibility fallback for `loop-agent`.
18
-
19
- ## Package Assets
20
-
21
- The npm package includes static capability assets needed to run and explain the harness: `bin/`, `dist/`, `skills/`, top-level `docs/*.md`, `docs/templates/`, `examples/`, `harness.json`, `AGENTS.md`, `README.md`, and `CHANGELOG.md`.
22
-
23
- Generated or historical task facts are not package assets. Existing files under `docs/progress/`, `docs/reports/`, `docs/exec-plans/`, and `docs/decisions/` belong to the target repository's history; the package carries only the directory README files for those areas.
24
-
25
- When `loop-agent` is installed from npm and used against another project, DAG skill instructions resolve from configured, user, or target-local skill directories when present, then fall back to the package-bundled `skills/`. A target project may add local skills, but it does not need loop-agent's source history or a copied `skills/` directory to use the default DAG workflow.
26
-
27
- ## Command Surfaces
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
- ## Verification Preset
37
-
38
- The shell preset `loop-agent-standard-verify` runs typecheck and focused DAG tests. Full delivery should still use:
3
+ loop-agent 提供结构化 agent 工作的本地 harness
4
+
5
+ ## Runtime 区域
6
+
7
+ - `.harness/tasks/` task source、约束、stateloop 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