@buildr-ai/buildr 0.1.0-rc.1 → 0.1.0-rc.2
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 +3 -1
- package/docs/agent-runtime-adapters.md +94 -0
- package/docs/cli-architecture.md +5 -2
- package/docs/cli-reference.md +2 -2
- package/docs/known-limitations.md +4 -2
- package/examples/minimal-workspace/README.md +2 -2
- package/package/bootstrap/contract.yml +5 -0
- package/package/bootstrap/guide.md +2 -2
- package/package/manifest.yml +16 -10
- package/package/targets/runtime/skills/buildr/SKILL.md +8 -5
- package/package/targets/workspace/gitignore +3 -0
- package/package/targets/workspace/rules/buildr/core.md +4 -2
- package/package/targets/workspace/skills/manifest.yml +4 -4
- package/package.json +11 -3
- package/tools/cli/application/doctor/runtime-diagnostics.mjs +4 -3
- package/tools/cli/application/package-maintenance/smoke-checks.mjs +0 -6
- package/tools/cli/application/package-maintenance/static-validation.mjs +4 -2
- package/tools/cli/application/package-maintenance.mjs +2 -0
- package/tools/cli/application/workspace-operations.mjs +2 -1
- package/tools/cli/command/help.mjs +8 -4
- package/tools/cli/command/registry.mjs +2 -2
- package/tools/cli/domains/components.mjs +2 -2
- package/tools/cli/domains/package-assets.mjs +2 -2
- package/tools/cli/domains/runtime.mjs +4 -11
- package/tools/cli/shared/platform.mjs +3 -3
- package/tools/runtime/adapter-contract.mjs +355 -30
- package/tools/runtime/check-claude-code.mjs +4 -7
- package/tools/runtime/check-codex.mjs +4 -7
- package/tools/runtime/check-runtime.mjs +98 -0
- package/tools/runtime/projection.mjs +224 -12
- package/tools/runtime/render-claude-code.mjs +1 -1
- package/tools/runtime/skills/render-plan.mjs +8 -9
- package/tools/verification/runtime/adapter-contract.mjs +124 -8
- package/tools/verification/runtime/adapter-parity.mjs +80 -6
package/README.md
CHANGED
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
Buildr 是面向人、Agent 和组织的工作资产治理系统。官方源码位于 [elevenching/Buildr](https://github.com/elevenching/Buildr),公开 npm package 为 `@buildr-ai/buildr`,安装后使用 `buildr` 命令。
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install --global @buildr-ai/buildr
|
|
8
|
+
npm install --global @buildr-ai/buildr@next
|
|
9
9
|
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.2`](https://github.com/elevenching/Buildr/releases/tag/v0.1.0-rc.2)。使用反馈请提交 [GitHub Issue](https://github.com/elevenching/Buildr/issues/new/choose),安全漏洞请按 [SECURITY.md](https://github.com/elevenching/Buildr/blob/main/SECURITY.md) 私下报告。
|
|
14
|
+
|
|
13
15
|
完整产品定位、核心模型、快速开始、当前能力和文档导航见仓库根目录的[中文 README](https://github.com/elevenching/Buildr#readme) 或 [English README](https://github.com/elevenching/Buildr/blob/main/README.en.md)。
|
|
14
16
|
|
|
15
17
|
本目录维护 Buildr 产品源;开发约定见 [AGENTS.md](AGENTS.md),详细产品事实见 [Buildr 产品说明](docs/buildr-product.md),当前实现事实见 [Buildr current state](openspec/knowledge/buildr-current-state.md),规范性契约见 [OpenSpec specs](openspec/specs/)。
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Agent Runtime Adapters
|
|
2
|
+
|
|
3
|
+
本文是 Buildr 已接入 Agent runtime adapter 的权威说明。机器可读事实始终以 `buildr runtime list --json` 为准;本文解释每个 adapter 如何把标准 `AGENTS.md` 与 Skills 源资产接入目标 Agent。
|
|
4
|
+
|
|
5
|
+
新增 adapter 的调查与实现流程见 [Agent Runtime Adapter 接入指南](agent-runtime-adapter-contribution.md),可交给目标 Agent 的采集问题见 [调研 Prompt](agent-runtime-adapter-research-prompt.md)。
|
|
6
|
+
|
|
7
|
+
## 使用方式
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
buildr runtime list --json
|
|
11
|
+
buildr init --agent <agent> --target <workspace>
|
|
12
|
+
# 已初始化 workspace
|
|
13
|
+
buildr sync <agent> --target <workspace>
|
|
14
|
+
buildr doctor --agent <agent> --target <workspace> --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
adapter id 不做 alias 或 fallback。目标 Agent 不在列表中时必须停止自动投射并反馈,而不是借用“兼容”的 adapter。
|
|
18
|
+
|
|
19
|
+
## 支持矩阵
|
|
20
|
+
|
|
21
|
+
| Adapter id | Surface | Rules 接入 | Skills 接入 | 生效/刷新 | 验证等级 / smoke |
|
|
22
|
+
|---|---|---|---|---|---|
|
|
23
|
+
| `claude-code` | CLI | 每个 source 同目录 `CLAUDE.md` bridge | `.claude/skills` | 新会话 | 既有 adapter |
|
|
24
|
+
| `codex` | CLI | 原生递归 `AGENTS.md` | `.agents/skills` | path read / 新会话 | 既有 adapter |
|
|
25
|
+
| `cursor` | IDE、CLI | 各 source scope 的 `.cursor/rules/buildr.mdc` | `.agents/skills` | Rules path read;Skills 新会话 | `documented` / `pending` |
|
|
26
|
+
| `qoder` | IDE | `.qoder/rules/buildr/*.md` | `.qoder/skills` | Rules path read;Skills `/skills reload` 或新会话 | `documented` / `pending` |
|
|
27
|
+
| `trae` | IDE | 各 source scope 的 `.trae/rules/buildr.md` | `.agents/skills` | 新会话 | `documented` / `pending` |
|
|
28
|
+
| `trae-work` | desktop | root `CLAUDE.local.md` reference bridge | `.trae/skills` | Rules 新会话;Skills immediate | `documented` / `pending` |
|
|
29
|
+
| `workbuddy` | desktop、desktop-bundled CLI | root `CODEBUDDY.md` reference bridge | `.codebuddy/skills` | 新任务 | `verified` / `passed`(5.2.5 bundled CLI) |
|
|
30
|
+
|
|
31
|
+
`documented` 表示官方文档、产品随包文档、安装包 discovery 源码或可重复的本机会话观察足以认证接入路径;`verified` 表示在此基础上又完成了真实 runtime marker smoke。`pending` 只表示可选的真实产品 smoke 尚未记录为通过,不否定自动契约或已有文档证据。文件生成成功仍不等于目标 Agent 已读取。
|
|
32
|
+
|
|
33
|
+
GUI 产品的标准 smoke 是一次新会话、一份由 Buildr 生成的 `SMOKE_PROMPT.md` 和一份返回 JSON。Buildr 不把自动点击 GUI、抓取应用数据库或重复验证 reload 作为新增 adapter 的常规完成条件;只有文档/源码与实际行为冲突时才进入深度调查。
|
|
34
|
+
|
|
35
|
+
## Claude Code (`claude-code`)
|
|
36
|
+
|
|
37
|
+
- Buildr 在每个 `AGENTS.md` 同目录生成受管 `CLAUDE.md` reference bridge,并将 Skills/install plans 投射到 `.claude/`。
|
|
38
|
+
- Rules 与 Skills 在新会话加载;checker 比较 bridge、Skills 和 install plans 的 missing/stale/conflict/orphan 状态。
|
|
39
|
+
- 证据状态为既有 adapter contract/parity 与产品验证基线。
|
|
40
|
+
|
|
41
|
+
## Codex (`codex`)
|
|
42
|
+
|
|
43
|
+
- Codex 原生递归读取 `AGENTS.md`,Buildr 不生成 Rules 文件;Skills/install plans 使用 `.agents/`。
|
|
44
|
+
- Rules 在访问路径时生效,Skills 以新会话发现为准;checker 同时检查 native Rules source 和 Skills projection。
|
|
45
|
+
- 证据状态为既有 adapter contract/parity、当前 Buildr 自举运行时与产品验证基线。
|
|
46
|
+
|
|
47
|
+
## Cursor (`cursor`)
|
|
48
|
+
|
|
49
|
+
- Buildr 将每个 `AGENTS.md` 转换为同 scope 的 `.cursor/rules/buildr.mdc`;Cursor 官方的 nested project rules 机制负责将子目录 rule 限定到该目录树,避免依赖发生过版本漂移的 native nested `AGENTS.md` 或 glob 匹配。
|
|
50
|
+
- Buildr Skill、workspace/Project Skills 和 install plans 使用 `.agents/`。
|
|
51
|
+
- checker 对 IDE/CLI 安装与版本采用人工确认,因为安装形态并不稳定。
|
|
52
|
+
- 当前不直接依赖 Cursor 原生 nested `AGENTS.md`:公开版本行为曾发生漂移,scoped `.mdc` 才能保持 Buildr 的 sibling isolation。Rules 或 Skills 未刷新时开启新 chat。
|
|
53
|
+
- 验证等级为 `documented`:证据来自 [Cursor Rules](https://cursor.com/docs/context/rules)、[Cursor Skills](https://cursor.com/docs/context/skills);一次性 root/child/sibling 与 Skill smoke 仍为 `pending`。
|
|
54
|
+
|
|
55
|
+
## Qoder (`qoder`)
|
|
56
|
+
|
|
57
|
+
- Buildr 把每个 `AGENTS.md` 转换为 `.qoder/rules/buildr/<source-id>.md`。root 使用 `trigger: always_on`,nested 使用 `trigger: glob` 与 `<scope>/**`。
|
|
58
|
+
- Skills 与 install plans 使用 `.qoder/`;同名 Skill 的官方优先级为 project 高于 user。
|
|
59
|
+
- Qoder 官方限制 active Rules 总量最多 100,000 字符;Buildr 在写入前检查每个目标和总量。
|
|
60
|
+
- checker 使用静态无 shell 的 `qoder --version`;Skills 修改后运行 `/skills reload`,不可用时开启新会话。
|
|
61
|
+
- 验证等级为 `documented`:证据来自 [Qoder Rules](https://docs.qoder.com/user-guide/rules)、[Qoder Skills](https://docs.qoder.com/en/cli/Skills) 与本机 1.13.3 intake;IDE 一次性 marker smoke 仍为 `pending`。
|
|
62
|
+
|
|
63
|
+
## TRAE (`trae`)
|
|
64
|
+
|
|
65
|
+
- Buildr 在每个 discovered source scope 生成带 `alwaysApply: true` frontmatter 的 `.trae/rules/buildr.md`;这样 root、Project、Service/deeper Rules 保持各自目录边界。
|
|
66
|
+
- Skills 与 install plans 使用 `.agents/`。TRAE 3.5.73 的 `AI.skills.enableAgentsDir` 默认开启,安装包说明会自动加载 `.agents/skills`;这也与本机会话中项目 Skills 的实际注入一致。`.trae/skills` 在该版本安装包中只证明为 vendor 内容/编辑器路径,不能替代已观察到的项目发现入口。
|
|
67
|
+
- checker 使用静态无 shell 的 `trae --version` 确认入口存在;该命令当前返回底层编辑器 build,因此产品版本必须从 About 人工记录。Rules 或 Skills 修改后开启新会话。
|
|
68
|
+
- 验证等级为 `documented`:[TRAE 官方 Skills 指南](https://www.trae.ai/blog/trae_tutorial_0115?v=1)确认产品采用开放 Agent Skills 标准,但没有声明项目目录;具体路径证据为 TRAE 3.5.73 本机 intake(root `AGENTS.md`、项目 `.agents/skills` 及用户级 `~/.agents/skills`/`~/.trae/skills` 的会话注入观察)、安装包 `AI.skills.enableAgentsDir` 配置,以及 `agent-tool-host` 中的 `globs`、`alwaysApply`、`description`、Rules import flags。nested vendor Rules 与 sibling 一次性 marker smoke 仍为 `pending`。
|
|
69
|
+
|
|
70
|
+
## TRAE Work (`trae-work`)
|
|
71
|
+
|
|
72
|
+
- TRAE Work 与 TRAE IDE 是两个独立 adapter:TRAE IDE 的项目 Skills 使用 `.agents/skills`,TRAE Work 使用 `.trae/skills`;两者的 Rules、Skills root、surface 和 activation 都必须分别认证。
|
|
73
|
+
- Buildr 生成 root `CLAUDE.local.md`。bridge 明确要求 Agent 读取 root 和当前工作路径 ancestor chain 中适用的 `AGENTS.md`,并列出 source index;普通 Markdown 链接本身不视为 include。
|
|
74
|
+
- 使用前必须在桌面 Settings 中启用对应 Rules import;修改 Rules 后开启新会话。Skills 写入后的实际即时发现仍以产品版本为准。
|
|
75
|
+
- checker 读取 `/Applications/TRAE SOLO.app` 版本,并持续给出 import/reference smoke 前置条件 warning。
|
|
76
|
+
- 验证等级为 `documented`:证据来自 [TRAE Work Rules](https://docs.trae.cn/work_rules)、[TRAE Work Skills](https://docs.trae.cn/work_skills) 与本机 0.1.31/内置 runtime 1.0.37 机制 intake;当前安装包为 0.1.34,bridge traversal 一次性 smoke 仍为 `pending`。
|
|
77
|
+
|
|
78
|
+
## WorkBuddy (`workbuddy`)
|
|
79
|
+
|
|
80
|
+
- Buildr 生成 root `CODEBUDDY.md`,其中包含 imperative ancestor-chain 读取指令和 source index;内容不得超过 WorkBuddy 5.2.5 已观察到的 8,000 字符 project guidance 上限。
|
|
81
|
+
- WorkBuddy 5.2.5 安装源码的 first-match 顺序是 `CODEBUDDY.md`、`.codebuddy/CODEBUDDY.md`、`AGENTS.md`,只读取 workspace root 第一个存在的入口。非 Buildr 管理的 `CODEBUDDY.md` 会触发 conflict,Buildr 不覆盖也不静默降级。
|
|
82
|
+
- Skills 与 install plans 使用 `.codebuddy/`。WorkBuddy 5.2.5 内置的 CodeBuddy CLI 2.106.4 文档和 Skills panel 源码都将项目 Skill 根声明为 `.codebuddy/skills/`;`.workbuddy/skills` 只出现在 sandbox 可写路径中,不能据此认定为发现入口。Rules 与 Skills 修改后都要开启新任务。
|
|
83
|
+
- checker 读取 `/Applications/WorkBuddy.app` 的 bundle id/版本,并检查 bridge、Skills 和 install plans 的 projection 状态。
|
|
84
|
+
- 验证等级为 `verified`:2026-07-13 使用 WorkBuddy 5.2.5 桌面包内置 CodeBuddy CLI 2.106.4 新建 headless task,`CODEBUDDY.md` 作为 `always_applied_workspace_rules` 预注入,Agent 按 root → Project → active 路径读取三个 `AGENTS.md`,工具调用审计证明没有读取 sibling Rule;`.codebuddy/skills/adapter-smoke-skill` 被发现并返回 `SMOKE_SKILL_DISCOVERED_19AF`。该结果记为 `passed`,surface 为 `desktop-bundled-cli`;桌面 UI 不再重复 smoke。
|
|
85
|
+
- 其他证据为 WorkBuddy 5.2.5 本机 app.asar 源码、随应用交付的 CodeBuddy CLI 文档/源码和运行时 intake;官方公开文档只覆盖产品与 Marketplace,未公开 project guidance 与 project Skills 的完整实现。
|
|
86
|
+
|
|
87
|
+
## Checker 与限制
|
|
88
|
+
|
|
89
|
+
`runtime check`/doctor 分别报告 projection、安装/版本 probe、activation/reload guidance 和 adapter prerequisite。它们能证明 Buildr 计划是否完整、目标是否 missing/stale/conflict/orphan,但不能从文件系统单独证明 GUI Agent 已加载内容。
|
|
90
|
+
|
|
91
|
+
- `trae-work` 在 Rules import/reference smoke 完成前保持 warning。
|
|
92
|
+
- `cursor`、`qoder`、`trae` 与 `trae-work` 保持 `documented` / `pending`;这表示接入路径已有独立证据,真实产品 smoke 尚未把等级提升为 `verified`。
|
|
93
|
+
- 标准贡献流程不得为了把 `pending` 变成 `passed` 而自动操控 GUI 或抓取目标产品私有数据库;仅在有稳定官方 automation surface 时自动执行。
|
|
94
|
+
- 所有 runtime 目标都受统一路径保护、symlink 防护、零写入冲突预检、managed ownership、orphan cleanup 和幂等 reconcile 约束。
|
package/docs/cli-architecture.md
CHANGED
|
@@ -38,6 +38,8 @@ tools/runtime/render-claude-code.mjs
|
|
|
38
38
|
|
|
39
39
|
`tools/verify-buildr-product-mvp` 同样只调度 `tools/verify/mvp/*.sh` 场景;共享同一临时 workspace 的 E2E 仍在同一 shell 进程执行,但不再把所有场景实现堆在聚合入口。
|
|
40
40
|
|
|
41
|
+
产品验证采用三层调度:`verify-buildr-product-fast` 提供普通任务低成本反馈,`verify-buildr-product-affected` 按 step identity 去重领域检查,`verify-buildr-product` 作为稳定 wrapper 委托 `verification/candidate.mjs` 运行完整候选。candidate orchestrator 只对使用独立临时状态的 verifier 做有界并行,并为每个 step 保留独立日志、退出状态和 timing;同一候选 run 的 tarball 为只读共享制品,安装 prefix 和 workspace 不共享。
|
|
42
|
+
|
|
41
43
|
`tools/` 顶层只保留 `buildr`、安装/卸载脚本和产品验证聚合入口等稳定可执行表面。内部 runtime、共享 helper 与专项 verifier 必须进入职责子目录;这些内部文件路径不属于公开兼容契约。
|
|
42
44
|
|
|
43
45
|
## 兼容和发布边界
|
|
@@ -51,12 +53,13 @@ tools/runtime/render-claude-code.mjs
|
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
55
|
node tools/verification/cli/architecture.mjs
|
|
54
|
-
npm
|
|
56
|
+
npm test
|
|
57
|
+
npm run test:affected -- cli
|
|
55
58
|
node tools/verification/cli/compatibility.mjs
|
|
56
59
|
node tools/verification/cli/package-parity.mjs
|
|
57
60
|
node tools/verification/integrity/managed-mutations.mjs
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
architecture verifier 检查薄入口、稳定 facade、显式 platform 依赖、完整 runtime inventory、单向 import、command 唯一登记、MVP 场景组合和 npm
|
|
63
|
+
architecture verifier 检查薄入口、稳定 facade、显式 platform 依赖、完整 runtime inventory、单向 import、command 唯一登记、MVP 场景组合和 npm 边界;默认 `npm test` 聚合 `node:test` 与低成本契约;compatibility verifier 检查 help、失败路径、JSON discovery 和 source mutation;package parity verifier 从 tarball 安装,在干净目录比较 checkout/npm 行为;mutation verifier 递归扫描全部发布 runtime modules 的直接写入白名单。
|
|
61
64
|
|
|
62
65
|
新增命令时应先在 `command/registry.mjs` 登记唯一 key,把领域逻辑放入对应 domain,并仅在确需跨领域组合时新增 application service。不要把领域 helper 放入 `shared/`,也不要通过 Component 或动态加载扩展 command registry。
|
package/docs/cli-reference.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
buildr runtime list --json
|
|
11
|
-
buildr init --agent <claude-code|codex> --target <workspace> --name <name> --profile <personal|team|company>
|
|
11
|
+
buildr init --agent <claude-code|codex|cursor|qoder|trae|trae-work|workbuddy> --target <workspace> --name <name> --profile <personal|team|company>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
`init --agent` 是默认首次 onboarding 入口:它先初始化源资产,再复用完整 `sync` 执行 source update、产品 Buildr Skill 安装、workspace/project Skills 投射和最终 doctor。已有 workspace 的产品能力与 runtime 更新继续使用 `sync`。
|
|
@@ -43,7 +43,7 @@ buildr init --agent <claude-code|codex> --target <workspace> --name <name> --pro
|
|
|
43
43
|
| `buildr skill install <agent>` | 只安装产品入口 Buildr Skill。 |
|
|
44
44
|
| `buildr mutation recover <id>` | 从完整 transaction journal/backup 恢复未完成 source mutation。 |
|
|
45
45
|
|
|
46
|
-
当前支持 `claude-code` 和 `
|
|
46
|
+
当前支持 `claude-code`、`codex`、`cursor`、`qoder`、`trae`、`trae-work` 和 `workbuddy`。其他 runtime 不使用 fallback adapter;各 adapter 的文件路径、刷新方式和证据状态见 [Agent Runtime Adapters](agent-runtime-adapters.md)。
|
|
47
47
|
|
|
48
48
|
## Product maintenance / workflow internal
|
|
49
49
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
# Buildr 0.1 已知限制
|
|
2
2
|
|
|
3
|
-
-
|
|
3
|
+
- 当前支持 `claude-code`、`codex`、`cursor`、`qoder`、`trae`、`trae-work` 和 `workbuddy` runtime adapter;目标路径与证据状态见 [Agent Runtime Adapters](agent-runtime-adapters.md)。新增五个 adapter 的自动投射测试已覆盖;WorkBuddy 5.2.5 为 `verified` / `passed`,Cursor、Qoder、TRAE 与 TRAE Work 为 `documented` / `pending`。`pending` 不会触发 GUI 自动化,只表示尚未用一次性真实产品 marker smoke 提升证据等级。
|
|
4
|
+
- TRAE Work 依赖桌面 Rules import toggle,checker 会持续提示无法仅靠文件系统证明的前置条件。WorkBuddy 依赖 `CODEBUDDY.md` 中的 imperative reference bridge,其通过状态仅适用于已记录的 WorkBuddy 5.2.5 / bundled CLI 2.106.4 证据版本。
|
|
5
|
+
- runtime trait catalog 只降低新增 adapter 的重复实现;它不会把尚未独立验证五项 capabilities 的 Agent 自动视为 supported。
|
|
4
6
|
- CLI 支持 Node.js 20 及以上版本。CI 在 Linux 上对 Node 20/22 执行完整验证,并在 Linux、macOS、Windows 的 Node 22 上验证打包安装生命周期;其他 Node/操作系统组合不属于 0.1 的持续验证范围。
|
|
5
7
|
- Component 只支持 workspace scope;没有 Project/Service Component、远程 registry、依赖求解或可执行 Hook。
|
|
6
8
|
- Buildr 使用本地文件系统和 Git 保存资产,没有云端权限系统、Web UI 或跨机器自动恢复服务。
|
|
7
9
|
- Commands 只声明和诊断外部 CLI,不执行本机安装、升级或登录。
|
|
8
10
|
- 远端 Skill 当前只支持 raw `SKILL.md` 的 `resolved.kind: skill-url`;未声明 integrity 时允许 render,但 doctor 会警告。
|
|
9
11
|
- Service branch intent 不负责 pull、merge、rebase 或长期分支同步;它只控制首次 clone、metadata 和 drift 诊断。
|
|
10
|
-
-
|
|
12
|
+
- `@buildr-ai/buildr@0.1.0-rc.2` 通过 GitHub trusted publisher 发布,`next` 指向该 RC;`latest` 仍可能指向历史 prerelease,它不代表稳定版。稳定版 `0.1.0` 尚未发布,公开试用应显式安装 `@next`。
|
|
11
13
|
- `package check/build` 与 `openspec baseline/check` 是维护/workflow 表面,不建议普通 workspace 直接依赖。
|
|
12
14
|
|
|
13
15
|
遇到 unsupported runtime 或不能确定的资产边界时,Agent 应停止自动变更、保留源资产,并报告可执行下一步。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
这个示例展示从 CLI 可用到 Agent runtime 可用的最小路径,不保存生成后的 runtime 文件。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
先用 `buildr runtime list --json` 选择当前 Agent 对应的 adapter id(`claude-code`、`codex`、`cursor`、`qoder`、`trae`、`trae-work` 或 `workbuddy`):
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
mkdir buildr-demo
|
|
@@ -21,4 +21,4 @@ buildr service create shop/api <git-url> --branch main --target . --type backend
|
|
|
21
21
|
buildr doctor --agent <agent> --target . --json
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
长期事实写入 `AGENTS.md`、`rules/`、`skills/`、`commands/`、`components/` 和 `projects
|
|
24
|
+
长期事实写入 `AGENTS.md`、`rules/`、`skills/`、`commands/`、`components/` 和 `projects/`;各 Agent 的接入路径见 [Agent Runtime Adapters](../../docs/agent-runtime-adapters.md),生成目标都是可重建 runtime。
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
buildr runtime list --json
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
识别当前 Agent,并将 `<agent>` 固定为支持列表中对应的参数;当前支持 `claude-code` 和 `
|
|
12
|
+
识别当前 Agent,并将 `<agent>` 固定为支持列表中对应的参数;当前支持 `claude-code`、`codex`、`cursor`、`qoder`、`trae`、`trae-work` 和 `workbuddy`。如果无法和支持列表对齐,停止 Buildr 操作,并请联系 Buildr 作者反馈该 Agent。
|
|
13
13
|
|
|
14
14
|
workspace 尚未初始化时,用一个高层命令完成源资产、Buildr Skill、当前 Agent runtime render 和最终 doctor:
|
|
15
15
|
|
|
@@ -62,7 +62,7 @@ Buildr workspace 是组织(Organization/Root)资产根;Agent runtime 是
|
|
|
62
62
|
|
|
63
63
|
Rules 控制 Agent 的价值观、边界和约束;Skills 封装可复用的专业动作和操作流程。Rule 和 Skill 不以“是否必须加载”作为本质区分;任务触发型流程应沉淀为 Skills,并通过当前 Agent runtime 渲染后使用。
|
|
64
64
|
|
|
65
|
-
Agent runtime adapter 按“scope 祖先链 + scope 子树”发现和投射 `AGENTS.md
|
|
65
|
+
Agent runtime adapter 按“scope 祖先链 + scope 子树”发现和投射 `AGENTS.md`,再按目标 Agent 使用原生入口、scoped vendor rules 或 reference bridge;具体路径、reload 和 UI 前置条件见随包 `docs/agent-runtime-adapters.md`。adapter 不替 Agent 做语义决策。Agent 必须读取 enabled、required 且 installed 的 Rule;对 enabled、optional 且 installed 的 Rule,先检查 description,并在当前任务语义相关时于行动前读取正文。disabled 或 uninstalled Rule 不参与任务。
|
|
66
66
|
|
|
67
67
|
root/Organization 规则维护使用 `rules/manifest.yml` 和 `rules/`。新增规则时,先创建并编辑 `rules/<rule-id>.md`,再运行:
|
|
68
68
|
|
package/package/manifest.yml
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
include:
|
|
2
2
|
- LICENSE
|
|
3
3
|
- README.md
|
|
4
|
+
- docs/agent-runtime-adapters.md
|
|
4
5
|
- docs/cli-reference.md
|
|
5
6
|
- docs/cli-architecture.md
|
|
6
7
|
- docs/known-limitations.md
|
|
@@ -13,6 +14,11 @@ agentSkills:
|
|
|
13
14
|
runtimes:
|
|
14
15
|
- claude-code
|
|
15
16
|
- codex
|
|
17
|
+
- cursor
|
|
18
|
+
- qoder
|
|
19
|
+
- trae
|
|
20
|
+
- trae-work
|
|
21
|
+
- workbuddy
|
|
16
22
|
|
|
17
23
|
builtins:
|
|
18
24
|
rules:
|
|
@@ -27,7 +33,7 @@ builtins:
|
|
|
27
33
|
target: skills/buildr/task-triage
|
|
28
34
|
description: 用户要求修 bug、实现或调整功能、改需求、重构、优化、补文档、补测试、调整 API/契约/权限/状态流/数据语义,或询问某项改动是否需要更新 spec、创建 change、只改代码时使用。
|
|
29
35
|
required: false
|
|
30
|
-
runtimes: ["claude-code","codex"]
|
|
36
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
31
37
|
- id: task-worktree
|
|
32
38
|
path: package/targets/workspace/skills/buildr/task-worktree
|
|
33
39
|
target: skills/buildr/task-worktree
|
|
@@ -35,61 +41,61 @@ builtins:
|
|
|
35
41
|
required: false
|
|
36
42
|
legacyIntegrities:
|
|
37
43
|
- sha256-23e68c3174887ebbf6990526f93e7f1c047199e1bef1f2e8e293b0cba2a3cfad
|
|
38
|
-
runtimes: ["claude-code","codex"]
|
|
44
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
39
45
|
- id: task-finish
|
|
40
46
|
path: package/targets/workspace/skills/buildr/task-finish
|
|
41
47
|
target: skills/buildr/task-finish
|
|
42
48
|
description: 用户在 task worktree 中要求“收尾”、完成任务、自动收尾,或要求自动完成已验证 change 的归档、提交、集成、推送和本地清理时使用。
|
|
43
49
|
required: false
|
|
44
|
-
runtimes: ["claude-code","codex"]
|
|
50
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
45
51
|
- id: git-ops
|
|
46
52
|
path: package/targets/workspace/skills/buildr/git-ops
|
|
47
53
|
target: skills/buildr/git-ops
|
|
48
54
|
description: 用户表达提交、commit、推送、push、提交并推送、合并、merge、rebase、发布、release、删除分支、清理远端分支等单项 Git 意图,或 Git 操作存在授权、范围、amend、远端改写、分支删除等歧义时使用。
|
|
49
55
|
required: false
|
|
50
|
-
runtimes: ["claude-code","codex"]
|
|
56
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
51
57
|
- id: openspec-explore
|
|
52
58
|
path: package/targets/workspace/skills/openspec/openspec-explore
|
|
53
59
|
target: skills/openspec/openspec-explore
|
|
54
60
|
description: 探索想法、调查问题或澄清需求时使用;只思考和梳理,不实现代码。
|
|
55
61
|
required: false
|
|
56
62
|
component: openspec
|
|
57
|
-
runtimes: ["claude-code","codex"]
|
|
63
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
58
64
|
- id: openspec-propose
|
|
59
65
|
path: package/targets/workspace/skills/openspec/openspec-propose
|
|
60
66
|
target: skills/openspec/openspec-propose
|
|
61
67
|
description: 用户要快速创建完整 OpenSpec change 提案、设计、规格和任务时使用。
|
|
62
68
|
required: false
|
|
63
69
|
component: openspec
|
|
64
|
-
runtimes: ["claude-code","codex"]
|
|
70
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
65
71
|
- id: openspec-apply-change
|
|
66
72
|
path: package/targets/workspace/skills/openspec/openspec-apply-change
|
|
67
73
|
target: skills/openspec/openspec-apply-change
|
|
68
74
|
description: 用户要开始或继续实现某个 OpenSpec change 的任务时使用。
|
|
69
75
|
required: false
|
|
70
76
|
component: openspec
|
|
71
|
-
runtimes: ["claude-code","codex"]
|
|
77
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
72
78
|
- id: openspec-sync-specs
|
|
73
79
|
path: package/targets/workspace/skills/openspec/openspec-sync-specs
|
|
74
80
|
target: skills/openspec/openspec-sync-specs
|
|
75
81
|
description: 用户要把 change 中的 delta specs 同步到主 specs,但不归档 change 时使用。
|
|
76
82
|
required: false
|
|
77
83
|
component: openspec
|
|
78
|
-
runtimes: ["claude-code","codex"]
|
|
84
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
79
85
|
- id: openspec-archive-change
|
|
80
86
|
path: package/targets/workspace/skills/openspec/openspec-archive-change
|
|
81
87
|
target: skills/openspec/openspec-archive-change
|
|
82
88
|
description: 用户明确要归档已完成 OpenSpec change 时使用。
|
|
83
89
|
required: false
|
|
84
90
|
component: openspec
|
|
85
|
-
runtimes: ["claude-code","codex"]
|
|
91
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
86
92
|
- id: openspec-contract-guard
|
|
87
93
|
path: package/targets/workspace/skills/buildr/openspec-contract-guard
|
|
88
94
|
target: skills/buildr/openspec-contract-guard
|
|
89
95
|
description: 创建、同步或归档 OpenSpec change 时建立契约基线,并检测并行冲突、陈旧 delta 和同步结果漂移。
|
|
90
96
|
required: false
|
|
91
97
|
component: openspec
|
|
92
|
-
runtimes: ["claude-code","codex"]
|
|
98
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
93
99
|
commands: []
|
|
94
100
|
|
|
95
101
|
components:
|
|
@@ -7,11 +7,11 @@ description: 在 Buildr workspace 中安装、更新、同步、诊断和维护
|
|
|
7
7
|
|
|
8
8
|
## Buildr 是什么
|
|
9
9
|
|
|
10
|
-
Buildr
|
|
10
|
+
Buildr 是为组织和 Agent 构建的工作资产治理系统。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
它把散落在员工个人经验、文档、仓库和工具中的工作内容、工作能力与工作方式,沉淀为可共享、可审计、可适配不同 Agent 的工作区(workspace)源资产。Rules、Skills、Commands、Projects 和 Services 等是当前资产形式,不是工作资产概念的封闭边界。Agent 是这些资产的主要使用者;人通过 Agent 表达目标、提供业务判断并确认重要决策。
|
|
13
13
|
|
|
14
|
-
Buildr workspace 是组织(Organization/Root)资产根;Agent runtime 是面向当前 Agent
|
|
14
|
+
Buildr workspace 是组织(Organization/Root)资产根;Agent runtime 是面向当前 Agent 的可重建入口。Buildr 组织并投射 Agent 可发现、可选择、可使用的工作资产,不替 Agent 构造 context window;Agent 根据当前任务发现并选择相关内容,形成任务上下文。本机状态和临时提示不由 Buildr 维护。
|
|
15
15
|
|
|
16
16
|
Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 Buildr CLI 完成维护、诊断和按需渲染。事实状态以 `buildr runtime list --json`、`buildr doctor --agent <agent> --target <dir> --json`、manifest、CLI 帮助和 CLI 错误输出为准。
|
|
17
17
|
|
|
@@ -45,6 +45,7 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
45
45
|
| 沉淀可复用任务流程或操作能力 | 技能(Skills) |
|
|
46
46
|
| 声明组织复用的外部命令行工具 | 命令(Commands) |
|
|
47
47
|
| 当前 Agent 找不到已声明规则或技能 | Agent runtime 渲染 |
|
|
48
|
+
| 为 Buildr 增加新的 Agent runtime adapter | runtime trait intake + OpenSpec change |
|
|
48
49
|
|
|
49
50
|
## 资产维护
|
|
50
51
|
|
|
@@ -107,7 +108,7 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
107
108
|
- root/Organization 规则新增:先创建并编辑 `rules/<rule-id>.md`,再运行 `buildr rules add <rule-id> --target <dir> --description <text>`;未传 `--path` 时默认注册 `rules/<rule-id>.md`。
|
|
108
109
|
- root/Organization 规则删除:运行 `buildr rules remove <rule-id> --target <dir>`,同时删除 manifest entry 和规则文件;如只取消注册并保留文件,使用 `--keep-file`。
|
|
109
110
|
- Project/Service 规则分别通过对应目录的 `AGENTS.md` 维护,不使用 Project 或 Service 级 `rules/manifest.yml`。
|
|
110
|
-
- 需要渲染到 Agent runtime 时,运行 `buildr rules render <agent> --scope <workspace-relative-path> --target <dir>`;Claude Code
|
|
111
|
+
- 需要渲染到 Agent runtime 时,运行 `buildr rules render <agent> --scope <workspace-relative-path> --target <dir>`;Codex 原生读取,Claude Code 使用逐 source bridge,Cursor/Qoder/TRAE 使用 scoped vendor rules,TRAE Work/WorkBuddy 使用 root reference bridge。具体路径、reload/UI 前置条件以及 `documented` / `verified` 证据等级见随包 `docs/agent-runtime-adapters.md`;GUI smoke 保持一次性人工 Prompt,不自动点击或抓取应用私有状态。
|
|
111
112
|
|
|
112
113
|
### Commands
|
|
113
114
|
|
|
@@ -131,8 +132,10 @@ Agent 使用本 Skill 判断用户意图属于哪类 Buildr 资产,并通过 B
|
|
|
131
132
|
### Agent 运行时渲染
|
|
132
133
|
|
|
133
134
|
- 只在当前 Agent 已确认受支持时处理 Agent runtime。
|
|
134
|
-
- `buildr runtime list --json` 的静态 registry 是 supported adapter
|
|
135
|
+
- `buildr runtime list --json` 的静态 registry 是 supported adapter 的事实源,并输出 Rules、Skills、surface、activation 和 checker trait catalog;每个 supported adapter 必须完整覆盖 Rules entry、产品 Buildr Skill、workspace/Project Skills、Skill install plans 和 runtime check,不为 unsupported runtime 使用 alias 或 fallback。
|
|
135
136
|
- Adapter 只生成 runtime-specific 声明式计划;Buildr 通用 core 统一负责 Component 完整性后的 source assembly、计划验证、冲突预检、写入、清理和诊断。
|
|
137
|
+
- 用户要求增加新 adapter 时,先从目标 Agent 收集能直接映射到 trait descriptor 的最小 intake:identity/surface、Rules kind、Skills root、activation、安装/版本 checker 和最小黑盒证据;不要调查与 adapter 无关的产品功能。
|
|
138
|
+
- 新 adapter 属于 Buildr 产品 change-flow:每个 runtime 使用独立 descriptor、capability evidence 和 tests;只在现有 primitive 无法表达时增加新的静态 implementation,不能 alias 或 fallback 到其他 adapter。
|
|
136
139
|
- 用户说“更新 Buildr”时,依次运行 `buildr update` 与新的 `buildr sync <agent> --target <dir>`;用户说“只更新 Buildr”时不追加 sync;用户说“同步 workspace”时不先更新 CLI。sync 默认从 `.` 递归 reconcile workspace Rules,并同步 Root/Project Skills。
|
|
137
140
|
- doctor 指出特定 scope runtime 问题时,按 canonical workspace 相对 scope 运行 `render`、`rules render` 或 `runtime check`;组合 `render` 会把 Skills scope 折叠到所属 Root/Project。
|
|
138
141
|
- `runtime check` 是专项 runtime 细查入口;只有 doctor 指向具体 runtime 问题,或用户明确要求细查时运行。
|
|
@@ -23,9 +23,11 @@ Buildr workspace 的基础模型、术语和硬边界。每次进入 workspace
|
|
|
23
23
|
|
|
24
24
|
## 基本模型
|
|
25
25
|
|
|
26
|
-
Buildr
|
|
26
|
+
Buildr 是为组织和 Agent 构建的工作资产治理系统。
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
它把散落在员工个人经验、文档、仓库和工具中的工作内容、工作能力与工作方式,沉淀为可共享、可审计、可适配不同 Agent 的工作区(workspace)源资产。Rules、Skills、Commands、Projects 和 Services 等是当前资产形式,不是工作资产概念的封闭边界。Agent 是这些资产的主要使用者;人通过 Agent 表达目标、提供业务判断并确认重要决策。
|
|
29
|
+
|
|
30
|
+
Buildr 管理和投射的是 Agent 可发现、可选择、可使用的工作资产,不是当前任务的 context window。Agent 根据用户目标、修改范围、代码语义和 workspace 信息选择相关内容,形成任务上下文;Agent runtime adapter 不替 Agent 判断语义相关性。
|
|
29
31
|
|
|
30
32
|
```text
|
|
31
33
|
Organization/Root -> Project -> Service
|
|
@@ -7,7 +7,7 @@ skills:
|
|
|
7
7
|
enabled: true
|
|
8
8
|
required: false
|
|
9
9
|
state: installed
|
|
10
|
-
runtimes: ["claude-code","codex"]
|
|
10
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
11
11
|
runtimePath: task-triage
|
|
12
12
|
- id: task-worktree
|
|
13
13
|
source: buildr
|
|
@@ -16,7 +16,7 @@ skills:
|
|
|
16
16
|
enabled: true
|
|
17
17
|
required: false
|
|
18
18
|
state: installed
|
|
19
|
-
runtimes: ["claude-code","codex"]
|
|
19
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
20
20
|
runtimePath: task-worktree
|
|
21
21
|
- id: task-finish
|
|
22
22
|
source: buildr
|
|
@@ -25,7 +25,7 @@ skills:
|
|
|
25
25
|
enabled: true
|
|
26
26
|
required: false
|
|
27
27
|
state: installed
|
|
28
|
-
runtimes: ["claude-code","codex"]
|
|
28
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
29
29
|
runtimePath: task-finish
|
|
30
30
|
- id: git-ops
|
|
31
31
|
source: buildr
|
|
@@ -34,5 +34,5 @@ skills:
|
|
|
34
34
|
enabled: true
|
|
35
35
|
required: false
|
|
36
36
|
state: installed
|
|
37
|
-
runtimes: ["claude-code","codex"]
|
|
37
|
+
runtimes: ["claude-code","codex","cursor","qoder","trae","trae-work","workbuddy"]
|
|
38
38
|
runtimePath: git-ops
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildr-ai/buildr",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildr CLI for managing Agent workspace assets.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"bin": {
|
|
29
|
-
"buildr": "
|
|
29
|
+
"buildr": "tools/buildr"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"LICENSE",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"tools/cli/",
|
|
35
35
|
"tools/runtime/check-codex.mjs",
|
|
36
36
|
"tools/runtime/check-claude-code.mjs",
|
|
37
|
+
"tools/runtime/check-runtime.mjs",
|
|
37
38
|
"tools/shared/fetch-remote-text.mjs",
|
|
38
39
|
"tools/runtime/adapter-contract.mjs",
|
|
39
40
|
"tools/runtime/projection.mjs",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"tools/verification/runtime/adapter-contract.mjs",
|
|
47
48
|
"tools/verification/runtime/adapter-parity.mjs",
|
|
48
49
|
"README.md",
|
|
50
|
+
"docs/agent-runtime-adapters.md",
|
|
49
51
|
"docs/cli-reference.md",
|
|
50
52
|
"docs/cli-architecture.md",
|
|
51
53
|
"docs/known-limitations.md",
|
|
@@ -53,8 +55,11 @@
|
|
|
53
55
|
"package/"
|
|
54
56
|
],
|
|
55
57
|
"scripts": {
|
|
56
|
-
"test": "./tools/verify-buildr-product",
|
|
58
|
+
"test": "./tools/verify-buildr-product-fast",
|
|
59
|
+
"test:fast": "./tools/verify-buildr-product-fast",
|
|
57
60
|
"test:unit": "node --test test/*.test.mjs",
|
|
61
|
+
"test:affected": "./tools/verify-buildr-product-affected",
|
|
62
|
+
"test:candidate": "./tools/verify-buildr-product",
|
|
58
63
|
"test:release": "node tools/verification/release/release-smoke.mjs",
|
|
59
64
|
"pack:check": "npm pack --dry-run"
|
|
60
65
|
},
|
|
@@ -63,5 +68,8 @@
|
|
|
63
68
|
},
|
|
64
69
|
"dependencies": {
|
|
65
70
|
"yaml": "^2.9.0"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@fission-ai/openspec": "1.4.1"
|
|
66
74
|
}
|
|
67
75
|
}
|
|
@@ -42,7 +42,7 @@ export function createRuntimeDiagnostics(deps) {
|
|
|
42
42
|
function diagnoseRuntime(result, targetRoot, scopes, options = {}) {
|
|
43
43
|
const includeInfo = options.includeInfo === true;
|
|
44
44
|
const selectedAgent = options.agent || null;
|
|
45
|
-
const runtimeResultKey = (agent) => agent
|
|
45
|
+
const runtimeResultKey = (agent) => getRuntimeAdapter(agent).traits.checker.resultKey ?? agent.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
46
46
|
result.runtime = Object.fromEntries(SUPPORTED_AGENT_IDS.map((agent) => [runtimeResultKey(agent), []]));
|
|
47
47
|
if (selectedAgent && !isSupportedAgent(selectedAgent)) {
|
|
48
48
|
addUnsupportedAgentFinding(result, selectedAgent);
|
|
@@ -67,10 +67,11 @@ export function createRuntimeDiagnostics(deps) {
|
|
|
67
67
|
try {
|
|
68
68
|
const check = checker(['--scope', scope, '--target', targetRoot], {
|
|
69
69
|
repoRoot: targetRoot,
|
|
70
|
+
adapterId: adapter.id,
|
|
70
71
|
command: 'buildr doctor',
|
|
71
72
|
});
|
|
72
73
|
const findings = dedupeFindings(agent, runtimeFindingsForDoctor(check.findings, includeInfo));
|
|
73
|
-
result.runtime[resultKey].push({ agent, scope, counts: summarizeRuntimeFindings(findings), findings });
|
|
74
|
+
result.runtime[resultKey].push({ agent, scope, counts: summarizeRuntimeFindings(findings), findings, environmentChecks: check.environmentChecks, activation: check.activation });
|
|
74
75
|
if (findings.some((finding) => ['missing', 'stale', 'orphan'].includes(finding.status))) {
|
|
75
76
|
addDoctorFinding(result, 'warning', `runtime.${codeId}_stale`, `${adapter.displayName} runtime 缺失或过期:${scope}`, {
|
|
76
77
|
path: toPosixRelative(targetRoot, check.targetRoot),
|
|
@@ -107,7 +108,7 @@ export function createRuntimeDiagnostics(deps) {
|
|
|
107
108
|
}
|
|
108
109
|
} catch (error) {
|
|
109
110
|
const missingManifest = error.message.startsWith('Manifest not found:');
|
|
110
|
-
const missingCode =
|
|
111
|
+
const missingCode = adapter.traits.checker.skillsManifestAbsentCode ?? `runtime.${codeId}_skills_manifest_absent`;
|
|
111
112
|
addDoctorFinding(result, missingManifest ? 'ok' : 'error', missingManifest ? missingCode : `runtime.${codeId}_unchecked`, missingManifest ? `未声明 ${adapter.displayName} Skills manifest,跳过 Skills runtime 检查:${scope}` : `无法检查 ${adapter.displayName} runtime:${scope}`, missingManifest ? {} : {
|
|
112
113
|
agent,
|
|
113
114
|
suggestion: error.message,
|
|
@@ -433,10 +433,6 @@ export function createPackageSmokeChecks(deps) {
|
|
|
433
433
|
problems.push('OpenSpec contract fixture verifier is missing.');
|
|
434
434
|
} else {
|
|
435
435
|
files.push(contractFixture);
|
|
436
|
-
const fixtureResult = spawnSync(process.execPath, [contractFixture], { cwd: root, encoding: 'utf8', timeout: 30000 });
|
|
437
|
-
if (fixtureResult.status !== 0) {
|
|
438
|
-
problems.push(`OpenSpec contract fixture verifier failed: ${(fixtureResult.stderr || fixtureResult.stdout || 'unknown error').trim()}`);
|
|
439
|
-
}
|
|
440
436
|
}
|
|
441
437
|
|
|
442
438
|
const mutationVerifier = path.join(root, 'tools', 'verification', 'integrity', 'managed-mutations.mjs');
|
|
@@ -444,8 +440,6 @@ export function createPackageSmokeChecks(deps) {
|
|
|
444
440
|
problems.push('Managed mutation verifier is missing.');
|
|
445
441
|
} else {
|
|
446
442
|
files.push(mutationVerifier);
|
|
447
|
-
const mutationResult = spawnSync(process.execPath, [mutationVerifier], { cwd: root, encoding: 'utf8', timeout: 30000 });
|
|
448
|
-
if (mutationResult.status !== 0) problems.push(`Managed mutation verifier failed: ${(mutationResult.stderr || mutationResult.stdout || 'unknown error').trim()}`);
|
|
449
443
|
}
|
|
450
444
|
}
|
|
451
445
|
|
|
@@ -3,6 +3,7 @@ export function createPackageStaticValidator(deps) {
|
|
|
3
3
|
LEGACY_PACKAGE_PATHS,
|
|
4
4
|
PACKAGE_RUNTIME_TARGET,
|
|
5
5
|
PACKAGE_WORKSPACE_TARGET,
|
|
6
|
+
SUPPORTED_AGENT_IDS,
|
|
6
7
|
collectFiles,
|
|
7
8
|
componentMemberPaths,
|
|
8
9
|
existsDirectory,
|
|
@@ -453,8 +454,9 @@ export function createPackageStaticValidator(deps) {
|
|
|
453
454
|
if (!skill.path.startsWith(`${PACKAGE_WORKSPACE_TARGET}/skills/`)) {
|
|
454
455
|
problems.push(`${label}.path must be under ${PACKAGE_WORKSPACE_TARGET}/skills/.`);
|
|
455
456
|
}
|
|
456
|
-
|
|
457
|
-
|
|
457
|
+
const missingRuntimes = SUPPORTED_AGENT_IDS.filter((runtime) => !skill.runtimes?.includes(runtime));
|
|
458
|
+
if (!Array.isArray(skill.runtimes) || missingRuntimes.length > 0) {
|
|
459
|
+
problems.push(`${label}.runtimes must include all supported adapters: ${SUPPORTED_AGENT_IDS.join(', ')}.`);
|
|
458
460
|
}
|
|
459
461
|
if (path.isAbsolute(skill.path) || skill.path.startsWith('..') || path.isAbsolute(skill.target) || skill.target.startsWith('..')) {
|
|
460
462
|
problems.push(`${label} paths must stay relative.`);
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
PACKAGE_RUNTIME_TARGET,
|
|
17
17
|
LEGACY_PACKAGE_PATHS,
|
|
18
18
|
BUILDR_REQUIRED_BLOCK_START,
|
|
19
|
+
SUPPORTED_AGENT_IDS,
|
|
19
20
|
} from '../shared/platform.mjs';
|
|
20
21
|
import { PUBLIC_JSON_SCHEMAS, withJsonSchema } from '../shared/json-contracts.mjs';
|
|
21
22
|
import { createPackageOutput } from './package-maintenance/output.mjs';
|
|
@@ -409,6 +410,7 @@ export function registerApplicationPackageMaintenance(runtime) {
|
|
|
409
410
|
LEGACY_PACKAGE_PATHS,
|
|
410
411
|
PACKAGE_RUNTIME_TARGET,
|
|
411
412
|
PACKAGE_WORKSPACE_TARGET,
|
|
413
|
+
SUPPORTED_AGENT_IDS,
|
|
412
414
|
collectFiles,
|
|
413
415
|
componentMemberPaths,
|
|
414
416
|
existsDirectory,
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
fs,
|
|
3
3
|
path,
|
|
4
4
|
process,
|
|
5
|
+
RUNTIME_ADAPTERS,
|
|
5
6
|
SUPPORTED_AGENT_IDS,
|
|
6
7
|
UNSUPPORTED_AGENT_GUIDANCE,
|
|
7
8
|
isSupportedAgent,
|
|
@@ -173,7 +174,7 @@ export function registerApplicationWorkspaceOperations(runtime) {
|
|
|
173
174
|
components: { items: [], ownership: {}, findings: [] },
|
|
174
175
|
builtins: { items: [] },
|
|
175
176
|
commandLineTools: null,
|
|
176
|
-
runtime:
|
|
177
|
+
runtime: Object.fromEntries(SUPPORTED_AGENT_IDS.map((agent) => [RUNTIME_ADAPTERS[agent].traits.checker.resultKey ?? agent.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase()), []])),
|
|
177
178
|
mutations: { blocked: false, lock: null, transactions: [] },
|
|
178
179
|
findings: [],
|
|
179
180
|
nextSteps: [],
|