artifact-graph 1.1.0 → 1.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifact-graph",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Git-native Markdown artifact graph scanner and validator",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -91,7 +91,7 @@
91
91
  "bugs": {
92
92
  "url": "https://github.com/ifoohoo/artifact-graph/issues"
93
93
  },
94
- "homepage": "https://github.com/ifoohoo/artifact-graph#readme",
94
+ "homepage": "https://ifoohoo.github.io/artifact-chain-assistant-site/",
95
95
  "author": "广州市风荷科技有限公司",
96
96
  "contributors": [
97
97
  "mzdbxqh"
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://artifact-graph.dev/schemas/project-artifact-profiles/v1.0.schema.json",
4
4
  "title": "Project Artifact Profiles",
5
- "description": "Static published lists of common-minimum, project-type standard, lifecycle, and capability-triggered artifact types. schema_version must be 1.0. This file is a recommendation contract; reading it does not enable project types.",
5
+ "description": "随包发布的项目制品类型推荐清单契约(schema_version 固定为 1.0),定义跨项目最小集合、已批准项目形态标准、采用阶段候选与能力触发候选;仅作为裁剪参考,读取该清单不会自动启用目标项目类型。",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema_version", "common_minimum", "project_standards", "lifecycle", "conditional"],
@@ -10,11 +10,11 @@
10
10
  "schema_version": {
11
11
  "type": "string",
12
12
  "const": "1.0",
13
- "description": "Contract version. Must be '1.0' for this schema."
13
+ "description": "推荐清单契约版本号,当前 Schema 固定为 \"1.0\"。"
14
14
  },
15
15
  "common_minimum": {
16
16
  "type": "array",
17
- "description": "Cross-project common minimum artifact types. Unique names; not auto-enabled.",
17
+ "description": "跨项目通用的最小制品类型名称集合(去重且不会在运行时自动启用)。",
18
18
  "minItems": 1,
19
19
  "uniqueItems": true,
20
20
  "items": {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "project_standards": {
26
26
  "type": "object",
27
- "description": "Approved project-shape standards. Only skill-plugin is currently an independent category standard.",
27
+ "description": "已批准的项目形态标准扩展映射,当前仅包含 skill-plugin 这一独立品类标准。",
28
28
  "additionalProperties": false,
29
29
  "properties": {
30
30
  "skill-plugin": {
@@ -34,14 +34,14 @@
34
34
  },
35
35
  "lifecycle": {
36
36
  "type": "array",
37
- "description": "Stage-triggered candidates. condition is for skill interpretation; no runtime condition interpreter is implied.",
37
+ "description": "按采用阶段触发的候选制品类型列表;condition 供引导技能理解判读,不包含运行时条件求值器。",
38
38
  "items": {
39
39
  "$ref": "#/$defs/lifecycleEntry"
40
40
  }
41
41
  },
42
42
  "conditional": {
43
43
  "type": "array",
44
- "description": "Capability-triggered candidates for matching project shapes. Not auto-enabled.",
44
+ "description": "按项目形态与具体能力特征按需纳入的候选制品类型列表,默认不自动启用。",
45
45
  "items": {
46
46
  "$ref": "#/$defs/conditionalEntry"
47
47
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://artifact-graph.dev/schemas/review-result/v1.0.schema.json",
4
4
  "title": "Review Result Protocol",
5
- "description": "Versioned, machine-verifiable result schema for artifact review, repair, and batch processing workflows. Covers run-level, stage/batch-level, and finding-level results with severity, status, evidence, and repair relationships. Cross-object producer/reviewer identity comparison requires the semantic TypeScript validator because JSON Schema cannot compare field values.",
5
+ "description": "制品审阅、修复与分批处理工作流的版本化机读结果协议(v1.0)。覆盖整轮、单阶段/批次与逐条问题结论;跨对象的执行者与复审者身份独立性、以及目标文件 SHA-256 防串单校验须配合 validateReviewResult 语义校验器执行。",
6
6
  "version": "1.0",
7
7
  "type": "object",
8
8
  "additionalProperties": false,
@@ -11,90 +11,94 @@
11
11
  "schema_version": {
12
12
  "type": "string",
13
13
  "const": "1.0",
14
- "description": "Protocol version. Must be '1.0' for this schema."
14
+ "description": "协议版本号,当前版本固定为 \"1.0\"。"
15
15
  },
16
16
  "run_id": {
17
17
  "type": "string",
18
18
  "minLength": 1,
19
- "description": "Unique identifier for this review/repair run."
19
+ "description": "本轮审阅或修复运行的唯一标识。"
20
20
  },
21
21
  "stage_id": {
22
22
  "type": "string",
23
- "description": "Stage or batch identifier within the run. Omitted for final/run-level results."
23
+ "description": "整轮运行内的阶段或分批标识;整轮汇总级结果可省略。"
24
24
  },
25
25
  "attempt": {
26
26
  "type": "integer",
27
27
  "minimum": 1,
28
28
  "maximum": 3,
29
- "description": "Attempt number for this stage. Defaults to 1."
29
+ "description": "当前阶段的执行尝试轮次(取值 1 至 3,默认第 1 轮)。"
30
30
  },
31
31
  "status": {
32
32
  "type": "string",
33
33
  "enum": ["SUCCEEDED", "FAILED", "BLOCKED", "NEEDS_INPUT", "SKIPPED"],
34
- "description": "Execution status. SUCCEEDED means the stage completed; decision may still be FAIL."
34
+ "description": "运行执行状态。SUCCEEDED 仅表示审阅或修复动作本身正常跑完,业务裁决 decision 仍可能为 FAIL。"
35
35
  },
36
36
  "decision": {
37
37
  "type": "string",
38
38
  "enum": ["PASS", "FAIL", "PASS_WITH_RESIDUAL_MINOR", "BLOCKED", "NEEDS_INPUT", "NOT_APPLICABLE"],
39
- "description": "Business decision. PASS means no blocking findings; FAIL means blocking findings remain."
39
+ "description": "业务审阅裁决结论。PASS 表示无阻断项且全部通过;PASS_WITH_RESIDUAL_MINOR 表示仅存非阻断轻微项;FAIL 表示仍存阻断问题。"
40
40
  },
41
41
  "summary": {
42
42
  "type": "string",
43
- "description": "Human-readable summary of the result."
43
+ "description": "面向人类阅读的本轮或本阶段结论摘要。"
44
44
  },
45
45
  "outputs": {
46
46
  "type": "array",
47
47
  "items": { "type": "string" },
48
- "description": "Paths to output files produced by this stage."
48
+ "description": "当前阶段产出的结果文件路径列表。"
49
49
  },
50
50
  "warnings": {
51
51
  "type": "array",
52
52
  "items": { "type": "string" },
53
- "description": "Non-blocking warning messages."
53
+ "description": "非阻断提示或告警信息列表。"
54
54
  },
55
55
  "blocking_reason": {
56
56
  "type": ["string", "null"],
57
- "description": "Reason the stage is blocked. Null if not blocked."
57
+ "description": "流程受阻(BLOCKED)或待补输入(NEEDS_INPUT)时的具体原因;未受阻时为 null。"
58
58
  },
59
59
  "degradation": {
60
60
  "type": ["string", "null"],
61
- "description": "Description of any quality degradation (e.g., partial execution, timeout fallback)."
61
+ "description": "执行过程中的质量降级说明(如局部执行、超时回退等);无降级时为 null。"
62
62
  },
63
63
  "producer": {
64
64
  "type": "object",
65
- "description": "Identity of what produced this result.",
65
+ "description": "生成本条结果记录的执行主体身份。",
66
66
  "required": ["executor", "name"],
67
67
  "properties": {
68
68
  "executor": {
69
69
  "type": "string",
70
70
  "enum": ["script", "worker", "agent", "manual", "cli"],
71
- "description": "Type of executor."
71
+ "description": "执行器类别(脚本、工作器、智能体、人工或命令行工具)。"
72
72
  },
73
73
  "name": {
74
74
  "type": "string",
75
- "description": "Name of the executor (script filename, worker name, etc.)."
75
+ "description": "执行器稳定名称(如脚本文件名、worker 名称或独立审阅者标识)。"
76
76
  },
77
77
  "skill": {
78
78
  "type": "string",
79
- "description": "Skill or plugin that owns this executor."
79
+ "description": "所属技能或插件名称元数据。"
80
80
  }
81
81
  }
82
82
  },
83
83
  "acceptance": {
84
84
  "type": "object",
85
85
  "additionalProperties": false,
86
- "description": "Independent re-review identity and the repair result being accepted. The semantic validator compares stable executor+name identity (skill is metadata) and rejects self-acceptance.",
86
+ "description": "独立复审验收身份及所验收的修复结果引用。语义校验器按 executor+name 稳定身份核对职责隔离(skill 仅作元数据),严禁同一执行主体自审自签。",
87
87
  "required": ["reviewer", "source_result"],
88
88
  "properties": {
89
- "reviewer": { "$ref": "#/$defs/producer" },
89
+ "reviewer": {
90
+ "$ref": "#/$defs/producer",
91
+ "description": "执行独立复审验收的审阅主体身份。"
92
+ },
90
93
  "source_result": {
91
94
  "type": "object",
92
95
  "additionalProperties": false,
96
+ "description": "被本次独立复审验收的上游修复结果身份引用。",
93
97
  "required": ["run_id", "producer"],
94
98
  "properties": {
95
- "run_id": { "type": "string", "minLength": 1 },
96
- "stage_id": { "type": "string" },
97
- "producer": { "$ref": "#/$defs/producer" }
99
+ "run_id": { "type": "string", "minLength": 1, "description": "上游修复结果的运行标识。" },
100
+ "stage_id": { "type": "string", "description": "上游修复结果的阶段标识(若有)。" },
101
+ "producer": { "$ref": "#/$defs/producer", "description": "产出该修复结果的原执行主体身份。" }
98
102
  }
99
103
  }
100
104
  }
@@ -103,108 +107,120 @@
103
107
  "type": "array",
104
108
  "items": {
105
109
  "oneOf": [
106
- { "type": "string" },
110
+ { "type": "string", "description": "简写证据路径或引用说明。" },
107
111
  {
108
112
  "type": "object",
113
+ "description": "结构化证据条目。",
109
114
  "required": ["type", "path"],
110
115
  "properties": {
111
116
  "type": {
112
117
  "type": "string",
113
- "description": "Evidence type (e.g., task, deterministic-result, semantic-report, repair-log)."
118
+ "description": "证据类型(如 task、deterministic-result、semantic-report、repair-log、reviewed-input、target-digest)。"
114
119
  },
115
- "path": { "type": "string" },
116
- "status": { "type": "string" },
117
- "decision": { "type": "string" },
118
- "summary": { "type": "string" },
119
- "command": { "type": "string" },
120
- "result": { "type": "string" }
120
+ "path": { "type": "string", "description": "关联证据文件或受检输入路径。" },
121
+ "status": { "type": "string", "description": "该证据对应的执行状态。" },
122
+ "decision": { "type": "string", "description": "该证据对应的检查结论。" },
123
+ "summary": { "type": "string", "description": "证据要点摘要。" },
124
+ "command": { "type": "string", "description": "产生该证据的实际命令。" },
125
+ "result": { "type": "string", "description": "校验结果值或内容摘要(如 sha256:<64位十六进制>)。" }
121
126
  }
122
127
  }
123
128
  ]
124
129
  },
125
- "description": "Evidence items supporting this result."
130
+ "description": "支撑本次结论的命令记录、检查报告或输入摘要证据列表。"
126
131
  },
127
132
  "review": {
128
133
  "type": "object",
129
- "description": "Review-specific data. Present for review stages.",
134
+ "description": "审阅阶段专属载荷数据(在审阅与复审结果中提供)。",
130
135
  "properties": {
131
136
  "source_files": {
132
137
  "type": "array",
133
138
  "items": { "type": "string" },
134
- "description": "Files reviewed in this stage."
139
+ "description": "本阶段审阅期间实际读取的源文件与上下文参考路径列表。"
135
140
  },
136
141
  "files": {
137
142
  "type": "array",
138
143
  "items": { "type": "string" },
139
- "description": "All files in scope for the run."
144
+ "description": "本轮审阅纳管的全部目标文件路径。"
145
+ },
146
+ "target_digests": {
147
+ "type": "object",
148
+ "description": "被审目标路径到内容 SHA-256 摘要(sha256:<64位十六进制> 或 64 位十六进制)的绑定映射,用于在验收或合并前拦截旧快照混入与审阅对象串单。",
149
+ "additionalProperties": {
150
+ "type": "string",
151
+ "pattern": "^(?:sha256:)?[A-Fa-f0-9]{64}$"
152
+ }
140
153
  },
141
154
  "batches": {
142
155
  "type": "array",
143
156
  "items": {
144
157
  "type": "object",
158
+ "description": "单个审阅分批定义。",
145
159
  "required": ["id", "files"],
146
160
  "properties": {
147
- "id": { "type": "string" },
148
- "files": { "type": "array", "items": { "type": "string" } },
149
- "chars": { "type": "integer" }
161
+ "id": { "type": "string", "description": "批次唯一标识。" },
162
+ "files": { "type": "array", "items": { "type": "string" }, "description": "归入该批次的文件路径列表。" },
163
+ "chars": { "type": "integer", "description": "该批次估算字符总量。" }
150
164
  }
151
165
  },
152
- "description": "Batch definitions for batch processing."
166
+ "description": "分批审阅切分方案列表。"
153
167
  },
154
168
  "metrics": {
155
169
  "type": "object",
156
- "description": "Quantitative metrics for this review.",
170
+ "description": "本次审阅的定量统计指标。",
157
171
  "properties": {
158
- "files_reviewed": { "type": "integer", "minimum": 0 },
159
- "files_scanned": { "type": "integer", "minimum": 0 },
160
- "findings_count": { "type": "integer", "minimum": 0 },
161
- "deterministic_findings_count": { "type": "integer", "minimum": 0 },
162
- "semantic_findings_count": { "type": "integer", "minimum": 0 },
163
- "block_count": { "type": "integer", "minimum": 0 },
164
- "warn_count": { "type": "integer", "minimum": 0 },
165
- "info_count": { "type": "integer", "minimum": 0 },
166
- "resolved_count": { "type": "integer", "minimum": 0 },
167
- "batch_count": { "type": "integer", "minimum": 0 },
168
- "scenario_count": { "type": "integer", "minimum": 0 }
172
+ "files_reviewed": { "type": "integer", "minimum": 0, "description": "已完成实质审阅的文件数。" },
173
+ "files_scanned": { "type": "integer", "minimum": 0, "description": "已扫描的文件总数。" },
174
+ "findings_count": { "type": "integer", "minimum": 0, "description": "发现的问题总条数。" },
175
+ "deterministic_findings_count": { "type": "integer", "minimum": 0, "description": "确定性检查检出的问题条数。" },
176
+ "semantic_findings_count": { "type": "integer", "minimum": 0, "description": "语义审阅检出的问题条数。" },
177
+ "block_count": { "type": "integer", "minimum": 0, "description": "阻断级(block)问题条数。" },
178
+ "warn_count": { "type": "integer", "minimum": 0, "description": "警告级(warn)问题条数。" },
179
+ "info_count": { "type": "integer", "minimum": 0, "description": "提示级(info)问题条数。" },
180
+ "resolved_count": { "type": "integer", "minimum": 0, "description": "已解决的问题条数。" },
181
+ "batch_count": { "type": "integer", "minimum": 0, "description": "审阅分批数量。" },
182
+ "scenario_count": { "type": "integer", "minimum": 0, "description": "覆盖的场景数量。" }
169
183
  }
170
184
  },
171
185
  "findings": {
172
186
  "type": "array",
173
187
  "items": { "$ref": "#/$defs/finding" },
174
- "description": "Open findings from this review."
188
+ "description": "本次审阅发现的未关闭问题列表。"
175
189
  },
176
190
  "resolved_findings": {
177
191
  "type": "array",
178
192
  "items": { "$ref": "#/$defs/finding" },
179
- "description": "Findings that were resolved (by repair or acceptance)."
193
+ "description": "已通过返修或独立复审确认关闭的问题列表。"
180
194
  },
181
195
  "repair_worker_needed": {
182
196
  "type": "boolean",
183
- "description": "Whether a repair worker should be dispatched."
197
+ "description": "是否需要继续调度返修流程(repair worker)处理剩余问题。"
184
198
  }
185
199
  }
186
200
  },
187
201
  "repair": {
188
202
  "type": "object",
189
- "description": "Repair-specific data. Present for repair stages.",
203
+ "description": "返修阶段专属载荷数据(在修复结果中提供)。",
190
204
  "properties": {
191
- "source_review_run_id": { "type": "string" },
192
- "source_review_stage_id": { "type": "string" },
205
+ "source_review_run_id": { "type": "string", "description": "触发本次返修的上游审阅运行标识。" },
206
+ "source_review_stage_id": { "type": "string", "description": "触发本次返修的上游审阅阶段标识。" },
193
207
  "findings_addressed": {
194
208
  "type": "array",
195
- "items": { "$ref": "#/$defs/finding" }
209
+ "items": { "$ref": "#/$defs/finding" },
210
+ "description": "本轮返修实际处置的问题条目列表。"
196
211
  },
197
212
  "files_modified": {
198
213
  "type": "array",
199
- "items": { "type": "string" }
214
+ "items": { "type": "string" },
215
+ "description": "本轮返修实际修改的文件路径列表。"
200
216
  },
201
217
  "validation_after_repair": {
202
218
  "type": "object",
203
- "description": "Re-validation results after repair.",
219
+ "description": "返修完成后执行的本地自检验证结果。",
204
220
  "properties": {
205
- "command": { "type": "string" },
206
- "exit_code": { "type": "integer" },
207
- "findings_remaining": { "type": "integer", "minimum": 0 }
221
+ "command": { "type": "string", "description": "验证所执行的命令。" },
222
+ "exit_code": { "type": "integer", "description": "验证命令退出码。" },
223
+ "findings_remaining": { "type": "integer", "minimum": 0, "description": "验证后仍剩余的未解决问题数。" }
208
224
  }
209
225
  }
210
226
  }
@@ -256,62 +272,76 @@
256
272
  "$defs": {
257
273
  "producer": {
258
274
  "type": "object",
275
+ "description": "执行或审阅主体的稳定身份声明。",
259
276
  "required": ["executor", "name"],
260
277
  "properties": {
261
- "executor": { "type": "string", "enum": ["script", "worker", "agent", "manual", "cli"] },
262
- "name": { "type": "string", "minLength": 1 },
263
- "skill": { "type": "string" }
278
+ "executor": {
279
+ "type": "string",
280
+ "enum": ["script", "worker", "agent", "manual", "cli"],
281
+ "description": "执行器类别(脚本、工作器、智能体、人工或命令行工具)。"
282
+ },
283
+ "name": {
284
+ "type": "string",
285
+ "minLength": 1,
286
+ "description": "执行器或审阅者稳定非空名称。"
287
+ },
288
+ "skill": {
289
+ "type": "string",
290
+ "description": "所属技能或插件名称元数据(不单独构成独立身份)。"
291
+ }
264
292
  }
265
293
  },
266
294
  "finding": {
267
295
  "type": "object",
296
+ "description": "审阅检出的单条问题及处置状态记录。",
268
297
  "required": ["id", "severity", "message"],
269
298
  "properties": {
270
299
  "id": {
271
300
  "type": "string",
272
- "description": "Unique finding identifier within the run (e.g., B043-SF-001)."
301
+ "description": "本轮审阅内唯一的问题编号(如 B043-SF-001)。"
273
302
  },
274
303
  "severity": {
275
304
  "type": "string",
276
305
  "enum": ["block", "warn", "info"],
277
- "description": "Finding severity."
306
+ "description": "问题严重等级(block 阻断、warn 警告、info 提示)。"
278
307
  },
279
308
  "category": {
280
309
  "type": "string",
281
- "description": "Finding category (e.g., structure, semantic, link, format)."
310
+ "description": "问题类别(如 structure 结构、semantic 语义、link 关联链接、format 格式)。"
282
311
  },
283
312
  "message": {
284
313
  "type": "string",
285
- "description": "Human-readable finding description."
314
+ "description": "面向人类阅读的具体问题描述。"
286
315
  },
287
316
  "location": {
288
317
  "type": "object",
318
+ "description": "问题在被审文件中的源码或文档位置。",
289
319
  "properties": {
290
- "file": { "type": "string" },
291
- "line": { "type": "integer" },
292
- "column": { "type": "integer" }
320
+ "file": { "type": "string", "description": "文件路径。" },
321
+ "line": { "type": "integer", "description": "行号。" },
322
+ "column": { "type": "integer", "description": "列号。" }
293
323
  }
294
324
  },
295
325
  "artifact_id": {
296
326
  "type": "string",
297
- "description": "Related artifact ID (e.g., S-01, A1, D-ARCH-01)."
327
+ "description": "关联的制品编号(如 S-01、A1、D-ARCH-01)。"
298
328
  },
299
329
  "evidence": {
300
330
  "type": "string",
301
- "description": "Evidence supporting this finding."
331
+ "description": "支撑该问题判断的原文摘录或验证依据。"
302
332
  },
303
333
  "suggested_fix": {
304
334
  "type": "string",
305
- "description": "Suggested fix or remediation."
335
+ "description": "建议的最小修复方式或整改指引。"
306
336
  },
307
337
  "status": {
308
338
  "type": "string",
309
339
  "enum": ["open", "resolved", "accepted", "superseded"],
310
- "description": "Current status of this finding."
340
+ "description": "该问题当前的处置状态(open 未关闭、resolved 已修复、accepted 已裁决接受、superseded 已替代)。"
311
341
  },
312
342
  "resolved_by": {
313
343
  "type": "string",
314
- "description": "How the finding was resolved (e.g., repair, acceptance, superseded by another finding)."
344
+ "description": "问题关闭方式或依据说明(如返修通过、人工接受或被后续发现替代)。"
315
345
  }
316
346
  }
317
347
  }