adspecs 0.1.19 → 0.1.21

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.
Files changed (74) hide show
  1. package/.adspecs/feature.json +16 -16
  2. package/.adspecs/feature.yml +28 -28
  3. package/.adspecs/paths.json +17 -17
  4. package/.adspecs/templates/04-/345/211/215/347/253/257/345/212/237/350/203/275/350/256/276/350/256/241/346/250/241/346/235/277.md +1 -1
  5. package/.adspecs/templates/05-/345/220/216/347/253/257/344/273/273/345/212/241/346/270/205/345/215/225/346/250/241/346/235/277.md +613 -724
  6. package/.adspecs/templates/05b-/345/211/215/347/253/257/344/273/273/345/212/241/346/270/205/345/215/225/346/250/241/346/235/277.md +51 -51
  7. package/.claude-plugin/marketplace.json +23 -23
  8. package/.claude-plugin/plugin.json +18 -18
  9. package/.qoder-plugin/plugin.json +31 -31
  10. package/CLAUDE.md +1 -5
  11. package/INSTALL.md +3 -3
  12. package/README.md +395 -395
  13. package/bin/adspecs.js +129 -129
  14. package/hooks/commit-queue.js +245 -245
  15. package/hooks/hooks.json +63 -63
  16. package/hooks/session-start.js +44 -44
  17. package/hooks/wiki-queue.js +127 -127
  18. package/package.json +61 -61
  19. package/references/ant6-front-standard/index.md +99 -99
  20. package/references/antd-front-demo/public/mockServiceWorker.js +361 -361
  21. package/references/ecp-end-standard/index.md +63 -63
  22. package/references/python-end-standard/01-Python/345/220/216/347/253/257/347/274/226/347/240/201/350/247/204/350/214/203.md +372 -372
  23. package/references/python-end-standard/02-/346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/344/270/216/344/275/277/347/224/250/350/247/204/350/214/203.md +226 -226
  24. package/references/python-end-standard/03-Celery/345/274/202/346/255/245/344/273/273/345/212/241/350/247/204/350/214/203.md +237 -237
  25. package/references/python-end-standard/04-Redis/344/275/277/347/224/250/350/247/204/350/214/203.md +231 -231
  26. package/scripts/postinstall.js +107 -107
  27. package/scripts/sync-version.js +105 -105
  28. package/skills/.claude/.wiki-update-queue +26 -26
  29. package/skills/adspecs-constitution/SKILL.md +157 -0
  30. package/skills/adspecs-export-word/SKILL.md +498 -498
  31. package/skills/adspecs-export-word/references/md-to-docx.js +862 -862
  32. package/skills/adspecs-export-word/references/package-lock.json +220 -220
  33. package/skills/adspecs-export-word/references/package.json +10 -10
  34. package/skills/adspecs-front-prototype/SKILL.md +405 -405
  35. package/skills/adspecs-front-spec/SKILL.md +4 -4
  36. package/skills/adspecs-front-tasks/SKILL.md +213 -173
  37. package/skills/adspecs-plan/SKILL.md +59 -69
  38. package/skills/adspecs-prd/SKILL.md +13 -5
  39. package/skills/adspecs-prd-to-demo/SKILL.md +532 -0
  40. package/skills/adspecs-tasks/SKILL.md +175 -204
  41. package/skills/adspecs-update-status/SKILL.md +382 -382
  42. package/skills/adspecs-utest/SKILL.md +107 -116
  43. package/skills/grill-me/SKILL.md +7 -0
  44. package/skills/grill-me/agents/openai.yaml +5 -0
  45. package/skills/playwright-cli/SKILL.md +420 -0
  46. package/skills/playwright-cli/references/element-attributes.md +23 -0
  47. package/skills/playwright-cli/references/playwright-tests.md +39 -0
  48. package/skills/playwright-cli/references/request-mocking.md +87 -0
  49. package/skills/playwright-cli/references/running-code.md +241 -0
  50. package/skills/playwright-cli/references/session-management.md +225 -0
  51. package/skills/playwright-cli/references/storage-state.md +275 -0
  52. package/skills/playwright-cli/references/test-generation.md +433 -0
  53. package/skills/playwright-cli/references/tracing.md +139 -0
  54. package/skills/playwright-cli/references/video-recording.md +143 -0
  55. package/skills/playwright-trace/SKILL.md +171 -0
  56. package/skills/project-init/SKILL.md +93 -22
  57. package/skills/project-init/references/front-demo/.claude/settings.local.json +9 -0
  58. package/skills/wiki-update/SKILL.md +232 -232
  59. package/src/commands/doctor.js +197 -197
  60. package/src/commands/init.js +83 -83
  61. package/src/commands/plugin.js +165 -165
  62. package/src/commands/update.js +87 -87
  63. package/src/lib/area-scanner.js +129 -129
  64. package/src/lib/copier.js +104 -104
  65. package/src/lib/dir-utils.js +161 -133
  66. package/src/lib/json-merge.js +114 -114
  67. package/src/lib/paths-defaults.js +37 -37
  68. package/src/lib/prompts.js +428 -347
  69. package/src/lib/readme-gen.js +143 -143
  70. package/src/lib/report.js +338 -327
  71. package/src/lib/scaffolder.js +551 -518
  72. package/src/lib/short-name.js +36 -36
  73. package/src/utils.js +80 -80
  74. package/references/antd-front-demo/.env +0 -15
@@ -1,143 +1,143 @@
1
- 'use strict';
2
-
3
- /**
4
- * README.md 模板生成
5
- *
6
- * 与 project-init SKILL.md 中定义的 README.md 模板格式保持一致。
7
- */
8
-
9
- const TODAY = new Date().toISOString().slice(0, 10);
10
-
11
- /**
12
- * 生成标准 README.md 内容
13
- *
14
- * @param {object} opts
15
- * @param {string} opts.title - 目录名称(作为 H1)
16
- * @param {string} opts.purpose - 用途说明
17
- * @param {Array<{name: string, desc: string}>} [opts.subdirs] - 子目录说明列表
18
- * @param {string} [opts.namingConvention] - 文件命名规范
19
- * @param {string} [opts.date] - 修订日期(默认今天)
20
- * @returns {string}
21
- */
22
- function generateReadme({ title, purpose, subdirs = [], namingConvention = '', date = TODAY }) {
23
- const lines = [`# ${title}`, '', purpose, ''];
24
-
25
- if (subdirs.length > 0) {
26
- lines.push('## 目录说明', '', '| 子目录 | 说明 |', '| --- | --- |');
27
- for (const sub of subdirs) {
28
- lines.push(`| ${sub.name} | ${sub.desc} |`);
29
- }
30
- lines.push('');
31
- }
32
-
33
- if (namingConvention) {
34
- lines.push('## 文件命名规范', '', namingConvention, '');
35
- }
36
-
37
- lines.push(
38
- '## 修订记录',
39
- '',
40
- '| 日期 | 版本 | 修改内容 | 修改人 |',
41
- '| --- | --- | --- | --- |',
42
- `| ${date} | 1.0 | 初始创建 | system |`,
43
- ''
44
- );
45
-
46
- return lines.join('\n');
47
- }
48
-
49
- /**
50
- * 各 docs 子目录的 README 元数据
51
- */
52
- const DOCS_READMES = {
53
- '00-planning': {
54
- title: '00-planning',
55
- purpose: '规划阶段文档,存放平台级规划产物(业务场景、子模块依赖关系、统一数据模型等)。',
56
- namingConvention: '`{seq}-{name}.md`(如 `01-smom-wms_business_architecture.md`)',
57
- },
58
- '00-customer-requirements': {
59
- title: '00-customer-requirements',
60
- purpose: '客户需求文档,存放客户原始需求、会议纪要、需求沟通记录。',
61
- subdirs: [{ name: 'crm/', desc: 'CRM 模块客户需求' }],
62
- },
63
- '10-architecture': {
64
- title: '10-architecture',
65
- purpose: '架构文档,系统架构设计、模块依赖关系、统一数据模型。',
66
- namingConvention: '`{seq}-{name}.md`(如 `01-smom-wms_business_architecture.md`)',
67
- },
68
- '20-prd': {
69
- title: '20-prd',
70
- purpose: 'PRD 文档,产品需求说明书。',
71
- subdirs: [{ name: 'crm/', desc: 'CRM 模块 PRD' }],
72
- namingConvention: '`{module-code}-{module-name}/` 下存放',
73
- },
74
- '30-system-design': {
75
- title: '30-system-design',
76
- purpose: '系统设计,后端系统设计、SQL Schema、前端设计、TDD 任务清单。',
77
- subdirs: [{ name: 'crm/', desc: 'CRM 模块系统设计' }],
78
- namingConvention:
79
- '`{module-code}-{module-name}_system-design.md`、`{module-code}-{module-name}_schema.sql`',
80
- },
81
- '40-project_conventions': {
82
- title: '40-project_conventions',
83
- purpose: '项目约定,前后端集成开发规范和接口约定。',
84
- subdirs: [
85
- { name: 'frontend-standard/', desc: '前端约定(按技术栈来源不同)' },
86
- { name: 'end-standard/', desc: '后端约定(仅轻量模式复制 Python 后端规范)' },
87
- ],
88
- },
89
- '70-scripts': {
90
- title: '70-scripts',
91
- purpose: '脚本,部署脚本和工具脚本。',
92
- subdirs: [{ name: 'depoly/', desc: '部署相关脚本' }],
93
- },
94
- '80-development': {
95
- title: '80-development',
96
- purpose: '开发产物,开发工件和测试工件归档。',
97
- subdirs: [
98
- { name: '800-log/', desc: '开发日志,AI 会话记录和开发历史追踪' },
99
- { name: '801-dev/', desc: '开发工件' },
100
- { name: '802-test/', desc: '测试工件' },
101
- ],
102
- namingConvention: '`{YYYYMMDD}_{主题}.md` 或 `{YYYYMMDD_HHmmss}_{主题}.md`',
103
- },
104
- '100-help': {
105
- title: '100-help',
106
- purpose: '帮助文档,使用手册和参考指南。',
107
- },
108
- '300-specs': {
109
- title: '300-specs',
110
- purpose: '功能规格说明书。',
111
- namingConvention: '`p{module}-{seq}_{name}_spec.md`,配套 `p{module}-{seq}_{name}_sim-data.md`',
112
- },
113
- };
114
-
115
- /**
116
- * 生成 wiki/README.md
117
- */
118
- function generateWikiReadme(date = TODAY) {
119
- return generateReadme({
120
- title: 'wiki',
121
- purpose:
122
- '基线文件目录,用于存放项目级别的基线规格文件,包括功能规格、接口规格、数据规格等。',
123
- subdirs: [{ name: '(按需创建)', desc: '按模块或主题组织基线文件' }],
124
- namingConvention: '`{module}-{name}_spec.md`',
125
- date,
126
- });
127
- }
128
-
129
- /**
130
- * 生成 service/README.md
131
- */
132
- function generateServiceReadme() {
133
- return (
134
- '这是后端服务模块放置目录,在完成技术架构设计后,所有后端服务模块的源代码将放置在此目录下。\n'
135
- );
136
- }
137
-
138
- module.exports = {
139
- generateReadme,
140
- generateWikiReadme,
141
- generateServiceReadme,
142
- DOCS_READMES,
143
- };
1
+ 'use strict';
2
+
3
+ /**
4
+ * README.md 模板生成
5
+ *
6
+ * 与 project-init SKILL.md 中定义的 README.md 模板格式保持一致。
7
+ */
8
+
9
+ const TODAY = new Date().toISOString().slice(0, 10);
10
+
11
+ /**
12
+ * 生成标准 README.md 内容
13
+ *
14
+ * @param {object} opts
15
+ * @param {string} opts.title - 目录名称(作为 H1)
16
+ * @param {string} opts.purpose - 用途说明
17
+ * @param {Array<{name: string, desc: string}>} [opts.subdirs] - 子目录说明列表
18
+ * @param {string} [opts.namingConvention] - 文件命名规范
19
+ * @param {string} [opts.date] - 修订日期(默认今天)
20
+ * @returns {string}
21
+ */
22
+ function generateReadme({ title, purpose, subdirs = [], namingConvention = '', date = TODAY }) {
23
+ const lines = [`# ${title}`, '', purpose, ''];
24
+
25
+ if (subdirs.length > 0) {
26
+ lines.push('## 目录说明', '', '| 子目录 | 说明 |', '| --- | --- |');
27
+ for (const sub of subdirs) {
28
+ lines.push(`| ${sub.name} | ${sub.desc} |`);
29
+ }
30
+ lines.push('');
31
+ }
32
+
33
+ if (namingConvention) {
34
+ lines.push('## 文件命名规范', '', namingConvention, '');
35
+ }
36
+
37
+ lines.push(
38
+ '## 修订记录',
39
+ '',
40
+ '| 日期 | 版本 | 修改内容 | 修改人 |',
41
+ '| --- | --- | --- | --- |',
42
+ `| ${date} | 1.0 | 初始创建 | system |`,
43
+ ''
44
+ );
45
+
46
+ return lines.join('\n');
47
+ }
48
+
49
+ /**
50
+ * 各 docs 子目录的 README 元数据
51
+ */
52
+ const DOCS_READMES = {
53
+ '00-planning': {
54
+ title: '00-planning',
55
+ purpose: '规划阶段文档,存放平台级规划产物(业务场景、子模块依赖关系、统一数据模型等)。',
56
+ namingConvention: '`{seq}-{name}.md`(如 `01-smom-wms_business_architecture.md`)',
57
+ },
58
+ '00-customer-requirements': {
59
+ title: '00-customer-requirements',
60
+ purpose: '客户需求文档,存放客户原始需求、会议纪要、需求沟通记录。',
61
+ subdirs: [{ name: 'crm/', desc: 'CRM 模块客户需求' }],
62
+ },
63
+ '10-architecture': {
64
+ title: '10-architecture',
65
+ purpose: '架构文档,系统架构设计、模块依赖关系、统一数据模型。',
66
+ namingConvention: '`{seq}-{name}.md`(如 `01-smom-wms_business_architecture.md`)',
67
+ },
68
+ '20-prd': {
69
+ title: '20-prd',
70
+ purpose: 'PRD 文档,产品需求说明书。',
71
+ subdirs: [{ name: 'crm/', desc: 'CRM 模块 PRD' }],
72
+ namingConvention: '`{module-code}-{module-name}/` 下存放',
73
+ },
74
+ '30-system-design': {
75
+ title: '30-system-design',
76
+ purpose: '系统设计,后端系统设计、SQL Schema、前端设计、TDD 任务清单。',
77
+ subdirs: [{ name: 'crm/', desc: 'CRM 模块系统设计' }],
78
+ namingConvention:
79
+ '`{module-code}-{module-name}_system-design.md`、`{module-code}-{module-name}_schema.sql`',
80
+ },
81
+ '40-project_conventions': {
82
+ title: '40-project_conventions',
83
+ purpose: '项目约定,前后端集成开发规范和接口约定。',
84
+ subdirs: [
85
+ { name: 'frontend-standard/', desc: '前端约定(按技术栈来源不同)' },
86
+ { name: 'end-standard/', desc: '后端约定(仅轻量模式复制 Python 后端规范)' },
87
+ ],
88
+ },
89
+ '70-scripts': {
90
+ title: '70-scripts',
91
+ purpose: '脚本,部署脚本和工具脚本。',
92
+ subdirs: [{ name: 'depoly/', desc: '部署相关脚本' }],
93
+ },
94
+ '80-development': {
95
+ title: '80-development',
96
+ purpose: '开发产物,开发工件和测试工件归档。',
97
+ subdirs: [
98
+ { name: '800-log/', desc: '开发日志,AI 会话记录和开发历史追踪' },
99
+ { name: '801-dev/', desc: '开发工件' },
100
+ { name: '802-test/', desc: '测试工件' },
101
+ ],
102
+ namingConvention: '`{YYYYMMDD}_{主题}.md` 或 `{YYYYMMDD_HHmmss}_{主题}.md`',
103
+ },
104
+ '100-help': {
105
+ title: '100-help',
106
+ purpose: '帮助文档,使用手册和参考指南。',
107
+ },
108
+ '300-specs': {
109
+ title: '300-specs',
110
+ purpose: '功能规格说明书。',
111
+ namingConvention: '`p{module}-{seq}_{name}_spec.md`,配套 `p{module}-{seq}_{name}_sim-data.md`',
112
+ },
113
+ };
114
+
115
+ /**
116
+ * 生成 wiki/README.md
117
+ */
118
+ function generateWikiReadme(date = TODAY) {
119
+ return generateReadme({
120
+ title: 'wiki',
121
+ purpose:
122
+ '基线文件目录,用于存放项目级别的基线规格文件,包括功能规格、接口规格、数据规格等。',
123
+ subdirs: [{ name: '(按需创建)', desc: '按模块或主题组织基线文件' }],
124
+ namingConvention: '`{module}-{name}_spec.md`',
125
+ date,
126
+ });
127
+ }
128
+
129
+ /**
130
+ * 生成 service/README.md
131
+ */
132
+ function generateServiceReadme() {
133
+ return (
134
+ '这是后端服务模块放置目录,在完成技术架构设计后,所有后端服务模块的源代码将放置在此目录下。\n'
135
+ );
136
+ }
137
+
138
+ module.exports = {
139
+ generateReadme,
140
+ generateWikiReadme,
141
+ generateServiceReadme,
142
+ DOCS_READMES,
143
+ };