dsh-arch-doc 0.1.2 → 0.1.3

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
@@ -1,29 +1,34 @@
1
- # Changelog
2
-
3
- ## Unreleased
4
-
5
- - npm 包名改为 `dsh-arch-doc`:`arch-doc` 触发 npm 防抢注拦截(与既有包 `archdoc` 去连字符后撞名,403)。插件 id(cordis.patch.yml / providerName)与 GitHub 仓库名保持 `arch-doc` 不变,仅 npm 分发名变更。
6
- - 新增 `prepublishOnly` 钩子:npm 发布前自动运行测试门禁,防止红测试状态发包。
7
-
8
- ## 0.1.2 (2026-09-02)
9
-
10
- - `.gitignore` 补充 `.tmp/` 本地临时产物与 `.env` 类密钥忽略。
11
- - `package.json` 补充 `repository` / `bugs` / `homepage` 元数据。
12
- - 新增 GitHub Actions CI(`.github/workflows/ci.yml`):ubuntu + windows × Node 18/22 矩阵运行语法检查与契约测试。
13
- - 新增 `.editorconfig`(UTF-8 / LF / 2 空格基线)。
14
- - README 新增「排障」章节:Mermaid 本地渲染、大仓库深度控制、无 Node 降级、入口识别。
15
- - 新增 `examples/README.md` fixtures 说明。
16
-
17
- ## 0.1.1 (2026-08-16)
18
-
19
- - 文档清理:移除内部实现方案稿(arch-doc-实现文档.md),公开文档不再包含本地个人路径。
20
- - `PUBLISHING.md` 重写:状态更新为「已推送 GitHub、npm 包名可用」,补充 dsh-index 提交步骤与版本变更流程,检查清单勾选已达成项。
21
- - `README.md` 补充输出产物说明、环境要求与 License。
22
- - 修复 `test/arch-profile.test.mjs` 字符串字面量跨行导致的语法错误,`npm test` 11 项全部通过。
23
-
24
- ## 0.1.0 (2026-08-16)
25
-
26
- - 首个版本:实现 `arch-profile.mjs` probe / scan / deps / entry / all 五类确定性扫描。
27
- - 提供 `skills/arch-doc/SKILL.md` runbook `docs/architecture-template.md` 输出模板。
28
- - 内置 Python / Node / Go 三个最小 fixture 与 `node --test` 契约测试。
29
- - `dsh-data-insight` 同一标准打包(`package.json` + `cordis.patch.yml` + `plugin/index.js`)。
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.1.3 (2026-09-06)
6
+
7
+ - 增加固定 `@deepseek-ai/dsh@0.1.2-rc.1` 的 `npm run test:compat` 门禁及 Windows/Ubuntu Node 22.19 CI,隔离执行本地 bundle add、配置 dump 和有限时长启动。
8
+ - 文档明确独立脚本支持 Node >=18,最新 DSH 宿主要求 Node >=22.19;安装示例更新为 `v0.1.3`。
9
+ - 修复 `cordis.patch.yml` 的加载包名为 `dsh-arch-doc`,同时保持插件 id `arch-doc` 不变,避免 DSH 启动时报 `ERR_MODULE_NOT_FOUND`。
10
+ - npm 包名改为 `dsh-arch-doc`:`arch-doc` 触发 npm 防抢注拦截(与既有包 `archdoc` 去连字符后撞名,403)。插件 id(cordis.patch.yml / providerName)与 GitHub 仓库名保持 `arch-doc` 不变,仅 npm 分发名变更。
11
+ - 新增 `prepublishOnly` 钩子:npm 发布前自动运行测试门禁,防止红测试状态发包。
12
+
13
+ ## 0.1.2 (2026-09-02)
14
+
15
+ - `.gitignore` 补充 `.tmp/` 本地临时产物与 `.env` 类密钥忽略。
16
+ - `package.json` 补充 `repository` / `bugs` / `homepage` 元数据。
17
+ - 新增 GitHub Actions CI(`.github/workflows/ci.yml`):ubuntu + windows × Node 18/22 矩阵运行语法检查与契约测试。
18
+ - 新增 `.editorconfig`(UTF-8 / LF / 2 空格基线)。
19
+ - README 新增「排障」章节:Mermaid 本地渲染、大仓库深度控制、无 Node 降级、入口识别。
20
+ - 新增 `examples/README.md` fixtures 说明。
21
+
22
+ ## 0.1.1 (2026-08-16)
23
+
24
+ - 文档清理:移除内部实现方案稿(arch-doc-实现文档.md),公开文档不再包含本地个人路径。
25
+ - `PUBLISHING.md` 重写:状态更新为「已推送 GitHub、npm 包名可用」,补充 dsh-index 提交步骤与版本变更流程,检查清单勾选已达成项。
26
+ - `README.md` 补充输出产物说明、环境要求与 License。
27
+ - 修复 `test/arch-profile.test.mjs` 字符串字面量跨行导致的语法错误,`npm test` 11 项全部通过。
28
+
29
+ ## 0.1.0 (2026-08-16)
30
+
31
+ - 首个版本:实现 `arch-profile.mjs` 的 probe / scan / deps / entry / all 五类确定性扫描。
32
+ - 提供 `skills/arch-doc/SKILL.md` runbook 与 `docs/architecture-template.md` 输出模板。
33
+ - 内置 Python / Node / Go 三个最小 fixture 与 `node --test` 契约测试。
34
+ - 按 `dsh-data-insight` 同一标准打包(`package.json` + `cordis.patch.yml` + `plugin/index.js`)。
package/README.md CHANGED
@@ -1,74 +1,76 @@
1
- # arch-doc
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
- [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4c1d95)](https://github.com/topics/dsh-plugin)
5
- [![dsh-index](https://img.shields.io/badge/dsh--index-arch--doc-blue)](https://dsh-index.xlings.org/packages/arch-doc/)
6
- [![version](https://img.shields.io/badge/version-0.1.2-green)](CHANGELOG.md)
7
-
8
- DSH 技能插件:输入代码库路径,自动生成架构文档(模块职责、依赖关系、入口点、运行方式)。
9
-
10
- ## 能力
11
- - 项目类型 / 语言 / 构建系统识别
12
- - 模块划分与职责总结
13
- - 内部 / 外部依赖提取与 Mermaid 依赖图
14
- - 入口点(CLI / Web / Worker / Scheduler / Library)识别
15
- - 运行方式(安装 / 开发 / 构建 / 测试 / 运行 / 部署)提取
16
- - 输出 Markdown + JSON
17
-
18
- ## 目录结构
19
-
20
- ```text
21
- arch-doc/
22
- ├── package.json # npm 包 + dsh.bundle.patch
23
- ├── cordis.patch.yml # DSH bundle patch
24
- ├── plugin/index.js # ESM 入口,注册 skills/ 为技能根
25
- ├── skills/arch-doc/SKILL.md # 技能 frontmatter + 阶段执行 runbook
26
- ├── docs/ # 输出模板 + 扫描规则
27
- ├── scripts/arch-profile.mjs # 零依赖 Node 脚本:probe/scan/deps/entry
28
- ├── examples/ # 输入/输出示例
29
- └── test/ # node --test 测试 + fixtures
30
- ```
31
-
32
- ## 使用
33
-
34
- 1. 安装:`dsh plugin --profile web add github:duyanta123/arch-doc#v0.1.1`
35
- 2. 使用:对 Agent 说「用 arch-doc 分析 /path/to/repo」
36
- 3. 本地开发:profile 的 package.json 加 `"arch-doc": "file:<本地路径>/arch-doc"`,bundles 加 `"arch-doc"`
37
-
38
- ## 输出
39
-
40
- - `docs/ARCHITECTURE.md`:结构化架构文档(按 `docs/architecture-template.md` 骨架)
41
- - `docs/architecture.json`:机器可读的结构化结果
42
- - `docs/diagrams/module-dependencies.mmd`:Mermaid 模块依赖图
43
-
44
- ## 环境要求
45
-
46
- - Node.js >= 18(运行 `scripts/arch-profile.mjs`;无 Node 时 runbook 自动降级为 shell 手工探测)
47
-
48
- ## 脚本
49
-
50
- ```bash
51
- node scripts/arch-profile.mjs <repo_path> --probe
52
- node scripts/arch-profile.mjs <repo_path> --scan --max-depth 3
53
- node scripts/arch-profile.mjs <repo_path> --deps
54
- node scripts/arch-profile.mjs <repo_path> --entry
55
- node scripts/arch-profile.mjs <repo_path> --all
56
- ```
57
-
58
- ## 测试
59
-
60
- ```bash
61
- npm test
62
- node --check scripts/arch-profile.mjs
63
- ```
64
-
65
- ## 排障
66
-
67
- - **生成的 `ARCHITECTURE.md` 里 Mermaid 图不渲染**:`file://` 协议下浏览器直接打开时,CDN 加载的 mermaid.js 受同源策略限制无法自动渲染;用 Typora 等本地渲染编辑器打开,或把 `diagrams/module-dependencies.mmd` 内容粘到 mermaid.live 查看。`.mmd` 源文件语法本身独立有效。
68
- - **大仓库扫描太慢 / 输出太长**:`--max-depth 3` 起步,必要时降到 2;确认 `exclude_dirs` 覆盖了 `node_modules`、`.venv`、构建产物等大目录。
69
- - **无 Node 环境时**:runbook 自动降级为 shell 手工探测(`find` / `ls` / `package.json` / `go.mod` / `pyproject.toml`),结论质量略降但流程完整。
70
- - **识别不到入口点**:先跑 `--probe` 确认项目类型识别正确;混合技术栈仓库以主语言构建文件为准(如 Go+Node 混合,以 `go.mod` 优先)。
71
-
72
- ## License
73
-
74
- [MIT](./LICENSE)
1
+ # arch-doc
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4c1d95)](https://github.com/topics/dsh-plugin)
5
+ [![dsh-index](https://img.shields.io/badge/dsh--index-arch--doc-blue)](https://dsh-index.xlings.org/packages/arch-doc/)
6
+ [![version](https://img.shields.io/badge/version-0.1.3-green)](CHANGELOG.md)
7
+
8
+ DSH 技能插件:输入代码库路径,自动生成架构文档(模块职责、依赖关系、入口点、运行方式)。
9
+
10
+ ## 能力
11
+ - 项目类型 / 语言 / 构建系统识别
12
+ - 模块划分与职责总结
13
+ - 内部 / 外部依赖提取与 Mermaid 依赖图
14
+ - 入口点(CLI / Web / Worker / Scheduler / Library)识别
15
+ - 运行方式(安装 / 开发 / 构建 / 测试 / 运行 / 部署)提取
16
+ - 输出 Markdown + JSON
17
+
18
+ ## 目录结构
19
+
20
+ ```text
21
+ arch-doc/
22
+ ├── package.json # npm 包 + dsh.bundle.patch
23
+ ├── cordis.patch.yml # DSH bundle patch
24
+ ├── plugin/index.js # ESM 入口,注册 skills/ 为技能根
25
+ ├── skills/arch-doc/SKILL.md # 技能 frontmatter + 阶段执行 runbook
26
+ ├── docs/ # 输出模板 + 扫描规则
27
+ ├── scripts/arch-profile.mjs # 零依赖 Node 脚本:probe/scan/deps/entry
28
+ ├── examples/ # 输入/输出示例
29
+ └── test/ # node --test 测试 + fixtures
30
+ ```
31
+
32
+ ## 使用
33
+
34
+ 1. 安装:`dsh plugin --profile web add github:duyanta123/arch-doc#v0.1.3`
35
+ 2. 使用:对 Agent 说「用 arch-doc 分析 /path/to/repo」
36
+ 3. 本地开发:profile 的 package.json 加 `"arch-doc": "file:<本地路径>/arch-doc"`,bundles 加 `"arch-doc"`
37
+
38
+ ## 输出
39
+
40
+ - `docs/ARCHITECTURE.md`:结构化架构文档(按 `docs/architecture-template.md` 骨架)
41
+ - `docs/architecture.json`:机器可读的结构化结果
42
+ - `docs/diagrams/module-dependencies.mmd`:Mermaid 模块依赖图
43
+
44
+ ## 环境要求
45
+
46
+ - 独立脚本:Node.js >= 18(运行 `scripts/arch-profile.mjs`;无 Node 时 runbook 自动降级为 shell 手工探测)
47
+ - DSH 0.1.2-rc.1 宿主:Node.js >= 22.19
48
+
49
+ ## 脚本
50
+
51
+ ```bash
52
+ node scripts/arch-profile.mjs <repo_path> --probe
53
+ node scripts/arch-profile.mjs <repo_path> --scan --max-depth 3
54
+ node scripts/arch-profile.mjs <repo_path> --deps
55
+ node scripts/arch-profile.mjs <repo_path> --entry
56
+ node scripts/arch-profile.mjs <repo_path> --all
57
+ ```
58
+
59
+ ## 测试
60
+
61
+ ```bash
62
+ npm test
63
+ node --check scripts/arch-profile.mjs
64
+ npm run test:compat
65
+ ```
66
+
67
+ ## 排障
68
+
69
+ - **生成的 `ARCHITECTURE.md` Mermaid 图不渲染**:`file://` 协议下浏览器直接打开时,CDN 加载的 mermaid.js 受同源策略限制无法自动渲染;用 Typora 等本地渲染编辑器打开,或把 `diagrams/module-dependencies.mmd` 内容粘到 mermaid.live 查看。`.mmd` 源文件语法本身独立有效。
70
+ - **大仓库扫描太慢 / 输出太长**:`--max-depth 3` 起步,必要时降到 2;确认 `exclude_dirs` 覆盖了 `node_modules`、`.venv`、构建产物等大目录。
71
+ - **无 Node 环境时**:runbook 自动降级为 shell 手工探测(`find` / `ls` / 读 `package.json` / `go.mod` / `pyproject.toml`),结论质量略降但流程完整。
72
+ - **识别不到入口点**:先跑 `--probe` 确认项目类型识别正确;混合技术栈仓库以主语言构建文件为准(如 Go+Node 混合,以 `go.mod` 优先)。
73
+
74
+ ## License
75
+
76
+ [MIT](./LICENSE)
package/cordis.patch.yml CHANGED
@@ -8,4 +8,4 @@
8
8
  # 计划模式、web 搜索、子代理等 runbook 引用的全部工具。
9
9
  - insert:
10
10
  - id: arch-doc
11
- name: arch-doc
11
+ name: dsh-arch-doc
@@ -1,9 +1,9 @@
1
- # Examples
2
-
3
- | 文件 | 用途 |
4
- |------|------|
5
- | `input.json` | 调用参数样例:`repo_path` / `output_path` / `max_depth` / `exclude_dirs` / `generate_mermaid` |
6
- | `sample-output.md` | 生成的架构文档样例(Markdown 通道) |
7
- | `sample-output.json` | 生成的结构化结果样例(JSON 通道:模块 / 依赖 / 入口 / 运行方式) |
8
-
9
- `test/fixtures/` 下另有 Python / Node / Go 三个最小应用,供 `node --test` 契约测试使用:`go-app`(`cmd/server` 布局)、`node-app`(`src/server.js` + ESM)、`python-app`(`src/` 包结构 + `pyproject.toml`)。
1
+ # Examples
2
+
3
+ | 文件 | 用途 |
4
+ |------|------|
5
+ | `input.json` | 调用参数样例:`repo_path` / `output_path` / `max_depth` / `exclude_dirs` / `generate_mermaid` |
6
+ | `sample-output.md` | 生成的架构文档样例(Markdown 通道) |
7
+ | `sample-output.json` | 生成的结构化结果样例(JSON 通道:模块 / 依赖 / 入口 / 运行方式) |
8
+
9
+ `test/fixtures/` 下另有 Python / Node / Go 三个最小应用,供 `node --test` 契约测试使用:`go-app`(`cmd/server` 布局)、`node-app`(`src/server.js` + ESM)、`python-app`(`src/` 包结构 + `pyproject.toml`)。
package/package.json CHANGED
@@ -1,59 +1,60 @@
1
- {
2
- "name": "dsh-arch-doc",
3
- "version": "0.1.2",
4
- "description": "DSH arch-doc skill plugin: analyze a codebase and generate architecture documentation (module responsibilities, dependencies, entry points and run methods).",
5
- "license": "MIT",
6
- "type": "module",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/duyanta123/arch-doc.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/duyanta123/arch-doc/issues"
13
- },
14
- "homepage": "https://github.com/duyanta123/arch-doc#readme",
15
- "scripts": {
16
- "test": "node --test test/arch-profile.test.mjs",
17
- "prepublishOnly": "npm test"
18
- },
19
- "main": "./plugin/index.js",
20
- "exports": {
21
- ".": "./plugin/index.js",
22
- "./package.json": "./package.json"
23
- },
24
- "dsh": {
25
- "bundle": {
26
- "patch": "./cordis.patch.yml"
27
- }
28
- },
29
- "files": [
30
- "plugin/index.js",
31
- "cordis.patch.yml",
32
- "skills/",
33
- "docs/",
34
- "scripts/",
35
- "examples/",
36
- "README.md",
37
- "CHANGELOG.md",
38
- "PUBLISHING.md",
39
- "LICENSE"
40
- ],
41
- "peerDependencies": {
42
- "@deepseek-ai/dsh-skill-filesystem": "*"
43
- },
44
- "peerDependenciesMeta": {
45
- "@deepseek-ai/dsh-skill-filesystem": {
46
- "optional": true
47
- }
48
- },
49
- "keywords": [
50
- "dsh",
51
- "dsh-plugin",
52
- "deepseek-harness",
53
- "architecture",
54
- "documentation",
55
- "code-analysis",
56
- "dependency-graph",
57
- "skills"
58
- ]
59
- }
1
+ {
2
+ "name": "dsh-arch-doc",
3
+ "version": "0.1.3",
4
+ "description": "DSH arch-doc skill plugin: analyze a codebase and generate architecture documentation (module responsibilities, dependencies, entry points and run methods).",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/duyanta123/arch-doc.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/duyanta123/arch-doc/issues"
13
+ },
14
+ "homepage": "https://github.com/duyanta123/arch-doc#readme",
15
+ "scripts": {
16
+ "test": "node --test test/arch-profile.test.mjs",
17
+ "test:compat": "node test/dsh-compat.test.mjs",
18
+ "prepublishOnly": "npm test"
19
+ },
20
+ "main": "./plugin/index.js",
21
+ "exports": {
22
+ ".": "./plugin/index.js",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "dsh": {
26
+ "bundle": {
27
+ "patch": "./cordis.patch.yml"
28
+ }
29
+ },
30
+ "files": [
31
+ "plugin/index.js",
32
+ "cordis.patch.yml",
33
+ "skills/",
34
+ "docs/",
35
+ "scripts/",
36
+ "examples/",
37
+ "README.md",
38
+ "CHANGELOG.md",
39
+ "PUBLISHING.md",
40
+ "LICENSE"
41
+ ],
42
+ "peerDependencies": {
43
+ "@deepseek-ai/dsh-skill-filesystem": "*"
44
+ },
45
+ "peerDependenciesMeta": {
46
+ "@deepseek-ai/dsh-skill-filesystem": {
47
+ "optional": true
48
+ }
49
+ },
50
+ "keywords": [
51
+ "dsh",
52
+ "dsh-plugin",
53
+ "deepseek-harness",
54
+ "architecture",
55
+ "documentation",
56
+ "code-analysis",
57
+ "dependency-graph",
58
+ "skills"
59
+ ]
60
+ }