adspecs 0.1.31 → 0.1.33
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/.codebuddy-plugin/plugin.json +24 -0
- package/.qoder-plugin/plugin.json +1 -1
- package/.workbuddy-plugin/plugin.json +1 -1
- package/CLAUDE.md +3 -2
- package/README.md +136 -107
- package/package.json +3 -2
- package/scripts/sync-version.js +11 -1
- package/src/commands/plugin.js +16 -4
- package/src/utils.js +22 -5
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adspecs",
|
|
3
|
+
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
+
"version": "0.1.33",
|
|
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
|
+
"codebuddy-plugin",
|
|
16
|
+
"adspecs",
|
|
17
|
+
"spec-driven",
|
|
18
|
+
"tdd"
|
|
19
|
+
],
|
|
20
|
+
"category": "developer-tools",
|
|
21
|
+
"skills": "./skills/",
|
|
22
|
+
"hooks": "./hooks/hooks.json",
|
|
23
|
+
"defaultEnabled": true
|
|
24
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adspecs",
|
|
3
3
|
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.33",
|
|
5
5
|
"description": "AI-first specification-driven development plugin for ECP platform full-lifecycle development",
|
|
6
6
|
"descriptionZh": "AI优先的工程规范驱动开发插件,覆盖需求分析、PRD、系统设计、任务拆解、TDD、代码评审、Wiki同步全流程",
|
|
7
7
|
"author": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adspecs",
|
|
3
3
|
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.33",
|
|
5
5
|
"description": "AI-first specification-driven development plugin for ECP platform full-lifecycle development",
|
|
6
6
|
"descriptionZh": "AI优先的工程规范驱动开发插件,覆盖需求分析、PRD、系统设计、任务拆解、TDD、代码评审、Wiki同步全流程",
|
|
7
7
|
"author": {
|
package/CLAUDE.md
CHANGED
|
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
6
6
|
|
|
7
7
|
**adspecs AI Plugin** — a Claude Code / Qoder / WorkBuddy plugin for ECP (Enterprise Cloud Platform) full-lifecycle AI-driven development. Provides 30 skills (slash commands) covering requirements, SOW authoring, system design, task breakdown, unit testing, code review, feature status tracking, and wiki sync.
|
|
8
8
|
|
|
9
|
-
- **Plugin name**: `adspecs` (see `.claude-plugin/plugin.json` / `.qoder-plugin/plugin.json` / `.workbuddy-plugin/plugin.json`)
|
|
9
|
+
- **Plugin name**: `adspecs` (see `.claude-plugin/plugin.json` / `.qoder-plugin/plugin.json` / `.codebuddy-plugin/plugin.json` / `.workbuddy-plugin/plugin.json`)
|
|
10
10
|
- **Author**: Qingwen Chen
|
|
11
11
|
- **License**: Apache 2.0
|
|
12
12
|
- **Language**: Chinese (all documentation, templates, and skill instructions are in Chinese)
|
|
@@ -18,7 +18,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
18
18
|
adspecs/
|
|
19
19
|
├── .claude-plugin/ # Plugin metadata for Claude Code
|
|
20
20
|
├── .qoder-plugin/ # Plugin metadata for Qoder
|
|
21
|
-
├── .
|
|
21
|
+
├── .codebuddy-plugin/ # Plugin metadata for WorkBuddy (CodeBuddy format)
|
|
22
|
+
├── .workbuddy-plugin/ # Plugin metadata for WorkBuddy (legacy, backward compat)
|
|
22
23
|
├── .adspecs/ # Plugin runtime config, templates, scripts & extensions (copied to target projects)
|
|
23
24
|
│ ├── templates/ # 21 standard document templates (PRD, system design, etc.)
|
|
24
25
|
│ ├── extensions/ # Extension configs (git hooks, etc.)
|
package/README.md
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
AdSpecs 是一个支持 **Claude Code**、**Qoder** 和 **WorkBuddy** 三平台的 AI 工程研发协同插件,提供:
|
|
12
12
|
|
|
13
|
-
- **
|
|
13
|
+
- **30 个 Skill**(Slash 命令) — 覆盖需求分析、架构规划、系统设计、任务拆解、单元测试、代码审查、原型生成、文档导出、Wiki 同步
|
|
14
14
|
- **CLI 工具** — `adspecs init` 一键脚手架、`adspecs plugin install` 插件注册、`adspecs doctor` 环境检查
|
|
15
15
|
- **21 个标准文档模板** — 需求 / 设计 / 任务 / 测试 / 评审 / 架构全覆盖
|
|
16
|
-
- **多技术栈参考** — Java 后端、Vue 3 前端、Ant Design React 前端、Python 后端等
|
|
16
|
+
- **多技术栈参考** — Java 后端、Vue 3 前端、Ant Design React 前端、Python 后端等 9 套参考工程
|
|
17
17
|
- **三平台支持** — 原生兼容 Claude Code、Qoder 和 WorkBuddy,自动检测运行环境
|
|
18
18
|
- **npm 分发** — `npm install -g adspecs` 即装即用
|
|
19
19
|
|
|
@@ -31,51 +31,92 @@ adspecs/
|
|
|
31
31
|
├── src/ # CLI 核心代码
|
|
32
32
|
│ ├── commands/ # init / plugin / doctor / update
|
|
33
33
|
│ └── lib/ # scaffolder / prompts / report 等
|
|
34
|
-
├── skills/ #
|
|
34
|
+
├── skills/ # 30 个 Skill 定义
|
|
35
35
|
├── .claude-plugin/ # Claude Code 插件清单
|
|
36
36
|
├── .qoder-plugin/ # Qoder 插件清单
|
|
37
|
-
├── .
|
|
37
|
+
├── .codebuddy-plugin/ # WorkBuddy 插件清单(CodeBuddy 格式)
|
|
38
|
+
├── .workbuddy-plugin/ # WorkBuddy 插件清单(向后兼容)
|
|
38
39
|
├── .adspecs/
|
|
39
40
|
│ ├── templates/ # 21 个标准文档模板
|
|
40
41
|
│ ├── extensions/ # 扩展配置(git hooks 等)
|
|
41
42
|
│ ├── scripts/ # 辅助脚本(bash/powershell/python)
|
|
42
|
-
│ ├──
|
|
43
|
+
│ ├── workflows/ # 工作流定义
|
|
44
|
+
│ ├── feature.json # 功能追踪模板(JSON,主数据源)
|
|
45
|
+
│ ├── feature.yml # 功能追踪人类可读视图(YAML,从 JSON 同步)
|
|
46
|
+
│ ├── session-logger.json # AI 会话日志触发器配置
|
|
47
|
+
│ ├── paths.json # 可自定义的输出路径配置
|
|
43
48
|
│ └── project.json # 项目元数据模板
|
|
44
|
-
├── hooks/ # Node.js 钩子脚本
|
|
45
|
-
├── references/ #
|
|
46
|
-
├──
|
|
49
|
+
├── hooks/ # Node.js 钩子脚本 + hooks.json
|
|
50
|
+
├── references/ # 9 套参考工程与编码规范
|
|
51
|
+
├── assets/ # README 配图资源
|
|
52
|
+
├── commands/ # 保留(空)
|
|
53
|
+
├── scripts/ # npm 生命周期脚本(postinstall/sync-version/prepublish-check)
|
|
47
54
|
├── package.json
|
|
48
55
|
├── CLAUDE.md
|
|
56
|
+
├── README.md
|
|
49
57
|
├── INSTALL.md
|
|
50
|
-
|
|
58
|
+
├── CHANGELOG.md
|
|
59
|
+
├── skill-help.md # Skill 详细使用说明
|
|
60
|
+
├── User-Manual.md # 用户手册
|
|
61
|
+
├── quickstar.md # 快速入门指南
|
|
62
|
+
├── help.md # 帮助文档
|
|
63
|
+
└── LICENSE
|
|
51
64
|
```
|
|
52
65
|
|
|
53
66
|
---
|
|
54
67
|
|
|
55
68
|
## 快速开始
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
## 安装与升级
|
|
71
|
+
|
|
72
|
+
详细安装说明见 [INSTALL.md](./INSTALL.md)。
|
|
73
|
+
|
|
74
|
+
### Claude Code
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm install -g adspecs
|
|
78
|
+
adspecs plugin install # 用户级(默认)
|
|
79
|
+
adspecs plugin install --scope project # 项目级
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Qoder
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install -g adspecs
|
|
86
|
+
adspecs plugin install --platform qoder # 用户级
|
|
87
|
+
adspecs plugin install --platform qoder --scope project # 项目级
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### WorkBuddy
|
|
58
91
|
|
|
59
92
|
```bash
|
|
60
|
-
# 全局安装 CLI
|
|
61
93
|
npm install -g adspecs
|
|
94
|
+
adspecs plugin install --platform workbuddy # 用户级(推荐)
|
|
95
|
+
adspecs plugin install --platform workbuddy --scope project # 项目级
|
|
96
|
+
```
|
|
62
97
|
|
|
63
|
-
|
|
64
|
-
adspecs plugin install
|
|
98
|
+
> **说明**:WorkBuddy 通过 CodeBuddy 插件系统加载 adspecs。若未安装 codebuddy CLI,安装脚本会自动回退为手工配置方式(创建 marketplace 链接 + 写入 enabledPlugins)。
|
|
65
99
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
100
|
+
### 通用命令
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 升级
|
|
104
|
+
npm install -g adspecs@latest
|
|
105
|
+
|
|
106
|
+
# 卸载
|
|
107
|
+
adspecs plugin uninstall --scope user
|
|
108
|
+
adspecs plugin uninstall --scope project
|
|
69
109
|
```
|
|
70
110
|
|
|
71
|
-
|
|
111
|
+
|
|
112
|
+
### 初始化项目
|
|
72
113
|
|
|
73
114
|
```bash
|
|
74
115
|
# 交互式初始化
|
|
75
116
|
adspecs init
|
|
76
117
|
```
|
|
77
118
|
|
|
78
|
-
###
|
|
119
|
+
### 开始使用 Skill
|
|
79
120
|
|
|
80
121
|
```
|
|
81
122
|
/adspecs-new-requirement CRM 销售预测模块
|
|
@@ -84,19 +125,22 @@ adspecs init
|
|
|
84
125
|
...
|
|
85
126
|
```
|
|
86
127
|
|
|
128
|
+
|
|
129
|
+
详细skill使用说明见 [skill-help.md](./skill-help.md)。
|
|
130
|
+
|
|
87
131
|
---
|
|
88
132
|
|
|
89
133
|
## CLI 工具
|
|
90
134
|
|
|
91
135
|
安装后提供 `adspecs` 命令行工具:
|
|
92
136
|
|
|
93
|
-
| 命令 | 说明 | 示例
|
|
94
|
-
| -------------------------- | ----------------------------------------------------- |
|
|
95
|
-
| `adspecs init` | 交互式初始化项目结构(docs/、templates/、前端模板等) | `adspecs init --mode simple`
|
|
96
|
-
| `adspecs plugin install` | 注册为
|
|
97
|
-
| `adspecs plugin uninstall` | 从
|
|
98
|
-
| `adspecs doctor` | 检查环境依赖(Node.js、git、Python 等) | `adspecs doctor`
|
|
99
|
-
| `adspecs update` | 升级到最新版本 | `adspecs update --version 0.2.0`
|
|
137
|
+
| 命令 | 说明 | 示例 |
|
|
138
|
+
| -------------------------- | ----------------------------------------------------- | --------------------------------------------- |
|
|
139
|
+
| `adspecs init` | 交互式初始化项目结构(docs/、templates/、前端模板等) | `adspecs init --mode simple` |
|
|
140
|
+
| `adspecs plugin install` | 注册为 AI 平台插件(自动检测或指定平台) | `adspecs plugin install --platform workbuddy` |
|
|
141
|
+
| `adspecs plugin uninstall` | 从 AI 平台卸载插件 | `adspecs plugin uninstall --platform qoder` |
|
|
142
|
+
| `adspecs doctor` | 检查环境依赖(Node.js、git、Python 等) | `adspecs doctor` |
|
|
143
|
+
| `adspecs update` | 升级到最新版本 | `adspecs update --version 0.2.0` |
|
|
100
144
|
|
|
101
145
|
### `adspecs init` 参数
|
|
102
146
|
|
|
@@ -115,26 +159,33 @@ adspecs init
|
|
|
115
159
|
|
|
116
160
|
---
|
|
117
161
|
|
|
118
|
-
## Skills 总览(
|
|
162
|
+
## Skills 总览(30 个)
|
|
119
163
|
|
|
120
164
|
按职责分为六类:
|
|
121
165
|
|
|
122
|
-
### 一、项目初始化(CLI
|
|
166
|
+
### 一、项目初始化(CLI + Skill)
|
|
123
167
|
|
|
124
|
-
| 命令
|
|
125
|
-
|
|
|
126
|
-
| `adspecs init`
|
|
168
|
+
| 命令 / Skill | 说明 |
|
|
169
|
+
| --------------- | ---------------------------------------------------------------------------------- |
|
|
170
|
+
| `adspecs init` | CLI 交互式初始化项目结构:`docs/` 文档树、前端模板、后端模块、编码规范、标准模板等 |
|
|
171
|
+
| `/project-init` | Skill 版初始化(在 AI 会话中调用,等价于 `adspecs init`) |
|
|
127
172
|
|
|
128
173
|
初始化后生成:
|
|
129
174
|
|
|
175
|
+
- `docs/00-planning/` — 产品规划报告与路标
|
|
176
|
+
- `docs/00-customer-requirements/` — 业务需求分析文档
|
|
130
177
|
- `docs/10-architecture/` — 架构规划
|
|
131
178
|
- `docs/20-prd/` — 产品需求说明书
|
|
132
179
|
- `docs/30-system-design/` — 系统设计 + SQL + 前端设计 + 任务清单
|
|
133
|
-
- `docs/40-project_conventions/` —
|
|
180
|
+
- `docs/40-project_conventions/` — 编码规范(前端 + 后端)
|
|
181
|
+
- `docs/80-development/` — 开发日志、测试报告
|
|
182
|
+
- `docs/100-help/` — 帮助文档
|
|
183
|
+
- `docs/300-specs/` — 规格文档
|
|
184
|
+
- `wiki/` — Wiki 同步目标目录
|
|
134
185
|
- `.adspecs/templates/` — 21 个标准模板
|
|
135
186
|
- `.adspecs/paths.json` — 可自定义的输出路径配置
|
|
136
187
|
|
|
137
|
-
### 二、需求分析与架构规划(
|
|
188
|
+
### 二、需求分析与架构规划(7 个)
|
|
138
189
|
|
|
139
190
|
| Skill | 说明 | 输入 | 输出 |
|
|
140
191
|
| ------------------------------- | ------------------------------------------------ | ------------------- | -------------------------------- |
|
|
@@ -143,34 +194,43 @@ adspecs init
|
|
|
143
194
|
| `adspecs-prd` | 从自然语言 / 调研材料生成 PRD | 调研材料 / 原始需求 | `docs/20-prd/` |
|
|
144
195
|
| `adspecs-clarify` | 识别 PRD 模糊点(≤5 个)并澄清 | 需求规格说明书 | 更新后的规格说明书 |
|
|
145
196
|
| `adspecs-architecture-planning` | 平台级架构规划(功能架构 → 模块依赖 → 数据建模) | 项目 / 业务描述 | `docs/10-architecture/` |
|
|
197
|
+
| `adspecs-requirement-research` | 需求溯源与调研,记录需求来源与关联 | 需求描述 | `docs/02-prd/` |
|
|
198
|
+
| `adspecs-constitution` | 创建或更新项目章程,同步依赖模板 | 项目原则 / 章程输入 | 项目章程文件 |
|
|
146
199
|
|
|
147
|
-
### 三、SOW / 设计 /
|
|
200
|
+
### 三、SOW / 设计 / 任务 / 原型(7 个)
|
|
148
201
|
|
|
149
|
-
| Skill
|
|
150
|
-
|
|
|
151
|
-
| `adspecs-write-sow`
|
|
152
|
-
| `adspecs-plan`
|
|
153
|
-
| `adspecs-front-spec`
|
|
154
|
-
| `adspecs-
|
|
155
|
-
| `adspecs-
|
|
202
|
+
| Skill | 说明 | 输入 | 输出 |
|
|
203
|
+
| ------------------------- | --------------------------------------------------- | ------------------ | ------------------------------------- |
|
|
204
|
+
| `adspecs-write-sow` | 根据项目 / 合同信息生成工作说明书 | 项目 / 合同信息 | `docs/05-sow/` |
|
|
205
|
+
| `adspecs-plan` | 后端统一系统设计(OOA+OOD)+ 建表 SQL | PRD | `docs/30-system-design/` design + SQL |
|
|
206
|
+
| `adspecs-front-spec` | 前端功能设计(UI/交互规格) | PRD + 系统设计 | `docs/30-system-design/` 前端设计 |
|
|
207
|
+
| `adspecs-front-prototype` | 基于 PRD 生成可在 front-demo 中运行的完整页面原型 | PRD / 前端设计文档 | front-demo 可运行页面 |
|
|
208
|
+
| `adspecs-prd-to-demo` | 基于 PRD 输出可点击 Demo 设计方案(7 段式规划文档) | PRD / 需求分析 | Demo 设计规划文档 |
|
|
209
|
+
| `adspecs-tasks` | 后端 TDD 任务清单 | 系统设计文档 | `docs/30-system-design/` tasks.md |
|
|
210
|
+
| `adspecs-front-tasks` | 前端 TDD 任务清单 | 前端设计文档 | `docs/30-system-design/` tasks.md |
|
|
156
211
|
|
|
157
|
-
### 四、质量保障与测试(
|
|
212
|
+
### 四、质量保障与测试(4 个)
|
|
158
213
|
|
|
159
214
|
| Skill | 说明 |
|
|
160
215
|
| ---------------------------- | ------------------------------------------------------------------- |
|
|
161
216
|
| `adspecs-analyze` | 跨文档(PRD / 系统设计 / tasks)全链路 13 维一致性分析 |
|
|
162
217
|
| `adspecs-adversarial-review` | 对抗式审查:5 个红队角色挑战文档假设、缺失、矛盾与歧义 |
|
|
218
|
+
| `grill-me` | 深度追问与挑战,针对方案或设计进行尖锐提问 |
|
|
163
219
|
| `adspecs-utest` | 基于系统设计生成 Service / Controller 层 JUnit 5 单元测试代码及报告 |
|
|
164
220
|
|
|
165
|
-
### 五、交付与运维(
|
|
221
|
+
### 五、交付与运维(9 个)
|
|
166
222
|
|
|
167
|
-
| Skill
|
|
168
|
-
|
|
|
169
|
-
| `adspecs-update-status`
|
|
170
|
-
| `adspecs-export-word`
|
|
171
|
-
| `adspecs-git-
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
223
|
+
| Skill | 说明 |
|
|
224
|
+
| ------------------------ | -------------------------------------------------- |
|
|
225
|
+
| `adspecs-update-status` | 更新 feature.json 功能状态 + 输出追踪矩阵 |
|
|
226
|
+
| `adspecs-export-word` | Markdown 导出为 Word(.docx),自动生成封面 + 目录 |
|
|
227
|
+
| `adspecs-git-initialize` | 初始化 Git 仓库并完成首次提交 |
|
|
228
|
+
| `adspecs-git-commit` | 各阶段完成后自动提交变更 |
|
|
229
|
+
| `adspecs-save-session` | 保存当前 AI 会话为结构化 Markdown 日志 |
|
|
230
|
+
| `sie-front-code-review` | 前端专项评审(React + TypeScript + Ant Design) |
|
|
231
|
+
| `playwright-cli` | 浏览器自动化交互、网页测试与 Playwright 测试 |
|
|
232
|
+
| `playwright-trace` | 检查 Playwright trace 文件(操作、请求、截图等) |
|
|
233
|
+
| `wiki-update` | 将 docs/ 同步到 wiki/(全量 / 增量模式) |
|
|
174
234
|
|
|
175
235
|
### 六、产品规划(2 个)
|
|
176
236
|
|
|
@@ -185,9 +245,8 @@ adspecs init
|
|
|
185
245
|
| -------------------------------- | -------------------------------- |
|
|
186
246
|
| `subagent-driven-development` | 子代理驱动并行开发 |
|
|
187
247
|
| `test-driven-development` | RED → GREEN → REFACTOR TDD 循环 |
|
|
188
|
-
| `dispatching-parallel-agents` | 并行子代理调度 |
|
|
189
|
-
| `finishing-a-development-branch` | 分支收尾(PR / merge / cleanup) |
|
|
190
248
|
| `verification-before-completion` | 完成前最终验证 |
|
|
249
|
+
| `finishing-a-development-branch` | 分支收尾(PR / merge / cleanup) |
|
|
191
250
|
|
|
192
251
|
---
|
|
193
252
|
|
|
@@ -223,23 +282,19 @@ adspecs init
|
|
|
223
282
|
|
|
224
283
|
---
|
|
225
284
|
|
|
226
|
-
## 参考工程(
|
|
285
|
+
## 参考工程(9 套)
|
|
227
286
|
|
|
228
287
|
`references/` 目录包含 `adspecs init` 时按需复制到目标项目的参考代码和规范:
|
|
229
288
|
|
|
230
|
-
| 目录
|
|
231
|
-
|
|
|
232
|
-
| `
|
|
233
|
-
| `front-demo/`
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
238
|
-
| `
|
|
239
|
-
| `iidp-front-standard/` | IIDP 前端编码规范 |
|
|
240
|
-
| `web-ui/` | ECP 管理控制台外壳工程 |
|
|
241
|
-
| `python/` | Python 后端参考 |
|
|
242
|
-
| `yudaocloud-end-standard/` | 芋道 Cloud 后端集成参考 |
|
|
289
|
+
| 目录 | 说明 |
|
|
290
|
+
| -------------------------- | ---------------------------------------------- |
|
|
291
|
+
| `front-demo/` | Vue 3 前端演示项目(Vite + TS + Element Plus) |
|
|
292
|
+
| `antd-front-demo/` | Ant Design React 前端演示项目 |
|
|
293
|
+
| `ant6-front-standard/` | Ant Design 6 前端编码规范(12 篇) |
|
|
294
|
+
| `vue3-front-stantard/` | Vue 3 前端编码规范 |
|
|
295
|
+
| `python-end-standard/` | Python 后端参考 |
|
|
296
|
+
| `yudaocloud-end-standard/` | 芋道 Cloud 后端集成参考 |
|
|
297
|
+
| `tools/` | 辅助工具集 |
|
|
243
298
|
|
|
244
299
|
---
|
|
245
300
|
|
|
@@ -332,10 +387,14 @@ Skill 支持通过 `.adspecs/paths.json` 自定义输出目录:
|
|
|
332
387
|
"paths": {
|
|
333
388
|
"biz_analysis_dir": "docs/00-customer-requirements",
|
|
334
389
|
"architecture_dir": "docs/10-architecture",
|
|
390
|
+
"research_output_dir": "docs/02-prd",
|
|
391
|
+
"sow_dir": "docs/05-sow",
|
|
335
392
|
"prd_dir": "docs/20-prd",
|
|
336
393
|
"design_dir": "docs/30-system-design",
|
|
337
394
|
"test_report_dir": "docs/80-development",
|
|
338
395
|
"export_dir": "docs/90-export",
|
|
396
|
+
"front_demo_dir": "front-demo",
|
|
397
|
+
"front_prototype_dir": "web-ui",
|
|
339
398
|
"wiki_dir": "wiki"
|
|
340
399
|
}
|
|
341
400
|
}
|
|
@@ -345,67 +404,37 @@ Skill 支持通过 `.adspecs/paths.json` 自定义输出目录:
|
|
|
345
404
|
|
|
346
405
|
---
|
|
347
406
|
|
|
348
|
-
## 安装与升级
|
|
349
|
-
|
|
350
|
-
详细安装说明见 [INSTALL.md](./INSTALL.md)。
|
|
351
|
-
|
|
352
|
-
### Claude Code
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
npm install -g adspecs
|
|
356
|
-
adspecs plugin install # 用户级(默认)
|
|
357
|
-
adspecs plugin install --scope project # 项目级
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
### Qoder
|
|
361
|
-
|
|
362
|
-
```bash
|
|
363
|
-
npm install -g adspecs
|
|
364
|
-
adspecs plugin install --platform qoder # 用户级
|
|
365
|
-
adspecs plugin install --platform qoder --scope project # 项目级
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
### 通用命令
|
|
369
|
-
|
|
370
|
-
```bash
|
|
371
|
-
# 升级
|
|
372
|
-
npm install -g adspecs@latest
|
|
373
|
-
|
|
374
|
-
# 卸载
|
|
375
|
-
adspecs plugin uninstall --scope user
|
|
376
|
-
adspecs plugin uninstall --scope project
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
---
|
|
380
407
|
|
|
381
408
|
## 常见问题
|
|
382
409
|
|
|
383
410
|
**Q1:adspecs 与 superpowers 的关系?**
|
|
384
411
|
adspecs 提供领域专属 Skill(需求、设计、模板、规范),superpowers 提供通用 AI 工程 Skill(TDD、子代理、调试)。
|
|
385
412
|
- **Claude Code**:两者分工协作,编码阶段必须同时安装
|
|
386
|
-
- **Qoder**:adspecs 可独立运行,无需 superpowers
|
|
413
|
+
- **Qoder / WorkBuddy**:adspecs 可独立运行,无需 superpowers
|
|
387
414
|
|
|
388
415
|
**Q2:用户级和项目级安装可以共存吗?**
|
|
389
416
|
可以,项目级优先于用户级(就近原则)。个人开发选用户级,团队协作选项目级。
|
|
390
417
|
|
|
391
|
-
**Q3:Claude Code 和
|
|
392
|
-
可以。adspecs 通过 `.claude-plugin
|
|
418
|
+
**Q3:Claude Code、Qoder 和 WorkBuddy 可以同时使用吗?**
|
|
419
|
+
可以。adspecs 通过 `.claude-plugin/`、`.qoder-plugin/`、`.codebuddy-plugin/` 分别提供三个平台的插件配置,互不干扰。使用 `--platform` 参数指定目标平台即可。
|
|
393
420
|
|
|
394
421
|
**Q4:安装后 Skill 未生效?**
|
|
395
|
-
1.
|
|
396
|
-
2.
|
|
397
|
-
3.
|
|
422
|
+
1. 检查 adspecs 是否在已加载插件列表中
|
|
423
|
+
2. 重启对应平台(Claude Code / Qoder / WorkBuddy)
|
|
424
|
+
3. WorkBuddy 用户:确认 `~/.workbuddy/plugins/marketplaces/local/.codebuddy-plugin/marketplace.json` 存在
|
|
425
|
+
4. 重新执行 `adspecs plugin install --platform <平台名>` 刷新注册
|
|
398
426
|
|
|
399
|
-
**
|
|
427
|
+
**Q5:如何升级?**
|
|
400
428
|
```bash
|
|
401
429
|
npm install -g adspecs@latest
|
|
402
|
-
|
|
430
|
+
adspecs plugin install --platform <平台名> # 刷新插件注册(WorkBuddy 建议执行)
|
|
431
|
+
# Skill 定义随 npm 包更新,Claude Code / Qoder 通常无需重新注册
|
|
403
432
|
```
|
|
404
433
|
|
|
405
|
-
**
|
|
434
|
+
**Q6:前端测试框架?**
|
|
406
435
|
Vue 项目使用 Vitest + @vue/test-utils;React 项目使用 Jest + React Testing Library。
|
|
407
436
|
|
|
408
|
-
**
|
|
437
|
+
**Q7:init 模式区别?**
|
|
409
438
|
- `simple`:仅 docs + wiki
|
|
410
439
|
- `classic`:+ front-demo(默认)
|
|
411
440
|
- `full`:所有目录 + 参考工程
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adspecs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "AI first 工程规范驱动开发插件 — 支持 npm 安装和 CLI 初始化",
|
|
5
5
|
"bin": {
|
|
6
6
|
"adspecs": "bin/adspecs.js"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"src/",
|
|
12
12
|
".claude-plugin/",
|
|
13
13
|
".qoder-plugin/",
|
|
14
|
+
".codebuddy-plugin/",
|
|
14
15
|
".workbuddy-plugin/",
|
|
15
16
|
".adspecs/",
|
|
16
17
|
"skills/",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"test": "node --test src/**/*.test.js",
|
|
32
33
|
"postinstall": "node scripts/postinstall.js",
|
|
33
34
|
"prepublishOnly": "node scripts/prepublish-check.js",
|
|
34
|
-
"version": "node scripts/sync-version.js && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .qoder-plugin/plugin.json .workbuddy-plugin/plugin.json",
|
|
35
|
+
"version": "node scripts/sync-version.js && git add .claude-plugin/plugin.json .claude-plugin/marketplace.json .qoder-plugin/plugin.json .codebuddy-plugin/plugin.json .workbuddy-plugin/plugin.json",
|
|
35
36
|
"sync-version": "node scripts/sync-version.js"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
package/scripts/sync-version.js
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* 版本同步脚本
|
|
6
6
|
*
|
|
7
7
|
* 在 `npm version <type>` 时自动执行(通过 preversion 钩子)。
|
|
8
|
-
* 将 package.json
|
|
8
|
+
* 将 package.json 的新版本同步到五套插件清单文件:
|
|
9
9
|
* - .claude-plugin/plugin.json
|
|
10
10
|
* - .claude-plugin/marketplace.json
|
|
11
11
|
* - .qoder-plugin/plugin.json
|
|
12
|
+
* - .codebuddy-plugin/plugin.json
|
|
12
13
|
* - .workbuddy-plugin/plugin.json
|
|
13
14
|
*
|
|
14
15
|
* 也可手动运行:`npm run sync-version`
|
|
@@ -87,6 +88,15 @@ function main() {
|
|
|
87
88
|
updated.push(`.workbuddy-plugin/plugin.json (${old} → ${newVersion})`);
|
|
88
89
|
}
|
|
89
90
|
|
|
91
|
+
// 5. .codebuddy-plugin/plugin.json — 始终与 package.json 保持版本一致
|
|
92
|
+
const cbPlugin = readJson('.codebuddy-plugin/plugin.json');
|
|
93
|
+
if (cbPlugin && cbPlugin.version !== newVersion) {
|
|
94
|
+
const old = cbPlugin.version;
|
|
95
|
+
cbPlugin.version = newVersion;
|
|
96
|
+
writeJson('.codebuddy-plugin/plugin.json', cbPlugin);
|
|
97
|
+
updated.push(`.codebuddy-plugin/plugin.json (${old} → ${newVersion})`);
|
|
98
|
+
}
|
|
99
|
+
|
|
90
100
|
if (updated.length === 0) {
|
|
91
101
|
console.log('✅ 所有清单版本已一致,无需更新');
|
|
92
102
|
} else {
|
package/src/commands/plugin.js
CHANGED
|
@@ -34,7 +34,7 @@ function getPluginName(platform) {
|
|
|
34
34
|
if (platform === 'qoder') {
|
|
35
35
|
manifestDir = '.qoder-plugin';
|
|
36
36
|
} else if (platform === 'workbuddy') {
|
|
37
|
-
manifestDir = '.
|
|
37
|
+
manifestDir = '.codebuddy-plugin';
|
|
38
38
|
} else {
|
|
39
39
|
manifestDir = '.claude-plugin';
|
|
40
40
|
}
|
|
@@ -121,7 +121,7 @@ function checkCodebuddyCli() {
|
|
|
121
121
|
* 若 CLI 不可用则回退为手工配置 enabledPlugins
|
|
122
122
|
*/
|
|
123
123
|
async function installForWorkBuddy(pluginName, scope) {
|
|
124
|
-
const workbuddyManifest = path.join(PLUGIN_DIR, '.
|
|
124
|
+
const workbuddyManifest = path.join(PLUGIN_DIR, '.codebuddy-plugin', 'plugin.json');
|
|
125
125
|
if (!fs.existsSync(workbuddyManifest)) {
|
|
126
126
|
throw new Error(`未找到 WorkBuddy 插件清单: ${workbuddyManifest}`);
|
|
127
127
|
}
|
|
@@ -523,7 +523,19 @@ async function uninstallWorkBuddy(pluginName, scope) {
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
// 2.
|
|
526
|
+
// 2. 移除 marketplace 目录级清单 (.codebuddy-plugin/marketplace.json)
|
|
527
|
+
const catalogDir = path.join(localMarketplaceDir, '.codebuddy-plugin');
|
|
528
|
+
if (fs.existsSync(catalogDir)) {
|
|
529
|
+
try {
|
|
530
|
+
fs.rmSync(catalogDir, { recursive: true, force: true });
|
|
531
|
+
console.log(chalk.green(' ✅ 已移除 marketplace 清单'));
|
|
532
|
+
cleaned = true;
|
|
533
|
+
} catch (err) {
|
|
534
|
+
console.log(chalk.yellow(` ⚠ 移除 marketplace 清单失败: ${err.message}`));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// 3. 从 settings.json 移除
|
|
527
539
|
if (fs.existsSync(settingsPath)) {
|
|
528
540
|
let settings = {};
|
|
529
541
|
try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8')); } catch (_e) { /* use default */ }
|
|
@@ -545,7 +557,7 @@ async function uninstallWorkBuddy(pluginName, scope) {
|
|
|
545
557
|
}
|
|
546
558
|
}
|
|
547
559
|
|
|
548
|
-
//
|
|
560
|
+
// 4. 从 known_marketplaces.json 移除 local marketplace
|
|
549
561
|
if (fs.existsSync(knownMarketplacesPath)) {
|
|
550
562
|
let knownMarketplaces = {};
|
|
551
563
|
try { knownMarketplaces = JSON.parse(fs.readFileSync(knownMarketplacesPath, 'utf8')); } catch (_e) { /* use default */ }
|
package/src/utils.js
CHANGED
|
@@ -98,8 +98,9 @@ function copyDirRecursive(src, dest, excludeDirs) {
|
|
|
98
98
|
* 手工方式完成完整注册,无需 codebuddy CLI:
|
|
99
99
|
* 1. 创建 ~/.workbuddy/plugins/marketplaces/local/ 目录
|
|
100
100
|
* 2. 创建 junction 链接(或回退复制)指向插件目录
|
|
101
|
-
* 3.
|
|
102
|
-
* 4. 在
|
|
101
|
+
* 3. 生成 marketplace 目录级清单 (.codebuddy-plugin/marketplace.json)
|
|
102
|
+
* 4. 在 known_marketplaces.json 中注册 local marketplace
|
|
103
|
+
* 5. 在 settings.json 的 enabledPlugins 中启用插件
|
|
103
104
|
*
|
|
104
105
|
* @param {string} pluginDir - adspecs 插件根目录
|
|
105
106
|
* @param {string} [pluginName='adspecs'] - 插件名称
|
|
@@ -135,7 +136,7 @@ function registerWorkBuddyPlugin(pluginDir, pluginName) {
|
|
|
135
136
|
} catch (_symlinkErr) {
|
|
136
137
|
// junction 创建失败 → 回退为复制关键目录
|
|
137
138
|
fs.mkdirSync(pluginLinkPath, { recursive: true });
|
|
138
|
-
const entriesToCopy = ['.workbuddy-plugin', 'skills', 'hooks', 'references', 'commands'];
|
|
139
|
+
const entriesToCopy = ['.codebuddy-plugin', '.workbuddy-plugin', 'skills', 'hooks', 'references', 'commands'];
|
|
139
140
|
for (const entry of entriesToCopy) {
|
|
140
141
|
const srcPath = path.join(pluginDir, entry);
|
|
141
142
|
if (!fs.existsSync(srcPath)) continue;
|
|
@@ -155,7 +156,23 @@ function registerWorkBuddyPlugin(pluginDir, pluginName) {
|
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
|
|
158
|
-
// 3.
|
|
159
|
+
// 3. 生成 marketplace 目录级清单(.codebuddy-plugin/marketplace.json)
|
|
160
|
+
// WorkBuddy 扫描器需要此文件才能发现 marketplace 中的插件
|
|
161
|
+
const catalogDir = path.join(localMarketplaceDir, '.codebuddy-plugin');
|
|
162
|
+
fs.mkdirSync(catalogDir, { recursive: true });
|
|
163
|
+
const pkg = getPkg();
|
|
164
|
+
safeWriteJson(path.join(catalogDir, 'marketplace.json'), {
|
|
165
|
+
name: 'local',
|
|
166
|
+
description: 'Local plugins',
|
|
167
|
+
plugins: [{
|
|
168
|
+
name: pluginName,
|
|
169
|
+
source: './' + pluginName,
|
|
170
|
+
version: pkg.version,
|
|
171
|
+
description: pkg.description
|
|
172
|
+
}]
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
// 4. 注册 local marketplace
|
|
159
176
|
let knownMarketplaces = safeReadJson(knownMarketplacesPath, {});
|
|
160
177
|
const now = new Date().toISOString();
|
|
161
178
|
|
|
@@ -172,7 +189,7 @@ function registerWorkBuddyPlugin(pluginDir, pluginName) {
|
|
|
172
189
|
};
|
|
173
190
|
safeWriteJson(knownMarketplacesPath, knownMarketplaces);
|
|
174
191
|
|
|
175
|
-
//
|
|
192
|
+
// 5. 启用插件
|
|
176
193
|
let settings = safeReadJson(settingsPath, {});
|
|
177
194
|
if (!settings.enabledPlugins) settings.enabledPlugins = {};
|
|
178
195
|
settings.enabledPlugins[`${pluginName}@local`] = true;
|