@buildr-ai/buildr 0.1.0-rc.2 → 0.1.0-rc.21

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 (181) hide show
  1. package/README.md +47 -5
  2. package/application-payload.json +595 -0
  3. package/bin/buildr.mjs +14 -0
  4. package/installation-origin.json +13 -0
  5. package/package.json +16 -45
  6. package/payload/licenses/dependencies/yaml-LICENSE +13 -0
  7. package/payload/product/LICENSE +21 -0
  8. package/payload/product/README.md +59 -0
  9. package/payload/product/package/README.md +42 -0
  10. package/{package → payload/product/package}/bootstrap/contract.yml +26 -11
  11. package/{package → payload/product/package}/bootstrap/guide.md +11 -11
  12. package/payload/product/package/launchers/assets/Buildr.icns +0 -0
  13. package/payload/product/package/launchers/assets/Buildr.ico +0 -0
  14. package/payload/product/package/manifest.yml +547 -0
  15. package/payload/product/package/targets/runtime/skills/buildr/SKILL.md +174 -0
  16. package/{package → payload/product/package}/targets/workspace/commands/buildr/openspec/manifest.yml +2 -2
  17. package/payload/product/package/targets/workspace/components/buildr/openspec/component.yml +79 -0
  18. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-apply-sidebar.md +21 -0
  19. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-archive-converge.md +5 -0
  20. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-explore-terminology.md +5 -0
  21. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-propose-sidebar.md +21 -0
  22. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-sync-converge.md +5 -0
  23. package/payload/product/package/targets/workspace/components/buildr/openspec/contributions/openspec-update-sidebar.md +13 -0
  24. package/payload/product/package/targets/workspace/gitattributes +1 -0
  25. package/payload/product/package/targets/workspace/gitignore +31 -0
  26. package/{package → payload/product/package}/targets/workspace/projects/AGENTS.project.md +1 -1
  27. package/payload/product/package/targets/workspace/rules/buildr/core.md +62 -0
  28. package/payload/product/package/targets/workspace/skills/buildr/capability-adaptation/SKILL.md +56 -0
  29. package/payload/product/package/targets/workspace/skills/buildr/capability-adaptation/agents/openai.yaml +4 -0
  30. package/payload/product/package/targets/workspace/skills/buildr/current-knowledge-maintenance/SKILL.md +103 -0
  31. package/payload/product/package/targets/workspace/skills/buildr/declaration-intake/SKILL.md +65 -0
  32. package/payload/product/package/targets/workspace/skills/buildr/git-operations/SKILL.md +100 -0
  33. package/payload/product/package/targets/workspace/skills/buildr/openspec-contract-guard/SKILL.md +65 -0
  34. package/payload/product/package/targets/workspace/skills/buildr/project-daily-progress/SKILL.md +52 -0
  35. package/payload/product/package/targets/workspace/skills/buildr/project-testing/SKILL.md +84 -0
  36. package/payload/product/package/targets/workspace/skills/buildr/project-testing/references/testing-model-v1.md +116 -0
  37. package/payload/product/package/targets/workspace/skills/buildr/task-development/SKILL.md +108 -0
  38. package/payload/product/package/targets/workspace/skills/buildr/task-environment/SKILL.md +42 -0
  39. package/payload/product/package/targets/workspace/skills/buildr/task-environment/agents/openai.yaml +4 -0
  40. package/payload/product/package/targets/workspace/skills/buildr/task-environment/references/project-environment-preparation-v1.md +14 -0
  41. package/payload/product/package/targets/workspace/skills/buildr/task-environment/templates/project-preparation.yml +20 -0
  42. package/payload/product/package/targets/workspace/skills/buildr/task-environment/templates/task-environment-plan-request.json +17 -0
  43. package/payload/product/package/targets/workspace/skills/buildr/task-finish/SKILL.md +80 -0
  44. package/payload/product/package/targets/workspace/skills/buildr/task-manager/SKILL.md +47 -0
  45. package/payload/product/package/targets/workspace/skills/buildr/task-manager/agents/openai.yaml +4 -0
  46. package/payload/product/package/targets/workspace/skills/buildr/task-retrospective/SKILL.md +101 -0
  47. package/payload/product/package/targets/workspace/skills/buildr/task-retrospective/agents/openai.yaml +4 -0
  48. package/payload/product/package/targets/workspace/skills/buildr/task-review/SKILL.md +60 -0
  49. package/payload/product/package/targets/workspace/skills/buildr/task-review/agents/openai.yaml +4 -0
  50. package/payload/product/package/targets/workspace/skills/buildr/task-triage/SKILL.md +119 -0
  51. package/payload/product/package/targets/workspace/skills/buildr/task-verification/SKILL.md +142 -0
  52. package/payload/product/package/targets/workspace/skills/buildr/task-verification/references/project-verification-v2.md +51 -0
  53. package/payload/product/package/targets/workspace/skills/buildr/task-verification/templates/project-verification.yml +16 -0
  54. package/payload/product/package/targets/workspace/skills/buildr/task-worktree/SKILL.md +28 -0
  55. package/payload/product/package/targets/workspace/skills/buildr/terminology-governance/SKILL.md +60 -0
  56. package/payload/product/package/targets/workspace/skills/buildr/ui-preview/SKILL.md +74 -0
  57. package/payload/product/package/targets/workspace/skills/contracts/buildr/current-knowledge-maintenance/v1.md +36 -0
  58. package/payload/product/package/targets/workspace/skills/contracts/buildr/current-knowledge-maintenance/v2.md +45 -0
  59. package/payload/product/package/targets/workspace/skills/contracts/buildr/git-operations/v1.md +39 -0
  60. package/payload/product/package/targets/workspace/skills/contracts/buildr/git-worktree-provider/v1.md +35 -0
  61. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-development/v2.md +61 -0
  62. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-environment/v1.md +37 -0
  63. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-finish/v1.md +59 -0
  64. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-record/v2.md +35 -0
  65. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-retrospective/v2.md +41 -0
  66. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-review/v1.md +39 -0
  67. package/payload/product/package/targets/workspace/skills/contracts/buildr/task-verification/v3.md +63 -0
  68. package/payload/product/package/targets/workspace/skills/contracts/buildr/terminology-governance/v1.md +36 -0
  69. package/{package → payload/product/package}/targets/workspace/skills/openspec/openspec-apply-change/SKILL.md +4 -3
  70. package/{package → payload/product/package}/targets/workspace/skills/openspec/openspec-archive-change/SKILL.md +4 -3
  71. package/{package → payload/product/package}/targets/workspace/skills/openspec/openspec-explore/SKILL.md +4 -1
  72. package/{package → payload/product/package}/targets/workspace/skills/openspec/openspec-propose/SKILL.md +4 -1
  73. package/{package → payload/product/package}/targets/workspace/skills/openspec/openspec-sync-specs/SKILL.md +4 -3
  74. package/payload/product/package/targets/workspace/skills/openspec/openspec-update-change/SKILL.md +86 -0
  75. package/payload/product/package.json +33 -0
  76. package/payload/product/src/infrastructure/sqlite/migrations/0000_create_migration_ledger.sql +16 -0
  77. package/payload/product/src/infrastructure/sqlite/migrations/0001_create_task_store.sql +47 -0
  78. package/payload/product/src/infrastructure/sqlite/migrations/0002_create_parent_task_relations.sql +7 -0
  79. package/payload/product/src/infrastructure/sqlite/migrations/0003_inline_parent_task_column.sql +19 -0
  80. package/payload/product/src/infrastructure/sqlite/migrations/0004_create_task_current_records.sql +16 -0
  81. package/payload/product/src/infrastructure/sqlite/migrations/0005_create_task_retrospective_current.sql +4 -0
  82. package/payload/product/src/infrastructure/sqlite/migrations/0006_create_task_lifecycle_current.sql +4 -0
  83. package/payload/product/src/infrastructure/sqlite/migrations/0007_create_task_finish_current.sql +46 -0
  84. package/payload/product/src/infrastructure/sqlite/migrations/0008_create_task_environment_current.sql +8 -0
  85. package/payload/product/src/infrastructure/sqlite/migrations/0009_retire_task_lifecycle_current.sql +107 -0
  86. package/payload/product/src/infrastructure/sqlite/migrations/0010_add_task_retrospective_disposition.sql +19 -0
  87. package/payload/product/src/infrastructure/sqlite/migrations/0011_create_task_execution_records.sql +115 -0
  88. package/payload/product/src/infrastructure/sqlite/migrations/0012_compact_task_finish_current.sql +261 -0
  89. package/payload/product/src/infrastructure/sqlite/migrations/0013_add_todo_task_retrospective_sources.sql +56 -0
  90. package/payload/product/src/infrastructure/sqlite/migrations/0014_add_task_execution_invocation_identity.sql +14 -0
  91. package/payload/product/src/infrastructure/sqlite/migrations/0015_add_task_execution_unknown_outcome.sql +143 -0
  92. package/payload/product/src/infrastructure/sqlite/migrations/0016_allow_terminal_task_finish_target_lease.sql +83 -0
  93. package/payload/product/src/infrastructure/sqlite/migrations/0017_expand_task_finish_repository_set.sql +111 -0
  94. package/payload/product/src/interfaces/local-app/web-dist/assets/antd-NAtxFWmu.js +394 -0
  95. package/payload/product/src/interfaces/local-app/web-dist/assets/index-BqoyfMSY.css +1 -0
  96. package/payload/product/src/interfaces/local-app/web-dist/assets/index-DTqvE0TF.js +39 -0
  97. package/payload/product/src/interfaces/local-app/web-dist/assets/react-9kRp7SbA.js +28 -0
  98. package/payload/product/src/interfaces/local-app/web-dist/index.html +19 -0
  99. package/payload/runtime/read-worker.cjs +45071 -0
  100. package/runtime/buildr.cjs +51533 -0
  101. package/scripts/postinstall.mjs +15 -0
  102. package/docs/agent-runtime-adapters.md +0 -94
  103. package/docs/cli-architecture.md +0 -65
  104. package/docs/cli-reference.md +0 -67
  105. package/docs/known-limitations.md +0 -15
  106. package/examples/minimal-workspace/README.md +0 -24
  107. package/package/README.md +0 -28
  108. package/package/manifest.yml +0 -150
  109. package/package/targets/runtime/skills/buildr/SKILL.md +0 -154
  110. package/package/targets/workspace/.buildr/workspace.yml +0 -5
  111. package/package/targets/workspace/commands/manifest.yml +0 -2
  112. package/package/targets/workspace/components/buildr/openspec/component.yml +0 -16
  113. package/package/targets/workspace/components/buildr/openspec/contributions/openspec-apply-sidebar.md +0 -3
  114. package/package/targets/workspace/components/buildr/openspec/contributions/openspec-archive-sidebar.md +0 -3
  115. package/package/targets/workspace/components/buildr/openspec/contributions/openspec-explore-sidebar.md +0 -3
  116. package/package/targets/workspace/components/buildr/openspec/contributions/openspec-propose-sidebar.md +0 -3
  117. package/package/targets/workspace/components/buildr/openspec/contributions/openspec-sync-sidebar.md +0 -3
  118. package/package/targets/workspace/components/buildr/openspec/contributions/task-finish-post-sync.md +0 -1
  119. package/package/targets/workspace/components/buildr/openspec/contributions/task-finish-pre-sync.md +0 -1
  120. package/package/targets/workspace/components/buildr/openspec/contributions/task-triage-change-ready.md +0 -10
  121. package/package/targets/workspace/components/manifest.yml +0 -2
  122. package/package/targets/workspace/gitignore +0 -16
  123. package/package/targets/workspace/projects/manifest.yml +0 -2
  124. package/package/targets/workspace/projects/services/manifest.yml +0 -3
  125. package/package/targets/workspace/projects/skills/manifest.yml +0 -2
  126. package/package/targets/workspace/rules/buildr/core.md +0 -65
  127. package/package/targets/workspace/rules/manifest.yml +0 -9
  128. package/package/targets/workspace/skills/buildr/git-ops/SKILL.md +0 -73
  129. package/package/targets/workspace/skills/buildr/openspec-contract-guard/SKILL.md +0 -67
  130. package/package/targets/workspace/skills/buildr/task-finish/SKILL.md +0 -104
  131. package/package/targets/workspace/skills/buildr/task-triage/SKILL.md +0 -103
  132. package/package/targets/workspace/skills/buildr/task-worktree/SKILL.md +0 -104
  133. package/package/targets/workspace/skills/manifest.yml +0 -38
  134. package/tools/buildr +0 -11
  135. package/tools/cli/application/cli-update.mjs +0 -219
  136. package/tools/cli/application/compose-runtime.mjs +0 -38
  137. package/tools/cli/application/doctor/runtime-diagnostics.mjs +0 -227
  138. package/tools/cli/application/doctor/scope-diagnostics.mjs +0 -440
  139. package/tools/cli/application/doctor/service-diagnostics.mjs +0 -184
  140. package/tools/cli/application/doctor.mjs +0 -201
  141. package/tools/cli/application/package-maintenance/builtin-receipts.mjs +0 -73
  142. package/tools/cli/application/package-maintenance/output.mjs +0 -148
  143. package/tools/cli/application/package-maintenance/smoke-checks.mjs +0 -463
  144. package/tools/cli/application/package-maintenance/static-validation.mjs +0 -680
  145. package/tools/cli/application/package-maintenance.mjs +0 -540
  146. package/tools/cli/application/runtime.mjs +0 -118
  147. package/tools/cli/application/workspace-operations.mjs +0 -311
  148. package/tools/cli/bootstrap.mjs +0 -6
  149. package/tools/cli/command/help.mjs +0 -296
  150. package/tools/cli/command/registry.mjs +0 -97
  151. package/tools/cli/domains/commands.mjs +0 -661
  152. package/tools/cli/domains/components.mjs +0 -922
  153. package/tools/cli/domains/openspec.mjs +0 -603
  154. package/tools/cli/domains/package-assets.mjs +0 -652
  155. package/tools/cli/domains/rules.mjs +0 -380
  156. package/tools/cli/domains/runtime.mjs +0 -87
  157. package/tools/cli/domains/skills.mjs +0 -647
  158. package/tools/cli/domains/workspace.mjs +0 -571
  159. package/tools/cli/shared/infrastructure.mjs +0 -411
  160. package/tools/cli/shared/json-contracts.mjs +0 -22
  161. package/tools/cli/shared/platform.mjs +0 -52
  162. package/tools/runtime/adapter-contract.mjs +0 -655
  163. package/tools/runtime/check-claude-code.mjs +0 -23
  164. package/tools/runtime/check-codex.mjs +0 -23
  165. package/tools/runtime/check-runtime.mjs +0 -98
  166. package/tools/runtime/projection.mjs +0 -375
  167. package/tools/runtime/render-claude-code-rules.mjs +0 -459
  168. package/tools/runtime/render-claude-code.mjs +0 -59
  169. package/tools/runtime/skills/arguments.mjs +0 -51
  170. package/tools/runtime/skills/contributions.mjs +0 -171
  171. package/tools/runtime/skills/manifests.mjs +0 -167
  172. package/tools/runtime/skills/primitives.mjs +0 -86
  173. package/tools/runtime/skills/render-plan.mjs +0 -243
  174. package/tools/runtime/skills/sources.mjs +0 -276
  175. package/tools/shared/fetch-remote-text.mjs +0 -78
  176. package/tools/verification/integrity/managed-data-integrity.mjs +0 -107
  177. package/tools/verification/integrity/managed-mutations.mjs +0 -72
  178. package/tools/verification/openspec/contract.mjs +0 -212
  179. package/tools/verification/runtime/adapter-contract.mjs +0 -218
  180. package/tools/verification/runtime/adapter-parity.mjs +0 -173
  181. /package/{package → payload/product/package}/targets/workspace/AGENTS.md +0 -0
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: task-development
3
+ description: 正式Task从首个proposal、方案或直接实现等研发动作开始,到稳定Content Target、正式Verification、Task Candidate、Completion Review、风险决定与Finish handoff的全过程使用;不用于Task Record、专业内容写入、测试开发或交付执行。
4
+ ---
5
+
6
+ # Task Development
7
+
8
+ 本 Skill 编排`buildr.task-development/v2`。它通过Buildr内部Task Development Application工作;仍没有公共Development CLI,Buildr Web只消费Application `inspect`的只读投影来展示通用Development。Parent coordination另有受控公共CLI/Buildr Web surface,但Development Receipt仍只能由Application写入。不得手写Development Receipt。
9
+
10
+ 所有Development内部action必须使用`buildr task next`返回的`environment.controllerInvocation.command + argsPrefix`,再追加`__internal task-development <action> ...`;不得使用Task Environment的candidate `cliInvocation`、resource payload root或checkout中的`src/interfaces/internal`路径写canonical Workspace。
11
+
12
+ ## 阶段化上下文与效率边界
13
+
14
+ 进入或继续已有Formal Task时,先消费`buildr task next <task-id> --target <canonical-workspace> --json`的compact snapshot。它返回matching Environment execution roots、retained controller、保存的Development applicability和一个typed next;默认不复制完整Receipt。`required`只覆盖authority/identity恢复,`recommended`不构成gate,用户选择其他合法动作时仍交给实际owner contract判断。只有诊断恢复、审查或明确请求完整evidence时才读取详细Result。
15
+
16
+ 只在某个专业动作成为 next executable action 时读取该动作的 capability contract、selected provider 与直接 authority:Planning Review、current knowledge、Formal Verification、Completion Review 和 Finish 的完整指引分别在进入对应阶段前装配,不在 proposal 前一次性预读整个生命周期。当前动作仍必须遵守已触发 Skill、required Rule、授权与 result evidence,按需读取不等于跳过门禁。
17
+
18
+ 首次修改 proposal、Skill、代码、测试或当前知识前,复用 triage 建立的一次有界 authority source map;若尚未形成,则从直接相关的 canonical specs、current knowledge、实现、测试与 registries 建立。该 map 保留在 Agent 工作上下文,不写入 Receipt 或其他产品 store;只有 scope、authority 或相关事实变化时才增量刷新。
19
+
20
+ Task 可能产生用户可见前端 UI 变化、且 triage 尚未询问时,先询问用户是否需要界面预演稿(UI Preview)。只有当前任务已有明确确认,才在正式前端实现前加载独立 `ui-preview` Skill;用户拒绝、未确认或要求继续时不生成并继续本流程。UI Preview 与是否完成 planning、形成 Content Target、进入 Verification 或 Finish 无关,不保存为 Development node、gate、Result、Receipt 或 blocker。
21
+
22
+ proposal 启动耗时、重复 Skill/authority 读取、重复命令、实现到 handoff 耗时与 verification wall-clock 只作为 `task-retrospective` 跟踪、评估和优化的参考。它们不进入专业 Result、Development gate、Task status、Candidate identity或自动 skip/advance 决策,也不构成 pass/fail threshold。
23
+
24
+ 日常 Development transition 或状态回读只需要 current identity、applicability 与下一步方向时,优先使用Task Entry Snapshot;直接调试Development owner时可对内部driver显式使用`--compact`。两者都只是response projection,不追加观察或写入,并以同源`formalVerificationReadiness`说明正式验证交接是否尚未到达、存在明确blocker或需要current knowledge即时确认。需要完整Receipt、专业Result引用或handoff snapshot时仍读取默认完整result。typed `next`与legacy `nextActions`来自同一判定;它们不执行动作、不代表授权,也不得越过当前阶段才加载的selected provider。
25
+
26
+ ## Parent Plan 与 Child Contribution
27
+
28
+ 新建Parent可以显式采用Parent Plan。正常启动顺序是:active Task → matching ready Parent Environment → Development begin → Parent Plan record → current Planning Review → `task parent refresh-planning`消费Review → `task next`返回首个依赖已满足的Contribution。任何一步blocked都只恢复该步的owner事实;不要先创建Child、手工拼Development写入或把非阻塞建议升级成gate。
29
+
30
+ Parent Environment只服务Parent本身。纯协调且在Child前不修改交付内容的Parent可以显式采用coordination-only共享执行根;Parent会直接修改代码、文档或其他生产内容时,必须从一开始使用隔离checkout。Child Environment按Child自己的Task scope另行准备,既不继承Parent Receipt,也不因Parent Plan刚建立而提前prepare。若Child依赖Parent尚未进入canonical baseline的真实交付,Parent Plan必须表达该依赖,并等前置Contribution正式交付后再准备Child Environment。
31
+
32
+ 先用`task parent inspect`确认`legacy|parent-plan`模式;`task parent record|reconcile --schema|--example`是Parent Plan输入的公开发现入口。首次`record`只保存outcome、architecture invariants、Contribution Map、dependencies与final acceptance。Parent Plan不得保存Child状态、Result、完整delta Requirement、字段/migration/file清单或Markdown checkbox进度。只有这五类协调内容实质变化时才用current identity执行`reconcile`;普通Child完成、Verification、Change归档或Finish不得改写Plan。
33
+
34
+ Parent Plan JSON只是`task parent record|reconcile --input`的一次性CLI输入,不是Development资源或长期事实。Agent必须在操作系统临时目录创建,不得写入Workspace的`.buildr/local/`、`.buildr/tmp/`、`.buildr/transient/`或其他受管资产目录;`record`或`reconcile`成功后必须立即删除。命令失败时,只有仍需使用同一输入诊断或重试才能暂时保留,并必须报告路径;问题解决、放弃重试或Task终止后立即删除。Application保存的current Parent Plan才是authority;CLI、Task Development和Environment cleanup均不扫描或删除调用方临时输入。
35
+
36
+ Child必须先通过Task Record绑定Parent,再建立自己的Development Receipt,并用`task parent bind-child`绑定一个或多个current Contribution。Child仍拥有独立Environment、窄Change、Planning Review、Verification、Completion Review与Finish;同一个具体规范变化同一时间只能由一个active Change持有。
37
+
38
+ Child形成正式handoff时必须提交`contributionHandoff`,完整表达planned、delivered、extra、residual、superseded、affected与唯一`nextAction`。Application要求planned精确匹配已保存binding,全部引用属于current Parent Plan,且parentTaskId与Task Record关系一致;`completed`状态不能替代handoff证明。Parent自己承担窄集成Contribution时,在Plan中把`plannedChildTaskId`设为Parent Task ID,并由Parent自己的current Development handoff证明。
39
+
40
+ Child越过其他Contribution、改变依赖/invariant/final acceptance或覆盖未来Child范围时,先根据已保存handoff显式`reconcile` Parent Plan,再分别更新或放弃受影响Child:全部覆盖用Task Record `abandon`并在handoff/Plan中表达superseded,部分覆盖只保留residual intent与窄Change;不得伪装completed,也不得从代码、文件或canonical specs猜测delivery。
41
+
42
+ 所有Contribution得到saved delivery或明确superseded后,`task parent accept`仍只记录显式最终集成验收,不自动完成Parent。随后继续正常Candidate、Completion Review、decision、handoff与Formal Finish。
43
+
44
+ ## 从首个研发动作接入
45
+
46
+ 1. 读取Task Record,确认Task active、Intent、Project/Service scope和`0..N` Change引用。
47
+ 2. 通过`task-environment`恢复matching ready Environment,只使用Receipt返回的execution/validation roots。
48
+ 3. 通过Development Application inspect已有Receipt;若缺失,在首个proposal、design、直接实现或其他正式研发动作前调用`begin`,记录完整Change dispositions与current planning snapshot。若Task将绑定OpenSpec变更,必须先有可解析脚手架并完成`add-change`再`begin`;不得先对空变更列表`begin`再绑定同一变更。无变更的任务仍在首个实现前`begin`空列表。`begin|planning`都必须显式提交完整`planning`整值;没有node时提交`{"targetIdentity":null,"nodes":[]}`,不得用字段omission表达清空、保留或patch。
49
+ 4. Proposal、design或Project自定义规划artifact形成/改变时调用`planning`,只保存专业authority、portable reference、content identity、disposition与最小summary。不存在的节点不造占位;`not-applicable`说明任务不适用;`waived`必须绑定明确用户/业务授权source。省略顶层`planning`时Application会在任何Receipt写入前失败关闭,Agent应根据专业authority重新形成完整snapshot,而不是猜测旧值。
50
+ 5. 通过`task-review`inspect Planning Result。Review可按当前policy不存在、not-applicable或明确waived;存在时必须绑定current planning target。旧Result和handoff snapshot即使stale也不删除或改写。
51
+
52
+ 正式Task的OpenSpec planning artifacts达到apply-ready后,不再手工摘要文件。使用`buildr task next`返回的matching retained `environment.controllerInvocation`调用bundled只读resolver:
53
+
54
+ ```text
55
+ <controller-command> <controller-args-prefix...> __internal task-planning-identity inspect --task <task-id> --target <canonical-workspace>
56
+ ```
57
+
58
+ 只有返回`resolved`时,才能把原样`target.identity`与全部`planningNodes`提交给`planning`并交给Planning Review。不得用artifact path、raw digest、mtime、checkbox progress、Git ref或旧Review target替代;返回`blocked`时停止推进并执行唯一`nextActions[0]`。归档后再次调用resolver:target相同则沿用current Planning Review,只更新Change disposition;target不同则先更新planning并重审。
59
+
60
+ Development只拥有这些专业事实如何构成当前Task研发过程,不生成或复制proposal、design、Review/Verification Result正文。
61
+
62
+ ## 开发到稳定目标
63
+
64
+ 在 Candidate freeze 前完成所有内容修改、测试开发与修复、Quick/Task-affected 反馈、current knowledge 维护,以及每个关联 Change 的 deterministic convergence/archive 最终处置。这些动作属于相应 Project/Skill,不由 Development Application 执行。规划期间使用`pending`;只有OpenSpec专业流程已收敛时才能提交`converged`。Application会复用Task Record的Task-scoped Change read model,要求当前working copy为`available + archived`;retained baseline仍active不构成阻塞,调用方summary、路径与文件存在也不能替代该事实。OpenSpec归档路径、provenance、checkbox完成态和filesystem时间不属于plan target;只有Task Planning Identity resolver返回的新target才能使Planning Review stale。
65
+
66
+ 创建或重写文本文件时直接遵守required Core的EOF不变量。内容固定后、调用`observe`形成Content Target之前,检查Task本次新增的全部文本文件;Git-backed scope必须同时覆盖tracked-added与未忽略的untracked文件,非Git scope按Task实际新增文件inventory检查。发现末尾空白行时先修正再`observe`;不得为了清理未触达的存量EOF问题扩大当前Task范围。修正改变delivery bytes时,后续Content Target与验证证据必须基于修正后内容,不得复用旧bytes的evidence。
67
+
68
+ 检查通过后,向Development Application提交完整Change dispositions并调用`observe`形成Content Target。任一Change仍为`pending`时Application会在Content observation与Receipt写入前失败关闭;先完成Change-owned实现、current knowledge与deterministic convergence/archive,不能为了进入验证把pending伪装成stable。code-only Task提交空数组,明确`not-applicable`继续按原路径工作。观察结果必须只含逻辑selector、相对source path、observer capability与内容identity,不得保存本机路径。Content Target形成前,Receipt状态保持`planning`,不得虚构policy、Candidate或Result。
69
+
70
+ Candidate freeze后交付基线(Delivery Baseline)前进时,不要rebase或修改原Task worktree。先只读inspect原Task source snapshot、Task Context、policy与gates;Task Development是Content Target、Candidate、Verification、Completion Review、decision与handoff是否current/stale的唯一authority。原Task source与这些输入未变时,全部facts保持current,直接让Finish在run-owned隔离交付载体(Delivery Carrier)处理交付适配(Delivery Adaptation);不得调用observe覆盖Content Target、重跑正式Verification或递增generation。
71
+
72
+ Finish的Git conflict只证明机械应用失败或需要语义判断,不证明任务贡献(Task Contribution)已改变。只有Agent确认任务行为、验收目标或原Task source/Task Contribution真实变化时,才调用observe并按本Skill重新Verification、Completion Review、handoff与freeze。无法判断时保持blocked,不交付或伪造复用evidence。
73
+
74
+ ## Verification policy 与正式 Verification
75
+
76
+ 根据 Task scope 和 Task Verification Application 返回的 current declarations,形成一份完整 policy:
77
+
78
+ - 选择当前稳定目标需要的已有 capabilities,并说明 required;
79
+ - 没有能力时记录 Project/Service coverage gap;
80
+ - applicability override 必须包含 Project、capability、required decision、scope、basis 和 source;
81
+ - 不在 Verification 阶段开发测试,也不复制 Project 测试 registry。
82
+
83
+ 有效Project集合必须合并显式Project、Service所属Project与Change所属Project。只有并集为空时才使用仅工作区policy:空declarations、空capabilities、唯一`workspace` coverage gap与空overrides;Service或Change不能因省略`scope.projects`进入该分支。仅工作区Content Target变化后重新形成policy;Project集合或declaration变化时旧policy必须stale。
84
+
85
+ 在启动昂贵Formal Verification前读取response-only `formalVerificationReadiness`:`blocked`只处理其中明确的Change、Content Target或policy blocker;`unknown`时调用selected current knowledge provider对同一current tree执行只读`inspect`。返回`aligned|not-applicable`后直接对同一Content Target进入`task-verification`,无需为了保存ready摘要重读Snapshot或写入Development;返回`unresolved`时先由knowledge owner收敛,任何delivery content变化都重新观察Content Target。readiness与inspect Result不进入Receipt、Result或新sidecar。
86
+
87
+ 该预检只属于正式Task的Development → Formal Verification交接。开发中的focused/affected/unit/integration反馈、Task外transient `verification run`和Candidate CI不读取readiness、不增加检查步骤,也不因Change pending或knowledge unknown被阻塞。`unknown`产生的是`recommended` owner action,不是通用executor硬门禁;合法替代顺序仍由实际owner contract判断。
88
+
89
+ 然后对 Content Target identity 执行正式 `task-verification`。Result target/declarations 必须 current;policy 中每个 required capability 都必须有明确 passed/failed fact,每个 policy gap 都必须在 Result 中有对应 coverage gap。仅工作区没有验证能力时记录空declarations、空capabilities、唯一workspace gap与`not-passed`,不得自动passed。gap尚未进入matching current Result时不得freeze;事实完整后仍按现有风险授权门禁推进。
90
+
91
+ ## Candidate、Completion 与决定
92
+
93
+ 所有Change disposition非pending,且每个`converged`均由current working copy archived事实证明后,planning nodes与适用gates已得到current专业Result、`not-applicable`或明确`waived`处置,policy current且Verification facts满足policy,才调用Development Application freeze。freeze不修改内容、不运行命令,只创建或复用current Candidate;Change lifecycle、planning、Content、Task context、policy或gate disposition变化会使旧Candidate失效并在下一次freeze递增generation。
94
+
95
+ 随后用 `task-review` 对 Candidate identity 执行 Completion Review。根据 current gates 记录:
96
+
97
+ - `blocked`:说明未获接受的风险或仍需处理的问题,不修改Task顶层status;
98
+ - `proceed`:必须绑定current Candidate。Verification not-passed、coverage gap或Completion changes-required时,每项风险都要绑定`verification|completion`、精确Result digest、scope、summary和用户授权source;跳过整个适用gate使用`gate`记录waiver,不伪造Result或混入风险列表。
99
+
100
+ 只有 current Candidate、三个 current gates 和合法 proceed decision 同时成立时生成正式 handoff。Application append immutable snapshot;不得因后续 Result 刷新或新 generation 改写旧 snapshot。承担Parent Contribution的Task必须同时提供上述Contribution Handoff。
101
+
102
+ ## 交给 Finish
103
+
104
+ handoff 完成后调用 `task-finish`。Finish 只能读取该 snapshot、准备或保留隔离Delivery Carrier、交付并清理;它每次核验都必须把run冻结的handoff、Candidate、generation与Content Target identity提交给Development Application,不能从历史handoffs自行选择。Finish不得收敛Change、同步Candidate内容、生成Candidate、发起正式Verification/Completion Review、接受风险或修改Development Receipt。只有Development Application报告applicability stale时才回到本Skill;Finish机械冲突留在carrier适配路径。
105
+
106
+ ## 完成证据
107
+
108
+ 报告planning snapshot identity与nodes/dispositions、Content Target identity、policy identity、Verification Result或waiver applicability、Candidate identity/generation、Completion Result或waiver applicability、decision、handoff identity,以及适用的Task Contribution/Delivery Baseline观察与Finish carrier equivalence。不得把Product Candidate verification误报成Task Candidate,也不得把commit/branch/worktree当Candidate。
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: task-environment
3
+ description: 正式 Task 需要准备、检查、恢复或清理实际执行环境,或按 Task ID 取得 Environment Receipt 的当前机器事实时使用;不用于任务分流、Task Record、验证结论或 Git 集成。
4
+ ---
5
+
6
+ # Task Environment Skill
7
+
8
+ 本 Skill 是 `buildr.task-environment/v1` 的默认 provider。它调用公开 CLI,不手写或解析 Environment Receipt。
9
+
10
+ 开始行动时必须读取 `references/project-environment-preparation-v1.md`。只有经`declaration-intake`完成只读发现、展示精确diff并取得用户授权后,才使用`templates/project-preparation.yml`维护长期声明;提交Task选择时使用 `templates/task-environment-plan-request.json`。未经用户授权不得把候选声明写入Project。
11
+
12
+ ## 使用方式
13
+
14
+ 必须已有正式 Task Record,并明确 canonical Workspace:
15
+
16
+ ```bash
17
+ buildr task environment prepare <task-id> --agent <adapter> --target <canonical-workspace> --json
18
+ buildr task environment prepare <task-id> --plan <json-file> --agent <adapter> --target <canonical-workspace> --json
19
+ buildr task environment plan record <task-id> --input <json-file> --target <canonical-workspace> --json
20
+ buildr task environment plan inspect <task-id> --target <canonical-workspace> --json
21
+ buildr task environment inspect <task-id> --target <canonical-workspace> --json
22
+ buildr task environment cleanup <task-id> --target <canonical-workspace> --json
23
+ ```
24
+
25
+ - `--agent`对`prepare`必填,必须写成当前宿主,例如 Cursor 会话写`cursor`、Codex 会话写`codex`。不得省略,也不得假设省略后默认为 Codex。未给`--branch`时默认任务分支为`<adapter>/<task-id>`;显式`--branch`优先。
26
+ - Project可选维护closed `preparation.yml`,长期声明Project-wide或Service-scoped Recipe。Agent读取Task Record的完整Project/Service scope与构建、验证事实,只选择当前Task需要的Recipe,提交`buildr.task-environment-plan-request/v1`;Application解析声明identity并保存`buildr.task-environment-plan/v2`执行快照。没有长期声明时可显式提交`task-inline` Recipe,但不得静默回写Project。
27
+ - `prepare --plan`可一次完成登记与准备;若Agent必须先检查Task checkout,可先运行无Plan的`prepare`取得受控执行根(结果明确blocked),再运行`plan record`和`prepare`。
28
+ - Plan Request只是CLI的一次性输入,不是Environment资源或长期事实。需要JSON文件时,Agent必须在操作系统临时目录创建,不得写入Workspace的`.buildr/tmp/`、`.buildr/transient/`或其他受管资产目录;`prepare --plan`或`plan record`成功后必须立即删除。命令失败时,只有仍需用同一输入诊断或重试才能暂时保留,并必须报告路径;问题解决、放弃重试或Task终止后立即删除。
29
+ - Application保存的resolved `buildr.task-environment-plan/v2`与`buildr.task-environment-receipt/v5`是Plan和机器状态authority;原始Plan Request不进入SQLite。Environment cleanup只清理Receipt已登记资源与provider-owned执行位置,不扫描或删除调用方临时输入。
30
+ - `prepare` 同时承担首次准备和幂等恢复;只重跑输出缺失或 executable/input identity 漂移的 Step,没有单独 `restore`。
31
+ - `inspect`只读重新观察已保存Plan的executable、inputs和outputs;它不执行Step、不创建或修复输出、不回写Receipt。
32
+ - `cleanup` 只在 Task 已明确 abandon,或由 Task Finish 提交 durable handoff 时成立。普通 Agent 不绕过授权。
33
+
34
+ ## 执行边界
35
+
36
+ 取得 `ready` 后,只在结果的实际 execution roots / validation root 中写入、构建和测试,并使用结果指定的执行 CLI。Environment Receipt 独占 Runtime、CLI、Preparation Declaration/Scope/Recipe/Step、projection、动态资源、ready、恢复和总 cleanup;Task Record 不保存这些字段。Recipe只允许无 shell 的明确 executable、args、Project或Service相对cwd、input与预期output;受管Node/npm等使用`workspace-foundation` executable,其他技术栈可使用Project/Service wrapper或明确绝对executable。Buildr不实现Node/Python/Go/Rust适配器,也不扫描manifest。不得提交env、secret、stdin或任意shell。Buildr Web Environment GET只展示已保存current,不等同于CLI live inspect。
37
+
38
+ 候选 Skill、CLI 与 runtime 可以在自身任务验证工作区测试,但候选不能写 retained Workspace、其他 Task worktree 或共享 user runtime,也不能认领或清理自己的 Environment。真实 Agent session 是否采用候选 runtime 属于 Task Verification,不在这里证明。
39
+
40
+ ## 停止条件
41
+
42
+ Task/Workspace不匹配、省略`--agent`、Plan Request未完整覆盖Task Project/Service scope、声明/Recipe identity漂移、Receipt损坏、retained Environment Manager不可信或源码dirty、provider/resource identity漂移、required Recipe/Step缺失/漂移/执行失败、必需probe blocked、执行根越界或cleanup未授权时停止,保留现场并报告具体Declaration/Scope/Recipe/Step diagnostic与next action。Task checkout/provider evidence决定源码版本;不要从cwd、分支、同一HEAD或旧worktree receipt猜ownership,retained Buildr hash同样不是ownership;也不要由Environment自动fetch/rebase。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "任务环境"
3
+ short_description: "准备、检查、恢复与清理正式 Task 的执行环境"
4
+ default_prompt: "Use $task-environment to manage the formal Task Environment through Buildr public commands."
@@ -0,0 +1,14 @@
1
+ # Project Environment Preparation Declaration v1
2
+
3
+ Project根可选的`preparation.yml`是长期环境准备声明,schema为`buildr.project-environment-preparation/v1`。它只声明已知Recipe,不保存Task选择、执行状态或机器事实。
4
+
5
+ 每个Recipe包含稳定`id`、可选`title`、`scope`、`required`与非空有序`steps`:
6
+
7
+ - `scope.kind: project`适用于没有Service或Project-wide准备;Step相对Project执行根。
8
+ - `scope.kind: service`还必须声明已注册`service`;Step相对该Service执行根。
9
+ - Step包含`id`、`cwd`、无shell`executable`、`args`、`inputs`、`outputs`、`required`和`timeoutMs`。
10
+ - `workspace-foundation`只引用受管工具名;`project`/`service`引用对应根内wrapper;`absolute`仅用于明确受信绝对工具。
11
+
12
+ Agent只读发现构建、验证和工具链入口,形成候选或差异;长期写入必须经用户授权。不要递归扫描仓库、生成技术栈适配器、写运行状态,或把多个worktree的`node_modules`等输出共享/软链接。
13
+
14
+ Task选择使用`buildr.task-environment-plan-request/v1`,必须恰好覆盖Task Record中的全部Project/Service scope。每个scope选择当前声明中的Recipe identity,或明确`not-applicable`。Application在Task执行根解析声明并保存Plan v2快照;声明改变后旧Plan/Receipt会stale或blocked,Agent需重新提交选择。`inspect`不会升级声明或Plan。
@@ -0,0 +1,20 @@
1
+ schemaVersion: buildr.project-environment-preparation/v1
2
+ recipes:
3
+ - id: example.prepare
4
+ title: Prepare the example Project
5
+ scope:
6
+ kind: project
7
+ required: true
8
+ steps:
9
+ - id: prepare
10
+ cwd: .
11
+ executable:
12
+ kind: project
13
+ path: scripts/prepare
14
+ args: []
15
+ inputs: [scripts/prepare]
16
+ outputs:
17
+ - path: .cache/prepared
18
+ kind: directory
19
+ required: true
20
+ timeoutMs: 180000
@@ -0,0 +1,17 @@
1
+ {
2
+ "schemaVersion": "buildr.task-environment-plan-request/v1",
3
+ "projects": [
4
+ {
5
+ "project": "example",
6
+ "source": { "kind": "project-declaration" },
7
+ "scopes": [
8
+ {
9
+ "selector": "project:example",
10
+ "disposition": "required",
11
+ "reason": "The Project preparation is required for this Task.",
12
+ "recipeIds": ["example.prepare"]
13
+ }
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: task-finish
3
+ description: 用户要求已有 active formal Task 的“收尾”或交付 current formal Development handoff 时使用;在隔离交付载体(Delivery Carrier)上机械复用或进行交付适配(Delivery Adaptation)、推进 retained target 并清理 Environment,只有 Development applicability stale 才返回 Task Development。
4
+ ---
5
+
6
+ # Task Finish
7
+
8
+ 本 Skill 只处理 active formal Task,提供 `buildr.task-finish/v1` 入口;不编排 Development/Review/Verification,不写 Receipt。没有 active Task 时用户说“收尾”,转由直接 Git 路径执行;不得创建临时 Task,也不把 Git Result 冒充 Formal Finish。
9
+
10
+ ## 调用前
11
+
12
+ 1. 明确正式 Task ID 与 canonical Workspace。
13
+ 2. 用户排除 push、install 或 cleanup 而改变交付语义时停止。
14
+ 3. 轻量确认任务分支贡献已提交、本机主工作区已对齐目标远端;`--agent`省略或等于 Environment adapter。未提交或落后时先说明并等待处理或明确继续;不得做成新的入口缺口码。
15
+ 4. 不要在调用产品前自行链式做 Environment → handoff → target/remote 的 fail-fast;入口聚合与模块分类由产品一次完成。
16
+ 5. 根据最终交付内容与Workspace、Project、Service、repository约定形成完整commit message。subject必须描述内容,优先使用简洁Conventional Commits;Task ID由产品写入trailer,不得使用“交付 + Task ID”占位主题。调用前向用户展示subject,正文存在时一并展示。
17
+ 6. 直接启动 canonical `buildr task finish run`;若返回 `task_finish.entry_gaps`,按 `error.details.gaps` 的 `development` / `environment` / `delivery` 完整转述,不得只报第一项。
18
+ 7. 存在 `development` 缺口(或 `nextWorkflow: task-development`)时路由 `task-development`;Finish 不补齐 Change/Verification/Completion/handoff 事实。仅工作区Task也必须先有current Candidate、Completion Review、proceed decision与Development handoff;Finish只消费handoff,不解释workspace gap或重新接受风险。
19
+ - Child承担Parent Contribution时,handoff还必须包含与current Parent Plan和planned binding一致的Contribution Handoff。
20
+ - Parent采用Parent Plan时,必须已记录current plan identity的显式最终集成验收;Child全部完成本身不满足该条件。
21
+
22
+ ## 执行
23
+
24
+ 从 canonical retained Workspace 的可信 Environment Manager 调用:
25
+
26
+ ```bash
27
+ buildr task finish run --task <task-id> --commit-message '<semantic-message>' --target <canonical-workspace> --detail compact --json
28
+ ```
29
+
30
+ 直接使用runtime投射到本Skill的精确`buildr.task-finish/v1` capability binding。启动后使用宿主支持的有界长等待消费同一进程/session,直到completed、failed、input-required或当前等待窗口到期;窗口只决定Agent何时恢复控制,不是Finish业务timeout。若仍为running,继续长等待同一session,不启动第二个Finish、不高频读取普通输出,也不承诺固定两次调用或写死45/60秒。
31
+
32
+ 产品在创建 run 前一次聚合 Environment / Development / 交付入口观察;通过后固定执行:
33
+
34
+ ```text
35
+ preflight → prepare → verify → deliver → cleanup
36
+ ```
37
+
38
+ 五阶段由产品连续执行,Agent不编排阶段、补evidence或设计recovery。
39
+
40
+ 完整message只在首次run冻结;resume不得覆盖。新handoff以新message创建新run。旧run仅在preflight且无交付副作用时失效,否则保留现场并返回identity conflict。
41
+
42
+ 首次run或resume先预留独立`task-finish/finish-diagnostics` Execution Record;容量不足不启动五阶段。record只保留受控诊断,carrier、lease、resume与cleanup仍由Finish current管理。
43
+
44
+ - `preflight`核对handoff、Environment、carrier、retained与远端对齐;各阶段/resume精确核对冻结handoff、Candidate、generation与Content Target。
45
+ - `prepare`在隔离交付载体(Delivery Carrier)把任务贡献(Task Contribution)机械应用到最新交付基线(Delivery Baseline)。clean apply记录`deterministic-reuse`;Git conflict保留carrier并返回`delivery-adaptation-required`,不改原Task worktree。
46
+ - Agent只在carrier完成交付适配(Delivery Adaptation)。非零适配HEAD必须保持冻结message;若baseline已满足任务且正确适配为零tree delta,保持clean carrier并在matching resume传入`--accept-zero-delta-adaptation`,不得创建空提交或无关差异。resume仍执行bounded compatibility checks,`formalVerificationExecutions` 必须为 `0`。
47
+ - `verify` 对clean apply记录确定性Git identity;对适配记录`agent-reviewed-delivery-adaptation`,不得描述为Buildr已证明语义等价。Candidate identity/generation保持不变。
48
+ - `deliver`只做fast-forward、push/回读、按冻结Task Contribution选择的runtime activation与Agent Doctor;Doctor失败保留现场并停止cleanup。通用executor不sync、不安装CLI/Buildr Web或接受任意命令。
49
+ - render不得产生tracked/staged delta。普通交付的`remoteAfterRef`与`finalRemoteRef`都等于carrier;仅当最新target可证明完整包含carrier时,记录`targetDisposition: already-contained`、原carrier ref与最新后代final remote ref。
50
+ - `cleanup` 把 delivery identity 交给 Task Environment;不直接删除 provider 状态或写第二份 Environment 结论。
51
+
52
+ target前进时先证明carrier ancestry及changed paths;完整包含才跳过apply/push并继续Doctor与cleanup。恢复不增加 Candidate generation或重跑formal Verification/Completion Review;原Task source/handoff真实stale时才返回`nextWorkflow: task-development`。路径不重叠都不等于语义安全;不得手写token、recovery manifest或claimed semantic equivalence。
53
+
54
+ 恢复命令:
55
+
56
+ ```bash
57
+ buildr task finish run --task <task-id> --run <run-id> --resume <product-token> [--accept-zero-delta-adaptation] --target <canonical-workspace> --detail compact --json
58
+ ```
59
+
60
+ 只读查看:
61
+
62
+ ```bash
63
+ buildr task finish inspect --run <run-id> --target <canonical-workspace> --detail compact --json
64
+ ```
65
+ abandon 后未交付隔离载体:对既有 run 加 `--release-occupancy`;不得 `git worktree remove` 或手删 `.buildr/transient/task-finish/carriers/`,也不作废已推送交付。
66
+ ## 禁止事项
67
+
68
+ Finish不改变Candidate/generation、Development Receipt、Change或原Task worktree,不发起 Task Verification/Completion Review,也不决定风险。Finish不运行OpenSpec Converge。两种reuse mode都复用handoff;clean apply或resume不等于语义安全。仅当既有run在preflight/prepare发生已记录、无副作用的Product provider exception时,用户才可明确授权`--bootstrap-recovery`;它只让retained Application从current ready Environment和current Development handoff共同确认的clean committed checkout加载run-owned capsule provider。retained Application、SQLite、Execution Record及状态机仍是唯一writer;不得传source/module/manifest/tarball、运行candidate CLI、临时安装或新建run。入口、registry、Application、repository或migration损坏不适用。
69
+
70
+ ## 完成标准
71
+
72
+ - 五阶段全部 passed/not-applicable;
73
+ - Result引用Development handoff、Candidate/generation、Content Target、Task Contribution、Delivery Baseline和Delivery Carrier;
74
+ - Result标记`deterministic-reuse`或`agent-reviewed-delivery-adaptation`,后者不声称Buildr证明语义等价;
75
+ - carrier equivalence 为 current,target 仅 fast-forward,Environment cleanup 完成;
76
+ - Git delivery完成remote回读;普通路径after/final ref等于carrier,`already-contained`保留适用的逐路径或零差异Agent review/baseline/ref/activation paths证明;
77
+ - `agentProviderCompletions = 0`、`manualRecoveryManifests = 0`、`formalVerificationExecutions = 0`。
78
+ - bootstrap recovery还须证明同一run/capsule、原failure、source commit/tree/provider digest及cleanup后的authority revocation;`bootstrapRecoveryExecutions = 1`。
79
+
80
+ `run`结果的additive `executionRecord`必须可解释:`retained`表示本invocation正文已保留;`attention`表示record或diagnostics cleanup需owner后续处理,但不得据此回滚、改写或重跑已经成立的Finish delivery/cleanup/Task终态;`blocked`表示容量门禁在五阶段前停止;invalid或complete no-op为`not-opened`。`task finish inspect`只读Finish current/terminal,不列举records。complete 后先报告终态,再询问是否进行“任务复盘”:当前关注 Agent 耗时、Token、重复尝试和人机协作,Token 不可得可缺失。仅用户同意后路由 `task-retrospective`;blocked/failed 不提示,且复盘不影响终态。
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: task-manager
3
+ description: 用户明确要求创建或查看待办/正式 Task Record、更新顶层事实或复盘来源、激活待办、设置 Parent、完成或放弃 Task,或按 Task ID 恢复记录时使用;不用于普通任务分流、Task Environment 或专业阶段动作。
4
+ ---
5
+
6
+ # Task Manager Skill
7
+
8
+ 本 Skill 是 `buildr.task-record/v2` 的默认 provider,只管理 Task 的最小顶层记录、直接 Parent/Child 和复盘来源。`todo` 是已接受但未启动的 data-only 意向,`active` 才进入正式执行。Buildr Web 是同一 Application 的独立人类客户端;Parent Plan、Contribution、复盘正文和专业事实不得复制到 Task Record。
9
+
10
+ ## 1. 何时使用
11
+
12
+ 仅在以下意图使用:
13
+
14
+ - 用户明确创建、查看、修改、激活、设置或清除 Parent、维护复盘来源、完成或放弃 Task Record;
15
+ - 用户给出 Task ID 要求继续正式任务,需要先恢复 title、intent、scope、Change 引用和顶层状态;
16
+ - `task-triage` 已判断即将进入正式持久交付,并在首次交付写入前要求创建或恢复记录。
17
+
18
+ 不要仅因用户说“任务”就触发。普通任务分流、讨论、只读探索、单次测试、临时服务、只维护已有 metadata,以及 Task Environment、Development、Review、Verification、Git、Finish、Board 或 Retrospective 动作都不由本 Skill 执行。
19
+
20
+ ## 2. 输入与 canonical target
21
+
22
+ 确认 operation、稳定小写 Task ID、canonical Workspace 和明确字段。create 默认 active;只有用户已接受意向但尚未授权执行时使用 `--status todo`。todo 不得带 Change,也不运行 Git、Environment 或专业动作。复盘来源可在 create 或 update 中重复提供,但每个来源必须是已有 current 复盘的 completed/abandoned Task;只保存 source Task ID,不保存行动项或报告副本。activate 仅做 todo-to-active,调用前置门禁由 task-triage 负责。complete 需要 summary 和明确 no-change,todo 只允许 no-change;abandon 需要 reason。
23
+
24
+ 当前位于 task environment 时,只接受上游已确认的 canonical Workspace target;不读取 environment receipt,不扫描父目录,不从 worktree 推断 retained root,也不把 environment identity 写入 Task Record。Buildr Web 已创建或用户按 Task ID 继续时先 inspect,同一记录即为权威来源。
25
+
26
+ ## 3. 执行动作
27
+
28
+ 调用 selected provider 对应的产品命令:
29
+
30
+ ```text
31
+ buildr task create <task-id> --title <text> --intent <text> [--status todo|active] [--retrospective-source <task-id> ...] [--parent <task-id>] [--project <code> ...] [--service <project/service> ...] [--change <project/change> ...] --target <canonical-workspace> --json
32
+ buildr task inspect <task-id> --target <canonical-workspace> --json
33
+ buildr task update <task-id> [--add-retrospective-source <task-id> ... | --remove-retrospective-source <task-id> ...] [--parent <task-id> | --clear-parent] [set/add/remove flags] --target <canonical-workspace> --json
34
+ buildr task activate <task-id> --target <canonical-workspace> --json
35
+ buildr task complete <task-id> --summary <text> [--no-change] --target <canonical-workspace> --json
36
+ buildr task abandon <task-id> --reason <text> --target <canonical-workspace> --json
37
+ ```
38
+
39
+ 只提交动作参数,不直接读写 Workspace SQLite 或旧 `.buildr/tasks/<task-id>/task.yml`,不传完整 next state。`open` 只是 todo+active 查询值,不是持久状态。默认值、状态转换、来源校验、去重、系统字段和事务安全全部由 Application 决定。
40
+
41
+ ## 4. 停止与交接
42
+
43
+ canonical target、identity、引用或授权不明,provider 不 ready,数据库或记录损坏、已终态、动作冲突或 result 为 blocked 时停止对应 Task Record 动作,保留原状态并报告唯一 next action。不得回退为 Agent 手写 YAML,也不得把专业记录复制进 Task Record。
44
+
45
+ 成功后报告 operation、Task ID、status、effects 和必要的 nextActions;不得返回本地数据库路径。`complete|abandon` 成功时,先报告已经成立的终态,再使用长期名称“任务复盘”询问用户是否复盘,并说明当前重点包括 Agent 执行耗时、Token 消耗、重复尝试和人机协作效率;Token 数据仅在 Agent 可取得时记录,缺失不影响复盘。该提示非阻塞,只有用户明确同意后才路由 `task-retrospective`,不得自动执行或改变终态结果。
46
+
47
+ 随后仅按用户意图把工作交给 Triage、Environment 或其他专业 Skill;Task Manager 本身不执行这些阶段,也不自动 commit、push、publication、Finish 或 cleanup。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "任务管理器"
3
+ short_description: "管理待办与正式 Task Record 及复盘来源"
4
+ default_prompt: "Use $task-manager to inspect or mutate todo and active Task Records and retrospective source links through Buildr product actions."
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: task-retrospective
3
+ description: 用户明确要求复盘已完成或已放弃的正式 Task,或要查看、处理、标记无需处理、重新打开已有复盘时使用;复盘重点检查 Agent 执行时间、token 消耗、重复尝试、人机协作或 Buildr workflow/harness 效率。不用于过程 observation、任务审查、门禁或资产自动写回。
4
+ ---
5
+
6
+ # Task Retrospective
7
+
8
+ 本 Skill 是 `buildr.task-retrospective/v2` 的默认 provider。Agent负责复盘、当前事实重评与后续承接;Retrospective Application只负责terminal校验与SQLite current Result/处置状态,Task来源关系只通过selected `buildr.task-record/v2` provider维护。
9
+
10
+ ## 1. 恢复任务事实
11
+
12
+ 确认 canonical Workspace 和正式 Task ID,读取 Task Record;Task 必须是 `completed` 或 `abandoned`。使用当前Workspace matching retained Buildr controller invocation执行bundled `inspect`;不得使用candidate `cliInvocation`、resource payload root或checkout内部driver:
13
+
14
+ ```text
15
+ <controller-command> <controller-args-prefix...> __internal task-retrospective inspect --task <task-id> --target <canonical-workspace>
16
+ ```
17
+
18
+ 已有Result可以重做并完整替换;没有Result只是“尚未复盘”。同时读取 `disposition` 与 `currentDigest`;不要打开SQLite;不读取、迁移或删除`.buildr/asset-review/`。
19
+
20
+ ## 2. 生成一份自由复盘
21
+
22
+ 只基于当前session/runtime可访问的任务步骤、工具结果和最终事实,重点寻找:
23
+
24
+ - 哪些步骤耗时最多或token消耗最大;
25
+ - 哪些推理、检索、尝试、验证或恢复发生重复;
26
+ - 哪些等待、阻塞或环境准备可以前移、缓存或确定化;
27
+ - 哪些选择应更早交给人,哪些可以由workflow/harness直接确定;
28
+ - 哪些Buildr引导本身增加了不必要工作量。
29
+
30
+ 报告使用自由Markdown,不要求固定标题、评分、分类或结构化建议。Token 数据按证据可见性处理:可信可得时记录数值、来源和覆盖范围;部分可得时明确覆盖的步骤、阶段或调用及其不代表完整 Task;不可得时直接标记缺失,并继续使用耗时、重复尝试、等待、工具调用和人机协作等可观察事实。不得为了补齐 Token 数字回放完整上下文、读取隐藏推理、强制估算、新增采集流程或增加任务消耗;其他精确成本数据不可见时同样写明缺口并区分观察事实与推断。不得声称读取隐藏推理、完整对话、完整工具日志或后台事件。
31
+
32
+ 用户或团队给出的同类任务耗时参考区间,只作为当前任务复杂度下的比较、解释和优化背景;报告应说明适用范围及偏离原因,不把它固化为通用产品阈值、Result字段、gate、pass/fail标准或自动缩减验证范围的依据。
33
+
34
+ ## 3. 完整后一次写入
35
+
36
+ 报告未完成或任务仍active时不写。完整报告形成后执行:
37
+
38
+ ```text
39
+ <controller-command> <controller-args-prefix...> __internal task-retrospective record --task <task-id> --target <canonical-workspace> --report-markdown <markdown>
40
+ ```
41
+
42
+ Application会完整替换同一Task的current row;不创建历史、候选或draft。若命令行承载长Markdown存在转义风险,使用安全的进程参数调用方式,不借此新增临时持久化store。
43
+
44
+ ## 4. 处理 current 复盘
45
+
46
+ 用户要求处理多份已有复盘时,先通过一次有界批量只读调用取得默认 `pending` 摘要:
47
+
48
+ ```text
49
+ <controller-command> <controller-args-prefix...> __internal task-retrospective list --target <canonical-workspace> [--status <pending|handled|no-action|all>] [--task <task-id> ...] [--limit <1..500>] [--include-report]
50
+ ```
51
+
52
+ 默认最多返回 100 份 pending 摘要且不包含报告正文;先用摘要收窄对象,只在确实需要批量读取原文时显式使用 `--include-report`,个别全文继续使用单 Task `inspect`。`list` 只减少重复 driver 调用,不自动分析、评分、生成方向、创建 Task 或修改 disposition,也不成为后续 mutation 的授权或门禁。
53
+
54
+ 用户要求处理已有复盘时,再对需要判断的对象使用 `inspect`,在对话中直接给出完整原始 `reportMarkdown`;正文过长或已在同一对话完整展示时可以给出 `currentDigest` 不可变引用,但不能只让用户去 Buildr Web 查。随后读取当前 canonical specs、实现、knowledge 与 open Task,对原问题和建议逐项判断当前是否仍存在、仍有效,再按当前事实重新拆分改进方向;不沿用旧行动项编号,也不生成新 action item ID。
55
+
56
+ ### 4.1 先完成只读讨论
57
+
58
+ 用户只说“处理”“检查”“查看”或“分析”复盘时,只授权只读阶段。Agent 可以 inspect、调查当前事实、重判方向并形成拟处置方案,但不得调用 Task Record `create|update` 或 Task Retrospective `handle`。先向用户完整展示:
59
+
60
+ - current disposition 与 `currentDigest`;
61
+ - 拟 disposition 及完整处置理由;
62
+ - 将复用、创建或关联的目标 Task IDs;
63
+ - 每一项 Task Record 与 Retrospective mutation effect;没有 Task effect 时明确写 none。
64
+
65
+ 展示后停止写入并等待用户决定。用户继续讨论、要求调整、提出异议、只表示“看看再说”或没有明确接受时,保持 current disposition 和全部 Task Record rows 不变;不得把“处理复盘”推断成 `no-action`、`handled`、`pending` 或创建/关联 Task 的授权。
66
+
67
+ ### 4.2 判断是否已有明确授权
68
+
69
+ 以下任一情况可以进入写入阶段:
70
+
71
+ 1. 用户直接指定了完整 mutation,例如“把这个复盘标记为无需处理,理由是……”,或明确指定 `handled`、处置说明和全部目标 Task effects;完整动作本身就是本次精确 mutation 的明确授权,不再机械要求第二次确认。
72
+ 2. 用户明确接受 Agent 刚展示的完整方案,且 disposition、理由、目标 Task IDs 与关系 effects 均未变化。
73
+
74
+ 授权只覆盖已指定或已展示的精确 effects。表达不完整或含糊时继续保持只读。实际写入前重新 inspect,并复核 current digest、拟 disposition、处置理由、目标 Task 与关系 effects;任一事实或 effect 发生实质变化时旧授权失效,立即停止后续写入、保持 current disposition、重新展示变化后的完整方案并取得新授权。若已有部分已授权 effects 成功,原样报告实际 effects,不回滚、不扩大授权,也不得把部分落地冒充完整处置。
75
+
76
+ ### 4.3 只执行已授权 effects
77
+
78
+ 取得明确授权且复核无变化后,每个仍有效方向按以下顺序落地:
79
+
80
+ 1. 已有 todo 或 active Task 覆盖目标时,通过 `task update --add-retrospective-source` 关联,不重复创建。
81
+ 2. 没有承接 Task 且用户已同意保留意向时,通过 `task create --status todo --retrospective-source` 只写数据;不运行Git基线、不创建Environment、Change、proposal或design。
82
+ 3. 多个方向可以合并到同一Task,一个源Task也可以关联多个Task;关系只到source Task ID,不绑定具体建议文本。
83
+ 4. 已失效、已解决、收益不足或不适用的方向说明当前证据和丢弃理由,不创建Task。
84
+
85
+ 全部已授权的有效方向完成关系写入后才处置:
86
+
87
+ - `handled`:所有有效方向均已有承接 Task,处置说明包含当前事实判断、目标 Task ID 与丢弃理由;不等于目标 Task 已实施完成。
88
+ - `no-action`:当前没有值得转化的行动;必须说明理由。
89
+ - `pending`:重新打开,清空上次处置说明与时间。
90
+
91
+ ```text
92
+ <controller-command> <controller-args-prefix...> __internal task-retrospective handle --task <task-id> --target <canonical-workspace> --status <pending|handled|no-action> --note <reason> --expected-current-digest <current-digest>
93
+ ```
94
+
95
+ `handled|no-action` 必须提供非空完整处理意见;`pending` 不保留说明。任一Task创建或关系写入失败时不提交最终 `handle`,保持 current disposition并报告实际 effects 与恢复动作。若digest冲突,重新inspect并基于最新报告、关系与处置状态重新判断、展示方案并取得新授权。重新record会原子重置为pending。
96
+
97
+ ## 5. 报告边界
98
+
99
+ 向用户返回原始复盘或不可变引用、当前有效性证据、重新拆分方向、丢弃理由、实际承接Task IDs、关系effects、operation status与current digest。todo只表示意向,后续明确启动时再走task-triage和activate。
100
+
101
+ 本Skill不参与Task完成、Development handoff、Finish、cleanup或OpenSpec门禁,也不创建空复盘。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "任务复盘"
3
+ short_description: "复盘终态 Task 并把有效改进关联到后续 Task"
4
+ default_prompt: "Use $task-retrospective to record or process a terminal Task retrospective and link valid improvements to todo or active Task Records."
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: task-review
3
+ description: 用户要求审查正式 Task 的计划或完成候选、查看已有 Task Review Result,或实现任务在计划/完成节点需要形成轻量审查 evidence 时使用;不用于资产沉淀复盘、Task Verification 或通用代码 Review。
4
+ ---
5
+
6
+ # Task Review Skill
7
+
8
+ 本 Skill 是 `buildr.task-review/v1` 的默认 provider。它用一个参数化能力完成 Planning Review 或 Completion Review;语义审查由 Agent/人完成,确定性 Task Review Application 独占 Result 写入和读取。
9
+
10
+ ## 1. 确认目标
11
+
12
+ 先确认 canonical Workspace、正式 Task ID、`planning|completion` 类型和该类型的 current target identity,再运行:
13
+
14
+ ```text
15
+ buildr task review inspect <task-id> [--planning-target <identity>] [--completion-target <identity>] --target <canonical-workspace> --json
16
+ ```
17
+
18
+ 读取 Task Record 的 Intent、scope 与限定 Change 引用。实际执行目标位于 Task Environment 时,使用 `task-environment` 返回的 execution/validation root 读取,不从 cwd 或 Review Result 猜环境 authority。
19
+
20
+ - `planning` 绑定当前计划上下文的明确稳定 identity。计划可以是 OpenSpec Change、任务清单或其他 owner 已界定的计划,不要求固定形态。正式Task的OpenSpec计划必须先用`buildr task next`返回的matching retained `environment.controllerInvocation`调用`__internal task-planning-identity inspect --task <task-id> --target <canonical-workspace>`;只消费`resolved`结果的`target.identity`和`planningNodes`。不得使用candidate `cliInvocation`、source driver,不得手工摘要artifact、路径、mtime、checkbox progress、Git ref或沿用旧Result;resolver `blocked`时停止且不record Review。
21
+ - 采用Parent Plan的Parent只审查outcome、architecture invariants、Contribution Map、dependencies与final acceptance,并把Parent Plan identity作为target。Child status、Verification、Change归档、实现字段/migration定稿或未改变Plan的Finish不得单独使Review stale;只有显式reconcile产生的新Plan identity需要重做Planning Review。不得要求Parent复制Child delta、测试清单或执行进度。
22
+ - `completion` 只绑定上游已形成的 current Candidate identity。没有明确 Candidate identity 就停止,不得用 HEAD、dirty tree、Environment identity、时间或任意临时摘要代替。
23
+ - 仅工作区Candidate仍执行同一Completion Review;Review不得把workspace coverage gap或`not-passed` Verification重写为passed、waiver或风险接受。
24
+
25
+ Result 存在但未提供 current target 时 applicability 是 `unknown`;identity 不同是 `stale`。两者都不能描述为仍满足审查。
26
+
27
+ 同一OpenSpec语义从active移动到archive,或只改变tasks checkbox时,resolver target保持不变,已有current Planning Review继续适用,不重复record。proposal、design、delta Requirement/Scenario、关键任务文本或Task Intent/scope使resolver target改变时,才以新target重新审查。
28
+
29
+ ## 2. 动态执行语义审查
30
+
31
+ 根据 Task Intent、Project authority、目标内容、风险和用户要求选择实际 reviewed 对象。不要把 OpenSpec artifacts、代码目录、测试命令或 checklist 固定为每个 Task 的必选范围。
32
+
33
+ current planning nodes包含OpenSpec Change `tasks.md`时,Planning Review必须逐项语义判断checkbox能否在Change convergence/archive前完成,并把实际checklist写入`reviewed`;无法审查时写入`uncovered`及原因。只能在archive后由Formal Verification、Candidate、Completion Review、Task Finish、Environment cleanup或Task terminal authority完成的checkbox必须形成精确finding并返回`changes-required`,先修订planning artifact。不得用关键词匹配代替语义判断:实现或测试同名产品能力、且能在archive前完成的Change-owned action仍可合法保留。planning不含`tasks.md`时不创建虚假审查对象。
34
+
35
+ 同时维护:
36
+
37
+ - `reviewed`:至少一个实际完成审阅的可移植逻辑对象;
38
+ - `uncovered`:相关但没有审阅的对象及真实原因,可以为空;
39
+ - `findings`:简洁事实列表,可以为空;
40
+ - `conclusion`:完整的 `ready|changes-required` 与非空摘要。
41
+
42
+ method 必须真实:同一 Agent 自审使用 `self`;只有实际独立 Agent 完整执行才使用 `independent-agent`;只有人类给出本次结论才使用 `human`。不要保存 reviewer、Agent session、model、隐藏推理、完整日志或凭证。
43
+
44
+ ## 3. 只记录完整 Result
45
+
46
+ 只有目标 identity 和完整结论都已形成时,调用:
47
+
48
+ ```text
49
+ buildr task review record <task-id> --type <planning|completion> --target-identity <identity> --method <self|independent-agent|human> --reviewed <subject> ... [--uncovered <subject>::<reason> ...] [--finding <text> ...] --outcome <ready|changes-required> --summary <text> --target <canonical-workspace> --json
50
+ ```
51
+
52
+ 只传语义字段;不直接编辑旧YAML或打开SQLite,不传 schemaVersion、taskId、completedAt、revision、current、applicability、path 或完整 next state。Application 只事务替换精确类型的 current slot;Planning 和 Completion 同时存在时不生成总 receipt,也不让一种覆盖另一种。
53
+
54
+ Agent、工具或人工流程在形成完整结论前中断时不要调用 record。已有 Result 即使 stale 也保留;不得写 draft/blocked 占位结果。
55
+
56
+ ## 4. 报告与边界
57
+
58
+ 报告 reviewType、target identity、method、实际 reviewed/uncovered、findings、结论,以及 operation status、resultDigest、applicability、effects/diagnostic。`changes-required` 只表达审查结论,不修改 Task 顶层状态。
59
+
60
+ 本 Skill 不创建 Task Environment、Task Development、Candidate generation、Verification evidence、Task Retrospective、Task Finish run、Git 提交或通用状态机。后续 gate 只由 Task Development 通过本 Application read model 判断;Task Review 本身不设置 gate。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "任务审查"
3
+ short_description: "审查正式 Task 的计划或完成候选并记录轻量 Result"
4
+ default_prompt: "Use $task-review to inspect or complete a planning or completion review for a formal Buildr Task."