artifact-graph 0.6.1 → 0.7.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.7.0
6
+
7
+ ### Added
8
+
9
+ - **Contract kernel**: new deterministic contract kernel providing contract identity, a contract
10
+ registry, canonical IR normalization, revision digests, and policy compatibility checks. Exposed
11
+ through the new `artifact-graph contract` CLI subcommand group and public library exports.
12
+
13
+ ### Changed
14
+
15
+ - **Version-lock changed-only collects untracked paths**: `version-lock refresh --changed-only`
16
+ (worktree and staged modes) now also collects untracked files, so newly added artifacts can no
17
+ longer silently bypass lock refresh.
18
+ - **Organization migration to `ifoohoo`**: the public repository transferred to the `ifoohoo`
19
+ GitHub organization (`ifoohoo/artifact-graph`, name unchanged). Copyright is now held by
20
+ 广州市风荷科技有限公司 (Guangzhou Fenghe Technology Co., Ltd.) together with the project
21
+ contributors; the NOTICE file states that the organization transfer is an administrative hosting
22
+ change, not a copyright assignment. Package metadata, installation docs, and repository
23
+ references were updated accordingly; the npm package name `artifact-graph` is unchanged.
24
+
5
25
  ## 0.6.1
6
26
 
7
27
  ### Fixed
package/INSTALL.md CHANGED
@@ -21,13 +21,13 @@ npm install --save-dev artifact-graph
21
21
  ### From GitHub
22
22
 
23
23
  ```bash
24
- npm install --save-dev github:mzdbxqh/artifact-graph
24
+ npm install --save-dev github:ifoohoo/artifact-graph
25
25
  ```
26
26
 
27
27
  Or with pnpm:
28
28
 
29
29
  ```bash
30
- pnpm add -D github:mzdbxqh/artifact-graph
30
+ pnpm add -D github:ifoohoo/artifact-graph
31
31
  ```
32
32
 
33
33
  After installation, verify the CLI is available:
@@ -171,5 +171,5 @@ packet validation (`validatePacket`) correctly allows `requiredBaseline.total=0`
171
171
 
172
172
  ## Related Project
173
173
 
174
- Use [`artifact-chain-assistant`](https://github.com/mzdbxqh/artifact-chain-assistant) for Codex and
174
+ Use [`artifact-chain-assistant`](https://github.com/ifoohoo/artifact-chain-assistant) for Codex and
175
175
  Claude Code skills that guide artifact-chain intake, setup, and maintenance.
package/LICENSE CHANGED
@@ -171,7 +171,7 @@ recommend that a file or class name and description of purpose be included on
171
171
  the same "printed page" as the copyright notice for easier identification
172
172
  within third-party archives.
173
173
 
174
- Copyright 2026 xqh
174
+ Copyright 2026 广州市风荷科技有限公司 (Guangzhou Fenghe Technology Co., Ltd.)
175
175
 
176
176
  Licensed under the Apache License, Version 2.0 (the "License");
177
177
  you may not use this file except in compliance with the License.
package/NOTICE CHANGED
@@ -1,4 +1,18 @@
1
- artifact-graph
2
- Copyright 2026 xqh
1
+ # Notice
3
2
 
4
- This product includes software developed for the artifact-chain project.
3
+ artifact-graph is an open-source project released under the Apache License 2.0.
4
+
5
+ ## Maintenance
6
+
7
+ artifact-graph is maintained by 广州市风荷科技有限公司 (Guangzhou Fenghe
8
+ Technology Co., Ltd.), together with the artifact-graph contributors. Copyright
9
+ in the project is held by the artifact-graph contributors and 广州市风荷科技
10
+ 有限公司 as stated in the LICENSE file. The transfer of the public GitHub
11
+ repository to the `ifoohoo` organization is an administrative change of the
12
+ hosting location and maintenance identity; it does not by itself constitute a
13
+ copyright assignment or transfer.
14
+
15
+ ## Third-Party Dependencies
16
+
17
+ This project is built on Node.js and the npm ecosystem. See `package.json`
18
+ for the full list of dependencies.
package/README.md CHANGED
@@ -17,7 +17,7 @@ pnpm add -D artifact-graph
17
17
  Or install from GitHub:
18
18
 
19
19
  ```bash
20
- npm install --save-dev github:mzdbxqh/artifact-graph
20
+ npm install --save-dev github:ifoohoo/artifact-graph
21
21
  ```
22
22
 
23
23
  Node.js `>=22.0.0` is required. For pnpm 10+, see [INSTALL.md](INSTALL.md) for the native build
@@ -65,7 +65,7 @@ cross-object field values, so callers must also run the semantic validator; stab
65
65
 
66
66
  ## Related Project
67
67
 
68
- Use [`artifact-chain-assistant`](https://github.com/mzdbxqh/artifact-chain-assistant) for Codex and
68
+ Use [`artifact-chain-assistant`](https://github.com/ifoohoo/artifact-chain-assistant) for Codex and
69
69
  Claude Code skills that guide artifact-chain intake, setup, and maintenance.
70
70
 
71
71
  ## License
package/README.zh-CN.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  [English](README.md)
4
4
 
5
- `artifact-graph` 是面向 AI 编程工作流的 Git-native Markdown 制品图扫描和校验工具。
5
+ `artifact-graph` 是一个 Git 原生的 Markdown 制品图扫描与校验工具,面向 AI 编程工作流。
6
6
 
7
- 它帮助项目把需求、场景、设计、源码、测试和 version-lock 元数据连接起来,在 AI agent
8
- 声称实现完成之前,用确定性本地命令检查上下文和追溯关系。
7
+ 它把项目里的需求、场景、设计、源码、测试和 version-lock 元数据连成一张图,
8
+ 供 AI agent 在宣称实现完成之前,用确定性的本地命令检查上下文和追溯关系。
9
9
 
10
10
  ## 安装
11
11
 
@@ -16,7 +16,7 @@ pnpm add -D artifact-graph
16
16
  或从 GitHub 安装:
17
17
 
18
18
  ```bash
19
- npm install --save-dev github:mzdbxqh/artifact-graph
19
+ npm install --save-dev github:ifoohoo/artifact-graph
20
20
  ```
21
21
 
22
22
  需要 Node.js `>=22.0.0`。pnpm 10+ 需要配置原生构建白名单,详见 [INSTALL.md](INSTALL.md)。
@@ -46,24 +46,24 @@ npx artifact-graph version-lock audit --root . --strict-missing-lock
46
46
  - 用 `artifact-graph validate` 校验制品之间的链接。
47
47
  - 用 `artifact-graph validate-review-result --file <path>` 校验 Review Result Protocol v1.0 文档。
48
48
  - 用 `artifact-graph context` 或 `artifact-graph packet` 构建实现上下文。
49
- - 用 `artifact-graph version-lock refresh` 和 `audit` 维护追溯新鲜度。
49
+ - 用 `artifact-graph version-lock refresh` 和 `audit` 保持追溯关系及时更新。
50
50
  - 用 `artifact-graph hooks install-git --hook all` 安装可选 Git hooks。
51
51
 
52
52
  ## Review Result Protocol
53
53
 
54
- 包内发布 `schemas/review-result.schema.json` 和等价的 TypeScript 类型与 validateReviewResult 校验 API。该协议不绑定具体
55
- 项目,覆盖 review、repair、批次证据、findings、metrics 与 fail-closed decision;非法字段
56
- 会返回稳定的 JSON path 诊断。协议拒绝未知顶层字段,`attempt` 仅允许 1–3;成功接受必须包含
57
- `producer`,`PASS`/`PASS_WITH_RESIDUAL_MINOR` 不能伴随 open `block` finding。独立 repair
58
- re-review 可记录 `acceptance.reviewer` `acceptance.source_result`,validator 会拒绝 repair
59
- producer 自行接受。
60
- JSON Schema 无法比较跨对象字段值,因此调用方还必须运行 semantic validator;稳定身份是
61
- `executor + name`,`skill` 只是附加元数据,不能用于证明独立性。
54
+ 包内发布了 `schemas/review-result.schema.json`,以及配套的 TypeScript 类型和 `validateReviewResult`
55
+ 校验 API。该协议与具体项目无关,覆盖 review、repair、批次证据、findings、metrics
56
+ fail-closed decision;非法字段和语义违规都会以稳定的 JSON path 报告。协议拒绝未知顶层字段;
57
+ `attempt` 取值仅限 1–3;成功接受必须带 `producer`;`PASS`/`PASS_WITH_RESIDUAL_MINOR` 不允许
58
+ 存在未关闭的 `block` finding。独立的 repair 复审可以记录 `acceptance.reviewer`
59
+ `acceptance.source_result`,validator 会拒绝 repair producer 自我接受。
60
+ JSON Schema 无法比较跨对象的字段值,因此调用方还必须运行语义 validator;稳定身份由
61
+ `executor + name` 构成,`skill` 只是附加元数据,不能用来证明独立性。
62
62
 
63
63
  ## 相关项目
64
64
 
65
- 如果需要 Codex / Claude Code 的技能、初始化引导和维护流程,请使用
66
- [`artifact-chain-assistant`](https://github.com/mzdbxqh/artifact-chain-assistant)。
65
+ 如果需要 Codex / Claude Code 技能来引导制品链的接入、初始化和日常维护,请使用
66
+ [`artifact-chain-assistant`](https://github.com/ifoohoo/artifact-chain-assistant)。
67
67
 
68
68
  ## 开源协议
69
69
 
@@ -0,0 +1,315 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "artifact.e2e-test@1",
4
+ "title": "Artifact Contract: E2E Test Specification",
5
+ "description": "Minimal schema for E2E test specification artifacts",
6
+ "version": "1.0.0",
7
+ "contractIdentity": {
8
+ "major": "artifact.e2e-test@1",
9
+ "authority": "artifact",
10
+ "namespace": "artifact",
11
+ "revisionDigest": "sha256:374b99424519e42b40b621774fb602d62dfa23f48f792095f717bbabbe9e3f2a",
12
+ "relationRules": {
13
+ "derives_from": {
14
+ "allowedTargetTypes": ["scenario", "design", "decision"],
15
+ "min": 1,
16
+ "max": 10,
17
+ "anchorPolicy": "optional"
18
+ },
19
+ "verifies": {
20
+ "allowedTargetTypes": ["feature", "scenario"],
21
+ "min": 1,
22
+ "max": 5,
23
+ "anchorPolicy": "required"
24
+ },
25
+ "implemented_by": {
26
+ "allowedTargetTypes": ["code"],
27
+ "min": 0,
28
+ "max": 5,
29
+ "anchorPolicy": "optional"
30
+ },
31
+ "references": {
32
+ "allowedTargetTypes": ["feature", "scenario", "decision", "design", "e2e_test", "test"],
33
+ "min": 0,
34
+ "max": 20,
35
+ "anchorPolicy": "optional"
36
+ },
37
+ "covers": {
38
+ "allowedTargetTypes": ["feature", "scenario"],
39
+ "min": 0,
40
+ "max": 10,
41
+ "anchorPolicy": "optional"
42
+ }
43
+ },
44
+ "semanticMarkers": {
45
+ "scope": {
46
+ "jsonPointer": "/scope",
47
+ "markdownMarker": "scope",
48
+ "required": true
49
+ },
50
+ "system_boundary": {
51
+ "jsonPointer": "/system_boundary",
52
+ "markdownMarker": "system-boundary",
53
+ "required": true
54
+ },
55
+ "coverage": {
56
+ "jsonPointer": "/coverage",
57
+ "markdownMarker": "coverage",
58
+ "required": true
59
+ },
60
+ "environment_data": {
61
+ "jsonPointer": "/environment_data",
62
+ "markdownMarker": "environment-data",
63
+ "required": true
64
+ },
65
+ "test_cases": {
66
+ "jsonPointer": "/test_cases",
67
+ "markdownMarker": "test-cases",
68
+ "required": true
69
+ },
70
+ "evidence_contract": {
71
+ "jsonPointer": "/evidence_contract",
72
+ "markdownMarker": "evidence-contract",
73
+ "required": true
74
+ }
75
+ }
76
+ },
77
+ "type": "object",
78
+ "required": ["metadata", "scope", "system_boundary", "coverage", "environment_data", "relations", "test_cases", "evidence_contract"],
79
+ "properties": {
80
+ "metadata": {
81
+ "type": "object",
82
+ "required": ["id", "title", "status"],
83
+ "properties": {
84
+ "id": {
85
+ "type": "string",
86
+ "pattern": "^[A-Za-z0-9._-]+:(TC-\\d+[a-z]?|FILE)$"
87
+ },
88
+ "title": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "status": {
93
+ "type": "string",
94
+ "enum": ["planned", "active", "done", "deprecated"]
95
+ },
96
+ "test_batch": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ },
102
+ "scope": {
103
+ "type": "object",
104
+ "required": ["business_goal", "actors"],
105
+ "properties": {
106
+ "business_goal": {
107
+ "type": "string",
108
+ "minLength": 1
109
+ },
110
+ "actors": {
111
+ "type": "array",
112
+ "items": { "type": "string" },
113
+ "minItems": 1
114
+ },
115
+ "system_boundaries": {
116
+ "type": "array",
117
+ "items": { "type": "string" }
118
+ },
119
+ "non_goals": {
120
+ "type": "array",
121
+ "items": { "type": "string" }
122
+ }
123
+ },
124
+ "additionalProperties": false
125
+ },
126
+ "system_boundary": {
127
+ "type": "object",
128
+ "required": ["components"],
129
+ "properties": {
130
+ "components": {
131
+ "type": "array",
132
+ "items": { "type": "string" },
133
+ "minItems": 1
134
+ },
135
+ "external_dependencies": {
136
+ "type": "array",
137
+ "items": { "type": "string" }
138
+ },
139
+ "trust_boundaries": {
140
+ "type": "array",
141
+ "items": { "type": "string" }
142
+ }
143
+ },
144
+ "additionalProperties": false
145
+ },
146
+ "coverage": {
147
+ "type": "object",
148
+ "required": [],
149
+ "properties": {
150
+ "ac_coverage": {
151
+ "type": "object",
152
+ "additionalProperties": {
153
+ "type": "array",
154
+ "items": { "type": "string" }
155
+ }
156
+ },
157
+ "related_scenarios": {
158
+ "type": "array",
159
+ "items": { "type": "string" }
160
+ },
161
+ "related_features": {
162
+ "type": "array",
163
+ "items": { "type": "string" }
164
+ },
165
+ "related_decisions": {
166
+ "type": "array",
167
+ "items": { "type": "string" }
168
+ }
169
+ },
170
+ "additionalProperties": false
171
+ },
172
+ "environment_data": {
173
+ "type": "object",
174
+ "properties": {
175
+ "topology": {
176
+ "type": "string"
177
+ },
178
+ "fixtures": {
179
+ "type": "array",
180
+ "items": { "type": "string" }
181
+ },
182
+ "identities": {
183
+ "type": "array",
184
+ "items": { "type": "string" }
185
+ },
186
+ "isolation_strategy": {
187
+ "type": "string"
188
+ }
189
+ },
190
+ "additionalProperties": false
191
+ },
192
+ "relations": {
193
+ "type": "array",
194
+ "description": "Machine-readable relation declarations: kind, target type/id, optional anchor, and contract-level cardinality rules",
195
+ "minItems": 2,
196
+ "items": {
197
+ "type": "object",
198
+ "required": ["kind", "target_type", "target_id"],
199
+ "properties": {
200
+ "kind": {
201
+ "type": "string",
202
+ "enum": ["derives_from", "verifies", "implemented_by", "references", "covers"]
203
+ },
204
+ "target_type": {
205
+ "type": "string",
206
+ "enum": ["feature", "scenario", "decision", "design", "e2e_test", "test", "code"]
207
+ },
208
+ "target_id": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "anchor": {
213
+ "type": "string",
214
+ "description": "Optional anchor point (e.g., section marker, line reference)"
215
+ }
216
+ },
217
+ "additionalProperties": false
218
+ }
219
+ },
220
+ "test_cases": {
221
+ "type": "array",
222
+ "items": {
223
+ "$ref": "#/definitions/testCase"
224
+ },
225
+ "minItems": 1
226
+ },
227
+ "evidence_contract": {
228
+ "type": "object",
229
+ "required": ["required_artifacts"],
230
+ "properties": {
231
+ "required_artifacts": {
232
+ "type": "array",
233
+ "items": { "type": "string" },
234
+ "minItems": 1
235
+ },
236
+ "runner_binding": {
237
+ "type": "string"
238
+ },
239
+ "proof_requirements": {
240
+ "type": "array",
241
+ "items": { "type": "string" }
242
+ }
243
+ },
244
+ "additionalProperties": false
245
+ }
246
+ },
247
+ "additionalProperties": false,
248
+ "definitions": {
249
+ "testCase": {
250
+ "type": "object",
251
+ "required": ["case_id", "goal", "preconditions", "actions", "oracles", "cleanup", "priority", "trace_targets"],
252
+ "properties": {
253
+ "case_id": {
254
+ "type": "string",
255
+ "pattern": "^TC-\\d+[a-z]?$"
256
+ },
257
+ "goal": {
258
+ "type": "string",
259
+ "minLength": 1
260
+ },
261
+ "preconditions": {
262
+ "type": "array",
263
+ "items": { "type": "string" },
264
+ "minItems": 1
265
+ },
266
+ "actions": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "required": ["step", "action"],
271
+ "properties": {
272
+ "step": { "type": "integer", "minimum": 1 },
273
+ "action": { "type": "string", "minLength": 1 },
274
+ "expected_result": { "type": "string" }
275
+ },
276
+ "additionalProperties": false
277
+ },
278
+ "minItems": 1
279
+ },
280
+ "oracles": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "object",
284
+ "required": ["observable", "criterion"],
285
+ "properties": {
286
+ "observable": { "type": "string", "minLength": 1 },
287
+ "criterion": { "type": "string", "minLength": 1 },
288
+ "timeout_ms": { "type": "integer", "minimum": 0 }
289
+ },
290
+ "additionalProperties": false
291
+ },
292
+ "minItems": 1
293
+ },
294
+ "cleanup": {
295
+ "type": "array",
296
+ "items": { "type": "string" }
297
+ },
298
+ "priority": {
299
+ "type": "string",
300
+ "enum": ["critical", "high", "medium", "low"]
301
+ },
302
+ "trace_targets": {
303
+ "type": "array",
304
+ "items": { "type": "string" },
305
+ "minItems": 1
306
+ },
307
+ "path_class": {
308
+ "type": "string",
309
+ "enum": ["happy", "error", "recovery", "edge", "security", "performance"]
310
+ }
311
+ },
312
+ "additionalProperties": false
313
+ }
314
+ }
315
+ }