artifact-graph 0.6.1 → 0.8.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.
@@ -0,0 +1,26 @@
1
+ name: Bug report
2
+ description: Report a reproducible problem
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: textarea
7
+ id: summary
8
+ attributes:
9
+ label: Summary
10
+ description: What happened?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: reproduce
15
+ attributes:
16
+ label: Reproduction
17
+ description: Steps to reproduce the issue.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: environment
22
+ attributes:
23
+ label: Environment
24
+ description: Node.js version, package version, OS, and package manager.
25
+ validations:
26
+ required: false
@@ -0,0 +1,19 @@
1
+ name: Feature request
2
+ description: Suggest an improvement
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Problem
10
+ description: What problem should this solve?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: proposal
15
+ attributes:
16
+ label: Proposal
17
+ description: What would a good solution look like?
18
+ validations:
19
+ required: true
@@ -0,0 +1,14 @@
1
+ ## Summary
2
+
3
+ -
4
+
5
+ ## Validation
6
+
7
+ - [ ] `pnpm build`
8
+ - [ ] `pnpm test`
9
+ - [ ] `pnpm typecheck --if-present`
10
+
11
+ ## Checklist
12
+
13
+ - [ ] README / CHANGELOG updated when user-facing behavior changed
14
+ - [ ] No private parent-repository files or local machine paths included
@@ -0,0 +1,23 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: pnpm/action-setup@v4
14
+ with:
15
+ version: 10.17.1
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 22
19
+ - run: pnpm install
20
+ - run: pnpm test:ci
21
+ - run: pnpm typecheck
22
+ - run: pnpm build
23
+ - run: git diff --exit-code
package/CHANGELOG.md CHANGED
@@ -1,6 +1,51 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.8.0
4
+
5
+ ### Added
6
+
7
+ - **Artifact relation version locks**: `version-lock refresh` and `bootstrap` now generate
8
+ `artifactRelations` entries for artifact-to-artifact edges (for example, skill→skill_family and
9
+ feature→scenario). The `audit` command checks for missing relation locks, content hash mismatches,
10
+ and path drift.
11
+
12
+ ### Changed
13
+
14
+ - **Strict local artifact-relation refresh**: `version-lock refresh --changed-only` updates or adds
15
+ only relation locks whose endpoints are reached by the current worktree or staged change set. It
16
+ no longer fills unrelated missing relation locks while processing a local change; use
17
+ `version-lock refresh --all` only when intentionally establishing a complete relation baseline.
18
+ - **Deterministic, reproducible relation locks**: relation lock output uses deterministic sorting and
19
+ carries no timestamps, so identical artifact content produces byte-identical lock files across
20
+ environments and runs.
21
+ - **Old 1.0 lock read boundary**: lock files written before artifact relations existed (no
22
+ `artifactRelations` key) are read as an empty relation list instead of failing; run
23
+ `version-lock refresh --all` once to establish the complete relation baseline.
24
+ - **Non-software domain isolation via `baselinePolicy: false`**: when a project explicitly disables
25
+ the universal baseline (`baselinePolicy: false` in the context/packet manifest), packet assembly
26
+ and validation no longer inject the software-development defaults — baseline constraints, the risk
27
+ checklist, and blueprint non-goals are required to be empty (PKT-005 / PKT-010), so non-software
28
+ skill-family domains are not forced through software-specific packet rules.
29
+
30
+ ## 0.7.0
31
+
32
+ ### Added
33
+
34
+ - **Contract kernel**: new deterministic contract kernel providing contract identity, a contract
35
+ registry, canonical IR normalization, revision digests, and policy compatibility checks. Exposed
36
+ through the new `artifact-graph contract` CLI subcommand group and public library exports.
37
+
38
+ ### Changed
39
+
40
+ - **Version-lock changed-only collects untracked paths**: `version-lock refresh --changed-only`
41
+ (worktree and staged modes) now also collects untracked files, so newly added artifacts can no
42
+ longer silently bypass lock refresh.
43
+ - **Organization migration to `ifoohoo`**: the public repository transferred to the `ifoohoo`
44
+ GitHub organization (`ifoohoo/artifact-graph`, name unchanged). Copyright is now held by
45
+ 广州市风荷科技有限公司 (Guangzhou Fenghe Technology Co., Ltd.) together with the project
46
+ contributors; the NOTICE file states that the organization transfer is an administrative hosting
47
+ change, not a copyright assignment. Package metadata, installation docs, and repository
48
+ references were updated accordingly; the npm package name `artifact-graph` is unchanged.
4
49
 
5
50
  ## 0.6.1
6
51
 
@@ -0,0 +1,11 @@
1
+ # Code of Conduct
2
+
3
+ This project follows a simple contributor covenant:
4
+
5
+ - Be respectful and constructive.
6
+ - Assume good intent, but accept responsibility for impact.
7
+ - Keep technical discussion focused on the work.
8
+ - Do not harass, insult, or discriminate.
9
+
10
+ Maintainers may remove comments, issues, pull requests, or other contributions that violate these
11
+ expectations.
@@ -0,0 +1,24 @@
1
+ # Contributing
2
+
3
+ Thanks for your interest in contributing.
4
+
5
+ ## Development
6
+
7
+ Use Node.js `>=22.0.0`.
8
+
9
+ ```bash
10
+ pnpm install
11
+ pnpm build
12
+ pnpm test
13
+ ```
14
+
15
+ ## Pull Requests
16
+
17
+ - Keep changes focused.
18
+ - Update README, CHANGELOG, and tests when behavior changes.
19
+ - Run the package validation commands before opening a pull request.
20
+ - Do not include private parent-repository artifacts or local machine paths.
21
+
22
+ ## License
23
+
24
+ By contributing, you agree that your contribution is licensed under Apache-2.0.
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
@@ -8,6 +8,25 @@ Git-native Markdown artifact graph scanner and validator for agentic coding work
8
8
  and version-lock metadata connected. It is designed for deterministic local use before an AI coding
9
9
  agent claims implementation work is complete.
10
10
 
11
+ <!-- release-skill:capability:external-write-boundary -->
12
+ > **External-write boundary:** Installing `artifact-graph` does not modify a project or write to
13
+ > remote systems. Read-only commands such as `--help`, `doctor`, `validate`, `query`, and `audit`
14
+ > do not change project files. Commands including `init`, `version-lock refresh`, and
15
+ > `hooks install-git` write locally only when explicitly invoked.
16
+
17
+ <!-- release-skill:capability:safe-first-command -->
18
+ > **Safe first command:** Inspect the installed CLI and project health before authorizing any
19
+ > initialization, version-lock refresh, or hook installation.
20
+
21
+ ```bash
22
+ pnpm exec artifact-graph --help
23
+ pnpm exec artifact-graph doctor --root .
24
+ ```
25
+
26
+ If either read-only command fails, confirm that Node.js `>=22.0.0` is active and reinstall the
27
+ package using the precise instructions in [INSTALL.md](INSTALL.md). Do not run a write command
28
+ until the CLI resolves successfully and doctor reports an actionable diagnosis.
29
+
11
30
  ## Install
12
31
 
13
32
  ```bash
@@ -17,7 +36,7 @@ pnpm add -D artifact-graph
17
36
  Or install from GitHub:
18
37
 
19
38
  ```bash
20
- npm install --save-dev github:mzdbxqh/artifact-graph
39
+ npm install --save-dev github:ifoohoo/artifact-graph
21
40
  ```
22
41
 
23
42
  Node.js `>=22.0.0` is required. For pnpm 10+, see [INSTALL.md](INSTALL.md) for the native build
@@ -49,6 +68,9 @@ npx artifact-graph version-lock audit --root . --strict-missing-lock
49
68
  - Validate Review Result Protocol v1.0 documents with `artifact-graph validate-review-result --file <path>`.
50
69
  - Build implementation context with `artifact-graph context` or `artifact-graph packet`.
51
70
  - Keep traceability freshness with `artifact-graph version-lock refresh` and `audit`.
71
+ - Version lock covers both implementation/verification edges (`locks`) and artifact-to-artifact
72
+ relations (`artifactRelations`). Old 1.0 lock files without `artifactRelations` are treated as
73
+ having an empty relation list; run `refresh --all` once to establish the complete relation baseline.
52
74
  - Install opt-in Git hooks with `artifact-graph hooks install-git --hook all`.
53
75
 
54
76
  ## Review Result Protocol
@@ -65,7 +87,7 @@ cross-object field values, so callers must also run the semantic validator; stab
65
87
 
66
88
  ## Related Project
67
89
 
68
- Use [`artifact-chain-assistant`](https://github.com/mzdbxqh/artifact-chain-assistant) for Codex and
90
+ Use [`artifact-chain-assistant`](https://github.com/ifoohoo/artifact-chain-assistant) for Codex and
69
91
  Claude Code skills that guide artifact-chain intake, setup, and maintenance.
70
92
 
71
93
  ## License
package/README.zh-CN.md CHANGED
@@ -2,10 +2,28 @@
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
+
10
+ <!-- release-skill:capability:external-write-boundary -->
11
+ > **外部写入边界:** 安装 `artifact-graph` 不会修改项目或写入远端。`--help`、`doctor`、
12
+ > `validate`、`query` 和 `audit` 等只读命令不会更改项目文件。只有显式执行 `init`、
13
+ > `version-lock refresh` 或 `hooks install-git` 等命令时才会发生本地写入。
14
+
15
+ <!-- release-skill:capability:safe-first-command -->
16
+ > **安全的第一步:** 在授权初始化、刷新版本锁或安装 hook 前,先检查已安装的命令行工具
17
+ > 和项目健康状态。
18
+
19
+ ```bash
20
+ pnpm exec artifact-graph --help
21
+ pnpm exec artifact-graph doctor --root .
22
+ ```
23
+
24
+ 如果任一只读命令失败,先确认当前 Node.js 版本不低于 `22.0.0`,再按照
25
+ [INSTALL.md](INSTALL.md) 中的精确说明重新安装;命令行工具能够正常解析且 doctor
26
+ 给出可处理的诊断前,不要运行写入命令。
9
27
 
10
28
  ## 安装
11
29
 
@@ -16,7 +34,7 @@ pnpm add -D artifact-graph
16
34
  或从 GitHub 安装:
17
35
 
18
36
  ```bash
19
- npm install --save-dev github:mzdbxqh/artifact-graph
37
+ npm install --save-dev github:ifoohoo/artifact-graph
20
38
  ```
21
39
 
22
40
  需要 Node.js `>=22.0.0`。pnpm 10+ 需要配置原生构建白名单,详见 [INSTALL.md](INSTALL.md)。
@@ -46,24 +64,26 @@ npx artifact-graph version-lock audit --root . --strict-missing-lock
46
64
  - 用 `artifact-graph validate` 校验制品之间的链接。
47
65
  - 用 `artifact-graph validate-review-result --file <path>` 校验 Review Result Protocol v1.0 文档。
48
66
  - 用 `artifact-graph context` 或 `artifact-graph packet` 构建实现上下文。
49
- - 用 `artifact-graph version-lock refresh` 和 `audit` 维护追溯新鲜度。
67
+ - 用 `artifact-graph version-lock refresh` 和 `audit` 保持追溯关系及时更新。
68
+ - 版本锁覆盖实现/验证边(`locks`)和制品间关系(`artifactRelations`)。旧版 1.0 锁文件缺少
69
+ `artifactRelations` 时视为空数组;首次启用时执行一次 `refresh --all` 建立完整关系基线。
50
70
  - 用 `artifact-graph hooks install-git --hook all` 安装可选 Git hooks。
51
71
 
52
72
  ## Review Result Protocol
53
73
 
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` 只是附加元数据,不能用于证明独立性。
74
+ 包内发布了 `schemas/review-result.schema.json`,以及配套的 TypeScript 类型和 `validateReviewResult`
75
+ 校验 API。该协议与具体项目无关,覆盖 review、repair、批次证据、findings、metrics
76
+ fail-closed decision;非法字段和语义违规都会以稳定的 JSON path 报告。协议拒绝未知顶层字段;
77
+ `attempt` 取值仅限 1–3;成功接受必须带 `producer`;`PASS`/`PASS_WITH_RESIDUAL_MINOR` 不允许
78
+ 存在未关闭的 `block` finding。独立的 repair 复审可以记录 `acceptance.reviewer`
79
+ `acceptance.source_result`,validator 会拒绝 repair producer 自我接受。
80
+ JSON Schema 无法比较跨对象的字段值,因此调用方还必须运行语义 validator;稳定身份由
81
+ `executor + name` 构成,`skill` 只是附加元数据,不能用来证明独立性。
62
82
 
63
83
  ## 相关项目
64
84
 
65
- 如果需要 Codex / Claude Code 的技能、初始化引导和维护流程,请使用
66
- [`artifact-chain-assistant`](https://github.com/mzdbxqh/artifact-chain-assistant)。
85
+ 如果需要 Codex / Claude Code 技能来引导制品链的接入、初始化和日常维护,请使用
86
+ [`artifact-chain-assistant`](https://github.com/ifoohoo/artifact-chain-assistant)。
67
87
 
68
88
  ## 开源协议
69
89
 
package/SECURITY.md ADDED
@@ -0,0 +1,19 @@
1
+ # Security Policy
2
+
3
+ ## Reporting A Vulnerability
4
+
5
+ Please do not open a public issue for sensitive security reports.
6
+
7
+ Send a private report to the repository owner through GitHub's private vulnerability reporting when
8
+ available, or contact the maintainer directly.
9
+
10
+ Include:
11
+
12
+ - affected package and version;
13
+ - reproduction steps;
14
+ - impact;
15
+ - suggested fix, if known.
16
+
17
+ ## Supported Versions
18
+
19
+ Security fixes target the latest released version.
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "artifact-graph",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "description": "Git-native Markdown artifact graph scanner and validator",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
+ "packageManager": "pnpm@10.17.1",
7
8
  "keywords": [
8
9
  "artifact-graph",
9
10
  "traceability",
@@ -28,12 +29,25 @@
28
29
  "default": "./dist/index.cjs"
29
30
  }
30
31
  },
31
- "./schemas/review-result.schema.json": "./schemas/review-result.schema.json"
32
+ "./schemas/review-result.schema.json": "./schemas/review-result.schema.json",
33
+ "./contracts/e2e-test/schema.json": "./contracts/e2e-test/schema.json"
32
34
  },
33
35
  "engines": {
34
36
  "node": ">=22.0.0"
35
37
  },
38
+ "scripts": {
39
+ "build": "tsup src/index.ts --format esm,cjs --dts --splitting false && tsup src/cli.ts --format esm --dts --splitting false",
40
+ "test": "vitest run --config vitest.config.ts",
41
+ "test:ci": "ARTIFACT_GRAPH_PUBLIC_REPO=1 vitest run --config vitest.config.ts && pnpm test:npm-consumer",
42
+ "test:npm-consumer": "node test/npm-bin-install.test.mjs",
43
+ "test:watch": "vitest",
44
+ "typecheck": "tsc --noEmit",
45
+ "clean": "rm -rf dist coverage",
46
+ "packet:audit": "node scripts/run-packet-audit.mjs",
47
+ "packet:prompt-audit": "node scripts/run-packet-prompt-audit.mjs"
48
+ },
36
49
  "dependencies": {
50
+ "ajv": "^8.20.0",
37
51
  "better-sqlite3": "^11.9.0",
38
52
  "commander": "^13.1.0",
39
53
  "gray-matter": "^4.0.3",
@@ -43,7 +57,6 @@
43
57
  "@types/better-sqlite3": "^7.6.12",
44
58
  "@types/js-yaml": "^4.0.9",
45
59
  "@types/node": "^22.19.20",
46
- "ajv": "^8.20.0",
47
60
  "tsup": "^8.4.0",
48
61
  "typescript": "^5.7.0",
49
62
  "vitest": "^3.1.0"
@@ -55,28 +68,32 @@
55
68
  "LICENSE",
56
69
  "NOTICE",
57
70
  "INSTALL.md",
71
+ "CONTRIBUTING.md",
72
+ "CODE_OF_CONDUCT.md",
73
+ "SECURITY.md",
74
+ ".github",
58
75
  "dist",
59
76
  "schemas",
77
+ "contracts",
60
78
  "scripts",
61
79
  "templates"
62
80
  ],
63
81
  "repository": {
64
82
  "type": "git",
65
- "url": "git+https://github.com/mzdbxqh/artifact-graph.git"
83
+ "url": "git+https://github.com/ifoohoo/artifact-graph.git"
66
84
  },
67
85
  "bugs": {
68
- "url": "https://github.com/mzdbxqh/artifact-graph/issues"
86
+ "url": "https://github.com/ifoohoo/artifact-graph/issues"
69
87
  },
70
- "homepage": "https://github.com/mzdbxqh/artifact-graph#readme",
71
- "scripts": {
72
- "build": "tsup src/index.ts --format esm,cjs --dts --splitting false && tsup src/cli.ts --format esm --dts --splitting false",
73
- "test": "vitest run --config vitest.config.ts",
74
- "test:ci": "ARTIFACT_GRAPH_PUBLIC_REPO=1 vitest run --config vitest.config.ts && pnpm test:npm-consumer",
75
- "test:npm-consumer": "node test/npm-bin-install.test.mjs",
76
- "test:watch": "vitest",
77
- "typecheck": "tsc --noEmit",
78
- "clean": "rm -rf dist coverage",
79
- "packet:audit": "node scripts/run-packet-audit.mjs",
80
- "packet:prompt-audit": "node scripts/run-packet-prompt-audit.mjs"
88
+ "homepage": "https://github.com/ifoohoo/artifact-graph#readme",
89
+ "author": "广州市风荷科技有限公司",
90
+ "contributors": [
91
+ "mzdbxqh"
92
+ ],
93
+ "pnpm": {
94
+ "onlyBuiltDependencies": [
95
+ "better-sqlite3",
96
+ "esbuild"
97
+ ]
81
98
  }
82
- }
99
+ }
File without changes
File without changes
File without changes
package/dist/cli.d.ts DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- interface CliIo {
3
- cwd?: string;
4
- stdout?: (chunk: string) => void;
5
- stderr?: (chunk: string) => void;
6
- }
7
- declare function runCli(argv: string[], io?: CliIo): Promise<number>;
8
-
9
- export { type CliIo, runCli };