@tea-agent/loop-agent 0.5.0 → 0.6.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 (133) hide show
  1. package/AGENTS.md +142 -142
  2. package/CHANGELOG.md +116 -98
  3. package/README.md +195 -195
  4. package/bin/agent-worker.js +22 -22
  5. package/bin/loop-agent.js +21 -21
  6. package/dist/application/dag/args.js +9 -1
  7. package/dist/application/dag/run-dag.js +16 -2
  8. package/dist/cli/command-definitions.js +22 -4
  9. package/dist/cli/help.js +3 -2
  10. package/dist/cli/program.js +7 -5
  11. package/dist/commands/import-prd.js +76 -0
  12. package/dist/commands/init.js +467 -457
  13. package/dist/commands/instructions.js +90 -58
  14. package/dist/commands/loop-benchmark.js +11 -11
  15. package/dist/commands/pi-reuse-benchmark.js +16 -16
  16. package/dist/executors/cursor-executor.js +1 -1
  17. package/dist/executors/dag-pi-executor.js +1 -0
  18. package/dist/executors/pi-sdk-executor.js +63 -1
  19. package/dist/shared/preview.js +39 -0
  20. package/dist/task/runtime.js +27 -27
  21. package/dist/task/source-references.js +221 -0
  22. package/dist/worker/cli.js +62 -1
  23. package/dist/worker/loop-agent/loop-agent-client.js +97 -5
  24. package/dist/worker/materialize/harness-task-materializer.js +162 -5
  25. package/dist/worker/observability/event-store.js +82 -0
  26. package/dist/worker/observability/events.js +79 -0
  27. package/dist/worker/observability/progress-composite.js +33 -0
  28. package/dist/worker/observability/read-model.js +1013 -0
  29. package/dist/worker/observability/snapshot-store.js +43 -0
  30. package/dist/worker/observability/types.js +1 -0
  31. package/dist/worker/observe/paths.js +64 -0
  32. package/dist/worker/observe/routes.js +423 -0
  33. package/dist/worker/observe/server.js +61 -0
  34. package/dist/worker/observe/static/app.js +1419 -0
  35. package/dist/worker/observe/static/index.html +63 -0
  36. package/dist/worker/observe/static/styles.css +613 -0
  37. package/dist/worker/pool/failure-routing.js +41 -6
  38. package/dist/worker/pool/run-store.js +50 -0
  39. package/dist/worker/progress-reporter.js +0 -18
  40. package/dist/worker/run-task/run-task.js +327 -92
  41. package/dist/worker/runner/run-ready.js +112 -4
  42. package/dist/workflows/dag/canvas-observer.js +275 -275
  43. package/dist/workflows/dag/event-observer.js +132 -0
  44. package/dist/workflows/dag/init-hybrid.js +146 -13
  45. package/dist/workflows/dag/observer-compose.js +52 -0
  46. package/docs/README.md +74 -72
  47. package/docs/agent-dag-recovery-playbook.md +184 -184
  48. package/docs/agent-dag-runner.md +42 -42
  49. package/docs/architecture/runtime-boundaries.md +162 -147
  50. package/docs/cursor-executor-usage.md +25 -25
  51. package/docs/decisions/README.md +3 -3
  52. package/docs/design/README.md +49 -36
  53. package/docs/development-principles.md +73 -73
  54. package/docs/dynamic-workflow-dag-engine-roadmap.md +1749 -1749
  55. package/docs/exec-plans/README.md +6 -6
  56. package/docs/exec-plans/active/README.md +12 -7
  57. package/docs/exec-plans/completed/README.md +31 -19
  58. package/docs/feature-workflow.md +186 -186
  59. package/docs/harness-methodology-debugging.md +153 -153
  60. package/docs/harness-methodology-tdd.md +130 -130
  61. package/docs/harness-methodology-verification.md +27 -27
  62. package/docs/init-surface.manifest.json +205 -199
  63. package/docs/loop-agent-harness.md +55 -42
  64. package/docs/production-readiness.md +96 -96
  65. package/docs/progress/README.md +3 -3
  66. package/docs/reports/README.md +9 -5
  67. package/docs/skills/README.md +6 -6
  68. package/docs/skills/vetted-skill-registry.md +26 -26
  69. package/docs/templates/adr.md +60 -60
  70. package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
  71. package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
  72. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +117 -117
  73. package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
  74. package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
  75. package/docs/templates/agent-dag-report.schema.json +454 -454
  76. package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
  77. package/docs/templates/agent-dag.base.json +195 -195
  78. package/docs/templates/agent-dag.final-verification.json +190 -190
  79. package/docs/templates/agent-dag.schema.json +316 -316
  80. package/docs/templates/agent-dag.supervised-implementation.json +500 -500
  81. package/docs/templates/exec-plan.md +64 -64
  82. package/docs/templates/feature-spec.md +53 -53
  83. package/docs/templates/hybrid-dag.json +193 -193
  84. package/docs/templates/init-evolution-review.md +33 -33
  85. package/docs/templates/production-readiness-checklist.md +57 -57
  86. package/docs/templates/progress-log.md +17 -17
  87. package/docs/templates/project-start-checklist.md +9 -9
  88. package/docs/templates/qa-report.md +48 -48
  89. package/docs/templates/sprint-contract.md +29 -29
  90. package/docs/templates/worker-dogfood-evidence.md +52 -0
  91. package/docs/templates/worker-dogfood-setup.md +48 -0
  92. package/docs/verification-matrix.md +41 -41
  93. package/examples/decision-gate-agent-dag.json +123 -123
  94. package/examples/example-dag.json +51 -51
  95. package/examples/hybrid-loop-agent-dag.json +194 -194
  96. package/harness.json +70 -69
  97. package/package.json +66 -66
  98. package/skills/ai-engineering-context/SKILL.md +48 -48
  99. package/skills/code-review-core/SKILL.md +20 -20
  100. package/skills/codebase-scout/SKILL.md +19 -19
  101. package/skills/init-capability-evolution/SKILL.md +69 -69
  102. package/skills/loop-agent/SKILL.md +149 -147
  103. package/skills/loop-agent/references/README.md +67 -67
  104. package/skills/loop-agent/references/command-reference.md +412 -403
  105. package/skills/loop-agent/references/harness-policy.md +263 -259
  106. package/skills/loop-agent/references/hybrid-dag.md +216 -216
  107. package/skills/loop-agent/references/learned/README.md +21 -21
  108. package/skills/loop-agent/references/long-running-loop.md +59 -59
  109. package/skills/loop-agent/references/model-routing.md +36 -36
  110. package/skills/loop-agent/references/multi-worktree.md +54 -54
  111. package/skills/loop-agent/references/one-shot-runs.md +85 -85
  112. package/skills/loop-agent/references/orchestrator-and-interventions.md +169 -169
  113. package/skills/loop-agent/references/pi-prompt.md +23 -23
  114. package/skills/loop-agent/references/pi-subagent-assisted-mode.md +81 -81
  115. package/skills/loop-agent/references/post-implementation-and-patterns.md +44 -44
  116. package/skills/loop-agent/references/task-workflow.md +89 -84
  117. package/skills/loop-agent/references/verification-and-failure-handling.md +128 -128
  118. package/skills/requesting-code-review/SKILL.md +101 -101
  119. package/skills/requesting-code-review/code-reviewer.md +168 -168
  120. package/skills/systematic-debugging/CREATION-LOG.md +119 -119
  121. package/skills/systematic-debugging/SKILL.md +296 -296
  122. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  123. package/skills/systematic-debugging/condition-based-waiting.md +115 -115
  124. package/skills/systematic-debugging/defense-in-depth.md +122 -122
  125. package/skills/systematic-debugging/find-polluter.sh +63 -63
  126. package/skills/systematic-debugging/root-cause-tracing.md +169 -169
  127. package/skills/systematic-debugging/test-academic.md +14 -14
  128. package/skills/systematic-debugging/test-pressure-1.md +58 -58
  129. package/skills/systematic-debugging/test-pressure-2.md +68 -68
  130. package/skills/systematic-debugging/test-pressure-3.md +69 -69
  131. package/skills/test-driven-development/SKILL.md +20 -20
  132. package/skills/verification-before-completion/SKILL.md +154 -154
  133. package/skills/webapp-testing/SKILL.md +19 -19
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
- {
2
- "name": "@tea-agent/loop-agent",
3
- "version": "0.5.0",
4
- "type": "module",
5
- "bin": {
6
- "loop-agent": "bin/loop-agent.js",
7
- "agent-worker": "bin/agent-worker.js"
8
- },
9
- "files": [
10
- "AGENTS.md",
11
- "bin/",
12
- "dist/",
13
- "docs/*.md",
14
- "docs/architecture/runtime-boundaries.md",
15
- "docs/decisions/README.md",
16
- "docs/design/README.md",
17
- "docs/exec-plans/README.md",
18
- "docs/exec-plans/active/README.md",
19
- "docs/exec-plans/completed/README.md",
20
- "docs/init-surface.manifest.json",
21
- "docs/progress/README.md",
22
- "docs/reports/README.md",
23
- "docs/skills/",
24
- "docs/templates/",
25
- "examples/",
26
- "harness.json",
27
- "skills/",
28
- "README.md",
29
- "CHANGELOG.md"
30
- ],
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "scripts": {
35
- "dev": "node --import tsx/esm src/cli.ts",
36
- "cursor": "node --import tsx/esm src/cli.ts cursor-prompt",
37
- "pi-prompt": "node --import tsx/esm src/cli.ts pi-prompt",
38
- "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
39
- "build": "npm run clean && tsc -p tsconfig.build.json",
40
- "prepack": "npm run build",
41
- "prepublishOnly": "npm run typecheck && npm test && npm run build",
42
- "lint": "tsc --noEmit",
43
- "typecheck": "tsc --noEmit",
44
- "test": "vitest run",
45
- "docs:dev": "npm --prefix website start",
46
- "docs:build": "npm --prefix website run build",
47
- "docs:serve": "npm --prefix website run serve",
48
- "smoke:stale-serial": "tsx scripts/smoke-stale-plan-serial.ts"
49
- },
50
- "dependencies": {
51
- "commander": "^12.1.0",
52
- "yaml": "^2.9.0",
53
- "zod": "^3.25.76"
54
- },
55
- "optionalDependencies": {
56
- "@cursor/sdk": "^1.0.7",
57
- "@earendil-works/pi-ai": "*",
58
- "@earendil-works/pi-coding-agent": "*"
59
- },
60
- "devDependencies": {
61
- "@types/node": "^24.6.0",
62
- "tsx": "^4.20.6",
63
- "typescript": "^5.9.3",
64
- "vitest": "^3.2.4"
65
- }
66
- }
1
+ {
2
+ "name": "@tea-agent/loop-agent",
3
+ "version": "0.6.0",
4
+ "type": "module",
5
+ "bin": {
6
+ "loop-agent": "bin/loop-agent.js",
7
+ "agent-worker": "bin/agent-worker.js"
8
+ },
9
+ "files": [
10
+ "AGENTS.md",
11
+ "bin/",
12
+ "dist/",
13
+ "docs/*.md",
14
+ "docs/architecture/runtime-boundaries.md",
15
+ "docs/decisions/README.md",
16
+ "docs/design/README.md",
17
+ "docs/exec-plans/README.md",
18
+ "docs/exec-plans/active/README.md",
19
+ "docs/exec-plans/completed/README.md",
20
+ "docs/init-surface.manifest.json",
21
+ "docs/progress/README.md",
22
+ "docs/reports/README.md",
23
+ "docs/skills/",
24
+ "docs/templates/",
25
+ "examples/",
26
+ "harness.json",
27
+ "skills/",
28
+ "README.md",
29
+ "CHANGELOG.md"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "dev": "node --import tsx/esm src/cli.ts",
36
+ "cursor": "node --import tsx/esm src/cli.ts cursor-prompt",
37
+ "pi-prompt": "node --import tsx/esm src/cli.ts pi-prompt",
38
+ "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
39
+ "build": "npm run clean && tsc -p tsconfig.build.json && node -e \"const fs=require('node:fs');const p='dist/worker/observe/static';fs.mkdirSync(p,{recursive:true});fs.cpSync('src/worker/observe/static',p,{recursive:true});\"",
40
+ "prepack": "npm run build",
41
+ "prepublishOnly": "npm run typecheck && npm test && npm run build",
42
+ "lint": "tsc --noEmit",
43
+ "typecheck": "tsc --noEmit",
44
+ "test": "vitest run",
45
+ "docs:dev": "npm --prefix website start",
46
+ "docs:build": "npm --prefix website run build",
47
+ "docs:serve": "npm --prefix website run serve",
48
+ "smoke:stale-serial": "tsx scripts/smoke-stale-plan-serial.ts"
49
+ },
50
+ "dependencies": {
51
+ "commander": "^12.1.0",
52
+ "yaml": "^2.9.0",
53
+ "zod": "^3.25.76"
54
+ },
55
+ "optionalDependencies": {
56
+ "@cursor/sdk": "^1.0.7",
57
+ "@earendil-works/pi-ai": "*",
58
+ "@earendil-works/pi-coding-agent": "*"
59
+ },
60
+ "devDependencies": {
61
+ "@types/node": "^24.6.0",
62
+ "tsx": "^4.20.6",
63
+ "typescript": "^5.9.3",
64
+ "vitest": "^3.2.4"
65
+ }
66
+ }
@@ -1,48 +1,48 @@
1
- ---
2
- name: ai-engineering-context
3
- description: 当 AI coding agent 启动 loop-agent 工作、准备 DAG 或 Loop context、委派 role-specific 节点,或决定 requirements、facts、evidence、handoff notes 应落何处时使用。
4
- ---
5
-
6
- # AI Engineering Context
7
-
8
- Context 是工程 artifact,不是 chat 残留。须显式保留 requirements、role 边界、write authority、evidence 与 handoff facts。
9
-
10
- ## When to Use
11
-
12
- 在启动 task、DAG、workflow 或 Loop round;准备 role prompt;委派给 Cursor/Pi/shell/static executor;或处理 stale plan、冲突 requirements、缺失 evidence 时使用。
13
-
14
- 不要用于 private platform paths、personal memory、Google Drive 规则,或替代 task skills。
15
-
16
- ## Context Priority
17
-
18
- 按以下顺序优先采信 facts:最新 user instruction;task source/contract;DAG/Loop artifacts;docs/plans/ADRs;code/tests;chat history 仅作 hint。
19
-
20
- 若 sources 冲突,停止并点明冲突。
21
-
22
- ## Role Boundaries
23
-
24
- - Planner:contract、DAG shape、write boundary、verification plan;不做 implementation edits。
25
- - Scout:code/test/doc/artifact facts;不写 repo。
26
- - Implementer:在 writeSet 内做 bounded changes;不扩大 scope 或宣称完成。
27
- - Reviewer:bugs、regressions、missing tests、risk;除非被指派,否则不重写。
28
- - Verifier:command evidence、reproduction、failure category;model judgment 不是 proof。
29
- - Supervisor:gates、escalation、repair scope;不绕过 write-guard 或 human-gate。
30
- - Closeout:evidence、risks、next steps;不隐藏 failures。
31
-
32
- ## Prompt Contract
33
-
34
- 每个 delegated node prompt 应包含:objective、task id、role、executor、allowed paths、forbidden paths、writeSet、upstream artifact refs、concise excerpts、output contract、expected evidence、non-goals、stop conditions。
35
-
36
- read-only node 只能在 node output 返回 findings。不得在 repo 中创建 scratch files。
37
-
38
- ## Persistence Rules
39
-
40
- Requirements 与 constraints 写入 task `source/`。Execution state 与 node artifacts 写入 `.harness/`。Durable plans、reports、decisions 写入 `docs/`。可复用 process guidance 写入 `skills/`。Chat 仅 transient。
41
-
42
- ## Failure Handling
43
-
44
- - Missing context:运行 scout 或读取 durable source。
45
- - Ambiguous requirement:implementation 前更新 contract。
46
- - Verification failure:改 code 前先 diagnose cause。
47
- - Missing skill instructions:视为 context defect;不要假设 hidden behavior。
48
- - Missing fresh verification:不要 close out。
1
+ ---
2
+ name: ai-engineering-context
3
+ description: 当 AI coding agent 启动 loop-agent 工作、准备 DAG 或 Loop context、委派 role-specific 节点,或决定 requirements、facts、evidence、handoff notes 应落何处时使用。
4
+ ---
5
+
6
+ # AI Engineering Context
7
+
8
+ Context 是工程 artifact,不是 chat 残留。须显式保留 requirements、role 边界、write authority、evidence 与 handoff facts。
9
+
10
+ ## When to Use
11
+
12
+ 在启动 task、DAG、workflow 或 Loop round;准备 role prompt;委派给 Cursor/Pi/shell/static executor;或处理 stale plan、冲突 requirements、缺失 evidence 时使用。
13
+
14
+ 不要用于 private platform paths、personal memory、Google Drive 规则,或替代 task skills。
15
+
16
+ ## Context Priority
17
+
18
+ 按以下顺序优先采信 facts:最新 user instruction;task source/contract;DAG/Loop artifacts;docs/plans/ADRs;code/tests;chat history 仅作 hint。
19
+
20
+ 若 sources 冲突,停止并点明冲突。
21
+
22
+ ## Role Boundaries
23
+
24
+ - Planner:contract、DAG shape、write boundary、verification plan;不做 implementation edits。
25
+ - Scout:code/test/doc/artifact facts;不写 repo。
26
+ - Implementer:在 writeSet 内做 bounded changes;不扩大 scope 或宣称完成。
27
+ - Reviewer:bugs、regressions、missing tests、risk;除非被指派,否则不重写。
28
+ - Verifier:command evidence、reproduction、failure category;model judgment 不是 proof。
29
+ - Supervisor:gates、escalation、repair scope;不绕过 write-guard 或 human-gate。
30
+ - Closeout:evidence、risks、next steps;不隐藏 failures。
31
+
32
+ ## Prompt Contract
33
+
34
+ 每个 delegated node prompt 应包含:objective、task id、role、executor、allowed paths、forbidden paths、writeSet、upstream artifact refs、concise excerpts、output contract、expected evidence、non-goals、stop conditions。
35
+
36
+ read-only node 只能在 node output 返回 findings。不得在 repo 中创建 scratch files。
37
+
38
+ ## Persistence Rules
39
+
40
+ Requirements 与 constraints 写入 task `source/`。Execution state 与 node artifacts 写入 `.harness/`。Durable plans、reports、decisions 写入 `docs/`。可复用 process guidance 写入 `skills/`。Chat 仅 transient。
41
+
42
+ ## Failure Handling
43
+
44
+ - Missing context:运行 scout 或读取 durable source。
45
+ - Ambiguous requirement:implementation 前更新 contract。
46
+ - Verification failure:改 code 前先 diagnose cause。
47
+ - Missing skill instructions:视为 context defect;不要假设 hidden behavior。
48
+ - Missing fresh verification:不要 close out。
@@ -1,20 +1,20 @@
1
- ---
2
- name: code-review-core
3
- description: 用于只读 code review 节点,产出带文件与行号引用的优先级 findings。
4
- ---
5
-
6
- # Code Review Core
7
-
8
- 本 skill 用于 reviewer 节点。
9
-
10
- ## Review 重点
11
-
12
- - 优先关注 correctness、行为回归、security、数据丢失与缺失验证。
13
- - findings 须 grounded 在具体文件与行号。
14
- - 区分 blocking findings 与次要 maintainability 备注。
15
- - 检查测试是否证明变更行为,文档是否与面向用户的变更一致。
16
- - 若无 findings,明确说明,并指出 residual test gap(如有)。
17
-
18
- ## Output
19
-
20
- 按 severity 排序列出 findings。仅当无 blocking findings 时,才写 `VERDICT: pass`。
1
+ ---
2
+ name: code-review-core
3
+ description: 用于只读 code review 节点,产出带文件与行号引用的优先级 findings。
4
+ ---
5
+
6
+ # Code Review Core
7
+
8
+ 本 skill 用于 reviewer 节点。
9
+
10
+ ## Review 重点
11
+
12
+ - 优先关注 correctness、行为回归、security、数据丢失与缺失验证。
13
+ - findings 须 grounded 在具体文件与行号。
14
+ - 区分 blocking findings 与次要 maintainability 备注。
15
+ - 检查测试是否证明变更行为,文档是否与面向用户的变更一致。
16
+ - 若无 findings,明确说明,并指出 residual test gap(如有)。
17
+
18
+ ## Output
19
+
20
+ 按 severity 排序列出 findings。仅当无 blocking findings 时,才写 `VERDICT: pass`。
@@ -1,19 +1,19 @@
1
- ---
2
- name: codebase-scout
3
- description: 用于只读 scout 节点,在实现前定位现有代码、测试、文档与集成点。
4
- ---
5
-
6
- # Codebase Scout
7
-
8
- 本 skill 用于 scout 节点。
9
-
10
- ## 规则
11
-
12
- - 从 repo 指令、task source 与邻近测试入手。
13
- - 可用时优先 CodeGraph;否则用 `rg` 与聚焦文件阅读。
14
- - 在提议新抽象前,识别现有 helper 与 ownership 边界。
15
- - 只返回事实,不做编辑。
16
-
17
- ## Output
18
-
19
- 列出相关文件、现有模式、风险,以及实现所需的最小 write surface。
1
+ ---
2
+ name: codebase-scout
3
+ description: 用于只读 scout 节点,在实现前定位现有代码、测试、文档与集成点。
4
+ ---
5
+
6
+ # Codebase Scout
7
+
8
+ 本 skill 用于 scout 节点。
9
+
10
+ ## 规则
11
+
12
+ - 从 repo 指令、task source 与邻近测试入手。
13
+ - 可用时优先 CodeGraph;否则用 `rg` 与聚焦文件阅读。
14
+ - 在提议新抽象前,识别现有 helper 与 ownership 边界。
15
+ - 只返回事实,不做编辑。
16
+
17
+ ## Output
18
+
19
+ 列出相关文件、现有模式、风险,以及实现所需的最小 write surface。
@@ -1,69 +1,69 @@
1
- ---
2
- name: init-capability-evolution
3
- description: 用于 loop-agent 本仓库的初始化能力演化审查,判断代码、skill、模板、包范围或 DAG 默认能力变化是否需要同步更新目标项目 init surface。
4
- ---
5
-
6
- # Init Capability Evolution
7
-
8
- 本 skill 用于 loop-agent 本仓库。当变更可能影响 `loop-agent init` 初始化其他项目的能力时使用。
9
-
10
- ## Goal
11
-
12
- 让模型自行判断并维护初始化能力,而不是依赖人工记忆:
13
-
14
- - 新能力是否应该进入目标项目。
15
- - 新增/修改的 skill 是否应随 npm 包和 `init --profile full` 投影。
16
- - 目标项目的 `AGENTS.md`、README managed block、治理 docs、scripts 或 templates 是否需要更新。
17
- - `package.json files` 与 `docs/init-surface.manifest.json` 是否仍覆盖真实发布范围。
18
- - 是否需要目标项目 smoke、init doctor、docs audit 或 package dry-run 证据。
19
-
20
- ## Trigger Tiers
21
-
22
- 按 `docs/init-surface.manifest.json` 的 `evolutionReview.tiers` 判断成本:
23
-
24
- - `advisory`:只记录提示,不阻塞。
25
- - `surface-check`:运行 `bash scripts/check-init-surface.sh`;通过即可。
26
- - `model-review`:写一份简短 init evolution review,必要时修改 init surface、包范围、文档、skill 或测试。
27
-
28
- 不要把小改动升级成重流程。只有当变化可能改变目标项目初始化体验、默认 DAG 行为、skill resolution、发布包边界或 init 生成物时,才进入 model-review。
29
-
30
- ## Review Questions
31
-
32
- 审查时逐条回答:
33
-
34
- 1. 本次变更会改变目标项目执行 `loop-agent init --profile full --merge` 后得到的文件、规则或能力吗?
35
- 2. 是否新增、删除或重命名了 `skills/**`,并且目标项目需要 repo-local 可审计副本?
36
- 3. 是否改变了默认 DAG role skills、skill resolution、strict skill audit 或 task prompt 注入?
37
- 4. 是否新增通用治理模板、script matrix、production readiness 或 operator recovery 文档,需要目标项目初始化后可见?
38
- 5. `package.json files` 是否包含所有 npm 运行和初始化所需静态资料?
39
- 6. `docs/init-surface.manifest.json` 是否更新了 package / init / exclude / trigger contract?
40
- 7. 旧目标项目是否只需 advisory、需要手工复制新增文件,还是需要未来 `init audit/update` 迁移能力?
41
-
42
- ## Output
43
-
44
- 轻量审查可以只在 handoff 中说明。高影响审查应写入:
45
-
46
- ```text
47
- docs/reports/YYYY-MM-DD-init-evolution-review.md
48
- ```
49
-
50
- 报告保持短小,包含:
51
-
52
- - changed surface
53
- - decision: no init impact / surface check only / init update required
54
- - files updated
55
- - verification commands and results
56
- - residual risk
57
-
58
- ## Required Verification
59
-
60
- 按影响面选择最小命令:
61
-
62
- ```bash
63
- bash scripts/check-init-surface.sh
64
- bash scripts/check-repo.sh
65
- npm test -- init-command dag-skills dag-validate-command
66
- npm pack --dry-run --ignore-scripts
67
- ```
68
-
69
- 如果没有新鲜验证证据,不要宣称 init evolution 已完成。
1
+ ---
2
+ name: init-capability-evolution
3
+ description: 用于 loop-agent 本仓库的初始化能力演化审查,判断代码、skill、模板、包范围或 DAG 默认能力变化是否需要同步更新目标项目 init surface。
4
+ ---
5
+
6
+ # Init Capability Evolution
7
+
8
+ 本 skill 用于 loop-agent 本仓库。当变更可能影响 `loop-agent init` 初始化其他项目的能力时使用。
9
+
10
+ ## Goal
11
+
12
+ 让模型自行判断并维护初始化能力,而不是依赖人工记忆:
13
+
14
+ - 新能力是否应该进入目标项目。
15
+ - 新增/修改的 skill 是否应随 npm 包和 `init --profile full` 投影。
16
+ - 目标项目的 `AGENTS.md`、README managed block、治理 docs、scripts 或 templates 是否需要更新。
17
+ - `package.json files` 与 `docs/init-surface.manifest.json` 是否仍覆盖真实发布范围。
18
+ - 是否需要目标项目 smoke、init doctor、docs audit 或 package dry-run 证据。
19
+
20
+ ## Trigger Tiers
21
+
22
+ 按 `docs/init-surface.manifest.json` 的 `evolutionReview.tiers` 判断成本:
23
+
24
+ - `advisory`:只记录提示,不阻塞。
25
+ - `surface-check`:运行 `bash scripts/check-init-surface.sh`;通过即可。
26
+ - `model-review`:写一份简短 init evolution review,必要时修改 init surface、包范围、文档、skill 或测试。
27
+
28
+ 不要把小改动升级成重流程。只有当变化可能改变目标项目初始化体验、默认 DAG 行为、skill resolution、发布包边界或 init 生成物时,才进入 model-review。
29
+
30
+ ## Review Questions
31
+
32
+ 审查时逐条回答:
33
+
34
+ 1. 本次变更会改变目标项目执行 `loop-agent init --profile full --merge` 后得到的文件、规则或能力吗?
35
+ 2. 是否新增、删除或重命名了 `skills/**`,并且目标项目需要 repo-local 可审计副本?
36
+ 3. 是否改变了默认 DAG role skills、skill resolution、strict skill audit 或 task prompt 注入?
37
+ 4. 是否新增通用治理模板、script matrix、production readiness 或 operator recovery 文档,需要目标项目初始化后可见?
38
+ 5. `package.json files` 是否包含所有 npm 运行和初始化所需静态资料?
39
+ 6. `docs/init-surface.manifest.json` 是否更新了 package / init / exclude / trigger contract?
40
+ 7. 旧目标项目是否只需 advisory、需要手工复制新增文件,还是需要未来 `init audit/update` 迁移能力?
41
+
42
+ ## Output
43
+
44
+ 轻量审查可以只在 handoff 中说明。高影响审查应写入:
45
+
46
+ ```text
47
+ docs/reports/YYYY-MM-DD-init-evolution-review.md
48
+ ```
49
+
50
+ 报告保持短小,包含:
51
+
52
+ - changed surface
53
+ - decision: no init impact / surface check only / init update required
54
+ - files updated
55
+ - verification commands and results
56
+ - residual risk
57
+
58
+ ## Required Verification
59
+
60
+ 按影响面选择最小命令:
61
+
62
+ ```bash
63
+ bash scripts/check-init-surface.sh
64
+ bash scripts/check-repo.sh
65
+ npm test -- init-command dag-skills dag-validate-command
66
+ npm pack --dry-run --ignore-scripts
67
+ ```
68
+
69
+ 如果没有新鲜验证证据,不要宣称 init evolution 已完成。