adspecs 0.1.16 → 0.1.18
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +31 -21
- package/README.md +121 -128
- package/package.json +2 -2
- package/scripts/sync-version.js +7 -11
- package/skills/project-init/SKILL.md +1289 -0
- package/src/commands/plugin.js +0 -1
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "adspecs",
|
|
3
|
-
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "AI-first specification-driven development plugin for ECP platform full-lifecycle development",
|
|
6
|
-
"descriptionZh": "AI优先的工程规范驱动开发插件,覆盖需求分析、PRD、系统设计、任务拆解、TDD、代码评审、Wiki同步全流程",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Qingwen Chen",
|
|
9
|
-
"email": "cqinwn@qq.com"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://gitee.com/yuebon/adspecs",
|
|
12
|
-
"repository": "https://gitee.com/yuebon/adspecs",
|
|
13
|
-
"logo": "./assets/avatar.svg",
|
|
14
|
-
"keywords": [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "adspecs",
|
|
3
|
+
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
+
"version": "0.1.18",
|
|
5
|
+
"description": "AI-first specification-driven development plugin for ECP platform full-lifecycle development",
|
|
6
|
+
"descriptionZh": "AI优先的工程规范驱动开发插件,覆盖需求分析、PRD、系统设计、任务拆解、TDD、代码评审、Wiki同步全流程",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Qingwen Chen",
|
|
9
|
+
"email": "cqinwn@qq.com"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://gitee.com/yuebon/adspecs",
|
|
12
|
+
"repository": "https://gitee.com/yuebon/adspecs",
|
|
13
|
+
"logo": "./assets/avatar.svg",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"qoder-plugin",
|
|
16
|
+
"adspecs",
|
|
17
|
+
"spec-driven",
|
|
18
|
+
"tdd"
|
|
19
|
+
],
|
|
20
|
+
"category": "developer-tools",
|
|
21
|
+
"tags": [
|
|
22
|
+
"skill",
|
|
23
|
+
"specification",
|
|
24
|
+
"tdd",
|
|
25
|
+
"documentation"
|
|
26
|
+
],
|
|
27
|
+
"skills": "./skills/",
|
|
28
|
+
"rules": "./rules/",
|
|
29
|
+
"hooks": "./hooks/hooks.json",
|
|
30
|
+
"preserveUpstreamMetadata": true
|
|
31
|
+
}
|
package/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# AdSpecs — AI 工程研发协同插件
|
|
2
2
|
|
|
3
|
-
> **AI First 全链路研发协同**:规划 → 需求 → 设计 → 任务 → 编码 → 测试 → 审查 → 导出 → 知识回归
|
|
4
|
-
>
|
|
5
|
-
> **版本**:v0.1.15 | **协议**:Apache-2.0 | **作者**:Qingwen Chen
|
|
6
|
-
|
|
7
3
|
[](https://www.npmjs.com/package/adspecs)
|
|
8
4
|
[](https://www.npmjs.com/package/adspecs)
|
|
9
5
|
|
|
@@ -11,7 +7,7 @@
|
|
|
11
7
|
|
|
12
8
|
## 简介
|
|
13
9
|
|
|
14
|
-
AdSpecs 是一个基于 Claude Code 的 AI
|
|
10
|
+
AdSpecs 是一个基于 Claude Code 的 AI 工程研发协同插件,提供:
|
|
15
11
|
|
|
16
12
|
- **21 个 Skill**(Slash 命令) — 覆盖需求分析、架构规划、系统设计、任务拆解、单元测试、代码审查、文档导出、Wiki 同步
|
|
17
13
|
- **CLI 工具** — `adspecs init` 一键脚手架、`adspecs plugin install` 插件注册、`adspecs doctor` 环境检查
|
|
@@ -23,6 +19,34 @@ AdSpecs 是一个基于 Claude Code 的 AI 工程研发协同插件,面向 **E
|
|
|
23
19
|
|
|
24
20
|
---
|
|
25
21
|
|
|
22
|
+
## 项目结构
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
adspecs/
|
|
26
|
+
├── bin/adspecs.js # CLI 入口
|
|
27
|
+
├── src/ # CLI 核心代码
|
|
28
|
+
│ ├── commands/ # init / plugin / doctor / update
|
|
29
|
+
│ └── lib/ # scaffolder / prompts / report 等
|
|
30
|
+
├── skills/ # 21 个 Skill 定义
|
|
31
|
+
├── .claude-plugin/ # Claude Code 插件清单
|
|
32
|
+
├── .qoder-plugin/ # Qoder 插件清单
|
|
33
|
+
├── .adspecs/
|
|
34
|
+
│ ├── templates/ # 21 个标准文档模板
|
|
35
|
+
│ ├── extensions/ # 扩展配置(git hooks 等)
|
|
36
|
+
│ ├── scripts/ # 辅助脚本(bash/powershell/python)
|
|
37
|
+
│ ├── feature.json # 功能追踪模板
|
|
38
|
+
│ └── project.json # 项目元数据模板
|
|
39
|
+
├── hooks/ # Node.js 钩子脚本
|
|
40
|
+
├── references/ # 11 套参考工程与编码规范
|
|
41
|
+
├── scripts/ # 构建脚本(postinstall/sync-version)
|
|
42
|
+
├── package.json
|
|
43
|
+
├── CLAUDE.md
|
|
44
|
+
├── INSTALL.md
|
|
45
|
+
└── README.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
26
50
|
## 快速开始
|
|
27
51
|
|
|
28
52
|
### 1. 安装
|
|
@@ -44,9 +68,6 @@ adspecs plugin install --scope project
|
|
|
44
68
|
```bash
|
|
45
69
|
# 交互式初始化
|
|
46
70
|
adspecs init
|
|
47
|
-
|
|
48
|
-
# 或直接在 Claude Code 中
|
|
49
|
-
/project-init
|
|
50
71
|
```
|
|
51
72
|
|
|
52
73
|
### 3. 开始使用 Skill
|
|
@@ -64,28 +85,28 @@ adspecs init
|
|
|
64
85
|
|
|
65
86
|
安装后提供 `adspecs` 命令行工具:
|
|
66
87
|
|
|
67
|
-
| 命令
|
|
68
|
-
|
|
|
69
|
-
| `adspecs init`
|
|
70
|
-
| `adspecs plugin install`
|
|
71
|
-
| `adspecs plugin uninstall` | 从 Claude Code 卸载插件
|
|
72
|
-
| `adspecs doctor`
|
|
73
|
-
| `adspecs update`
|
|
88
|
+
| 命令 | 说明 | 示例 |
|
|
89
|
+
| -------------------------- | ----------------------------------------------------- | ---------------------------------------- |
|
|
90
|
+
| `adspecs init` | 交互式初始化项目结构(docs/、templates/、前端模板等) | `adspecs init --mode simple` |
|
|
91
|
+
| `adspecs plugin install` | 注册为 Claude Code 插件 | `adspecs plugin install --scope project` |
|
|
92
|
+
| `adspecs plugin uninstall` | 从 Claude Code 卸载插件 | `adspecs plugin uninstall --scope user` |
|
|
93
|
+
| `adspecs doctor` | 检查环境依赖(Node.js、git、Python 等) | `adspecs doctor` |
|
|
94
|
+
| `adspecs update` | 升级到最新版本 | `adspecs update --version 0.2.0` |
|
|
74
95
|
|
|
75
96
|
### `adspecs init` 参数
|
|
76
97
|
|
|
77
|
-
| 参数
|
|
78
|
-
|
|
|
79
|
-
| `--project-name <name>`
|
|
80
|
-
| `--project-dir <dir>`
|
|
81
|
-
| `--mode <mode>`
|
|
82
|
-
| `--front-demo <stack>`
|
|
83
|
-
| `--company <name>`
|
|
84
|
-
| `--confidentiality <level>` | 文件密级:`公开` \| `内部资料` \| `机密` \| `绝密`
|
|
85
|
-
| `--modules <list>`
|
|
86
|
-
| `--non-interactive`
|
|
87
|
-
| `--force`
|
|
88
|
-
| `-y, --yes`
|
|
98
|
+
| 参数 | 说明 | 默认值 |
|
|
99
|
+
| --------------------------- | ----------------------------------------------------- | ---------- |
|
|
100
|
+
| `--project-name <name>` | 项目名称 | 交互输入 |
|
|
101
|
+
| `--project-dir <dir>` | 项目目录(留空=当前目录) | 当前目录 |
|
|
102
|
+
| `--mode <mode>` | 初始化模式:`simple` \| `classic` \| `full` \| `demo` | 交互选择 |
|
|
103
|
+
| `--front-demo <stack>` | 前端演示技术栈:`vue` \| `antd` | `vue` |
|
|
104
|
+
| `--company <name>` | 公司名称 | — |
|
|
105
|
+
| `--confidentiality <level>` | 文件密级:`公开` \| `内部资料` \| `机密` \| `绝密` | `内部资料` |
|
|
106
|
+
| `--modules <list>` | 后端模块列表(逗号分隔) | — |
|
|
107
|
+
| `--non-interactive` | 非交互模式,使用默认值 | — |
|
|
108
|
+
| `--force` | 已存在区域直接重建 | — |
|
|
109
|
+
| `-y, --yes` | 自动确认执行 | — |
|
|
89
110
|
|
|
90
111
|
---
|
|
91
112
|
|
|
@@ -95,8 +116,8 @@ adspecs init
|
|
|
95
116
|
|
|
96
117
|
### 一、项目初始化(CLI 命令)
|
|
97
118
|
|
|
98
|
-
| 命令
|
|
99
|
-
|
|
|
119
|
+
| 命令 | 说明 |
|
|
120
|
+
| -------------- | ------------------------------------------------------------------------------ |
|
|
100
121
|
| `adspecs init` | 交互式初始化项目结构:`docs/` 文档树、前端模板、后端模块、编码规范、标准模板等 |
|
|
101
122
|
|
|
102
123
|
初始化后生成:
|
|
@@ -110,58 +131,58 @@ adspecs init
|
|
|
110
131
|
|
|
111
132
|
### 二、需求分析与架构规划(5 个)
|
|
112
133
|
|
|
113
|
-
| Skill
|
|
114
|
-
|
|
|
115
|
-
| `adspecs-new-requirement`
|
|
116
|
-
| `adspecs-biz-blueprint`
|
|
117
|
-
| `adspecs-prd`
|
|
118
|
-
| `adspecs-clarify`
|
|
119
|
-
| `adspecs-architecture-planning` | 平台级架构规划(功能架构 → 模块依赖 → 数据建模) | 项目 / 业务描述
|
|
134
|
+
| Skill | 说明 | 输入 | 输出 |
|
|
135
|
+
| ------------------------------- | ------------------------------------------------ | ------------------- | -------------------------------- |
|
|
136
|
+
| `adspecs-new-requirement` | 深度业务需求分析(六步结构 + 模拟评审) | 业务需求描述 | `docs/00-customer-requirements/` |
|
|
137
|
+
| `adspecs-biz-blueprint` | 将需求分析转化为 F1~F6 业务方案文件体系 | 业务需求分析文档 | `docs/00-customer-requirements/` |
|
|
138
|
+
| `adspecs-prd` | 从自然语言 / 调研材料生成 PRD | 调研材料 / 原始需求 | `docs/20-prd/` |
|
|
139
|
+
| `adspecs-clarify` | 识别 PRD 模糊点(≤5 个)并澄清 | 需求规格说明书 | 更新后的规格说明书 |
|
|
140
|
+
| `adspecs-architecture-planning` | 平台级架构规划(功能架构 → 模块依赖 → 数据建模) | 项目 / 业务描述 | `docs/10-architecture/` |
|
|
120
141
|
|
|
121
142
|
### 三、SOW / 设计 / 任务(5 个)
|
|
122
143
|
|
|
123
|
-
| Skill
|
|
124
|
-
|
|
|
125
|
-
| `adspecs-write-sow`
|
|
126
|
-
| `adspecs-plan`
|
|
127
|
-
| `adspecs-front-spec`
|
|
128
|
-
| `adspecs-tasks`
|
|
129
|
-
| `adspecs-front-tasks` | 前端 TDD 任务清单
|
|
144
|
+
| Skill | 说明 | 输入 | 输出 |
|
|
145
|
+
| --------------------- | ------------------------------------- | --------------- | ------------------------------------- |
|
|
146
|
+
| `adspecs-write-sow` | 根据项目 / 合同信息生成工作说明书 | 项目 / 合同信息 | `docs/05-sow/` |
|
|
147
|
+
| `adspecs-plan` | 后端统一系统设计(OOA+OOD)+ 建表 SQL | PRD | `docs/30-system-design/` design + SQL |
|
|
148
|
+
| `adspecs-front-spec` | 前端功能设计(UI/交互规格) | PRD + 系统设计 | `docs/30-system-design/` 前端设计 |
|
|
149
|
+
| `adspecs-tasks` | 后端 TDD 任务清单 | 系统设计文档 | `docs/30-system-design/` tasks.md |
|
|
150
|
+
| `adspecs-front-tasks` | 前端 TDD 任务清单 | 前端设计文档 | `docs/30-system-design/` tasks.md |
|
|
130
151
|
|
|
131
152
|
### 四、质量保障与测试(3 个)
|
|
132
153
|
|
|
133
|
-
| Skill
|
|
134
|
-
|
|
|
135
|
-
| `adspecs-analyze`
|
|
136
|
-
| `adspecs-adversarial-review` | 对抗式审查:5 个红队角色挑战文档假设、缺失、矛盾与歧义
|
|
137
|
-
| `adspecs-utest`
|
|
154
|
+
| Skill | 说明 |
|
|
155
|
+
| ---------------------------- | ------------------------------------------------------------------- |
|
|
156
|
+
| `adspecs-analyze` | 跨文档(PRD / 系统设计 / tasks)全链路 13 维一致性分析 |
|
|
157
|
+
| `adspecs-adversarial-review` | 对抗式审查:5 个红队角色挑战文档假设、缺失、矛盾与歧义 |
|
|
158
|
+
| `adspecs-utest` | 基于系统设计生成 Service / Controller 层 JUnit 5 单元测试代码及报告 |
|
|
138
159
|
|
|
139
160
|
### 五、交付与运维(5 个)
|
|
140
161
|
|
|
141
|
-
| Skill
|
|
142
|
-
|
|
|
143
|
-
| `adspecs-update-status` | 更新 feature.json 功能状态 + 输出追踪矩阵
|
|
144
|
-
| `adspecs-export-word`
|
|
145
|
-
| `adspecs-git-commit`
|
|
146
|
-
| `sie-front-code-review` | 前端专项评审(React + TypeScript + Ant Design)
|
|
147
|
-
| `wiki-update`
|
|
162
|
+
| Skill | 说明 |
|
|
163
|
+
| ----------------------- | -------------------------------------------------- |
|
|
164
|
+
| `adspecs-update-status` | 更新 feature.json 功能状态 + 输出追踪矩阵 |
|
|
165
|
+
| `adspecs-export-word` | Markdown 导出为 Word(.docx),自动生成封面 + 目录 |
|
|
166
|
+
| `adspecs-git-commit` | 各阶段完成后自动提交变更 |
|
|
167
|
+
| `sie-front-code-review` | 前端专项评审(React + TypeScript + Ant Design) |
|
|
168
|
+
| `wiki-update` | 将 docs/ 同步到 wiki/(全量 / 增量模式) |
|
|
148
169
|
|
|
149
170
|
### 六、产品规划(2 个)
|
|
150
171
|
|
|
151
|
-
| Skill
|
|
152
|
-
|
|
|
172
|
+
| Skill | 说明 |
|
|
173
|
+
| ------------------------------- | ------------------------------------ |
|
|
153
174
|
| `adspecs-write-planning-report` | 汇总调研期分析输出,生成产品规划报告 |
|
|
154
|
-
| `adspecs-write-roadmap`
|
|
175
|
+
| `adspecs-write-roadmap` | 版本路标维护,追写 roadmap.md |
|
|
155
176
|
|
|
156
177
|
### 编码阶段依赖(superpowers 插件)
|
|
157
178
|
|
|
158
|
-
| 外部 Skill
|
|
159
|
-
|
|
|
160
|
-
| `subagent-driven-development`
|
|
161
|
-
| `test-driven-development`
|
|
162
|
-
| `dispatching-parallel-agents`
|
|
179
|
+
| 外部 Skill | 说明 |
|
|
180
|
+
| -------------------------------- | -------------------------------- |
|
|
181
|
+
| `subagent-driven-development` | 子代理驱动并行开发 |
|
|
182
|
+
| `test-driven-development` | RED → GREEN → REFACTOR TDD 循环 |
|
|
183
|
+
| `dispatching-parallel-agents` | 并行子代理调度 |
|
|
163
184
|
| `finishing-a-development-branch` | 分支收尾(PR / merge / cleanup) |
|
|
164
|
-
| `verification-before-completion` | 完成前最终验证
|
|
185
|
+
| `verification-before-completion` | 完成前最终验证 |
|
|
165
186
|
|
|
166
187
|
---
|
|
167
188
|
|
|
@@ -169,29 +190,29 @@ adspecs init
|
|
|
169
190
|
|
|
170
191
|
初始化后位于 `.adspecs/templates/`:
|
|
171
192
|
|
|
172
|
-
| 模板
|
|
173
|
-
|
|
|
174
|
-
| `01-业务需求分析模板.md`
|
|
175
|
-
| `02-产品需求说明书模板.md`
|
|
176
|
-
| `03-系统设计模板.md`
|
|
177
|
-
| `04-前端功能设计模板.md`
|
|
178
|
-
| `05-后端任务清单模板.md`
|
|
179
|
-
| `05b-前端任务清单模板.md`
|
|
180
|
-
| `06-代码评审报告模板.md`
|
|
181
|
-
| `07-单元测试报告模板.md`
|
|
182
|
-
| `08-系统集成测试报告模板.md` | 集成测试报告
|
|
183
|
-
| `09-性能测试报告模板.md`
|
|
184
|
-
| `10-安全检查清单.md`
|
|
185
|
-
| `11-代码质量标准.md`
|
|
186
|
-
| `13-测试用例模板.md`
|
|
187
|
-
| `14-需求追溯矩阵模板.md`
|
|
188
|
-
| `15-业务功能架构文档模板.md` | 业务功能架构规划
|
|
189
|
-
| `16-系统架构设计模板.md`
|
|
190
|
-
| `17-子模块依赖关系模板.md`
|
|
191
|
-
| `18-统一数据模型模板.md`
|
|
192
|
-
| `19-项目目录结构模板.md`
|
|
193
|
-
| `20-工作说明书SOW模板.md`
|
|
194
|
-
| `21-业务方案模板.md`
|
|
193
|
+
| 模板 | 用途 | 阶段 |
|
|
194
|
+
| ---------------------------- | --------------------------- | ---- |
|
|
195
|
+
| `01-业务需求分析模板.md` | 业务需求分析(六步结构) | 需求 |
|
|
196
|
+
| `02-产品需求说明书模板.md` | 产品需求说明书(PRD) | 需求 |
|
|
197
|
+
| `03-系统设计模板.md` | 后端统一系统设计(OOA+OOD) | 设计 |
|
|
198
|
+
| `04-前端功能设计模板.md` | 前端功能规格(UI/交互) | 设计 |
|
|
199
|
+
| `05-后端任务清单模板.md` | 后端 TDD 任务清单 | 任务 |
|
|
200
|
+
| `05b-前端任务清单模板.md` | 前端 TDD 任务清单 | 任务 |
|
|
201
|
+
| `06-代码评审报告模板.md` | 代码评审报告 | 审查 |
|
|
202
|
+
| `07-单元测试报告模板.md` | 单元测试报告 | 测试 |
|
|
203
|
+
| `08-系统集成测试报告模板.md` | 集成测试报告 | 测试 |
|
|
204
|
+
| `09-性能测试报告模板.md` | 性能测试报告 | 测试 |
|
|
205
|
+
| `10-安全检查清单.md` | 安全检查清单 | 审查 |
|
|
206
|
+
| `11-代码质量标准.md` | 代码质量标准 | 审查 |
|
|
207
|
+
| `13-测试用例模板.md` | 测试用例 | 测试 |
|
|
208
|
+
| `14-需求追溯矩阵模板.md` | 需求 → 实现追溯矩阵 | 审查 |
|
|
209
|
+
| `15-业务功能架构文档模板.md` | 业务功能架构规划 | 架构 |
|
|
210
|
+
| `16-系统架构设计模板.md` | 系统架构设计 | 架构 |
|
|
211
|
+
| `17-子模块依赖关系模板.md` | 子模块依赖关系 | 架构 |
|
|
212
|
+
| `18-统一数据模型模板.md` | 统一数据建模(含 ER 图) | 架构 |
|
|
213
|
+
| `19-项目目录结构模板.md` | 项目目录结构规划 | 架构 |
|
|
214
|
+
| `20-工作说明书SOW模板.md` | 工作说明书(SOW) | 需求 |
|
|
215
|
+
| `21-业务方案模板.md` | 业务方案(F1~F6 文件体系) | 需求 |
|
|
195
216
|
|
|
196
217
|
> **约定**:所有模板通过对应 Skill 调用生成,不建议直接手工填写。
|
|
197
218
|
|
|
@@ -201,19 +222,19 @@ adspecs init
|
|
|
201
222
|
|
|
202
223
|
`references/` 目录包含 `adspecs init` 时按需复制到目标项目的参考代码和规范:
|
|
203
224
|
|
|
204
|
-
| 目录
|
|
205
|
-
|
|
|
206
|
-
| `docs/40-project_conventions/` | ECP 编码标准(后端 Java + 前端集成)
|
|
207
|
-
| `front-demo/`
|
|
208
|
-
| `antd-front-demo/`
|
|
209
|
-
| `ant6-front-standard/`
|
|
210
|
-
| `ecp-end-standard/`
|
|
211
|
-
| `ecp-front-standard/`
|
|
212
|
-
| `iidp-end-standard/`
|
|
213
|
-
| `iidp-front-standard/`
|
|
214
|
-
| `web-ui/`
|
|
215
|
-
| `python/`
|
|
216
|
-
| `yudaocloud-end-standard/`
|
|
225
|
+
| 目录 | 说明 |
|
|
226
|
+
| ------------------------------ | ---------------------------------------------- |
|
|
227
|
+
| `docs/40-project_conventions/` | ECP 编码标准(后端 Java + 前端集成) |
|
|
228
|
+
| `front-demo/` | Vue 3 前端演示项目(Vite + TS + Element Plus) |
|
|
229
|
+
| `antd-front-demo/` | Ant Design React 前端演示项目 |
|
|
230
|
+
| `ant6-front-standard/` | Ant Design 6 前端编码规范(9 篇) |
|
|
231
|
+
| `ecp-end-standard/` | ECP 后端编码规范 |
|
|
232
|
+
| `ecp-front-standard/` | ECP 前端编码规范 |
|
|
233
|
+
| `iidp-end-standard/` | IIDP 后端编码规范 |
|
|
234
|
+
| `iidp-front-standard/` | IIDP 前端编码规范 |
|
|
235
|
+
| `web-ui/` | ECP 管理控制台外壳工程 |
|
|
236
|
+
| `python/` | Python 后端参考 |
|
|
237
|
+
| `yudaocloud-end-standard/` | 芋道 Cloud 后端集成参考 |
|
|
217
238
|
|
|
218
239
|
---
|
|
219
240
|
|
|
@@ -369,34 +390,6 @@ Vue 项目使用 Vitest + @vue/test-utils;React 项目使用 Jest + React Test
|
|
|
369
390
|
|
|
370
391
|
---
|
|
371
392
|
|
|
372
|
-
## 项目结构
|
|
373
|
-
|
|
374
|
-
```
|
|
375
|
-
adspecs/
|
|
376
|
-
├── bin/adspecs.js # CLI 入口
|
|
377
|
-
├── src/ # CLI 核心代码
|
|
378
|
-
│ ├── commands/ # init / plugin / doctor / update
|
|
379
|
-
│ └── lib/ # scaffolder / prompts / report 等
|
|
380
|
-
├── skills/ # 21 个 Skill 定义
|
|
381
|
-
├── .claude-plugin/ # Claude Code 插件清单
|
|
382
|
-
├── .qoder-plugin/ # Qoder 插件清单
|
|
383
|
-
├── .adspecs/
|
|
384
|
-
│ ├── templates/ # 21 个标准文档模板
|
|
385
|
-
│ ├── extensions/ # 扩展配置(git hooks 等)
|
|
386
|
-
│ ├── scripts/ # 辅助脚本(bash/powershell/python)
|
|
387
|
-
│ ├── feature.json # 功能追踪模板
|
|
388
|
-
│ └── project.json # 项目元数据模板
|
|
389
|
-
├── hooks/ # Node.js 钩子脚本
|
|
390
|
-
├── references/ # 11 套参考工程与编码规范
|
|
391
|
-
├── scripts/ # 构建脚本(postinstall/sync-version)
|
|
392
|
-
├── package.json
|
|
393
|
-
├── CLAUDE.md
|
|
394
|
-
├── INSTALL.md
|
|
395
|
-
└── README.md
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
---
|
|
399
|
-
|
|
400
393
|
## License
|
|
401
394
|
|
|
402
395
|
[Apache-2.0](./LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adspecs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "AI first 工程规范驱动开发插件 — 支持 npm 安装和 CLI 初始化",
|
|
5
5
|
"bin": {
|
|
6
6
|
"adspecs": "./bin/adspecs.js"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "node --test src/**/*.test.js",
|
|
31
31
|
"postinstall": "node scripts/postinstall.js",
|
|
32
32
|
"prepublishOnly": "node scripts/prepublish-check.js",
|
|
33
|
-
"
|
|
33
|
+
"version": "node scripts/sync-version.js && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .qoder-plugin/plugin.json",
|
|
34
34
|
"sync-version": "node scripts/sync-version.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
package/scripts/sync-version.js
CHANGED
|
@@ -68,17 +68,13 @@ function main() {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// 3. .qoder-plugin/plugin.json
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
qoderPlugin.version = newVersion;
|
|
79
|
-
writeJson('.qoder-plugin/plugin.json', qoderPlugin);
|
|
80
|
-
updated.push(`.qoder-plugin/plugin.json (${old} → ${newVersion})`);
|
|
81
|
-
}
|
|
71
|
+
// 3. .qoder-plugin/plugin.json — 始终与 package.json 保持版本一致
|
|
72
|
+
const qoderPlugin = readJson('.qoder-plugin/plugin.json');
|
|
73
|
+
if (qoderPlugin && qoderPlugin.version !== newVersion) {
|
|
74
|
+
const old = qoderPlugin.version;
|
|
75
|
+
qoderPlugin.version = newVersion;
|
|
76
|
+
writeJson('.qoder-plugin/plugin.json', qoderPlugin);
|
|
77
|
+
updated.push(`.qoder-plugin/plugin.json (${old} → ${newVersion})`);
|
|
82
78
|
}
|
|
83
79
|
|
|
84
80
|
if (updated.length === 0) {
|