adspecs 0.1.15 → 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/.adspecs/extensions/git/git-config.yml +3 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +31 -21
- package/README.md +395 -595
- package/package.json +2 -2
- package/scripts/sync-version.js +7 -11
- package/src/commands/plugin.js +0 -1
|
@@ -36,6 +36,9 @@ auto_commit:
|
|
|
36
36
|
after_constitution:
|
|
37
37
|
enabled: false
|
|
38
38
|
message: "[adspecs] Add project constitution"
|
|
39
|
+
after_new_requirement:
|
|
40
|
+
enabled: true
|
|
41
|
+
message: "[adspecs] Add business requirement analysis"
|
|
39
42
|
after_prd:
|
|
40
43
|
enabled: false
|
|
41
44
|
message: "[adspecs] Add PRD"
|
|
@@ -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,595 +1,395 @@
|
|
|
1
|
-
# AdSpecs AI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
| `
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
| `adspecs-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
| `
|
|
231
|
-
| `
|
|
232
|
-
| `
|
|
233
|
-
| `
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
/
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
### 第八步:生成任务清单
|
|
398
|
-
|
|
399
|
-
根据系统设计 / 前端设计生成 TDD 就绪的任务清单。
|
|
400
|
-
|
|
401
|
-
**后端任务**:
|
|
402
|
-
|
|
403
|
-
```txt
|
|
404
|
-
/adspecs-tasks docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
**前端任务**:
|
|
408
|
-
|
|
409
|
-
```txt
|
|
410
|
-
/adspecs-front-tasks docs/30-system-design/crm/M06-01_销售预测_前端设计.md
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
输出到同目录:
|
|
414
|
-
- `{模块编号}-{模块名}_tasks.md` — 按用户故事分组的 TDD 任务列表
|
|
415
|
-
|
|
416
|
-
### 第九步:一致性与质量审查
|
|
417
|
-
|
|
418
|
-
对 PRD、系统设计、任务清单做全链路一致性审查:
|
|
419
|
-
|
|
420
|
-
```txt
|
|
421
|
-
/adspecs-analyze docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md docs/30-system-design/crm/M06-01-销售预测_system-design.md docs/30-system-design/crm/M06-01-销售预测_tasks.md
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
加入对抗策略进行深度审查:
|
|
425
|
-
|
|
426
|
-
```txt
|
|
427
|
-
/adspecs-adversarial-review M06-01_*.md
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### 第十步:编码实现
|
|
431
|
-
|
|
432
|
-
**方式 A — 子代理驱动开发(推荐,多任务并行)**
|
|
433
|
-
|
|
434
|
-
后端实现:
|
|
435
|
-
```txt
|
|
436
|
-
/test-driven-development TDD 模式 按 M06-01-销售预测_tasks.md 分配多个 agent 进行实现
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
前端实现(需指定前端项目名):
|
|
440
|
-
```txt
|
|
441
|
-
/test-driven-development TDD 模式 按 M06-01-销售预测_tasks.md 分配多个 agent 进行实现,前端项目为 `crm-platform-ui`
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
每个任务启动独立子代理执行,完成后自动两阶段审查。
|
|
445
|
-
|
|
446
|
-
### 第十一步:单元测试
|
|
447
|
-
|
|
448
|
-
```txt
|
|
449
|
-
/adspecs-utest docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
基于系统设计文档生成 Service 层 / Controller 层 JUnit 5 单元测试代码,并按模板输出单元测试报告到 `docs/80-development/`。
|
|
453
|
-
|
|
454
|
-
### 第十二步:审查与验证
|
|
455
|
-
|
|
456
|
-
**前端专项审查**:
|
|
457
|
-
|
|
458
|
-
```txt
|
|
459
|
-
/sie-front-code-review
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
**完成后验证**:
|
|
463
|
-
|
|
464
|
-
```txt
|
|
465
|
-
/verification-before-completion
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
### 第十三步:文档导出与 Wiki 同步
|
|
469
|
-
|
|
470
|
-
**导出 Word 文档**:
|
|
471
|
-
|
|
472
|
-
```txt
|
|
473
|
-
/adspecs-export-word docs/30-system-design/
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
将 Markdown 文档导出为 Word (.docx),自动生成封面页和目录索引页,输出到 `docs/90-export/`。
|
|
477
|
-
|
|
478
|
-
**同步到 Wiki**:
|
|
479
|
-
|
|
480
|
-
```txt
|
|
481
|
-
/wiki-update
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
将 `docs/20-prd/` 和 `docs/30-system-design/` 下的文档同步到 `wiki/` 目录。
|
|
485
|
-
|
|
486
|
-
### 第十四步:分支收尾
|
|
487
|
-
|
|
488
|
-
```txt
|
|
489
|
-
/finishing-a-development-branch
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
提供结构化选项:合并主分支、创建 PR、或清理分支。
|
|
493
|
-
|
|
494
|
-
---
|
|
495
|
-
|
|
496
|
-
## 完整示例:销售预测单从零到交付
|
|
497
|
-
|
|
498
|
-
```txt
|
|
499
|
-
# 1. 初始化项目
|
|
500
|
-
/project-init
|
|
501
|
-
# 输入: my-crm
|
|
502
|
-
|
|
503
|
-
# 2. 生成工作说明书
|
|
504
|
-
/adspecs-write-sow 华峰铝业CRM项目
|
|
505
|
-
|
|
506
|
-
# 3. 平台架构规划
|
|
507
|
-
/adspecs-architecture-planning 华峰铝业CRM平台,覆盖销售全生命周期
|
|
508
|
-
|
|
509
|
-
# 4. 深度业务需求分析
|
|
510
|
-
/adspecs-new-requirement CRM 销售预测模块
|
|
511
|
-
|
|
512
|
-
# 5. 从调研材料创建需求规格
|
|
513
|
-
/adspecs-prd 预测单需求调研.md
|
|
514
|
-
|
|
515
|
-
# 6. 澄清模糊点
|
|
516
|
-
/adspecs-clarify docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
517
|
-
|
|
518
|
-
# 7. 需求评审(建议 2~3 轮)
|
|
519
|
-
对 docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md 进行一致性检查
|
|
520
|
-
|
|
521
|
-
# 8. 生成后端系统设计 + SQL
|
|
522
|
-
/adspecs-plan docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
523
|
-
|
|
524
|
-
# 9. 生成前端设计
|
|
525
|
-
/adspecs-front-spec docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
526
|
-
|
|
527
|
-
# 10. 生成后端任务清单
|
|
528
|
-
/adspecs-tasks docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
529
|
-
|
|
530
|
-
# 11. 生成前端任务清单
|
|
531
|
-
/adspecs-front-tasks docs/30-system-design/crm/M06-01_销售预测_前端设计.md
|
|
532
|
-
|
|
533
|
-
# 12. 全链路一致性审查
|
|
534
|
-
/adspecs-analyze docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md docs/30-system-design/crm/M06-01-销售预测_system-design.md docs/30-system-design/crm/M06-01-销售预测_tasks.md
|
|
535
|
-
|
|
536
|
-
# 13. 对抗式审查
|
|
537
|
-
/adspecs-adversarial-review M06-01_*.md
|
|
538
|
-
|
|
539
|
-
# 14. 编码实现
|
|
540
|
-
/subagent-driven-development
|
|
541
|
-
|
|
542
|
-
# 15. 单元测试
|
|
543
|
-
/adspecs-utest docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
544
|
-
|
|
545
|
-
# 16. 审查验证
|
|
546
|
-
/sie-front-code-review
|
|
547
|
-
/verification-before-completion
|
|
548
|
-
|
|
549
|
-
# 17. 文档导出与 Wiki 同步
|
|
550
|
-
/adspecs-export-word docs/30-system-design/
|
|
551
|
-
/wiki-update
|
|
552
|
-
|
|
553
|
-
# 18. 收尾
|
|
554
|
-
/finishing-a-development-branch
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
---
|
|
558
|
-
|
|
559
|
-
## 常见问题
|
|
560
|
-
|
|
561
|
-
**Q1:adspecs 与 superpowers 的关系?**
|
|
562
|
-
adspecs 提供 ECP 平台领域专属 Skill(需求、设计、模板、规范),superpowers 提供通用 AI 工程 Skill(TDD、子代理、调试)。两者分工协作,**必须同时安装**。
|
|
563
|
-
|
|
564
|
-
**Q2:用户级和项目级安装可以共存吗?**
|
|
565
|
-
可以。两种安装方式互不冲突,若同时存在,**项目级优先于用户级**(就近原则)。建议个人开发选用户级,团队协作选项目级。
|
|
566
|
-
|
|
567
|
-
**Q3:安装后 Skill 未生效怎么办?**
|
|
568
|
-
1. 执行 `/plugins` 查看 adspecs 是否已在已加载列表中
|
|
569
|
-
2. 重启 Claude Code 重新加载插件
|
|
570
|
-
3. 检查安装 scope 是否正确:用户级插件需确认 `~/.claude/plugins/` 下有 adspecs 目录,项目级需确认 `{project}/.claude/plugins/` 下有 adspecs 目录
|
|
571
|
-
|
|
572
|
-
**Q4:如何升级 adspecs 插件?**
|
|
573
|
-
```txt
|
|
574
|
-
# 用户级升级
|
|
575
|
-
claude plugins upgrade adspecs --scope user
|
|
576
|
-
|
|
577
|
-
# 项目级升级
|
|
578
|
-
claude plugins upgrade adspecs --scope project
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
**Q5:系统设计和前端设计的先后顺序?**
|
|
582
|
-
推荐先 `adspecs-plan`(确定 API 端点和错误码),再 `adspecs-front-spec`(前端依赖后端接口定义),但两者可并行。
|
|
583
|
-
|
|
584
|
-
**Q6:消息码和 i18n 何时处理?**
|
|
585
|
-
`adspecs-tasks` 会自动从系统设计提取消息码并生成 i18n 任务。
|
|
586
|
-
|
|
587
|
-
**Q7:前端设计和系统设计是否合并?**
|
|
588
|
-
不合并。`adspecs-plan` 输出后端设计给开发团队,`adspecs-front-spec` 输出前端交互设计给产品和前端。两者关注点不同,读者不同。
|
|
589
|
-
|
|
590
|
-
**Q8:前端 TDD 测试框架?**
|
|
591
|
-
使用 Vitest + @vue/test-utils。`adspecs-front-tasks` 生成的 `[TDD]` 任务适用 `test-driven-development` Skill。
|
|
592
|
-
|
|
593
|
-
**Q9:项目初始化失败怎么办?**
|
|
594
|
-
确认项目名称仅包含字母、数字、连字符、下划线。若目标目录已存在 `docs/`、`web-ui/` 等目录,`/project-init` 会询问对每个已存在区域的处理方式:**重新创建**(删除后重建)或**跳过**(保留现有内容)。
|
|
595
|
-
|
|
1
|
+
# AdSpecs — AI 工程研发协同插件
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/adspecs)
|
|
4
|
+
[](https://www.npmjs.com/package/adspecs)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 简介
|
|
9
|
+
|
|
10
|
+
AdSpecs 是一个基于 Claude Code 的 AI 工程研发协同插件,提供:
|
|
11
|
+
|
|
12
|
+
- **21 个 Skill**(Slash 命令) — 覆盖需求分析、架构规划、系统设计、任务拆解、单元测试、代码审查、文档导出、Wiki 同步
|
|
13
|
+
- **CLI 工具** — `adspecs init` 一键脚手架、`adspecs plugin install` 插件注册、`adspecs doctor` 环境检查
|
|
14
|
+
- **21 个标准文档模板** — 需求 / 设计 / 任务 / 测试 / 评审 / 架构全覆盖
|
|
15
|
+
- **多技术栈参考** — ECP Java 后端、Vue 3 前端、Ant Design React 前端、Python 后端等 11 套参考工程
|
|
16
|
+
- **npm 分发** — `npm install -g adspecs` 即装即用
|
|
17
|
+
|
|
18
|
+
本插件需配合 [`superpowers`](https://github.com/anthropics/claude-plugins-official) 插件(提供 TDD、子代理驱动开发等通用 Skill)一起使用。
|
|
19
|
+
|
|
20
|
+
---
|
|
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
|
+
|
|
50
|
+
## 快速开始
|
|
51
|
+
|
|
52
|
+
### 1. 安装
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 全局安装 CLI
|
|
56
|
+
npm install -g adspecs
|
|
57
|
+
|
|
58
|
+
# 在 Claude Code 中注册插件(用户级,全局生效)
|
|
59
|
+
adspecs plugin install
|
|
60
|
+
|
|
61
|
+
# 或仅注册到当前项目(团队级)
|
|
62
|
+
cd your-project
|
|
63
|
+
adspecs plugin install --scope project
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. 初始化项目
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# 交互式初始化
|
|
70
|
+
adspecs init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. 开始使用 Skill
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
/adspecs-new-requirement CRM 销售预测模块
|
|
77
|
+
/adspecs-prd docs/00-customer-requirements/...
|
|
78
|
+
/adspecs-plan docs/20-prd/crm/...
|
|
79
|
+
...
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## CLI 工具
|
|
85
|
+
|
|
86
|
+
安装后提供 `adspecs` 命令行工具:
|
|
87
|
+
|
|
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` |
|
|
95
|
+
|
|
96
|
+
### `adspecs init` 参数
|
|
97
|
+
|
|
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` | 自动确认执行 | — |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Skills 总览(21 个)
|
|
114
|
+
|
|
115
|
+
按职责分为六类:
|
|
116
|
+
|
|
117
|
+
### 一、项目初始化(CLI 命令)
|
|
118
|
+
|
|
119
|
+
| 命令 | 说明 |
|
|
120
|
+
| -------------- | ------------------------------------------------------------------------------ |
|
|
121
|
+
| `adspecs init` | 交互式初始化项目结构:`docs/` 文档树、前端模板、后端模块、编码规范、标准模板等 |
|
|
122
|
+
|
|
123
|
+
初始化后生成:
|
|
124
|
+
|
|
125
|
+
- `docs/10-architecture/` — 架构规划
|
|
126
|
+
- `docs/20-prd/` — 产品需求说明书
|
|
127
|
+
- `docs/30-system-design/` — 系统设计 + SQL + 前端设计 + 任务清单
|
|
128
|
+
- `docs/40-project_conventions/` — 编码规范
|
|
129
|
+
- `.adspecs/templates/` — 21 个标准模板
|
|
130
|
+
- `.adspecs/paths.json` — 可自定义的输出路径配置
|
|
131
|
+
|
|
132
|
+
### 二、需求分析与架构规划(5 个)
|
|
133
|
+
|
|
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/` |
|
|
141
|
+
|
|
142
|
+
### 三、SOW / 设计 / 任务(5 个)
|
|
143
|
+
|
|
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 |
|
|
151
|
+
|
|
152
|
+
### 四、质量保障与测试(3 个)
|
|
153
|
+
|
|
154
|
+
| Skill | 说明 |
|
|
155
|
+
| ---------------------------- | ------------------------------------------------------------------- |
|
|
156
|
+
| `adspecs-analyze` | 跨文档(PRD / 系统设计 / tasks)全链路 13 维一致性分析 |
|
|
157
|
+
| `adspecs-adversarial-review` | 对抗式审查:5 个红队角色挑战文档假设、缺失、矛盾与歧义 |
|
|
158
|
+
| `adspecs-utest` | 基于系统设计生成 Service / Controller 层 JUnit 5 单元测试代码及报告 |
|
|
159
|
+
|
|
160
|
+
### 五、交付与运维(5 个)
|
|
161
|
+
|
|
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/(全量 / 增量模式) |
|
|
169
|
+
|
|
170
|
+
### 六、产品规划(2 个)
|
|
171
|
+
|
|
172
|
+
| Skill | 说明 |
|
|
173
|
+
| ------------------------------- | ------------------------------------ |
|
|
174
|
+
| `adspecs-write-planning-report` | 汇总调研期分析输出,生成产品规划报告 |
|
|
175
|
+
| `adspecs-write-roadmap` | 版本路标维护,追写 roadmap.md |
|
|
176
|
+
|
|
177
|
+
### 编码阶段依赖(superpowers 插件)
|
|
178
|
+
|
|
179
|
+
| 外部 Skill | 说明 |
|
|
180
|
+
| -------------------------------- | -------------------------------- |
|
|
181
|
+
| `subagent-driven-development` | 子代理驱动并行开发 |
|
|
182
|
+
| `test-driven-development` | RED → GREEN → REFACTOR TDD 循环 |
|
|
183
|
+
| `dispatching-parallel-agents` | 并行子代理调度 |
|
|
184
|
+
| `finishing-a-development-branch` | 分支收尾(PR / merge / cleanup) |
|
|
185
|
+
| `verification-before-completion` | 完成前最终验证 |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 模板体系(21 个)
|
|
190
|
+
|
|
191
|
+
初始化后位于 `.adspecs/templates/`:
|
|
192
|
+
|
|
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 文件体系) | 需求 |
|
|
216
|
+
|
|
217
|
+
> **约定**:所有模板通过对应 Skill 调用生成,不建议直接手工填写。
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 参考工程(11 套)
|
|
222
|
+
|
|
223
|
+
`references/` 目录包含 `adspecs init` 时按需复制到目标项目的参考代码和规范:
|
|
224
|
+
|
|
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 后端集成参考 |
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## 推荐开发流程
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
[adspecs init] → 项目脚手架
|
|
245
|
+
↓
|
|
246
|
+
[adspecs-architecture-planning] → 平台架构规划(功能架构→依赖→数据模型)
|
|
247
|
+
↓
|
|
248
|
+
[adspecs-new-requirement] → 深度业务需求分析
|
|
249
|
+
↓
|
|
250
|
+
[adspecs-biz-blueprint] → 业务方案(F1~F6 文件体系)
|
|
251
|
+
↓
|
|
252
|
+
[adspecs-prd + adspecs-clarify] → 产品需求说明书 + 澄清迭代
|
|
253
|
+
↓
|
|
254
|
+
[adspecs-plan / adspecs-front-spec] → 后端设计+SQL / 前端设计
|
|
255
|
+
↓
|
|
256
|
+
[adspecs-tasks / adspecs-front-tasks] → 后端 / 前端 TDD 任务清单
|
|
257
|
+
↓
|
|
258
|
+
[adspecs-analyze + adversarial-review]→ 一致性与质量审查
|
|
259
|
+
↓
|
|
260
|
+
[TDD + subagent-driven-development] → 编码实现(依赖 superpowers)
|
|
261
|
+
↓
|
|
262
|
+
[adspecs-utest] → 单元测试 + 报告
|
|
263
|
+
↓
|
|
264
|
+
[sie-front-code-review] → 前端代码审查
|
|
265
|
+
↓
|
|
266
|
+
[adspecs-update-status] → 功能状态追踪
|
|
267
|
+
↓
|
|
268
|
+
[adspecs-export-word / wiki-update] → 文档导出 + Wiki 同步
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### 完整示例:销售预测从零到交付
|
|
272
|
+
|
|
273
|
+
```txt
|
|
274
|
+
# 1. 初始化项目
|
|
275
|
+
adspecs init --project-name my-crm --mode classic
|
|
276
|
+
|
|
277
|
+
# 2. 平台架构规划
|
|
278
|
+
/adspecs-architecture-planning 华峰铝业CRM,覆盖销售全生命周期
|
|
279
|
+
|
|
280
|
+
# 3. 深度需求分析
|
|
281
|
+
/adspecs-new-requirement CRM 销售预测模块
|
|
282
|
+
|
|
283
|
+
# 4. 业务方案
|
|
284
|
+
/adspecs-biz-blueprint docs/00-customer-requirements/...
|
|
285
|
+
|
|
286
|
+
# 5. 生成 PRD
|
|
287
|
+
/adspecs-prd 预测单需求调研.md
|
|
288
|
+
|
|
289
|
+
# 6. 澄清 + 评审(2~3 轮)
|
|
290
|
+
/adspecs-clarify docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
291
|
+
|
|
292
|
+
# 7. 后端系统设计 + SQL
|
|
293
|
+
/adspecs-plan docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
294
|
+
|
|
295
|
+
# 8. 前端设计
|
|
296
|
+
/adspecs-front-spec docs/20-prd/crm/sales-forecast/M06-01_销售预测需求规格说明书.md
|
|
297
|
+
|
|
298
|
+
# 9. 生成任务清单
|
|
299
|
+
/adspecs-tasks docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
300
|
+
/adspecs-front-tasks docs/30-system-design/crm/M06-01_销售预测_前端设计.md
|
|
301
|
+
|
|
302
|
+
# 10. 一致性与对抗审查
|
|
303
|
+
/adspecs-analyze docs/20-prd/... docs/30-system-design/...
|
|
304
|
+
/adspecs-adversarial-review M06-01_*.md
|
|
305
|
+
|
|
306
|
+
# 11. 编码实现(TDD)
|
|
307
|
+
/subagent-driven-development
|
|
308
|
+
|
|
309
|
+
# 12. 单元测试 + 审查
|
|
310
|
+
/adspecs-utest docs/30-system-design/crm/M06-01-销售预测_system-design.md
|
|
311
|
+
/sie-front-code-review
|
|
312
|
+
|
|
313
|
+
# 13. 状态追踪 + 导出
|
|
314
|
+
/adspecs-update-status
|
|
315
|
+
/adspecs-export-word docs/30-system-design/
|
|
316
|
+
/wiki-update
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 路径配置
|
|
322
|
+
|
|
323
|
+
Skill 支持通过 `.adspecs/paths.json` 自定义输出目录:
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"paths": {
|
|
328
|
+
"biz_analysis_dir": "docs/00-customer-requirements",
|
|
329
|
+
"architecture_dir": "docs/10-architecture",
|
|
330
|
+
"prd_dir": "docs/20-prd",
|
|
331
|
+
"design_dir": "docs/30-system-design",
|
|
332
|
+
"test_report_dir": "docs/80-development",
|
|
333
|
+
"export_dir": "docs/90-export",
|
|
334
|
+
"wiki_dir": "wiki"
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
`adspecs init` 自动生成此文件,可直接编辑修改。
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 安装与升级
|
|
344
|
+
|
|
345
|
+
详细安装说明见 [INSTALL.md](./INSTALL.md)。
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
# 安装
|
|
349
|
+
npm install -g adspecs
|
|
350
|
+
adspecs plugin install # 用户级(默认)
|
|
351
|
+
adspecs plugin install --scope project # 项目级
|
|
352
|
+
|
|
353
|
+
# 升级
|
|
354
|
+
npm install -g adspecs@latest
|
|
355
|
+
|
|
356
|
+
# 卸载
|
|
357
|
+
adspecs plugin uninstall --scope user
|
|
358
|
+
adspecs plugin uninstall --scope project
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## 常见问题
|
|
364
|
+
|
|
365
|
+
**Q1:adspecs 与 superpowers 的关系?**
|
|
366
|
+
adspecs 提供领域专属 Skill(需求、设计、模板、规范),superpowers 提供通用 AI 工程 Skill(TDD、子代理、调试)。两者分工协作,**编码阶段必须同时安装**。
|
|
367
|
+
|
|
368
|
+
**Q2:用户级和项目级安装可以共存吗?**
|
|
369
|
+
可以,项目级优先于用户级(就近原则)。个人开发选用户级,团队协作选项目级。
|
|
370
|
+
|
|
371
|
+
**Q3:安装后 Skill 未生效?**
|
|
372
|
+
1. 执行 `/plugins` 查看 adspecs 是否在已加载列表
|
|
373
|
+
2. 重启 Claude Code
|
|
374
|
+
3. 检查安装 scope 对应的目录是否存在
|
|
375
|
+
|
|
376
|
+
**Q4:如何升级?**
|
|
377
|
+
```bash
|
|
378
|
+
npm install -g adspecs@latest
|
|
379
|
+
# 插件注册无需重新执行,Skill 定义随 npm 包更新
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Q5:前端测试框架?**
|
|
383
|
+
Vue 项目使用 Vitest + @vue/test-utils;React 项目使用 Jest + React Testing Library。
|
|
384
|
+
|
|
385
|
+
**Q6:init 模式区别?**
|
|
386
|
+
- `simple`:仅 docs + wiki
|
|
387
|
+
- `classic`:+ front-demo(默认)
|
|
388
|
+
- `full`:所有目录 + 参考工程
|
|
389
|
+
- `demo`:Python+SQLite+React+AntD6 全栈 demo
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## License
|
|
394
|
+
|
|
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) {
|
package/src/commands/plugin.js
CHANGED
|
@@ -123,7 +123,6 @@ exports.install = async function install(options) {
|
|
|
123
123
|
console.log(chalk.green.bold(`✅ adspecs 插件已注册到 Claude Code (scope=${scope})`));
|
|
124
124
|
console.log('');
|
|
125
125
|
console.log(' 现在可以在 Claude Code 中使用以下技能:');
|
|
126
|
-
console.log(' /project-init — 初始化项目目录结构');
|
|
127
126
|
console.log(' /adspecs-prd — 生成 PRD');
|
|
128
127
|
console.log(' /adspecs-plan — 后端系统设计');
|
|
129
128
|
console.log(' /adspecs-tasks — TDD 任务清单');
|