@buildr-ai/buildr 0.1.0-rc.2 → 0.1.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/known-limitations.md +1 -1
- package/package/manifest.yml +6 -1
- package/package/targets/runtime/skills/buildr/SKILL.md +5 -1
- package/package/targets/workspace/rules/buildr/core.md +1 -0
- package/package/targets/workspace/skills/buildr/git-ops/SKILL.md +21 -1
- package/package/targets/workspace/skills/buildr/task-finish/SKILL.md +4 -2
- package/package/targets/workspace/skills/buildr/task-worktree/SKILL.md +13 -1
- package/package/targets/workspace/skills/manifest.yml +1 -1
- package/package.json +1 -1
- package/tools/cli/application/package-maintenance/static-validation.mjs +77 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ buildr runtime list --json
|
|
|
10
10
|
buildr init --agent <agent> --target . --name <name> --profile <personal|team|company>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
当前公开试用版本是 [`0.1.0-rc.
|
|
13
|
+
当前公开试用版本是 [`0.1.0-rc.3`](https://github.com/elevenching/Buildr/releases/tag/v0.1.0-rc.3)。使用反馈请提交 [GitHub Issue](https://github.com/elevenching/Buildr/issues/new/choose),安全漏洞请按 [SECURITY.md](https://github.com/elevenching/Buildr/blob/main/SECURITY.md) 私下报告。
|
|
14
14
|
|
|
15
15
|
完整产品定位、核心模型、快速开始、当前能力和文档导航见仓库根目录的[中文 README](https://github.com/elevenching/Buildr#readme) 或 [English README](https://github.com/elevenching/Buildr/blob/main/README.en.md)。
|
|
16
16
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- Commands 只声明和诊断外部 CLI,不执行本机安装、升级或登录。
|
|
10
10
|
- 远端 Skill 当前只支持 raw `SKILL.md` 的 `resolved.kind: skill-url`;未声明 integrity 时允许 render,但 doctor 会警告。
|
|
11
11
|
- Service branch intent 不负责 pull、merge、rebase 或长期分支同步;它只控制首次 clone、metadata 和 drift 诊断。
|
|
12
|
-
- `@buildr-ai/buildr@0.1.0-rc.
|
|
12
|
+
- `@buildr-ai/buildr@0.1.0-rc.3` 通过 GitHub trusted publisher 发布,`next` 指向该 RC;`latest` 仍可能指向历史 prerelease,它不代表稳定版。稳定版 `0.1.0` 尚未发布,公开试用应显式安装 `@next`。
|
|
13
13
|
- `package check/build` 与 `openspec baseline/check` 是维护/workflow 表面,不建议普通 workspace 直接依赖。
|
|
14
14
|
|
|
15
15
|
遇到 unsupported runtime 或不能确定的资产边界时,Agent 应停止自动变更、保留源资产,并报告可执行下一步。
|
package/package/manifest.yml
CHANGED
|
@@ -41,18 +41,23 @@ builtins:
|
|
|
41
41
|
required: false
|
|
42
42
|
legacyIntegrities:
|
|
43
43
|
- sha256-23e68c3174887ebbf6990526f93e7f1c047199e1bef1f2e8e293b0cba2a3cfad
|
|
44
|
+
- sha256-7c792606db5d07e9364feb4be20755e184fb83291e4ae83a9cbb4884cf731b6d
|
|
44
45
|
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
45
46
|
- id: task-finish
|
|
46
47
|
path: package/targets/workspace/skills/buildr/task-finish
|
|
47
48
|
target: skills/buildr/task-finish
|
|
48
49
|
description: 用户在 task worktree 中要求“收尾”、完成任务、自动收尾,或要求自动完成已验证 change 的归档、提交、集成、推送和本地清理时使用。
|
|
49
50
|
required: false
|
|
51
|
+
legacyIntegrities:
|
|
52
|
+
- sha256-0607663344932ed85cdff84fe5c8dc817e4fc12a159a047eac054fa307fc1fd1
|
|
50
53
|
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
51
54
|
- id: git-ops
|
|
52
55
|
path: package/targets/workspace/skills/buildr/git-ops
|
|
53
56
|
target: skills/buildr/git-ops
|
|
54
|
-
description:
|
|
57
|
+
description: 用户表达提交、推送、拉取、pull、合并、merge、rebase、checkout、switch、reset、cherry-pick、revert、stash、发布、删除分支等单项 Git 意图,或 Git 操作存在授权、范围、amend、远端改写、工作区转换、分支删除等歧义时使用。
|
|
55
58
|
required: false
|
|
59
|
+
legacyIntegrities:
|
|
60
|
+
- sha256-badf69cfc2f7983fdbd2c681f7418a542d5538bfab283dfe8da927bfdfdd96c8
|
|
56
61
|
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
57
62
|
- id: openspec-explore
|
|
58
63
|
path: package/targets/workspace/skills/openspec/openspec-explore
|
|
@@ -17,6 +17,8 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
17
17
|
|
|
18
18
|
组织资产先改变源资产(使用 Buildr CLI),再同步 Agent runtime(使用 render/sync)。
|
|
19
19
|
|
|
20
|
+
Agent 是 Buildr 功能的默认操作入口。Agent 能在当前工具、权限和安全边界内完成的动作,应先说明必要影响并取得所需授权,再直接执行和验证;不得默认把命令交给用户代为执行。用户明确选择手动方式,或 Agent 因工具不可用、权限、登录态、外部环境等原因无法完成时,再提供准确的手动操作兜底。
|
|
21
|
+
|
|
20
22
|
## 执行循环
|
|
21
23
|
|
|
22
24
|
1. 确认 `target`。未指定时默认当前目录;如果当前目录在服务(Service)代码仓内,先定位 Buildr 组织(Organization/Root)。
|
|
@@ -39,7 +41,7 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
39
41
|
| 接入代码仓、服务仓或可执行资产 | 服务(Service) |
|
|
40
42
|
| 代码开发、实现、构建、测试或任务 worktree 生命周期 | `task-worktree` Skill |
|
|
41
43
|
| 完成已验证任务、自动归档集成并清理 task worktree | `task-finish` Skill |
|
|
42
|
-
|
|
|
44
|
+
| 提交、拉取、合并、rebase、checkout/switch、reset、推送、发布或其他单项 Git 操作 | `git-ops` Skill |
|
|
43
45
|
| 统一安装、更新和卸载一组 workspace Rules、Skills、Command collections | 组件(Components) |
|
|
44
46
|
| 沉淀每次会话必须遵守的约束 | 规则(Rules) |
|
|
45
47
|
| 沉淀可复用任务流程或操作能力 | 技能(Skills) |
|
|
@@ -47,6 +49,8 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
47
49
|
| 当前 Agent 找不到已声明规则或技能 | Agent runtime 渲染 |
|
|
48
50
|
| 为 Buildr 增加新的 Agent runtime adapter | runtime trait intake + OpenSpec change |
|
|
49
51
|
|
|
52
|
+
Agent 通过 `git-ops`、`task-worktree` 或 `task-finish` 成功改变已检出工作区内容后,由对应 Skill 在已初始化 Buildr workspace 中执行 post-transition doctor。doctor 指出 workspace sync 是合适修复动作时,询问用户是否由 Agent 立即同步,同时提供手动同步命令作为备选;用户确认后由 Agent 执行 `buildr sync <agent> --target <workspace-root>` 并验证最终 doctor。当前 session 是否重新发现新资产由 Agent runtime 决定。
|
|
53
|
+
|
|
50
54
|
## 资产维护
|
|
51
55
|
|
|
52
56
|
### Workspace / Organization Root
|
|
@@ -18,6 +18,7 @@ Buildr workspace 的基础模型、术语和硬边界。每次进入 workspace
|
|
|
18
18
|
- 没有更具体的 Project、Service 或仓库约定时,Git 提交信息的主题和正文默认使用中文;代码标识、路径、scope 和专有名词可保留原文。
|
|
19
19
|
- 新建或重写文本文件时,文件末尾必须恰好保留一个换行符;不得在 EOF 前生成额外空白行。内容内部为表达段落所需的空行不受此约束。
|
|
20
20
|
- 面向用户说明问题、方案、进度或结果时,优先使用常用、直接和简练的语言;只在准确表达所必需时使用专业术语,并在需要时解释。
|
|
21
|
+
- 使用 Buildr 时,Agent 是默认操作入口:能在当前工具、权限和安全边界内完成的动作,应在说明必要影响并取得所需授权后直接执行,不把命令或操作步骤作为默认结果要求用户代为执行。只有用户明确选择手动方式,或 Agent 因工具不可用、权限、登录态、外部环境等原因无法完成时,才提供准确的手动操作作为兜底。
|
|
21
22
|
- 完成当前工作、到达阶段节点或遇到阻塞时,应结合当前状态以及适用的 Rule、Skill 和项目约定,向用户说明明确、可执行的下一步;任务已经完整结束时,应明确说明任务已完成,不机械追加无关建议。
|
|
22
23
|
- `rules/manifest.yml` 是 root/Organization Rule 登记和启停用事实清单;新增 root Rule 先编辑 `rules/<rule-id>.md`,再用 `buildr rules add` 注册;删除 root Rule 用 `buildr rules remove`。
|
|
23
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: git-ops
|
|
3
|
-
description:
|
|
3
|
+
description: 用户表达提交、推送、拉取、pull、合并、merge、rebase、checkout、switch、reset、cherry-pick、revert、stash、发布、删除分支等单项 Git 意图,或 Git 操作存在授权、提交范围、amend、远端改写、工作区转换、分支删除等歧义时使用。用于统一 Git 协作约定和安全默认行为,而不是完整任务结束编排。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Git Ops Skill
|
|
@@ -56,6 +56,26 @@ description: 用户表达提交、commit、推送、push、提交并推送、合
|
|
|
56
56
|
- 已推送或多人共享的任务分支不自动 rebase 或 force push。
|
|
57
57
|
- rebase 冲突需要业务或语义选择时,停止并报告冲突,等待用户确认。
|
|
58
58
|
|
|
59
|
+
## 工作区转换后的 Buildr 环境检查
|
|
60
|
+
|
|
61
|
+
Agent 通过本 Skill 成功改变已检出工作区内容,且工作区已经离开冲突或中断状态后,执行一次 Buildr 环境检查。触发范围包括产生实际 tree 转换的 `pull`、`merge`、`rebase`、`checkout`、`switch`、`reset`、`cherry-pick`、`revert`、`stash apply` 和 `stash pop`。
|
|
62
|
+
|
|
63
|
+
`fetch`、`push` 和普通 `commit` 不改变已检出内容,不触发该检查;Git 操作失败、仍处于未解决冲突状态或命令没有产生 tree 转换时也不触发。
|
|
64
|
+
|
|
65
|
+
检查步骤:
|
|
66
|
+
|
|
67
|
+
1. 从 Git 操作所在目录逐层向上查找最近的 `.buildr/workspace.yml`。找不到时视为不在已初始化 Buildr workspace 中,不执行 Buildr 检查。
|
|
68
|
+
2. 使用当前 Agent 对应的受支持 adapter,在 workspace root 运行 `buildr doctor --agent <agent> --target <workspace-root> --json`。不得省略 `--agent`,也不得把 Git 仓库根直接当作 Buildr workspace root。
|
|
69
|
+
3. doctor 无需用户处理时,不提醒用户执行 `render` 或 `sync`。
|
|
70
|
+
4. doctor 报告问题时,说明这是当前环境状态,不把既有问题错误归因于刚完成的 Git 操作;按 Rules、Skills、Commands、Components、Contributions 和 Agent runtime 分类汇总,并优先采用 doctor 指向的可执行下一步。
|
|
71
|
+
5. doctor 指出 workspace sync 是合适修复动作时,询问用户是否由 Agent 立即同步当前 workspace 和 Agent runtime;同时给出 `buildr sync <agent> --target <workspace-root>` 作为手动同步备选,面向用户时必须把占位符替换为已解析的实际值并正确引用路径,用户确认前不得执行 sync。
|
|
72
|
+
6. 用户确认后,调用 Buildr Skill 执行 `buildr sync <agent> --target <workspace-root>`,并使用 sync 的最终 doctor 或追加 doctor 验证结果;不得把手动命令作为默认处理方式要求用户代为执行。
|
|
73
|
+
7. Commands、Components、CLI 或其他不能由 sync 正确修复的问题,按对应 Buildr 生命周期询问并在取得授权后由 Agent 执行可完成的动作。只有用户选择手动方式,或 Agent 因工具不可用、权限、登录态、外部环境等原因无法完成时,才提供手动步骤并说明原因;用户选择手动后不假设操作成功,在用户报告完成且 Agent 可以执行 doctor 时再次验证。
|
|
74
|
+
|
|
75
|
+
如果当前 Agent 无法匹配受支持 adapter,或 doctor 无法执行,报告环境状态尚未确认及具体原因,不猜测 runtime 已同步;此时可提供对应 doctor 命令作为手动兜底。当前 session 是否重新发现新资产由 Agent runtime 决定,不由 Buildr 保证。
|
|
76
|
+
|
|
77
|
+
该检查点由 Agent 工作流触发,不安装或维护 Git hook、daemon、文件 watcher 或定时任务。用户或其他程序绕过 Agent Skill 直接执行 Git 时,Buildr 不声称能够即时感知;后续进入 Buildr 工作流时由基线 doctor 兜底。
|
|
78
|
+
|
|
59
79
|
## 远端默认行为
|
|
60
80
|
|
|
61
81
|
- push 前确认目标分支和待推送提交。
|
|
@@ -63,6 +63,7 @@ description: 用户在 task worktree 中要求“收尾”、完成任务、自
|
|
|
63
63
|
- rebase 后再次读取 `HEAD^{tree}` 并与已验证 tree 比较:
|
|
64
64
|
- tree 相同:复用已有验证结果,不因 commit hash、parent、checkout 或分支名称变化重复 E2E。
|
|
65
65
|
- tree 不同:在集成前重新运行受影响的验证;验证失败时停止 merge、push 和 cleanup。
|
|
66
|
+
- 成功 rebase 后若最终已检出内容实际变化,复用 Git Ops 的“工作区转换后的 Buildr 环境检查”;doctor 指出 sync 时复用同步询问、Agent 执行和手动兜底边界,用户确认前不执行 sync。
|
|
66
67
|
- rebase 冲突只有在能机械保持双方既有语义时才可继续;需要业务选择时停止。
|
|
67
68
|
- 验证命令仍返回 session、cell、process id 或运行中状态时,继续 wait、poll 或 resume 同一进程;暂时无输出不得启动第二个相同验证。
|
|
68
69
|
|
|
@@ -72,8 +73,9 @@ description: 用户在 task worktree 中要求“收尾”、完成任务、自
|
|
|
72
73
|
|
|
73
74
|
1. 从目标分支所在的保留 workspace 执行 fast-forward-only 集成;不创建 merge commit。
|
|
74
75
|
2. 确认集成后的 tree 与任务分支一致。
|
|
75
|
-
3.
|
|
76
|
-
4.
|
|
76
|
+
3. fast-forward-only 集成完成后,在目标 workspace 复用 Git Ops 的“工作区转换后的 Buildr 环境检查”;doctor 无需处理时不询问同步,发现可由 sync 修复的问题时询问用户,确认后由 Agent 执行并验证,手动命令只作备选。
|
|
77
|
+
4. 普通 push 已确认的目标分支,并确认远端目标 ref 指向预期提交。
|
|
78
|
+
5. fast-forward、普通 push 和 checkout 切换不改变候选产品 tree,不在主开发分支重复相同产品 E2E;其中目标 workspace 的 fast-forward 已改变其已检出内容,仍须完成上一步环境检查。
|
|
77
79
|
|
|
78
80
|
push 被拒绝或远端状态变化时停止;不得改用 force push。
|
|
79
81
|
|
|
@@ -32,6 +32,8 @@ canonical 位置不可用、已被其他任务占用或无法确认 workspace
|
|
|
32
32
|
|
|
33
33
|
一旦采用 task worktree,artifacts、实现和合并前候选验证都只能写入该 worktree;artifacts 包括 proposal、design、specs 和 tasks。不得在原始主工作区保留同一 change 的第二份 artifacts,也不得从未合并 task checkout 向主自举 workspace 执行 sync。
|
|
34
34
|
|
|
35
|
+
新 worktree checkout 完成后,复用 Git Ops 的“工作区转换后的 Buildr 环境检查”:只有新 checkout 实际位于包含 `.buildr/workspace.yml` 的已初始化 Buildr workspace 中,才针对当前 Agent 和该 workspace root 运行 doctor。doctor 无需处理时不询问同步;发现可由 sync 修复的环境问题时,复用同步询问、Agent 执行和手动兜底边界,用户确认前不执行 sync。复用既有 worktree 且没有发生 tree 转换时,不重复运行该检查。
|
|
36
|
+
|
|
35
37
|
## 不创建 worktree 的场景
|
|
36
38
|
|
|
37
39
|
明确只维护 Buildr 源资产、OpenSpec artifacts、规则、Skills、文档、模板、README、AGENTS 等元内容,且不会进入代码实现、构建或测试时,默认在当前 workspace 直接修改,不创建 task worktree。
|
|
@@ -48,10 +50,18 @@ canonical 位置不可用、已被其他任务占用或无法确认 workspace
|
|
|
48
50
|
|
|
49
51
|
## 保留策略
|
|
50
52
|
|
|
51
|
-
-
|
|
53
|
+
- 普通开发任务未上线、未归档或未明确收尾前,默认保留 task worktree 和任务分支。
|
|
52
54
|
- 同一任务的缺陷、联调问题和需求调整优先继续在原 task worktree 中处理。
|
|
53
55
|
- 代码合并、推送、联调、测试通过或验收通过本身不等于可以清理 worktree。
|
|
54
56
|
|
|
57
|
+
发布 worktree 是用于从既有发布基线制作、验证和推送发布分支的临时环境,不沿用普通开发任务的保守保留策略。满足以下全部条件时,默认删除本地发布 worktree 和已由远端安全承载的本地发布分支:
|
|
58
|
+
|
|
59
|
+
- 远端发布分支已推送,且远端 ref 与本地候选提交一致。
|
|
60
|
+
- 发布 worktree 干净,没有未提交或未处理内容。
|
|
61
|
+
- 没有明确的后续本地构建、部署、修复或验证动作。
|
|
62
|
+
|
|
63
|
+
发布分支推送后仍有明确的本地构建、部署、修复或验证动作时,保留发布 worktree,并向用户说明保留原因和下一项本地动作。发布 worktree 的默认清理不授权删除远端发布分支。
|
|
64
|
+
|
|
55
65
|
## 验证证据边界
|
|
56
66
|
|
|
57
67
|
项目要求的完整验证应在所有 rebase、冲突解决和内容修改结束后,对准备集成的最终候选 Git tree 执行。
|
|
@@ -77,6 +87,7 @@ canonical 位置不可用、已被其他任务占用或无法确认 workspace
|
|
|
77
87
|
|
|
78
88
|
以下表达进入 worktree 清理检查:
|
|
79
89
|
|
|
90
|
+
- 发布 worktree 已完成远端分支推送和 ref 核对,且没有明确后续本地动作。
|
|
80
91
|
- 用户说明任务已上线。
|
|
81
92
|
- 用户说明 change 已归档。
|
|
82
93
|
- 用户说明任务已收尾或可以清理。
|
|
@@ -98,6 +109,7 @@ canonical 位置不可用、已被其他任务占用或无法确认 workspace
|
|
|
98
109
|
- 不在原始主工作区直接承载任务代码开发,除非用户明确要求。
|
|
99
110
|
- 不在实现型 OpenSpec change 创建 artifacts 后才延迟决定 worktree,也不保留同一 change 的双份副本。
|
|
100
111
|
- 不从未合并 task checkout 更新主自举 workspace。
|
|
112
|
+
- 不在用户确认前同步新 worktree runtime,也不把手动命令作为默认处理方式;不为未发生 tree 转换的 worktree 复用重复检查。
|
|
101
113
|
- 不因 checkout 或 commit hash 改变而机械重复验证,也不在候选 tree 已改变时沿用旧验证结果。
|
|
102
114
|
- 不在每个普通实现任务后机械运行完整验证,也不因运行中进程暂时无输出而重复启动验证。
|
|
103
115
|
- 不自动删除仍可能承载后续修复或未合入内容的 worktree。
|
|
@@ -30,7 +30,7 @@ skills:
|
|
|
30
30
|
- id: git-ops
|
|
31
31
|
source: buildr
|
|
32
32
|
path: buildr/git-ops
|
|
33
|
-
description:
|
|
33
|
+
description: 用户表达提交、推送、拉取、pull、合并、merge、rebase、checkout、switch、reset、cherry-pick、revert、stash、发布、删除分支等单项 Git 意图,或 Git 操作存在授权、范围、amend、远端改写、工作区转换、分支删除等歧义时使用。
|
|
34
34
|
enabled: true
|
|
35
35
|
required: false
|
|
36
36
|
state: installed
|
package/package.json
CHANGED
|
@@ -345,6 +345,20 @@ export function createPackageStaticValidator(deps) {
|
|
|
345
345
|
problems.push(`Package agentSkill SKILL.md does not exist: ${skill.path}/SKILL.md`);
|
|
346
346
|
continue;
|
|
347
347
|
}
|
|
348
|
+
const skillContent = fs.readFileSync(skillFile, 'utf8');
|
|
349
|
+
if (skill.id === 'buildr') {
|
|
350
|
+
for (const requiredText of [
|
|
351
|
+
'提交、拉取、合并、rebase、checkout/switch、reset、推送',
|
|
352
|
+
'post-transition doctor',
|
|
353
|
+
'Agent 是 Buildr 功能的默认操作入口',
|
|
354
|
+
'询问用户是否由 Agent 立即同步',
|
|
355
|
+
'buildr sync <agent> --target <workspace-root>',
|
|
356
|
+
'手动同步命令作为备选',
|
|
357
|
+
'当前 session 是否重新发现新资产由 Agent runtime 决定',
|
|
358
|
+
]) {
|
|
359
|
+
if (!skillContent.includes(requiredText)) problems.push(`Buildr Agent Skill must include ${JSON.stringify(requiredText)}.`);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
348
362
|
files.push(skillFile);
|
|
349
363
|
}
|
|
350
364
|
|
|
@@ -430,6 +444,17 @@ export function createPackageStaticValidator(deps) {
|
|
|
430
444
|
if (!existsFile(sourceFile)) {
|
|
431
445
|
problems.push(`${label}.path does not exist: ${rule.path}`);
|
|
432
446
|
} else {
|
|
447
|
+
if (rule.id === 'buildr-core') {
|
|
448
|
+
const coreContent = fs.readFileSync(sourceFile, 'utf8');
|
|
449
|
+
for (const requiredText of [
|
|
450
|
+
'Agent 是默认操作入口',
|
|
451
|
+
'取得所需授权后直接执行',
|
|
452
|
+
'不把命令或操作步骤作为默认结果要求用户代为执行',
|
|
453
|
+
'才提供准确的手动操作作为兜底',
|
|
454
|
+
]) {
|
|
455
|
+
if (!coreContent.includes(requiredText)) problems.push(`Buildr Core must include ${JSON.stringify(requiredText)}.`);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
433
458
|
files.push(sourceFile);
|
|
434
459
|
}
|
|
435
460
|
}
|
|
@@ -495,6 +520,17 @@ export function createPackageStaticValidator(deps) {
|
|
|
495
520
|
'不在主开发分支重复运行相同 E2E',
|
|
496
521
|
'候选 tree 已改变时沿用旧验证结果',
|
|
497
522
|
'不从未合并 task checkout 更新主自举 workspace',
|
|
523
|
+
'新 worktree checkout 完成后',
|
|
524
|
+
'复用 Git Ops 的“工作区转换后的 Buildr 环境检查”',
|
|
525
|
+
'复用既有 worktree 且没有发生 tree 转换时,不重复运行该检查',
|
|
526
|
+
'复用同步询问、Agent 执行和手动兜底边界',
|
|
527
|
+
'用户确认前不执行 sync',
|
|
528
|
+
'不把手动命令作为默认处理方式',
|
|
529
|
+
'不沿用普通开发任务的保守保留策略',
|
|
530
|
+
'远端 ref 与本地候选提交一致',
|
|
531
|
+
'没有明确的后续本地构建、部署、修复或验证动作',
|
|
532
|
+
'说明保留原因和下一项本地动作',
|
|
533
|
+
'默认清理不授权删除远端发布分支',
|
|
498
534
|
]) {
|
|
499
535
|
if (!skillContent.includes(requiredText)) problems.push(`task-worktree Skill must include ${JSON.stringify(requiredText)}.`);
|
|
500
536
|
}
|
|
@@ -506,9 +542,32 @@ export function createPackageStaticValidator(deps) {
|
|
|
506
542
|
'改变已验证 tree 时,原验证结果失效',
|
|
507
543
|
'相同 tree',
|
|
508
544
|
'不因 checkout、commit hash 或分支名称改变而重复运行相同验证',
|
|
545
|
+
'工作区转换后的 Buildr 环境检查',
|
|
546
|
+
'`pull`、`merge`、`rebase`、`checkout`、`switch`、`reset`、`cherry-pick`、`revert`、`stash apply` 和 `stash pop`',
|
|
547
|
+
'`fetch`、`push` 和普通 `commit`',
|
|
548
|
+
'.buildr/workspace.yml',
|
|
549
|
+
'buildr doctor --agent <agent> --target <workspace-root> --json',
|
|
550
|
+
'doctor 无需用户处理时,不提醒用户执行 `render` 或 `sync`',
|
|
551
|
+
'Rules、Skills、Commands、Components、Contributions 和 Agent runtime',
|
|
552
|
+
'询问用户是否由 Agent 立即同步当前 workspace 和 Agent runtime',
|
|
553
|
+
'buildr sync <agent> --target <workspace-root>',
|
|
554
|
+
'把占位符替换为已解析的实际值并正确引用路径',
|
|
555
|
+
'用户确认前不得执行 sync',
|
|
556
|
+
'用户确认后,调用 Buildr Skill',
|
|
557
|
+
'不得把手动命令作为默认处理方式',
|
|
558
|
+
'按对应 Buildr 生命周期询问并在取得授权后由 Agent 执行可完成的动作',
|
|
559
|
+
'只有用户选择手动方式,或 Agent 因工具不可用、权限、登录态、外部环境等原因无法完成时',
|
|
560
|
+
'用户选择手动后不假设操作成功',
|
|
561
|
+
'再次验证',
|
|
562
|
+
'当前 session 是否重新发现新资产由 Agent runtime 决定',
|
|
563
|
+
'Git hook、daemon、文件 watcher 或定时任务',
|
|
564
|
+
'后续进入 Buildr 工作流时由基线 doctor 兜底',
|
|
509
565
|
]) {
|
|
510
566
|
if (!skillContent.includes(requiredText)) problems.push(`git-ops Skill must include ${JSON.stringify(requiredText)}.`);
|
|
511
567
|
}
|
|
568
|
+
for (const routedIntent of ['pull', 'checkout', 'switch', 'reset', 'cherry-pick', 'revert', 'stash']) {
|
|
569
|
+
if (!skill.description.includes(routedIntent)) problems.push(`git-ops builtin description must route ${routedIntent}.`);
|
|
570
|
+
}
|
|
512
571
|
if (skill.description.includes('收尾')) {
|
|
513
572
|
problems.push('git-ops builtin description must not claim the complete task closeout intent.');
|
|
514
573
|
}
|
|
@@ -517,6 +576,9 @@ export function createPackageStaticValidator(deps) {
|
|
|
517
576
|
if (String(metadata.description || '').includes('收尾')) {
|
|
518
577
|
problems.push('git-ops Skill description must not claim the complete task closeout intent.');
|
|
519
578
|
}
|
|
579
|
+
for (const routedIntent of ['pull', 'checkout', 'switch', 'reset', 'cherry-pick', 'revert', 'stash']) {
|
|
580
|
+
if (!String(metadata.description || '').includes(routedIntent)) problems.push(`git-ops Skill description must route ${routedIntent}.`);
|
|
581
|
+
}
|
|
520
582
|
} catch {
|
|
521
583
|
// Frontmatter errors are already reported above.
|
|
522
584
|
}
|
|
@@ -536,6 +598,13 @@ export function createPackageStaticValidator(deps) {
|
|
|
536
598
|
'wait、poll 或 resume 同一进程',
|
|
537
599
|
'暂时无输出不得启动第二个相同验证',
|
|
538
600
|
'停止尚未执行的 archive、commit、rebase、merge、push 或 cleanup',
|
|
601
|
+
'成功 rebase 后若最终已检出内容实际变化',
|
|
602
|
+
'fast-forward-only 集成完成后',
|
|
603
|
+
'复用 Git Ops 的“工作区转换后的 Buildr 环境检查”',
|
|
604
|
+
'复用同步询问、Agent 执行和手动兜底边界',
|
|
605
|
+
'用户确认前不执行 sync',
|
|
606
|
+
'确认后由 Agent 执行并验证',
|
|
607
|
+
'手动命令只作备选',
|
|
539
608
|
'<!-- buildr:skill-contributions pre-spec-sync -->',
|
|
540
609
|
'<!-- buildr:skill-contributions post-spec-sync -->',
|
|
541
610
|
]) {
|
|
@@ -587,6 +656,10 @@ export function createPackageStaticValidator(deps) {
|
|
|
587
656
|
'不作为相同 tree 后续 Git 动作的重复产品验证门禁',
|
|
588
657
|
'使用 `task-finish` 编排',
|
|
589
658
|
'不授权 force push、merge commit、远端任务分支删除',
|
|
659
|
+
'Buildr 功能默认由 Agent 操作',
|
|
660
|
+
'取得所需授权后直接执行',
|
|
661
|
+
'不得把命令或操作步骤作为默认交付结果要求用户代为执行',
|
|
662
|
+
'才提供准确的手动操作作为兜底',
|
|
590
663
|
]) {
|
|
591
664
|
if (!productAgents.includes(requiredText)) problems.push(`Product AGENTS.md must include ${JSON.stringify(requiredText)}.`);
|
|
592
665
|
}
|
|
@@ -601,6 +674,10 @@ export function createPackageStaticValidator(deps) {
|
|
|
601
674
|
if (!taskFinish || taskFinish.source !== 'buildr' || taskFinish.state !== 'installed' || taskFinish.enabled !== true) {
|
|
602
675
|
problems.push('Workspace skills baseline must declare enabled installed Buildr task-finish.');
|
|
603
676
|
}
|
|
677
|
+
const gitOps = baselineSkills.find((entry) => entry.id === 'git-ops');
|
|
678
|
+
for (const routedIntent of ['pull', 'checkout', 'switch', 'reset', 'cherry-pick', 'revert', 'stash']) {
|
|
679
|
+
if (!gitOps?.description?.includes(routedIntent)) problems.push(`Workspace git-ops description must route ${routedIntent}.`);
|
|
680
|
+
}
|
|
604
681
|
for (const skill of baselineSkills.filter((entry) => entry.source !== undefined)) {
|
|
605
682
|
if (typeof skill.source === 'string' && !isManifestSourceLabel(skill.source)) {
|
|
606
683
|
const parsed = parseSkillSourceRef(skill.source);
|