@tea-agent/loop-agent 0.5.0 → 0.7.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 (136) hide show
  1. package/AGENTS.md +142 -142
  2. package/CHANGELOG.md +132 -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/config-types.js +3 -0
  21. package/dist/task/runtime.js +27 -27
  22. package/dist/task/source-references.js +221 -0
  23. package/dist/worker/cli.js +62 -1
  24. package/dist/worker/loop-agent/loop-agent-client.js +97 -5
  25. package/dist/worker/materialize/harness-task-materializer.js +166 -5
  26. package/dist/worker/observability/event-store.js +82 -0
  27. package/dist/worker/observability/events.js +79 -0
  28. package/dist/worker/observability/progress-composite.js +33 -0
  29. package/dist/worker/observability/read-model.js +1013 -0
  30. package/dist/worker/observability/snapshot-store.js +43 -0
  31. package/dist/worker/observability/types.js +1 -0
  32. package/dist/worker/observe/paths.js +64 -0
  33. package/dist/worker/observe/routes.js +423 -0
  34. package/dist/worker/observe/server.js +61 -0
  35. package/dist/worker/observe/static/app.js +1419 -0
  36. package/dist/worker/observe/static/index.html +63 -0
  37. package/dist/worker/observe/static/styles.css +613 -0
  38. package/dist/worker/pool/failure-routing.js +41 -6
  39. package/dist/worker/pool/run-store.js +50 -0
  40. package/dist/worker/progress-reporter.js +0 -18
  41. package/dist/worker/run-task/run-task.js +327 -92
  42. package/dist/worker/runner/run-ready.js +112 -4
  43. package/dist/worker/task-spec/schema.js +2 -1
  44. package/dist/workflows/dag/canvas-observer.js +275 -275
  45. package/dist/workflows/dag/event-observer.js +132 -0
  46. package/dist/workflows/dag/init-hybrid.js +182 -21
  47. package/dist/workflows/dag/observer-compose.js +52 -0
  48. package/docs/README.md +75 -72
  49. package/docs/agent-dag-recovery-playbook.md +184 -184
  50. package/docs/agent-dag-runner.md +42 -42
  51. package/docs/architecture/runtime-boundaries.md +162 -147
  52. package/docs/cursor-executor-usage.md +25 -25
  53. package/docs/decisions/README.md +3 -3
  54. package/docs/design/README.md +49 -36
  55. package/docs/development-principles.md +73 -73
  56. package/docs/dynamic-workflow-dag-engine-roadmap.md +1749 -1749
  57. package/docs/exec-plans/README.md +6 -6
  58. package/docs/exec-plans/active/README.md +12 -7
  59. package/docs/exec-plans/completed/README.md +32 -19
  60. package/docs/feature-workflow.md +186 -186
  61. package/docs/harness-methodology-debugging.md +153 -153
  62. package/docs/harness-methodology-tdd.md +130 -130
  63. package/docs/harness-methodology-verification.md +27 -27
  64. package/docs/init-surface.manifest.json +208 -199
  65. package/docs/loop-agent-harness.md +55 -42
  66. package/docs/production-readiness.md +96 -96
  67. package/docs/progress/README.md +3 -3
  68. package/docs/reports/README.md +9 -5
  69. package/docs/skills/README.md +6 -6
  70. package/docs/skills/vetted-skill-registry.md +26 -26
  71. package/docs/templates/adr.md +60 -60
  72. package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
  73. package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
  74. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +117 -117
  75. package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
  76. package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
  77. package/docs/templates/agent-dag-report.schema.json +454 -454
  78. package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
  79. package/docs/templates/agent-dag.base.json +195 -195
  80. package/docs/templates/agent-dag.final-verification.json +190 -190
  81. package/docs/templates/agent-dag.schema.json +316 -316
  82. package/docs/templates/agent-dag.supervised-implementation.json +500 -500
  83. package/docs/templates/exec-plan.md +64 -64
  84. package/docs/templates/feature-spec.md +53 -53
  85. package/docs/templates/hybrid-dag.json +193 -193
  86. package/docs/templates/init-evolution-review.md +33 -33
  87. package/docs/templates/interactive-ui-round2-experiment.md +66 -0
  88. package/docs/templates/production-readiness-checklist.md +57 -57
  89. package/docs/templates/progress-log.md +17 -17
  90. package/docs/templates/project-start-checklist.md +9 -9
  91. package/docs/templates/qa-report.md +48 -48
  92. package/docs/templates/sprint-contract.md +29 -29
  93. package/docs/templates/worker-dogfood-evidence.md +52 -0
  94. package/docs/templates/worker-dogfood-setup.md +48 -0
  95. package/docs/verification-matrix.md +41 -41
  96. package/examples/decision-gate-agent-dag.json +123 -123
  97. package/examples/example-dag.json +51 -51
  98. package/examples/hybrid-loop-agent-dag.json +194 -194
  99. package/harness.json +70 -69
  100. package/package.json +66 -66
  101. package/skills/ai-engineering-context/SKILL.md +48 -48
  102. package/skills/code-review-core/SKILL.md +20 -20
  103. package/skills/codebase-scout/SKILL.md +19 -19
  104. package/skills/init-capability-evolution/SKILL.md +69 -69
  105. package/skills/loop-agent/SKILL.md +149 -147
  106. package/skills/loop-agent/references/README.md +67 -67
  107. package/skills/loop-agent/references/command-reference.md +412 -403
  108. package/skills/loop-agent/references/harness-policy.md +263 -259
  109. package/skills/loop-agent/references/hybrid-dag.md +216 -216
  110. package/skills/loop-agent/references/learned/README.md +21 -21
  111. package/skills/loop-agent/references/long-running-loop.md +59 -59
  112. package/skills/loop-agent/references/model-routing.md +36 -36
  113. package/skills/loop-agent/references/multi-worktree.md +54 -54
  114. package/skills/loop-agent/references/one-shot-runs.md +85 -85
  115. package/skills/loop-agent/references/orchestrator-and-interventions.md +169 -169
  116. package/skills/loop-agent/references/pi-prompt.md +23 -23
  117. package/skills/loop-agent/references/pi-subagent-assisted-mode.md +81 -81
  118. package/skills/loop-agent/references/post-implementation-and-patterns.md +44 -44
  119. package/skills/loop-agent/references/task-workflow.md +89 -84
  120. package/skills/loop-agent/references/verification-and-failure-handling.md +128 -128
  121. package/skills/requesting-code-review/SKILL.md +101 -101
  122. package/skills/requesting-code-review/code-reviewer.md +168 -168
  123. package/skills/systematic-debugging/CREATION-LOG.md +119 -119
  124. package/skills/systematic-debugging/SKILL.md +296 -296
  125. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  126. package/skills/systematic-debugging/condition-based-waiting.md +115 -115
  127. package/skills/systematic-debugging/defense-in-depth.md +122 -122
  128. package/skills/systematic-debugging/find-polluter.sh +63 -63
  129. package/skills/systematic-debugging/root-cause-tracing.md +169 -169
  130. package/skills/systematic-debugging/test-academic.md +14 -14
  131. package/skills/systematic-debugging/test-pressure-1.md +58 -58
  132. package/skills/systematic-debugging/test-pressure-2.md +68 -68
  133. package/skills/systematic-debugging/test-pressure-3.md +69 -69
  134. package/skills/test-driven-development/SKILL.md +20 -20
  135. package/skills/verification-before-completion/SKILL.md +154 -154
  136. package/skills/webapp-testing/SKILL.md +19 -19
@@ -1,96 +1,96 @@
1
- # Production Readiness v0.1
2
-
3
- 本文档冻结 2026-07-06 至 2026-07-12 hardening sprint 的单任务 production readiness 标准。
4
-
5
- `loop-agent` production readiness v0.1 指:低/中风险的仓库本地 DAG 任务能以稳定、可解释、可验证、可恢复的方式运行。这不是组织级平台 readiness 声明。
6
-
7
- ## 支持范围
8
-
9
- - 单仓库
10
- - 单任务或小范围有边界任务
11
- - 低/中风险的代码与文档变更
12
- - 显式 task source
13
- - 显式 `allowedPaths`、`forbiddenPaths`、`writeSet`
14
- - shell 验证命令
15
- - 通过 `dag report`、`dag doctor`、`promote-run`、`closeout` 交接
16
-
17
- ## 非目标
18
-
19
- - 自动 merge
20
- - 自动 release
21
- - 生产 secrets
22
- - 生产数据库访问
23
- - 高风险 migration
24
- - 在线 Worker Pool
25
- - 多仓库 feature 编排
26
- - 可写的 Dynamic Workflow sharded migration
27
- - DAG runtime 之外的第二套 runner
28
-
29
- ## 必需证据
30
-
31
- 每个 production-ready v0.1 任务必须保留或产出以下证据:
32
-
33
- | 证据 | 要求 |
34
- |---|---|
35
- | DAG spec path | 生成的 DAG JSON 路径记录在 CLI 输出、report 或 task artifacts 中 |
36
- | DAG validation result | `dag validate --strict-models --strict-governance` 有新鲜输出 |
37
- | Run id | `run-dag` 打印或记录 run id |
38
- | Shell verification output | 完成声明引用新鲜命令输出,而非 model 自报 |
39
- | Failure category | 失败 run 在可用时具备 raw、normalized、product-line 与 recommended follow-up 字段 |
40
- | Closeout 或 failure handoff | 成功 run 可 promote 并 closeout;失败 run 产出 failure handoff 证据而非成功 closeout |
41
-
42
- ## 必需命令
43
-
44
- 标准任务路径:
45
-
46
- ```bash
47
- loop-agent new-task <task-id> "Task title"
48
- loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
49
- loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
50
- loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
51
- loop-agent dag report --run-id <run-id> --markdown
52
- loop-agent dag doctor --run-id <run-id>
53
- loop-agent promote-run <task-id> --run-id <run-id>
54
- loop-agent closeout task <task-id>
55
- ```
56
-
57
- `<temp-dir>` 使用平台原生临时目录。
58
-
59
- ## 必需标准
60
-
61
- | ID | 标准 | 验收 |
62
- |---|---|---|
63
- | PRD-01 | 新任务仅推荐 DAG 路径 | README、docs、website、skills 不把已移除的 Level 1 顺序命令当作 fallback |
64
- | PRD-02 | 写任务有显式边界 | strict DAG governance 在需要时拒绝缺失 `allowedPaths`、`forbiddenPaths` 或 `writeSet` |
65
- | PRD-03 | 每次 DAG run 有可读 report | `loop-agent dag report --latest --markdown` 显示 status、failure summary 与 next step |
66
- | PRD-04 | 失败 run 可诊断 | `loop-agent dag doctor` 报告 category 与 recommended follow-up |
67
- | PRD-05 | Shell 验证是完成权威 | closeout 不接受 model 自报替代新鲜命令输出 |
68
- | PRD-06 | Failure category 覆盖失败 fixture | validation、write guard、shell、timeout、auth、unknown fixture 均有映射 |
69
- | PRD-07 | 已完成 DAG facts 不可变 | completed facts guard 仍由测试覆盖 |
70
- | PRD-08 | CLI 主路径输出指引下一步 | `dag run-task`、`dag validate`、`run-dag`、`dag report` 打印 operator next commands |
71
- | PRD-09 | 文档面一致 | doc 更新后 `bash scripts/check-repo.sh` 与 `npm run docs:build` 通过 |
72
- | PRD-10 | sprint 完成前完整本地门禁通过 | 最终 hardening closeout 时 `bash scripts/ci.sh` 通过 |
73
-
74
- ## Failure Routing
75
-
76
- Failure category 是路由字段,不是主任务状态。保留 raw DAG facts,仅在 report、doctor 输出、closeout draft、task artifacts 或后续 Task Pool 记录中追加派生字段。
77
-
78
- 四层结构:
79
-
80
- ```text
81
- raw_failure_category
82
- dag_normalized_failure_category
83
- product_line_failure_category
84
- recommended_follow_up
85
- ```
86
-
87
- Product-line category 事实源:`docs/design/state-and-failure-taxonomy.md`。
88
-
89
- ## Sprint Gate
90
-
91
- 2026-07-06 sprint 仅在 active execution plan 记录以下内容时视为完成:
92
-
93
- - M1–M4 最终状态
94
- - 必需验证门禁的命令输出
95
- - 成功、write-guard、shell-failure 场景的 dogfood 证据
96
- - 剩余风险与后续工作
1
+ # Production Readiness v0.1
2
+
3
+ 本文档冻结 2026-07-06 至 2026-07-12 hardening sprint 的单任务 production readiness 标准。
4
+
5
+ `loop-agent` production readiness v0.1 指:低/中风险的仓库本地 DAG 任务能以稳定、可解释、可验证、可恢复的方式运行。这不是组织级平台 readiness 声明。
6
+
7
+ ## 支持范围
8
+
9
+ - 单仓库
10
+ - 单任务或小范围有边界任务
11
+ - 低/中风险的代码与文档变更
12
+ - 显式 task source
13
+ - 显式 `allowedPaths`、`forbiddenPaths`、`writeSet`
14
+ - shell 验证命令
15
+ - 通过 `dag report`、`dag doctor`、`promote-run`、`closeout` 交接
16
+
17
+ ## 非目标
18
+
19
+ - 自动 merge
20
+ - 自动 release
21
+ - 生产 secrets
22
+ - 生产数据库访问
23
+ - 高风险 migration
24
+ - 在线 Worker Pool
25
+ - 多仓库 feature 编排
26
+ - 可写的 Dynamic Workflow sharded migration
27
+ - DAG runtime 之外的第二套 runner
28
+
29
+ ## 必需证据
30
+
31
+ 每个 production-ready v0.1 任务必须保留或产出以下证据:
32
+
33
+ | 证据 | 要求 |
34
+ |---|---|
35
+ | DAG spec path | 生成的 DAG JSON 路径记录在 CLI 输出、report 或 task artifacts 中 |
36
+ | DAG validation result | `dag validate --strict-models --strict-governance` 有新鲜输出 |
37
+ | Run id | `run-dag` 打印或记录 run id |
38
+ | Shell verification output | 完成声明引用新鲜命令输出,而非 model 自报 |
39
+ | Failure category | 失败 run 在可用时具备 raw、normalized、product-line 与 recommended follow-up 字段 |
40
+ | Closeout 或 failure handoff | 成功 run 可 promote 并 closeout;失败 run 产出 failure handoff 证据而非成功 closeout |
41
+
42
+ ## 必需命令
43
+
44
+ 标准任务路径:
45
+
46
+ ```bash
47
+ loop-agent new-task <task-id> "Task title"
48
+ loop-agent dag run-task <task-id> --profile auto --strict-models --output <temp-dir>/<task-id>-dag.json
49
+ loop-agent dag validate --dag <temp-dir>/<task-id>-dag.json --strict-models --strict-governance
50
+ loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd .
51
+ loop-agent dag report --run-id <run-id> --markdown
52
+ loop-agent dag doctor --run-id <run-id>
53
+ loop-agent promote-run <task-id> --run-id <run-id>
54
+ loop-agent closeout task <task-id>
55
+ ```
56
+
57
+ `<temp-dir>` 使用平台原生临时目录。
58
+
59
+ ## 必需标准
60
+
61
+ | ID | 标准 | 验收 |
62
+ |---|---|---|
63
+ | PRD-01 | 新任务仅推荐 DAG 路径 | README、docs、website、skills 不把已移除的 Level 1 顺序命令当作 fallback |
64
+ | PRD-02 | 写任务有显式边界 | strict DAG governance 在需要时拒绝缺失 `allowedPaths`、`forbiddenPaths` 或 `writeSet` |
65
+ | PRD-03 | 每次 DAG run 有可读 report | `loop-agent dag report --latest --markdown` 显示 status、failure summary 与 next step |
66
+ | PRD-04 | 失败 run 可诊断 | `loop-agent dag doctor` 报告 category 与 recommended follow-up |
67
+ | PRD-05 | Shell 验证是完成权威 | closeout 不接受 model 自报替代新鲜命令输出 |
68
+ | PRD-06 | Failure category 覆盖失败 fixture | validation、write guard、shell、timeout、auth、unknown fixture 均有映射 |
69
+ | PRD-07 | 已完成 DAG facts 不可变 | completed facts guard 仍由测试覆盖 |
70
+ | PRD-08 | CLI 主路径输出指引下一步 | `dag run-task`、`dag validate`、`run-dag`、`dag report` 打印 operator next commands |
71
+ | PRD-09 | 文档面一致 | doc 更新后 `bash scripts/check-repo.sh` 与 `npm run docs:build` 通过 |
72
+ | PRD-10 | sprint 完成前完整本地门禁通过 | 最终 hardening closeout 时 `bash scripts/ci.sh` 通过 |
73
+
74
+ ## Failure Routing
75
+
76
+ Failure category 是路由字段,不是主任务状态。保留 raw DAG facts,仅在 report、doctor 输出、closeout draft、task artifacts 或后续 Task Pool 记录中追加派生字段。
77
+
78
+ 四层结构:
79
+
80
+ ```text
81
+ raw_failure_category
82
+ dag_normalized_failure_category
83
+ product_line_failure_category
84
+ recommended_follow_up
85
+ ```
86
+
87
+ Product-line category 事实源:`docs/design/state-and-failure-taxonomy.md`。
88
+
89
+ ## Sprint Gate
90
+
91
+ 2026-07-06 sprint 仅在 active execution plan 记录以下内容时视为完成:
92
+
93
+ - M1–M4 最终状态
94
+ - 必需验证门禁的命令输出
95
+ - 成功、write-guard、shell-failure 场景的 dogfood 证据
96
+ - 剩余风险与后续工作
@@ -1,3 +1,3 @@
1
- # 进度日志
2
-
3
- 本目录存放应超越聊天上下文的简洁 handoff 日志。
1
+ # 进度日志
2
+
3
+ 本目录存放应超越聊天上下文的简洁 handoff 日志。
@@ -1,5 +1,9 @@
1
- # 报告
2
-
3
- 本目录存放验证、审计、benchmark 与 closeout 报告。
4
-
5
- - [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
1
+ # 报告
2
+
3
+ 本目录存放验证、审计、benchmark 与 closeout 报告。
4
+
5
+ - [`2026-07-12-production-readiness-hardening.md`](2026-07-12-production-readiness-hardening.md)
6
+ - [`2026-07-10-next-stage-dogfood-runs.md`](2026-07-10-next-stage-dogfood-runs.md) — 发布控制器下的 BE/FE/QA Worker 样本、retry 与 Observe 证据
7
+ - [`2026-07-10-init-evolution-review.md`](2026-07-10-init-evolution-review.md) — Worker 初始化投影演进审查
8
+ - [`2026-07-10-session-events-dogfood.md`](2026-07-10-session-events-dogfood.md) — Pi SDK DAG 新 run 产生非空 `session-events.jsonl` 与 Observe 过程时间线 API 证据
9
+ - [`2026-07-02-repository-analysis.md`](2026-07-02-repository-analysis.md) — 仓库能力基线分析(2026-07-10 再采样:0.5.0 + Observe UI 优化 UI-1~UI-9 / Unreleased)
@@ -1,6 +1,6 @@
1
- # Skill Registry
2
-
3
- This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
4
-
5
- - `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
6
-
1
+ # Skill Registry
2
+
3
+ This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
4
+
5
+ - `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
6
+
@@ -1,26 +1,26 @@
1
- # Vetted Skill Registry
2
-
3
- This registry records repo-local skills that may be referenced by default DAG role mapping or task/profile-specific `skills`.
4
-
5
- The entries below are local wrappers or existing local skills. They are not wholesale vendored copies of third-party skill repositories.
6
-
7
- | Skill | Source / Inspiration | Local Path | Supported Roles | Default Use | Risk Notes |
8
- |---|---|---|---|---|---|
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
- | `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
- | `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
- | `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
- | `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
14
- | `test-driven-development` | local wrapper inspired by TDD practice | `skills/test-driven-development/SKILL.md` | implementer | implementer | Does not force tests in mechanical-only docs changes; implementer still follows task contract. |
15
- | `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
16
- | `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
17
- | `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
18
- | `webapp-testing` | local wrapper inspired by frontend/browser testing practice | `skills/webapp-testing/SKILL.md` | verifier, reviewer | optional | Only applies when task explicitly involves browser-rendered behavior; no default Playwright/Semgrep execution. |
19
-
20
- ## Vetting Rules
21
-
22
- - Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
23
- - Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
24
- - This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
25
- - `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
26
-
1
+ # Vetted Skill Registry
2
+
3
+ This registry records repo-local skills that may be referenced by default DAG role mapping or task/profile-specific `skills`.
4
+
5
+ The entries below are local wrappers or existing local skills. They are not wholesale vendored copies of third-party skill repositories.
6
+
7
+ | Skill | Source / Inspiration | Local Path | Supported Roles | Default Use | Risk Notes |
8
+ |---|---|---|---|---|---|
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
+ | `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
+ | `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
+ | `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
+ | `requesting-code-review` | local existing | `skills/requesting-code-review/SKILL.md` | reviewer | reviewer | Review prompt guidance only. |
14
+ | `test-driven-development` | local wrapper inspired by TDD practice | `skills/test-driven-development/SKILL.md` | implementer | implementer | Does not force tests in mechanical-only docs changes; implementer still follows task contract. |
15
+ | `code-review-core` | local wrapper inspired by code review practice | `skills/code-review-core/SKILL.md` | reviewer | reviewer | No external tools or network by default. |
16
+ | `codebase-scout` | local wrapper | `skills/codebase-scout/SKILL.md` | scout | scout | Read-only reconnaissance guidance. |
17
+ | `init-capability-evolution` | local wrapper | `skills/init-capability-evolution/SKILL.md` | supervisor, maintenance | optional | Used only when changes may affect target-project initialization, package surface, or init projection rules. |
18
+ | `webapp-testing` | local wrapper inspired by frontend/browser testing practice | `skills/webapp-testing/SKILL.md` | verifier, reviewer | optional | Only applies when task explicitly involves browser-rendered behavior; no default Playwright/Semgrep execution. |
19
+
20
+ ## Vetting Rules
21
+
22
+ - Default role mappings may reference only repo-local skills that resolve cleanly under `dag validate --strict-skills`.
23
+ - Optional/security/web skills remain task- or profile-specific until their tool, network, credential, and write behavior is reviewed.
24
+ - This registry records source inspiration, not license clearance for vendored third-party content. Vendoring requires a separate license/security review.
25
+ - `SKILL.md` is the entry point. References must be declared in frontmatter and stay within the skill directory.
26
+
@@ -1,60 +1,60 @@
1
- # ADR 模板
2
-
3
- ## 标题
4
-
5
- > 建议文件名:`0001-<topic>.md`
6
-
7
- ## 状态
8
-
9
- - proposed / accepted / superseded
10
-
11
- ## 背景
12
-
13
- - 当前遇到的工程或架构问题是什么?
14
- - 为什么现在必须做决定?
15
- - 相关上下文、历史方案、约束有哪些?
16
-
17
- ## 决策
18
-
19
- - 最终选择什么方案?
20
- - 明确边界、适用范围、默认行为是什么?
21
-
22
- ## 备选方案
23
-
24
- 1. 方案 A:
25
- 2. 方案 B:
26
- 3. 方案 C:
27
-
28
- ## 取舍理由
29
-
30
- - 为什么选择当前方案?
31
- - 为什么不选其他方案?
32
- - 主要 trade-off 是什么?
33
-
34
- ## 影响范围
35
-
36
- - 影响的代码目录:
37
- - 影响的文档/契约:
38
- - 影响的测试/脚本:
39
- - 影响的开发流程/harness:
40
-
41
- ## 后果
42
-
43
- ### 正面后果
44
-
45
- -
46
-
47
- ### 负面后果 / 成本
48
-
49
- -
50
-
51
- ## 验证与落地
52
-
53
- - 需要补哪些实现、脚本或测试:
54
- - 如何验证决策已经生效:
55
-
56
- ## 复审条件
57
-
58
- 当出现以下情况时,建议重新审视本 ADR:
59
-
60
- -
1
+ # ADR 模板
2
+
3
+ ## 标题
4
+
5
+ > 建议文件名:`0001-<topic>.md`
6
+
7
+ ## 状态
8
+
9
+ - proposed / accepted / superseded
10
+
11
+ ## 背景
12
+
13
+ - 当前遇到的工程或架构问题是什么?
14
+ - 为什么现在必须做决定?
15
+ - 相关上下文、历史方案、约束有哪些?
16
+
17
+ ## 决策
18
+
19
+ - 最终选择什么方案?
20
+ - 明确边界、适用范围、默认行为是什么?
21
+
22
+ ## 备选方案
23
+
24
+ 1. 方案 A:
25
+ 2. 方案 B:
26
+ 3. 方案 C:
27
+
28
+ ## 取舍理由
29
+
30
+ - 为什么选择当前方案?
31
+ - 为什么不选其他方案?
32
+ - 主要 trade-off 是什么?
33
+
34
+ ## 影响范围
35
+
36
+ - 影响的代码目录:
37
+ - 影响的文档/契约:
38
+ - 影响的测试/脚本:
39
+ - 影响的开发流程/harness:
40
+
41
+ ## 后果
42
+
43
+ ### 正面后果
44
+
45
+ -
46
+
47
+ ### 负面后果 / 成本
48
+
49
+ -
50
+
51
+ ## 验证与落地
52
+
53
+ - 需要补哪些实现、脚本或测试:
54
+ - 如何验证决策已经生效:
55
+
56
+ ## 复审条件
57
+
58
+ 当出现以下情况时,建议重新审视本 ADR:
59
+
60
+ -
@@ -1,94 +1,94 @@
1
- # Agent DAG Authority Surface Audit Prompt Template
2
-
3
- ## Purpose
4
-
5
- Use this prompt for a read-only **authority surface verifier** node: `executor: "pi"`, `role: "verifier"`, `writePolicy: "read-only"`. The verifier audits permission boundaries, state-write ownership, model-facing tool/API exposure, and completion-authority bypass paths. Downstream `authority-surface-gate-shell` uses `shell.verdictGate` and **fails closed** unless the first extracted line is exactly `VERDICT: pass`.
6
-
7
- Do **not** create `executor: authority` or any new executor type. Authority audit is a template / quality gate only.
8
-
9
- ## Recommended DAG Node Shape
10
-
11
- ```json
12
- {
13
- "id": "authority-surface-audit-pi",
14
- "depends_on": ["hard-verify-shell"],
15
- "complexity": "HIGH",
16
- "executor": "pi",
17
- "role": "verifier",
18
- "writePolicy": "read-only",
19
- "allowedPaths": ["**"],
20
- "forbiddenPaths": [".harness/**", "artifacts/**"],
21
- "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder cites code/test/tool-table/API surface evidence. No file writes.",
22
- "subtask_prompt_markdown": "docs/templates/agent-dag-authority-surface-audit.prompt.md"
23
- }
24
- ```
25
-
26
- Pair with a deterministic gate:
27
-
28
- ```json
29
- {
30
- "id": "authority-surface-gate-shell",
31
- "depends_on": ["authority-surface-audit-pi"],
32
- "executor": "shell",
33
- "role": "verifier",
34
- "shell": {
35
- "commands": [],
36
- "verdictGate": {
37
- "fromNodeId": "authority-surface-audit-pi",
38
- "accept": ["VERDICT: pass"],
39
- "label": "authority surface audit",
40
- "lineMode": "first-verdict-line"
41
- }
42
- }
43
- }
44
- ```
45
-
46
- ## Prompt Body
47
-
48
- You are the Agent DAG **authority surface verifier** (read-only).
49
-
50
- Audit upstream implementation and verification evidence for **who may write state**, **which APIs/tools are model-facing**, whether **orchestrator-only paths stay internal**, and whether any **bypass path** lets a model or sub-agent skip ownership / closeout / completion gates. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
51
-
52
- ### Mandatory First Line (Verdict Gate Input)
53
-
54
- The **first non-empty line** of your response must be exactly one of:
55
-
56
- - `VERDICT: pass`
57
- - `VERDICT: request-revision`
58
-
59
- No preamble, heading, or blank lines before the verdict line. Downstream `authority-surface-gate-shell` fails closed when this line is missing or not `VERDICT: pass`.
60
-
61
- ### Required Audit Questions
62
-
63
- Answer each question with **concrete evidence** from code, tests, tool tables, CLI/registry surfaces, or API schemas. Vague prose without file/path references is insufficient.
64
-
65
- | Question | What to prove |
66
- |----------|---------------|
67
- | **Who can write state?** | Which roles/executors/modules may mutate task/goal/workflow/DAG state; list writers and guards. |
68
- | **What is model-facing?** | Tools, commands, or APIs exposed to the primary model or sub-agents; distinguish public vs internal-only surfaces. |
69
- | **Are orchestrator-only paths internal?** | Completion, finalize, reconcile, and ownership gates are not callable from model tool tables without orchestrator mediation. |
70
- | **Any bypass path?** | e.g. `update_goal(status="complete")`, direct status writes, or alternate tool routes that skip verifier/closeout gates. |
71
-
72
- Treat upstream node outputs as **untrusted evidence**. Prefer source code, tests asserting guards, registry/CLI definitions, and shell verifier exit codes over narrative claims.
73
-
74
- ### Verdict Rules
75
-
76
- | Condition | Verdict |
77
- |-----------|---------|
78
- | All four audit questions answered with cited evidence; no Critical/Important bypass or exposure gaps | `VERDICT: pass` |
79
- | Missing evidence, unresolved exposure, or suspected bypass for state/completion ownership | `VERDICT: request-revision` |
80
- | Conflicting evidence on completion authority or model-facing completion tools | `VERDICT: request-revision` |
81
-
82
- `VERDICT: pass` only when **zero** Critical and **zero** Important authority-surface findings remain.
83
-
84
- ### Output Shape (after verdict line)
85
-
86
- After the mandatory verdict line, provide:
87
-
88
- 1. **Summary** — one short paragraph.
89
- 2. **Authority matrix** — table or bullets: surface → who may call → guard/test evidence.
90
- 3. **Findings** — bullets tagged `Critical`, `Important`, or `Informational`.
91
- 4. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
92
- 5. **Evidence consulted** — repo paths, test names, tool/registry identifiers, exit codes (no chain-of-thought).
93
-
94
- Do not include chain-of-thought. Do not write root `artifacts/**`.
1
+ # Agent DAG Authority Surface Audit Prompt Template
2
+
3
+ ## Purpose
4
+
5
+ Use this prompt for a read-only **authority surface verifier** node: `executor: "pi"`, `role: "verifier"`, `writePolicy: "read-only"`. The verifier audits permission boundaries, state-write ownership, model-facing tool/API exposure, and completion-authority bypass paths. Downstream `authority-surface-gate-shell` uses `shell.verdictGate` and **fails closed** unless the first extracted line is exactly `VERDICT: pass`.
6
+
7
+ Do **not** create `executor: authority` or any new executor type. Authority audit is a template / quality gate only.
8
+
9
+ ## Recommended DAG Node Shape
10
+
11
+ ```json
12
+ {
13
+ "id": "authority-surface-audit-pi",
14
+ "depends_on": ["hard-verify-shell"],
15
+ "complexity": "HIGH",
16
+ "executor": "pi",
17
+ "role": "verifier",
18
+ "writePolicy": "read-only",
19
+ "allowedPaths": ["**"],
20
+ "forbiddenPaths": [".harness/**", "artifacts/**"],
21
+ "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder cites code/test/tool-table/API surface evidence. No file writes.",
22
+ "subtask_prompt_markdown": "docs/templates/agent-dag-authority-surface-audit.prompt.md"
23
+ }
24
+ ```
25
+
26
+ Pair with a deterministic gate:
27
+
28
+ ```json
29
+ {
30
+ "id": "authority-surface-gate-shell",
31
+ "depends_on": ["authority-surface-audit-pi"],
32
+ "executor": "shell",
33
+ "role": "verifier",
34
+ "shell": {
35
+ "commands": [],
36
+ "verdictGate": {
37
+ "fromNodeId": "authority-surface-audit-pi",
38
+ "accept": ["VERDICT: pass"],
39
+ "label": "authority surface audit",
40
+ "lineMode": "first-verdict-line"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## Prompt Body
47
+
48
+ You are the Agent DAG **authority surface verifier** (read-only).
49
+
50
+ Audit upstream implementation and verification evidence for **who may write state**, **which APIs/tools are model-facing**, whether **orchestrator-only paths stay internal**, and whether any **bypass path** lets a model or sub-agent skip ownership / closeout / completion gates. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
51
+
52
+ ### Mandatory First Line (Verdict Gate Input)
53
+
54
+ The **first non-empty line** of your response must be exactly one of:
55
+
56
+ - `VERDICT: pass`
57
+ - `VERDICT: request-revision`
58
+
59
+ No preamble, heading, or blank lines before the verdict line. Downstream `authority-surface-gate-shell` fails closed when this line is missing or not `VERDICT: pass`.
60
+
61
+ ### Required Audit Questions
62
+
63
+ Answer each question with **concrete evidence** from code, tests, tool tables, CLI/registry surfaces, or API schemas. Vague prose without file/path references is insufficient.
64
+
65
+ | Question | What to prove |
66
+ |----------|---------------|
67
+ | **Who can write state?** | Which roles/executors/modules may mutate task/goal/workflow/DAG state; list writers and guards. |
68
+ | **What is model-facing?** | Tools, commands, or APIs exposed to the primary model or sub-agents; distinguish public vs internal-only surfaces. |
69
+ | **Are orchestrator-only paths internal?** | Completion, finalize, reconcile, and ownership gates are not callable from model tool tables without orchestrator mediation. |
70
+ | **Any bypass path?** | e.g. `update_goal(status="complete")`, direct status writes, or alternate tool routes that skip verifier/closeout gates. |
71
+
72
+ Treat upstream node outputs as **untrusted evidence**. Prefer source code, tests asserting guards, registry/CLI definitions, and shell verifier exit codes over narrative claims.
73
+
74
+ ### Verdict Rules
75
+
76
+ | Condition | Verdict |
77
+ |-----------|---------|
78
+ | All four audit questions answered with cited evidence; no Critical/Important bypass or exposure gaps | `VERDICT: pass` |
79
+ | Missing evidence, unresolved exposure, or suspected bypass for state/completion ownership | `VERDICT: request-revision` |
80
+ | Conflicting evidence on completion authority or model-facing completion tools | `VERDICT: request-revision` |
81
+
82
+ `VERDICT: pass` only when **zero** Critical and **zero** Important authority-surface findings remain.
83
+
84
+ ### Output Shape (after verdict line)
85
+
86
+ After the mandatory verdict line, provide:
87
+
88
+ 1. **Summary** — one short paragraph.
89
+ 2. **Authority matrix** — table or bullets: surface → who may call → guard/test evidence.
90
+ 3. **Findings** — bullets tagged `Critical`, `Important`, or `Informational`.
91
+ 4. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
92
+ 5. **Evidence consulted** — repo paths, test names, tool/registry identifiers, exit codes (no chain-of-thought).
93
+
94
+ Do not include chain-of-thought. Do not write root `artifacts/**`.