artifact-chain-assistant 0.8.0 → 0.8.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/.claude-plugin/plugin.json +18 -3
- package/.codex-plugin/plugin.json +4 -13
- package/AGENT-METHOD-REGISTRY.md +238 -0
- package/AGENT-METHOD-REGISTRY.zh-CN.md +229 -0
- package/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +6 -1
- package/EXTENDED-ARTIFACT-CATALOG.md +3 -0
- package/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +3 -0
- package/INSTALL.md +30 -16
- package/README.md +59 -275
- package/README.zh-CN.md +24 -176
- package/adapters/claude/.claude-plugin/plugin.json +18 -3
- package/adapters/claude/EXTENDED-ARTIFACT-CATALOG.md +3 -0
- package/adapters/claude/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +3 -0
- package/adapters/claude/INSTALL.md +33 -16
- package/adapters/claude/agent-methods/catalog.yaml +40 -4
- package/adapters/claude/compatibility.json +4 -4
- package/adapters/claude/scripts/lib/compatibility-policy.mjs +0 -65
- package/adapters/claude/skills/artifact-chain-bootstrap/SKILL.md +1 -1
- package/adapters/claude/skills/artifact-chain-maintainer/SKILL.md +1 -1
- package/adapters/claude/skills/artifact-review/SKILL.md +1 -1
- package/adapters/claude/skills/help/SKILL.md +96 -0
- package/adapters/claude/skills/prd-feature/author/references/compose.md +43 -0
- package/adapters/claude/skills/prd-feature/author/references/inspect.md +94 -0
- package/adapters/claude/skills/prd-feature/author/references/validate.md +65 -0
- package/adapters/claude/skills/prd-feature/review/references/compose.md +43 -0
- package/adapters/claude/skills/prd-feature/review/references/inspect.md +94 -0
- package/adapters/claude/skills/prd-feature/review/references/validate.md +65 -0
- package/adapters/claude/skills/quickstart/SKILL.md +113 -0
- package/adapters/claude/skills/scenario-script/author/references/compose.md +43 -0
- package/adapters/claude/skills/scenario-script/author/references/inspect.md +105 -0
- package/adapters/claude/skills/scenario-script/author/references/validate.md +72 -0
- package/adapters/claude/skills/scenario-script/review/references/compose.md +43 -0
- package/adapters/claude/skills/scenario-script/review/references/inspect.md +105 -0
- package/adapters/claude/skills/scenario-script/review/references/validate.md +72 -0
- package/adapters/claude/skills/setup/SKILL.md +118 -0
- package/adapters/claude/skills/where-am-i/SKILL.md +1 -1
- package/adapters/codex/.codex-plugin/plugin.json +3 -12
- package/adapters/codex/EXTENDED-ARTIFACT-CATALOG.md +3 -0
- package/adapters/codex/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +3 -0
- package/adapters/codex/INSTALL.md +33 -16
- package/adapters/codex/agent-methods/catalog.yaml +40 -4
- package/adapters/codex/compatibility.json +4 -4
- package/adapters/codex/scripts/lib/compatibility-policy.mjs +0 -65
- package/adapters/codex/skills/artifact-chain-bootstrap/SKILL.md +1 -1
- package/adapters/codex/skills/artifact-chain-maintainer/SKILL.md +1 -1
- package/adapters/codex/skills/artifact-review/SKILL.md +1 -1
- package/adapters/codex/skills/help/SKILL.md +96 -0
- package/adapters/codex/skills/prd-feature/author/references/compose.md +43 -0
- package/adapters/codex/skills/prd-feature/author/references/inspect.md +94 -0
- package/adapters/codex/skills/prd-feature/author/references/validate.md +65 -0
- package/adapters/codex/skills/prd-feature/review/references/compose.md +43 -0
- package/adapters/codex/skills/prd-feature/review/references/inspect.md +94 -0
- package/adapters/codex/skills/prd-feature/review/references/validate.md +65 -0
- package/adapters/codex/skills/quickstart/SKILL.md +113 -0
- package/adapters/codex/skills/scenario-script/author/references/compose.md +43 -0
- package/adapters/codex/skills/scenario-script/author/references/inspect.md +105 -0
- package/adapters/codex/skills/scenario-script/author/references/validate.md +72 -0
- package/adapters/codex/skills/scenario-script/review/references/compose.md +43 -0
- package/adapters/codex/skills/scenario-script/review/references/inspect.md +105 -0
- package/adapters/codex/skills/scenario-script/review/references/validate.md +72 -0
- package/adapters/codex/skills/setup/SKILL.md +118 -0
- package/adapters/codex/skills/where-am-i/SKILL.md +1 -1
- package/agent-methods/catalog.yaml +40 -4
- package/compatibility.json +4 -4
- package/package.json +5 -3
- package/scripts/build-adapters.mjs +22 -20
- package/scripts/check-method-registry.mjs +8 -5
- package/scripts/lib/compatibility-policy.mjs +0 -65
- package/scripts/sync-skills.mjs +169 -1
- package/skills/artifact-audit/SKILL.md +80 -0
- package/skills/artifact-batch/SKILL.md +115 -0
- package/skills/artifact-chain-bootstrap/SKILL.md +343 -0
- package/skills/artifact-chain-maintainer/SKILL.md +167 -0
- package/skills/artifact-generate/SKILL.md +89 -0
- package/skills/artifact-repair/SKILL.md +124 -0
- package/skills/artifact-review/SKILL.md +122 -0
- package/skills/artifact-workflow-worker/SKILL.md +90 -0
- package/skills/help/SKILL.md +96 -0
- package/skills/prd-feature/SKILL.md +68 -0
- package/skills/prd-feature/author/SKILL.md +92 -0
- package/skills/prd-feature/author/references/compose.md +43 -0
- package/skills/prd-feature/author/references/inspect.md +94 -0
- package/skills/prd-feature/author/references/validate.md +65 -0
- package/skills/prd-feature/references/compose.md +43 -0
- package/skills/prd-feature/references/inspect.md +94 -0
- package/skills/prd-feature/references/validate.md +65 -0
- package/skills/prd-feature/repair/SKILL.md +135 -0
- package/skills/prd-feature/review/SKILL.md +134 -0
- package/skills/prd-feature/review/references/compose.md +43 -0
- package/skills/prd-feature/review/references/inspect.md +94 -0
- package/skills/prd-feature/review/references/validate.md +65 -0
- package/skills/quickstart/SKILL.md +113 -0
- package/skills/scenario-script/SKILL.md +76 -0
- package/skills/scenario-script/author/SKILL.md +111 -0
- package/skills/scenario-script/author/references/compose.md +43 -0
- package/skills/scenario-script/author/references/inspect.md +105 -0
- package/skills/scenario-script/author/references/validate.md +72 -0
- package/skills/scenario-script/references/compose.md +43 -0
- package/skills/scenario-script/references/inspect.md +105 -0
- package/skills/scenario-script/references/validate.md +72 -0
- package/skills/scenario-script/repair/SKILL.md +135 -0
- package/skills/scenario-script/review/SKILL.md +137 -0
- package/skills/scenario-script/review/references/compose.md +43 -0
- package/skills/scenario-script/review/references/inspect.md +105 -0
- package/skills/scenario-script/review/references/validate.md +72 -0
- package/skills/setup/SKILL.md +118 -0
- package/skills/where-am-i/SKILL.md +233 -0
- package/skills-src/artifact-chain-bootstrap/SKILL.md +1 -1
- package/skills-src/artifact-chain-maintainer/SKILL.md +1 -1
- package/skills-src/artifact-review/SKILL.md +1 -1
- package/skills-src/help/SKILL.md +96 -0
- package/skills-src/quickstart/SKILL.md +113 -0
- package/skills-src/setup/SKILL.md +118 -0
- package/skills-src/where-am-i/SKILL.md.tpl +1 -1
- package/templates/claude/plugin.json.tpl +17 -2
- package/templates/codex/plugin.json.tpl +2 -11
- package/.agents/plugins/marketplace.json +0 -20
- package/.claude-plugin/marketplace.json +0 -20
- package/templates/claude/marketplace.json.tpl +0 -20
- package/templates/codex/marketplace.json.tpl +0 -20
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# scenario-script validate
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
在 author 或 repair 完成后,验证场景剧本制品的结构完整性和制品链一致性。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 制品链验证
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
artifact-graph validate --root . --warning-only
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
检查:
|
|
18
|
+
- 无新增孤立制品警告
|
|
19
|
+
- 无新增关联引用警告
|
|
20
|
+
- 新制品已正确参与图遍历
|
|
21
|
+
|
|
22
|
+
### 2. 项目规范完整性
|
|
23
|
+
|
|
24
|
+
按项目配置、模板、治理文档和同类制品检查 frontmatter、ID、状态与正文结构;不要假设固定字段或枚举。
|
|
25
|
+
|
|
26
|
+
### 3. ID 唯一性
|
|
27
|
+
|
|
28
|
+
从项目配置中派生制品扫描路径,确认新制品的 ID 不与已有制品冲突。
|
|
29
|
+
|
|
30
|
+
### 4. 关联可达性
|
|
31
|
+
|
|
32
|
+
对项目规则声明的关联字段中的每个 ID:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
artifact-graph query --from <ID>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
确认关联制品在图中存在。
|
|
39
|
+
|
|
40
|
+
### 5. 场景质量基本检查
|
|
41
|
+
|
|
42
|
+
- 能定位角色与目标、前置条件、主路径和可观察结果(章节名服从项目模板)
|
|
43
|
+
- 关键异常路径得到覆盖
|
|
44
|
+
- 步骤与结果可验证,不依赖模糊表述
|
|
45
|
+
|
|
46
|
+
## 输出
|
|
47
|
+
|
|
48
|
+
validate 输出供 review 和 repair 消费:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
validation:
|
|
52
|
+
artifact_id: <ID>
|
|
53
|
+
artifact_path: <文件路径>
|
|
54
|
+
issues:
|
|
55
|
+
- code: <问题代码>
|
|
56
|
+
severity: error | warning | info
|
|
57
|
+
message: <问题描述>
|
|
58
|
+
location: <文件路径>:<行号>
|
|
59
|
+
pass: true | false
|
|
60
|
+
chain_check:
|
|
61
|
+
validate_output: <artifact-graph validate 关键输出>
|
|
62
|
+
related_check:
|
|
63
|
+
- id: <关联 ID>
|
|
64
|
+
exists: true | false
|
|
65
|
+
quality_dimensions:
|
|
66
|
+
role_and_goals: present | missing
|
|
67
|
+
preconditions: present | missing
|
|
68
|
+
main_path: present | missing
|
|
69
|
+
exception_paths: present | missing
|
|
70
|
+
observable_results: present | missing
|
|
71
|
+
traceability: present | missing
|
|
72
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: 只读环境检查:插件闭包完整性、Node/CLI 可用性、doctor 诊断、项目 config、版本锁和 registry 可用性。输出结构化状态报告和精确下一步。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# setup
|
|
7
|
+
|
|
8
|
+
## 目的
|
|
9
|
+
|
|
10
|
+
在不写入任何内容的前提下,检查当前环境是否具备使用 artifact-chain-assistant 的条件。每项检查输出 PASS/WARN/FAIL 状态和精确诊断信息,最终汇总为结构化状态报告和推荐的下一步操作。
|
|
11
|
+
|
|
12
|
+
## 职责边界
|
|
13
|
+
|
|
14
|
+
- **只读**:不写配置、不装 hook、不刷新/建立版本锁、不修改任何文件。
|
|
15
|
+
- **路由写入**:当检查发现需要写入操作时,明确路由到 `artifact-chain-bootstrap` 并说明原因。
|
|
16
|
+
- **不复制 bootstrap 逻辑**:setup 只做检查和报告,不复制 bootstrap 的任何写入步骤。
|
|
17
|
+
- **不猜测状态**:只报告可直接验证的事实,不推断项目生命周期或技能启用状态。
|
|
18
|
+
|
|
19
|
+
## 检查序列
|
|
20
|
+
|
|
21
|
+
按以下顺序执行七项只读检查:
|
|
22
|
+
|
|
23
|
+
### 1. 插件闭包完整性
|
|
24
|
+
|
|
25
|
+
检查插件安装目录中以下路径是否存在且为常规文件/目录:
|
|
26
|
+
|
|
27
|
+
| 检查项 | 路径 | 说明 |
|
|
28
|
+
|--------|------|------|
|
|
29
|
+
| 技能目录 | `skills/` | 当前宿主已安装的技能目录 |
|
|
30
|
+
| Family API 目录 | `family-apis/` | 标准 Family API 定义 |
|
|
31
|
+
| 脚本目录 | `scripts/` | 辅助脚本 |
|
|
32
|
+
| 兼容性文件 | `compatibility.json` | 运行时版本兼容声明 |
|
|
33
|
+
| Catalog 文件 | `agent-methods/catalog.yaml` | 方法注册目录 |
|
|
34
|
+
|
|
35
|
+
**输出**:
|
|
36
|
+
- 全部存在 → `PASS: 插件闭包完整`
|
|
37
|
+
- 缺失项 → `FAIL: 缺失 <路径>`,列出每个缺失路径
|
|
38
|
+
|
|
39
|
+
### 2. Node.js 可用性
|
|
40
|
+
|
|
41
|
+
执行 `node --version`,检查是否可用及版本。
|
|
42
|
+
|
|
43
|
+
**输出**:
|
|
44
|
+
- 可用 → `PASS: Node.js <版本>`
|
|
45
|
+
- 不可用 → `FAIL: Node.js 未找到`
|
|
46
|
+
|
|
47
|
+
### 3. artifact-graph CLI 可用性
|
|
48
|
+
|
|
49
|
+
执行 `artifact-graph --help`,检查 CLI 是否在 PATH 中。
|
|
50
|
+
|
|
51
|
+
**输出**:
|
|
52
|
+
- 可用 → `PASS: artifact-graph CLI 可用`
|
|
53
|
+
- 不可用 → `FAIL: artifact-graph CLI 未找到`,附加 `pnpm add -D artifact-graph@0.8.1` 修复建议
|
|
54
|
+
|
|
55
|
+
### 4. Doctor 诊断
|
|
56
|
+
|
|
57
|
+
执行 `artifact-graph doctor --format json`,解析输出。
|
|
58
|
+
|
|
59
|
+
**输出**:
|
|
60
|
+
- exit 0 且输出有效 → `PASS: doctor 诊断通过`
|
|
61
|
+
- exit 非 0 → `WARN: doctor 报告问题`,附加诊断详情和修复建议
|
|
62
|
+
- 命令不存在 → `SKIP: artifact-graph CLI 不可用`
|
|
63
|
+
|
|
64
|
+
### 5. 项目 config 存在性
|
|
65
|
+
|
|
66
|
+
检查当前工作目录或项目根目录下 `artifact-graph.config.yaml` 是否存在。
|
|
67
|
+
|
|
68
|
+
**输出**:
|
|
69
|
+
- 存在 → `PASS: 项目 config 已配置`
|
|
70
|
+
- 不存在 → `WARN: 项目 config 不存在`,附加最小 config 示例和路由建议:`需要写入时请运行 artifact-chain-bootstrap`
|
|
71
|
+
|
|
72
|
+
### 6. 版本锁存在性
|
|
73
|
+
|
|
74
|
+
检查 `artifacts/traceability-version-lock.json` 是否存在。
|
|
75
|
+
|
|
76
|
+
**输出**:
|
|
77
|
+
- 存在 → `PASS: 版本锁已建立`
|
|
78
|
+
- 不存在 → `WARN: 版本锁不存在`,附加路由建议:`需要建锁时请运行 artifact-chain-bootstrap`
|
|
79
|
+
|
|
80
|
+
### 7. Registry CLI 可用性
|
|
81
|
+
|
|
82
|
+
检查 `agent-method-registry` CLI 是否可用(在 `node_modules/.bin/` 或 PATH 中)。
|
|
83
|
+
|
|
84
|
+
**输出**:
|
|
85
|
+
- 可用 → `PASS: agent-method-registry CLI 可用`
|
|
86
|
+
- 不可用 → `WARN: agent-method-registry CLI 不可用(contract-backed 服务解析将返回 NEEDS_INPUT)`
|
|
87
|
+
|
|
88
|
+
## 输出格式
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
## 环境检查报告
|
|
92
|
+
|
|
93
|
+
| # | 检查项 | 状态 | 详情 |
|
|
94
|
+
|---|--------|------|------|
|
|
95
|
+
| 1 | 插件闭包完整性 | PASS | 全部路径存在 |
|
|
96
|
+
| 2 | Node.js | PASS | v20.11.0 |
|
|
97
|
+
| 3 | artifact-graph CLI | PASS | 可用 |
|
|
98
|
+
| 4 | Doctor 诊断 | PASS | 诊断通过 |
|
|
99
|
+
| 5 | 项目 config | WARN | 不存在 |
|
|
100
|
+
| 6 | 版本锁 | WARN | 不存在 |
|
|
101
|
+
| 7 | Registry CLI | WARN | 不可用 |
|
|
102
|
+
|
|
103
|
+
## 推荐下一步
|
|
104
|
+
|
|
105
|
+
- 项目 config 和版本锁尚未建立。运行 `artifact-chain-bootstrap`(需用户授权)来初始化项目。
|
|
106
|
+
- Registry CLI 不可用。contract-backed 服务解析将返回 NEEDS_INPUT;可选安装 `agent-method-registry`。
|
|
107
|
+
|
|
108
|
+
## 状态摘要
|
|
109
|
+
|
|
110
|
+
- **可直接使用的能力**:help(只读能力查询)、where-am-i(只读项目分诊)
|
|
111
|
+
- **需要初始化后使用的能力**:bootstrap、maintainer、family/service(需要项目 config)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 安全边界
|
|
115
|
+
|
|
116
|
+
- 所有检查均为只读,不产生副作用。
|
|
117
|
+
- 未获得用户明确授权时,不执行任何写入操作。
|
|
118
|
+
- 需要写入时,输出明确的路由建议并说明原因,由用户决定是否执行。
|
|
@@ -151,7 +151,7 @@ agent-method-registry query \
|
|
|
151
151
|
- 不得自动选择第一候选或多候选中的"最佳"
|
|
152
152
|
- 只有明确标记为 generic non-contract-backed 的旧入口可按其既有协议建议,且必须与标准 service 区分
|
|
153
153
|
|
|
154
|
-
必须调用插件安装根中的
|
|
154
|
+
必须调用插件安装根中的 `<plugin-root>/scripts/method-query.mjs` 构建并验证 envelope 和 candidate,不手工拼装摘要或 digest。Registry 不可用时:输出 `NEEDS_INPUT` + 诊断步骤,不假装可以解析。
|
|
155
155
|
|
|
156
156
|
## 输出契约
|
|
157
157
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
schemaVersion: 1
|
|
2
2
|
catalog:
|
|
3
3
|
id: artifact-chain-assistant
|
|
4
|
-
version: "0.8.
|
|
4
|
+
version: "0.8.2"
|
|
5
5
|
entries:
|
|
6
6
|
- ref: artifact.prd-feature.default
|
|
7
7
|
provider:
|
|
@@ -239,13 +239,13 @@ entries:
|
|
|
239
239
|
sideEffects:
|
|
240
240
|
- write-project-artifacts
|
|
241
241
|
|
|
242
|
-
# ──
|
|
242
|
+
# ── 插件级入口 ──────────────────────────────────────────────────────────
|
|
243
243
|
|
|
244
|
-
- ref: artifact
|
|
244
|
+
- ref: artifact.help
|
|
245
245
|
provider:
|
|
246
246
|
scope: plugin
|
|
247
247
|
plugin: artifact-chain-assistant
|
|
248
|
-
skill:
|
|
248
|
+
skill: help
|
|
249
249
|
kind: operation
|
|
250
250
|
summary: "展示标准 Family API、bundled legacy 方法和安装后采用步骤"
|
|
251
251
|
match:
|
|
@@ -258,3 +258,39 @@ entries:
|
|
|
258
258
|
- "标准能力概览和采用指导"
|
|
259
259
|
sideEffects:
|
|
260
260
|
- read-only
|
|
261
|
+
|
|
262
|
+
- ref: artifact.setup
|
|
263
|
+
provider:
|
|
264
|
+
scope: plugin
|
|
265
|
+
plugin: artifact-chain-assistant
|
|
266
|
+
skill: setup
|
|
267
|
+
kind: operation
|
|
268
|
+
summary: "只读环境检查:插件闭包、CLI、config、版本锁、registry 可用性"
|
|
269
|
+
match:
|
|
270
|
+
domains: [artifact]
|
|
271
|
+
artifactTypes: [design-spec, link, e2e, domain, contract, blueprint, verification, prd-feature, scenario-script]
|
|
272
|
+
intents: [setup, diagnose]
|
|
273
|
+
accepts:
|
|
274
|
+
- "环境检查请求"
|
|
275
|
+
produces:
|
|
276
|
+
- "结构化状态报告和下一步建议"
|
|
277
|
+
sideEffects:
|
|
278
|
+
- read-only
|
|
279
|
+
|
|
280
|
+
- ref: artifact.quickstart
|
|
281
|
+
provider:
|
|
282
|
+
scope: plugin
|
|
283
|
+
plugin: artifact-chain-assistant
|
|
284
|
+
skill: quickstart
|
|
285
|
+
kind: operation
|
|
286
|
+
summary: "按意图路由到正确的技能"
|
|
287
|
+
match:
|
|
288
|
+
domains: [artifact]
|
|
289
|
+
artifactTypes: [design-spec, link, e2e, domain, contract, blueprint, verification, prd-feature, scenario-script]
|
|
290
|
+
intents: [start]
|
|
291
|
+
accepts:
|
|
292
|
+
- "用户意图描述"
|
|
293
|
+
produces:
|
|
294
|
+
- "路由建议和目标技能推荐"
|
|
295
|
+
sideEffects:
|
|
296
|
+
- read-only
|
package/compatibility.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0",
|
|
3
|
-
"pluginVersion": "0.8.
|
|
3
|
+
"pluginVersion": "0.8.2",
|
|
4
4
|
"artifactGraph": {
|
|
5
|
-
"verifiedVersion": "0.8.
|
|
6
|
-
"installSpec": "artifact-graph@0.8.
|
|
7
|
-
"githubFallbackSpec": "github:ifoohoo/artifact-graph#artifact-graph-v0.8.
|
|
5
|
+
"verifiedVersion": "0.8.2",
|
|
6
|
+
"installSpec": "artifact-graph@0.8.2",
|
|
7
|
+
"githubFallbackSpec": "github:ifoohoo/artifact-graph#artifact-graph-v0.8.2"
|
|
8
8
|
}
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artifact-chain-assistant",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Codex and Claude Code assistant plugin for artifact-chain projects",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -49,11 +49,13 @@
|
|
|
49
49
|
"SECURITY.md",
|
|
50
50
|
"EXTENDED-ARTIFACT-CATALOG.md",
|
|
51
51
|
"EXTENDED-ARTIFACT-CATALOG.zh-CN.md",
|
|
52
|
+
"AGENT-METHOD-REGISTRY.md",
|
|
53
|
+
"AGENT-METHOD-REGISTRY.zh-CN.md",
|
|
52
54
|
".github",
|
|
53
|
-
".agents",
|
|
54
55
|
".claude-plugin",
|
|
55
56
|
".codex-plugin",
|
|
56
57
|
"adapters",
|
|
58
|
+
"skills",
|
|
57
59
|
"skills-src",
|
|
58
60
|
"templates",
|
|
59
61
|
"scripts",
|
|
@@ -80,6 +82,6 @@
|
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
84
|
"ajv": "^8.20.0",
|
|
83
|
-
"artifact-graph": "0.8.
|
|
85
|
+
"artifact-graph": "0.8.2"
|
|
84
86
|
}
|
|
85
87
|
}
|
|
@@ -46,14 +46,6 @@ const shellResolver = `artifact_graph() {
|
|
|
46
46
|
`;
|
|
47
47
|
|
|
48
48
|
const outputs = [
|
|
49
|
-
{
|
|
50
|
-
template: 'templates/codex/marketplace.json.tpl',
|
|
51
|
-
path: '.agents/plugins/marketplace.json',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
template: 'templates/claude/marketplace.json.tpl',
|
|
55
|
-
path: '.claude-plugin/marketplace.json',
|
|
56
|
-
},
|
|
57
49
|
{
|
|
58
50
|
template: 'templates/codex/plugin.json.tpl',
|
|
59
51
|
path: 'adapters/codex/.codex-plugin/plugin.json',
|
|
@@ -103,6 +95,8 @@ artifact_graph version-lock refresh --changed-only --staged "$@"
|
|
|
103
95
|
let drift = false;
|
|
104
96
|
const stalePaths = [
|
|
105
97
|
'adapters/claude/.claude-plugin/marketplace.json',
|
|
98
|
+
'.agents/plugins/marketplace.json',
|
|
99
|
+
'.claude-plugin/marketplace.json',
|
|
106
100
|
'adapters/codex/commands',
|
|
107
101
|
'adapters/codex/commands/version-lock-audit.sh',
|
|
108
102
|
'adapters/codex/commands/version-lock-refresh.sh',
|
|
@@ -152,18 +146,26 @@ for (const output of outputs) {
|
|
|
152
146
|
}
|
|
153
147
|
}
|
|
154
148
|
|
|
155
|
-
// Root plugin manifests
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
const
|
|
160
|
-
{ from: 'adapters/claude/.claude-plugin/plugin.json', path: '.claude-plugin/plugin.json' },
|
|
161
|
-
{ from: 'adapters/codex/.codex-plugin/plugin.json', path: '.codex-plugin/plugin.json' },
|
|
149
|
+
// Root plugin manifests for external marketplace installation. They derive from the generated adapter
|
|
150
|
+
// manifests above, so the adapter template render stays the single version source. External market
|
|
151
|
+
// installs from the repository root use these manifests to discover the generated root Claude skills
|
|
152
|
+
// at ./skills and the self-contained Codex adapter skills at ./adapters/codex/skills.
|
|
153
|
+
const rootManifests = [
|
|
154
|
+
{ from: 'adapters/claude/.claude-plugin/plugin.json', path: '.claude-plugin/plugin.json', rewriteSkills: false },
|
|
155
|
+
{ from: 'adapters/codex/.codex-plugin/plugin.json', path: '.codex-plugin/plugin.json', rewriteSkills: true, skillsPrefix: './adapters/codex/' },
|
|
162
156
|
];
|
|
163
|
-
for (const
|
|
164
|
-
const target = join(root,
|
|
165
|
-
const
|
|
166
|
-
generatedContent.get(
|
|
157
|
+
for (const manifest of rootManifests) {
|
|
158
|
+
const target = join(root, manifest.path);
|
|
159
|
+
const sourceContent =
|
|
160
|
+
generatedContent.get(manifest.from) ?? (await readFile(join(root, manifest.from), 'utf-8'));
|
|
161
|
+
// Root Claude manifest keeps ./skills/ for standard plugin installation at repository root.
|
|
162
|
+
// Root Codex manifest rewrites to ./adapters/codex/skills/ because Codex adapter is self-contained.
|
|
163
|
+
const content = manifest.rewriteSkills
|
|
164
|
+
? sourceContent.replace(
|
|
165
|
+
/"skills": "\.\/skills\/"/,
|
|
166
|
+
`"skills": "${manifest.skillsPrefix}skills/"`,
|
|
167
|
+
)
|
|
168
|
+
: sourceContent;
|
|
167
169
|
if (check) {
|
|
168
170
|
let current = '';
|
|
169
171
|
try {
|
|
@@ -173,7 +175,7 @@ for (const copy of rootManifestCopies) {
|
|
|
173
175
|
}
|
|
174
176
|
if (current !== content) {
|
|
175
177
|
drift = true;
|
|
176
|
-
console.error(`Generated root manifest drift: ${
|
|
178
|
+
console.error(`Generated root manifest drift: ${manifest.path}`);
|
|
177
179
|
}
|
|
178
180
|
} else {
|
|
179
181
|
await mkdir(dirname(target), { recursive: true });
|
|
@@ -108,10 +108,11 @@ function runRegistryExpectFail(args) {
|
|
|
108
108
|
|
|
109
109
|
const index = JSON.parse(readFileSync(indexPath, 'utf-8'));
|
|
110
110
|
|
|
111
|
-
// ── 3. Exactly
|
|
112
|
-
assert(index.entries.length ===
|
|
111
|
+
// ── 3. Exactly 16 entries ──
|
|
112
|
+
assert(index.entries.length === 16, `expected 16 entries, got ${index.entries.length}`);
|
|
113
|
+
const operationRefs = new Set(['artifact.help', 'artifact.setup', 'artifact.quickstart']);
|
|
113
114
|
for (const entry of index.entries) {
|
|
114
|
-
if (entry.ref
|
|
115
|
+
if (operationRefs.has(entry.ref)) {
|
|
115
116
|
assert(entry.kind === 'operation', `entry ${entry.ref} should be operation, got ${entry.kind}`);
|
|
116
117
|
} else {
|
|
117
118
|
assert(entry.kind === 'workflow', `entry ${entry.ref} should be workflow, got ${entry.kind}`);
|
|
@@ -133,7 +134,9 @@ function runRegistryExpectFail(args) {
|
|
|
133
134
|
'artifact.batch',
|
|
134
135
|
'artifact.audit',
|
|
135
136
|
'artifact.generate',
|
|
136
|
-
'artifact
|
|
137
|
+
'artifact.help',
|
|
138
|
+
'artifact.setup',
|
|
139
|
+
'artifact.quickstart',
|
|
137
140
|
];
|
|
138
141
|
const actualRefs = index.entries.map(e => e.ref).sort();
|
|
139
142
|
const sortedExpected = [...expectedRefs].sort();
|
|
@@ -457,5 +460,5 @@ if (issues.length > 0) {
|
|
|
457
460
|
}
|
|
458
461
|
process.exit(1);
|
|
459
462
|
} else {
|
|
460
|
-
console.log('Method registry check passed: 13 workflow
|
|
463
|
+
console.log('Method registry check passed: 16 entries (13 workflow + 3 operation), schema/query/resolve/overlay all verified.');
|
|
461
464
|
}
|
|
@@ -96,12 +96,6 @@ export async function validateCompatibilityPolicy(pluginRoot) {
|
|
|
96
96
|
// Check package.json version
|
|
97
97
|
await checkJsonField(pluginRoot, 'package.json', 'version', pluginVersion, issues);
|
|
98
98
|
|
|
99
|
-
// Check Claude marketplace metadata.version (real schema)
|
|
100
|
-
await checkClaudeMarketplaceVersion(pluginRoot, pluginVersion, issues);
|
|
101
|
-
|
|
102
|
-
// Check Codex marketplace plugin source path (real schema has no version field)
|
|
103
|
-
await checkCodexMarketplaceSource(pluginRoot, issues);
|
|
104
|
-
|
|
105
99
|
// Check adapter manifest versions (real paths: .codex-plugin/plugin.json, .claude-plugin/plugin.json)
|
|
106
100
|
for (const [adapter, manifestRel] of [
|
|
107
101
|
['codex', join('adapters', 'codex', '.codex-plugin', 'plugin.json')],
|
|
@@ -147,65 +141,6 @@ async function checkJsonField(pluginRoot, relativePath, field, expected, issues)
|
|
|
147
141
|
}
|
|
148
142
|
}
|
|
149
143
|
|
|
150
|
-
/**
|
|
151
|
-
* Check Claude marketplace metadata.version matches plugin version.
|
|
152
|
-
* Real schema: { metadata: { version: "x.y.z" } }
|
|
153
|
-
*/
|
|
154
|
-
async function checkClaudeMarketplaceVersion(pluginRoot, expectedVersion, issues) {
|
|
155
|
-
const relPath = join('.claude-plugin', 'marketplace.json');
|
|
156
|
-
const filePath = join(pluginRoot, relPath);
|
|
157
|
-
try {
|
|
158
|
-
const raw = await readFile(filePath, 'utf8');
|
|
159
|
-
const json = JSON.parse(raw);
|
|
160
|
-
const actual = json.metadata?.version;
|
|
161
|
-
if (actual === undefined) {
|
|
162
|
-
issues.push(`${relPath} metadata.version is missing (required)`);
|
|
163
|
-
} else if (actual !== expectedVersion) {
|
|
164
|
-
issues.push(`${relPath} metadata.version must be "${expectedVersion}", got "${actual}"`);
|
|
165
|
-
}
|
|
166
|
-
} catch (error) {
|
|
167
|
-
if (error.code === 'ENOENT') {
|
|
168
|
-
issues.push(`${relPath} is missing (required)`);
|
|
169
|
-
} else if (error instanceof SyntaxError) {
|
|
170
|
-
issues.push(`${relPath} is not valid JSON: ${error.message}`);
|
|
171
|
-
} else {
|
|
172
|
-
issues.push(`${relPath} error: ${error.message}`);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Check Codex marketplace plugin source path points to ./adapters/codex.
|
|
179
|
-
* Real schema has NO version field; validate source.path instead.
|
|
180
|
-
*/
|
|
181
|
-
async function checkCodexMarketplaceSource(pluginRoot, issues) {
|
|
182
|
-
const relPath = join('.agents', 'plugins', 'marketplace.json');
|
|
183
|
-
const filePath = join(pluginRoot, relPath);
|
|
184
|
-
try {
|
|
185
|
-
const raw = await readFile(filePath, 'utf8');
|
|
186
|
-
const json = JSON.parse(raw);
|
|
187
|
-
const plugin = json.plugins?.[0];
|
|
188
|
-
if (!plugin) {
|
|
189
|
-
issues.push(`${relPath} has no plugins array entries`);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
const sourcePath = plugin.source?.path;
|
|
193
|
-
if (sourcePath !== './adapters/codex') {
|
|
194
|
-
issues.push(
|
|
195
|
-
`${relPath} plugins[0].source.path must be "./adapters/codex", got "${sourcePath}"`,
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
} catch (error) {
|
|
199
|
-
if (error.code === 'ENOENT') {
|
|
200
|
-
issues.push(`${relPath} is missing (required)`);
|
|
201
|
-
} else if (error instanceof SyntaxError) {
|
|
202
|
-
issues.push(`${relPath} is not valid JSON: ${error.message}`);
|
|
203
|
-
} else {
|
|
204
|
-
issues.push(`${relPath} error: ${error.message}`);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
144
|
/**
|
|
210
145
|
* Check adapter plugin manifest version.
|
|
211
146
|
* Fail-closed: missing file or invalid JSON produces an issue, never silently skipped.
|