artifact-chain-assistant 0.8.1 → 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 +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +15 -0
- package/INSTALL.md +10 -10
- package/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/INSTALL.md +10 -10
- package/adapters/claude/agent-methods/catalog.yaml +1 -1
- package/adapters/claude/compatibility.json +4 -4
- 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/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/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/where-am-i/SKILL.md +1 -1
- package/adapters/codex/.codex-plugin/plugin.json +1 -1
- package/adapters/codex/INSTALL.md +10 -10
- package/adapters/codex/agent-methods/catalog.yaml +1 -1
- package/adapters/codex/compatibility.json +4 -4
- 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/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/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/where-am-i/SKILL.md +1 -1
- package/agent-methods/catalog.yaml +1 -1
- package/compatibility.json +4 -4
- package/package.json +2 -2
- package/scripts/sync-skills.mjs +74 -1
- package/skills/artifact-chain-bootstrap/SKILL.md +1 -1
- package/skills/artifact-chain-maintainer/SKILL.md +1 -1
- package/skills/artifact-review/SKILL.md +1 -1
- 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/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/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/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/where-am-i/SKILL.md +1 -1
- 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/where-am-i/SKILL.md.tpl +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# prd-feature inspect
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
在编写或审阅 PRD 功能特性制品前,收集项目配置、已有制品、关联关系和实现状态的证据。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 项目配置发现
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 确认项目根目录
|
|
15
|
+
git rev-parse --show-toplevel
|
|
16
|
+
|
|
17
|
+
# 读取 artifact-graph 配置
|
|
18
|
+
cat artifact-graph.config.yaml
|
|
19
|
+
|
|
20
|
+
# 确认 CLI 能力
|
|
21
|
+
artifact-graph --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
提取:
|
|
25
|
+
- PRD 对应的注册类型名、paths、target 与对应 `idPatterns`(如有)
|
|
26
|
+
- 项目模板、`artifacts/README.md`、`AGENTS.md`/`CLAUDE.md` 中的本地规则
|
|
27
|
+
- 项目注册的关联类型与同类制品实际使用的关联字段
|
|
28
|
+
|
|
29
|
+
### 2. 已有制品扫描
|
|
30
|
+
|
|
31
|
+
从步骤 1 提取的 PRD 注册类型 paths 扫描已有制品:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# 查询特定制品关系
|
|
35
|
+
artifact-graph query --from <ID>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
记录:
|
|
39
|
+
- 已有制品 ID 列表(用于 ID 唯一性检查)
|
|
40
|
+
- 已有制品 status 分布
|
|
41
|
+
- 制品文件命名模式
|
|
42
|
+
|
|
43
|
+
### 3. 关联制品可达性
|
|
44
|
+
|
|
45
|
+
对项目配置、模板或同类制品声明的每个关联 ID:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
artifact-graph query --from <RELATED_ID>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
记录每个关联 ID 的存在状态;状态取值沿用目标项目的表达。
|
|
52
|
+
|
|
53
|
+
### 4. 实现状态检查
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
artifact-graph context --target <type>:<ID> --mode implementation
|
|
57
|
+
artifact-graph validate --root . --warning-only
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
记录:
|
|
61
|
+
- 实现文件列表
|
|
62
|
+
- validate 警告列表
|
|
63
|
+
- 追溯注释存在性
|
|
64
|
+
|
|
65
|
+
## 输出
|
|
66
|
+
|
|
67
|
+
inspect 输出供 author、review、repair 流程消费:
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
project:
|
|
71
|
+
root: <项目根目录>
|
|
72
|
+
config_loaded: true | false
|
|
73
|
+
artifact_type:
|
|
74
|
+
name: <项目注册的 PRD 类型名>
|
|
75
|
+
registered: true | false
|
|
76
|
+
paths: [<制品路径列表>]
|
|
77
|
+
id_pattern: <ID pattern>
|
|
78
|
+
existing_artifacts:
|
|
79
|
+
- id: <ID>
|
|
80
|
+
path: <文件路径>
|
|
81
|
+
status: <status>
|
|
82
|
+
target_artifact:
|
|
83
|
+
id: <ID> | null
|
|
84
|
+
path: <文件路径> | null
|
|
85
|
+
exists: true | false
|
|
86
|
+
related:
|
|
87
|
+
artifacts: [{ type, id, status }]
|
|
88
|
+
validation:
|
|
89
|
+
warnings: [<警告列表>]
|
|
90
|
+
pass: true | false
|
|
91
|
+
implementation:
|
|
92
|
+
files: [<实现文件列表>]
|
|
93
|
+
trace_comments: [<追溯注释列表>]
|
|
94
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# prd-feature validate
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
在 author 或 repair 完成后,验证 PRD 功能特性制品的结构完整性和制品链一致性。
|
|
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
|
+
按项目配置、模板、`artifacts/README.md` 和同类制品检查 frontmatter、ID、状态与正文结构;不要假设固定字段或枚举。
|
|
25
|
+
|
|
26
|
+
### 3. ID 唯一性
|
|
27
|
+
|
|
28
|
+
从 `artifact-graph.config.yaml` 中 PRD 注册类型的 paths 派生扫描路径,确认新制品 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
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# scenario-script compose
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
基于 inspect 结果编写场景剧本制品的 frontmatter 和正文。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 确定制品 ID
|
|
12
|
+
|
|
13
|
+
- 从项目 `idPatterns` 中场景类型对应的 pattern 派生合法 ID
|
|
14
|
+
- 检查与已有制品 ID 不冲突
|
|
15
|
+
- ID 应简短且具有业务语义
|
|
16
|
+
|
|
17
|
+
### 2. 编写 frontmatter
|
|
18
|
+
|
|
19
|
+
从 inspect 输出的项目模板、配置和同类制品派生 frontmatter。不得自行增加项目未采用的字段或状态。
|
|
20
|
+
|
|
21
|
+
### 3. 编写正文结构
|
|
22
|
+
|
|
23
|
+
正文应覆盖角色与目标、前置条件、主路径、异常路径、可观察结果和必要追溯等通用质量维度;具体章节名和布局从项目模板与已有制品派生。
|
|
24
|
+
|
|
25
|
+
### 4. 场景步骤编写规则
|
|
26
|
+
|
|
27
|
+
每个主路径和异常路径步骤必须:
|
|
28
|
+
- 使用编号列表
|
|
29
|
+
- 以动词开头
|
|
30
|
+
- 包含可验证的条件(不使用"足够""合理""尽快"等模糊词)
|
|
31
|
+
- 每个异常路径描述触发条件和预期处理方式
|
|
32
|
+
|
|
33
|
+
### 5. 文件放置
|
|
34
|
+
|
|
35
|
+
- 文件名按项目制品命名模式(从已有制品扫描结果派生)
|
|
36
|
+
- 路径按项目中场景剧本注册类型的 paths 配置
|
|
37
|
+
- 文件名与 ID 保持可追溯对应
|
|
38
|
+
|
|
39
|
+
## 输出
|
|
40
|
+
|
|
41
|
+
compose 输出供 validate 和 review 消费:
|
|
42
|
+
- 完整的制品文件内容
|
|
43
|
+
- 制品 ID 和路径
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# scenario-script inspect
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
在编写或审阅场景剧本制品前,收集项目配置、已有制品、关联关系和场景模板的证据。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 项目配置发现
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 确认项目根目录
|
|
15
|
+
git rev-parse --show-toplevel
|
|
16
|
+
|
|
17
|
+
# 读取 artifact-graph 配置
|
|
18
|
+
cat artifact-graph.config.yaml
|
|
19
|
+
|
|
20
|
+
# 确认场景类型注册和路径
|
|
21
|
+
artifact-graph --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
提取:
|
|
25
|
+
- 场景剧本对应的注册类型名、paths、target 与对应 `idPatterns`(如有)
|
|
26
|
+
- 项目注册的关联类型与同类制品实际使用的关联字段
|
|
27
|
+
|
|
28
|
+
### 2. 项目模板与治理文档
|
|
29
|
+
|
|
30
|
+
读取以下文件以派生场景剧本的合法字段、status 枚举和章节结构:
|
|
31
|
+
- `artifact-graph.config.yaml` 中场景类型的注册信息
|
|
32
|
+
- `artifacts/README.md` 中的制品边界说明
|
|
33
|
+
- `AGENTS.md` 或 `CLAUDE.md` 中的治理规则
|
|
34
|
+
- 同类已有制品(从步骤 3 的扫描结果中选取典型样本)
|
|
35
|
+
|
|
36
|
+
从以上来源派生:
|
|
37
|
+
- frontmatter 必填字段(不得假设固定字段集)
|
|
38
|
+
- status 合法枚举(不得假设固定枚举值)
|
|
39
|
+
- 章节结构要求(不得假设固定章节名)
|
|
40
|
+
|
|
41
|
+
### 3. 已有制品扫描
|
|
42
|
+
|
|
43
|
+
从步骤 1 提取的制品路径扫描已有场景制品:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 查询特定制品关系
|
|
47
|
+
artifact-graph query --from <ID>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
记录:
|
|
51
|
+
- 已有制品 ID 列表(用于 ID 唯一性检查)
|
|
52
|
+
- 已有制品 status 分布
|
|
53
|
+
- 制品文件命名模式
|
|
54
|
+
|
|
55
|
+
### 4. 关联制品可达性
|
|
56
|
+
|
|
57
|
+
对目标制品的关联制品 ID:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
artifact-graph query --from <RELATED_ID>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
记录每个关联 ID 的存在状态;状态取值沿用目标项目的表达。
|
|
64
|
+
|
|
65
|
+
### 5. 实现状态检查
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
artifact-graph validate --root . --warning-only
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
记录:
|
|
72
|
+
- validate 警告列表
|
|
73
|
+
- 制品链一致性状态
|
|
74
|
+
|
|
75
|
+
## 输出
|
|
76
|
+
|
|
77
|
+
inspect 输出供 author、review、repair 流程消费:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
project:
|
|
81
|
+
root: <项目根目录>
|
|
82
|
+
config_loaded: true | false
|
|
83
|
+
artifact_type:
|
|
84
|
+
name: <项目注册的场景剧本类型名>
|
|
85
|
+
registered: true | false
|
|
86
|
+
paths: [<制品路径列表>]
|
|
87
|
+
id_pattern: <ID pattern>
|
|
88
|
+
template:
|
|
89
|
+
required_fields: [<从项目模板派生的必填字段>]
|
|
90
|
+
status_enum: [<从项目模板派生的合法状态>]
|
|
91
|
+
sections: [<从项目模板派生的必要章节>]
|
|
92
|
+
existing_artifacts:
|
|
93
|
+
- id: <ID>
|
|
94
|
+
path: <文件路径>
|
|
95
|
+
status: <status>
|
|
96
|
+
target_artifact:
|
|
97
|
+
id: <ID> | null
|
|
98
|
+
path: <文件路径> | null
|
|
99
|
+
exists: true | false
|
|
100
|
+
related:
|
|
101
|
+
artifacts: [{ type, id, status }]
|
|
102
|
+
validation:
|
|
103
|
+
warnings: [<警告列表>]
|
|
104
|
+
pass: true | false
|
|
105
|
+
```
|
|
@@ -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,43 @@
|
|
|
1
|
+
# scenario-script compose
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
基于 inspect 结果编写场景剧本制品的 frontmatter 和正文。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 确定制品 ID
|
|
12
|
+
|
|
13
|
+
- 从项目 `idPatterns` 中场景类型对应的 pattern 派生合法 ID
|
|
14
|
+
- 检查与已有制品 ID 不冲突
|
|
15
|
+
- ID 应简短且具有业务语义
|
|
16
|
+
|
|
17
|
+
### 2. 编写 frontmatter
|
|
18
|
+
|
|
19
|
+
从 inspect 输出的项目模板、配置和同类制品派生 frontmatter。不得自行增加项目未采用的字段或状态。
|
|
20
|
+
|
|
21
|
+
### 3. 编写正文结构
|
|
22
|
+
|
|
23
|
+
正文应覆盖角色与目标、前置条件、主路径、异常路径、可观察结果和必要追溯等通用质量维度;具体章节名和布局从项目模板与已有制品派生。
|
|
24
|
+
|
|
25
|
+
### 4. 场景步骤编写规则
|
|
26
|
+
|
|
27
|
+
每个主路径和异常路径步骤必须:
|
|
28
|
+
- 使用编号列表
|
|
29
|
+
- 以动词开头
|
|
30
|
+
- 包含可验证的条件(不使用"足够""合理""尽快"等模糊词)
|
|
31
|
+
- 每个异常路径描述触发条件和预期处理方式
|
|
32
|
+
|
|
33
|
+
### 5. 文件放置
|
|
34
|
+
|
|
35
|
+
- 文件名按项目制品命名模式(从已有制品扫描结果派生)
|
|
36
|
+
- 路径按项目中场景剧本注册类型的 paths 配置
|
|
37
|
+
- 文件名与 ID 保持可追溯对应
|
|
38
|
+
|
|
39
|
+
## 输出
|
|
40
|
+
|
|
41
|
+
compose 输出供 validate 和 review 消费:
|
|
42
|
+
- 完整的制品文件内容
|
|
43
|
+
- 制品 ID 和路径
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# scenario-script inspect
|
|
2
|
+
|
|
3
|
+
内部工序,不作为 catalog 入口。
|
|
4
|
+
|
|
5
|
+
## 目的
|
|
6
|
+
|
|
7
|
+
在编写或审阅场景剧本制品前,收集项目配置、已有制品、关联关系和场景模板的证据。
|
|
8
|
+
|
|
9
|
+
## 步骤
|
|
10
|
+
|
|
11
|
+
### 1. 项目配置发现
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 确认项目根目录
|
|
15
|
+
git rev-parse --show-toplevel
|
|
16
|
+
|
|
17
|
+
# 读取 artifact-graph 配置
|
|
18
|
+
cat artifact-graph.config.yaml
|
|
19
|
+
|
|
20
|
+
# 确认场景类型注册和路径
|
|
21
|
+
artifact-graph --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
提取:
|
|
25
|
+
- 场景剧本对应的注册类型名、paths、target 与对应 `idPatterns`(如有)
|
|
26
|
+
- 项目注册的关联类型与同类制品实际使用的关联字段
|
|
27
|
+
|
|
28
|
+
### 2. 项目模板与治理文档
|
|
29
|
+
|
|
30
|
+
读取以下文件以派生场景剧本的合法字段、status 枚举和章节结构:
|
|
31
|
+
- `artifact-graph.config.yaml` 中场景类型的注册信息
|
|
32
|
+
- `artifacts/README.md` 中的制品边界说明
|
|
33
|
+
- `AGENTS.md` 或 `CLAUDE.md` 中的治理规则
|
|
34
|
+
- 同类已有制品(从步骤 3 的扫描结果中选取典型样本)
|
|
35
|
+
|
|
36
|
+
从以上来源派生:
|
|
37
|
+
- frontmatter 必填字段(不得假设固定字段集)
|
|
38
|
+
- status 合法枚举(不得假设固定枚举值)
|
|
39
|
+
- 章节结构要求(不得假设固定章节名)
|
|
40
|
+
|
|
41
|
+
### 3. 已有制品扫描
|
|
42
|
+
|
|
43
|
+
从步骤 1 提取的制品路径扫描已有场景制品:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# 查询特定制品关系
|
|
47
|
+
artifact-graph query --from <ID>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
记录:
|
|
51
|
+
- 已有制品 ID 列表(用于 ID 唯一性检查)
|
|
52
|
+
- 已有制品 status 分布
|
|
53
|
+
- 制品文件命名模式
|
|
54
|
+
|
|
55
|
+
### 4. 关联制品可达性
|
|
56
|
+
|
|
57
|
+
对目标制品的关联制品 ID:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
artifact-graph query --from <RELATED_ID>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
记录每个关联 ID 的存在状态;状态取值沿用目标项目的表达。
|
|
64
|
+
|
|
65
|
+
### 5. 实现状态检查
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
artifact-graph validate --root . --warning-only
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
记录:
|
|
72
|
+
- validate 警告列表
|
|
73
|
+
- 制品链一致性状态
|
|
74
|
+
|
|
75
|
+
## 输出
|
|
76
|
+
|
|
77
|
+
inspect 输出供 author、review、repair 流程消费:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
project:
|
|
81
|
+
root: <项目根目录>
|
|
82
|
+
config_loaded: true | false
|
|
83
|
+
artifact_type:
|
|
84
|
+
name: <项目注册的场景剧本类型名>
|
|
85
|
+
registered: true | false
|
|
86
|
+
paths: [<制品路径列表>]
|
|
87
|
+
id_pattern: <ID pattern>
|
|
88
|
+
template:
|
|
89
|
+
required_fields: [<从项目模板派生的必填字段>]
|
|
90
|
+
status_enum: [<从项目模板派生的合法状态>]
|
|
91
|
+
sections: [<从项目模板派生的必要章节>]
|
|
92
|
+
existing_artifacts:
|
|
93
|
+
- id: <ID>
|
|
94
|
+
path: <文件路径>
|
|
95
|
+
status: <status>
|
|
96
|
+
target_artifact:
|
|
97
|
+
id: <ID> | null
|
|
98
|
+
path: <文件路径> | null
|
|
99
|
+
exists: true | false
|
|
100
|
+
related:
|
|
101
|
+
artifacts: [{ type, id, status }]
|
|
102
|
+
validation:
|
|
103
|
+
warnings: [<警告列表>]
|
|
104
|
+
pass: true | false
|
|
105
|
+
```
|
|
@@ -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
|
+
```
|
|
@@ -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
|
{
|
|
2
2
|
"name": "artifact-chain-assistant",
|
|
3
3
|
"displayName": "Artifact Chain Assistant",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.2",
|
|
5
5
|
"description": "Artifact-chain intake, review/repair/batch/audit workflows, diagnostics, and version-lock maintenance helpers.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Artifact Graph Maintainers"
|
|
@@ -16,7 +16,7 @@ instructions.
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
18
|
- Node.js `>=22.0.0`.
|
|
19
|
-
- `artifact-graph` 0.8.
|
|
19
|
+
- `artifact-graph` 0.8.2 installed in the target project.
|
|
20
20
|
- **GitHub SSH key** — Claude Code clones `source: github` entries over SSH by default. If you
|
|
21
21
|
have not configured a GitHub SSH key, set `CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1` in your shell
|
|
22
22
|
profile, or add the marketplace with an explicit `https://` URL. Codex users can check
|
|
@@ -28,24 +28,24 @@ instructions.
|
|
|
28
28
|
|
|
29
29
|
| Plugin | Verified Runtime | Install |
|
|
30
30
|
| --- | --- | --- |
|
|
31
|
-
| `artifact-chain-assistant` 0.8.
|
|
31
|
+
| `artifact-chain-assistant` 0.8.2 | `artifact-graph` 0.8.2 | `pnpm add -D artifact-graph@0.8.2` |
|
|
32
32
|
|
|
33
33
|
### Install The Runtime
|
|
34
34
|
|
|
35
35
|
The default installation path uses the npm registry with a precise version:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
pnpm add -D artifact-graph@0.8.
|
|
38
|
+
pnpm add -D artifact-graph@0.8.2
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
If the npm registry is unavailable, use the explicit GitHub fallback pinned to the verified tag:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
pnpm add -D github:ifoohoo/artifact-graph#artifact-graph-v0.8.
|
|
44
|
+
pnpm add -D github:ifoohoo/artifact-graph#artifact-graph-v0.8.2
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
> **Never** install with an unlocked range (`artifact-graph`, `artifact-graph@latest`,
|
|
48
|
-
> `artifact-graph@^0.8.
|
|
48
|
+
> `artifact-graph@^0.8.2`) or an unpinned GitHub URL (`github:ifoohoo/artifact-graph`).
|
|
49
49
|
> Unlocked installs produce non-reproducible dependency trees and break version-lock audit.
|
|
50
50
|
|
|
51
51
|
With pnpm 10+, projects that install `artifact-graph` must allow the native `better-sqlite3`
|
|
@@ -72,7 +72,7 @@ allowBuilds:
|
|
|
72
72
|
|
|
73
73
|
The plugin's `doctor` command validates the installed runtime version before running any
|
|
74
74
|
diagnostic. If it detects a version mismatch or missing CLI, it reports the exact remediation
|
|
75
|
-
command (`pnpm add -D artifact-graph@0.8.
|
|
75
|
+
command (`pnpm add -D artifact-graph@0.8.2`) and exits non-zero.
|
|
76
76
|
|
|
77
77
|
### CLI Resolution Order
|
|
78
78
|
|
|
@@ -147,7 +147,7 @@ wrappers, and Stop-hook guardrail. These assistant controls do not replace Git h
|
|
|
147
147
|
|
|
148
148
|
> **Marketplace note**: `ifoohoo/artifact-skill-set` is an external independent marketplace. The
|
|
149
149
|
> plugin payload is still published from `ifoohoo/artifact-chain-assistant`. The marketplace entry
|
|
150
|
-
> must publish and enable `artifact-chain-assistant` 0.8.
|
|
150
|
+
> must publish and enable `artifact-chain-assistant` 0.8.2 before the install commands above will
|
|
151
151
|
> succeed.
|
|
152
152
|
|
|
153
153
|
## Post-Installation Discovery
|
|
@@ -197,7 +197,7 @@ The plugin should not move these files into the plugin repository.
|
|
|
197
197
|
|
|
198
198
|
For a first-time setup, the end-to-end sequence is:
|
|
199
199
|
|
|
200
|
-
1. **Install the CLI** — `pnpm add -D artifact-graph@0.8.
|
|
200
|
+
1. **Install the CLI** — `pnpm add -D artifact-graph@0.8.2` (see Prerequisites above).
|
|
201
201
|
2. **Install the plugin** — follow the Codex or Claude Code section above.
|
|
202
202
|
3. **Run bootstrap** — ask the assistant to use the `artifact-chain-bootstrap` skill (see prompt
|
|
203
203
|
below). The skill will:
|
|
@@ -995,7 +995,7 @@ with append-only behavior; it does not overwrite local rules.
|
|
|
995
995
|
### Recovery Steps
|
|
996
996
|
|
|
997
997
|
```bash
|
|
998
|
-
# 1. Install dependencies from lockfile (gets artifact-graph@0.8.
|
|
998
|
+
# 1. Install dependencies from lockfile (gets artifact-graph@0.8.2)
|
|
999
999
|
pnpm install --frozen-lockfile
|
|
1000
1000
|
|
|
1001
1001
|
# 2. Install plugin per your host (Codex / Claude Code)
|
|
@@ -1062,7 +1062,7 @@ pnpm exec artifact-graph hooks install-git --hook all
|
|
|
1062
1062
|
### Enterprise Mirror
|
|
1063
1063
|
|
|
1064
1064
|
If the corporate environment cannot access the public npm registry or GitHub, mirror both
|
|
1065
|
-
`artifact-graph@0.8.
|
|
1065
|
+
`artifact-graph@0.8.2` and the plugin marketplace repository on an internal registry. The mirror
|
|
1066
1066
|
does not change the state ownership model: Git-tracked files remain authoritative, local caches
|
|
1067
1067
|
remain derived.
|
|
1068
1068
|
|