adspecs 0.1.28 → 0.1.30
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 +1 -1
- package/.workbuddy-plugin/plugin.json +24 -0
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +14 -8
- package/INSTALL.md +85 -5
- package/README.md +33 -10
- package/bin/adspecs.js +8 -7
- package/hooks/hooks.json +2 -2
- package/hooks/platform.js +22 -11
- package/package.json +4 -2
- package/scripts/postinstall.js +79 -36
- package/scripts/sync-version.js +11 -1
- package/skills/adspecs-adversarial-review/SKILL.md +1 -0
- package/skills/adspecs-analyze/SKILL.md +1 -0
- package/skills/adspecs-architecture-planning/SKILL.md +1 -0
- package/skills/adspecs-biz-blueprint/SKILL.md +555 -554
- package/skills/adspecs-clarify/SKILL.md +1 -0
- package/skills/adspecs-constitution/SKILL.md +1 -0
- package/skills/adspecs-export-word/SKILL.md +499 -498
- package/skills/adspecs-front-prototype/SKILL.md +1 -0
- package/skills/adspecs-front-spec/SKILL.md +1 -0
- package/skills/adspecs-front-tasks/SKILL.md +1 -0
- package/skills/adspecs-git-commit/SKILL.md +1 -0
- package/skills/adspecs-git-initialize/SKILL.md +1 -0
- package/skills/adspecs-new-requirement/SKILL.md +1 -0
- package/skills/adspecs-plan/SKILL.md +1 -0
- package/skills/adspecs-prd/SKILL.md +1 -0
- package/skills/adspecs-prd-to-demo/SKILL.md +1 -0
- package/skills/adspecs-save-session/SKILL.md +179 -178
- package/skills/adspecs-tasks/SKILL.md +1 -0
- package/skills/adspecs-update-status/SKILL.md +1 -0
- package/skills/adspecs-utest/SKILL.md +1 -0
- package/skills/adspecs-write-planning-report/SKILL.md +1 -0
- package/skills/adspecs-write-roadmap/SKILL.md +1 -0
- package/skills/adspecs-write-sow/SKILL.md +1 -0
- package/skills/grill-me/SKILL.md +1 -0
- package/skills/playwright-cli/SKILL.md +1 -0
- package/skills/playwright-trace/SKILL.md +1 -0
- package/skills/project-init/SKILL.md +1 -0
- package/skills/sie-front-code-review/SKILL.md +1 -0
- package/skills/wiki-update/SKILL.md +233 -232
- package/src/commands/plugin.js +376 -61
- package/src/commands/update.js +5 -1
package/scripts/postinstall.js
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
* - `npm install adspecs` (本地) → 作为项目依赖安装
|
|
11
11
|
*
|
|
12
12
|
* 行为:
|
|
13
|
-
* - 检查 AI 平台 CLI 是否可用(Claude Code /
|
|
13
|
+
* - 检查 AI 平台 CLI 是否可用(Claude Code / WorkBuddy)
|
|
14
14
|
* - 检查 adspecs 插件是否已在平台中注册
|
|
15
15
|
* - 若已注册 → 静默重新安装以刷新版本
|
|
16
16
|
* - 若未注册 → 不做任何事(首次安装应由用户主动 `adspecs plugin install`)
|
|
17
|
+
* - Qoder/WorkBuddy IDE 模式无需 CLI 刷新(通过插件清单自动发现)
|
|
17
18
|
*
|
|
18
19
|
* 关键约束:
|
|
19
20
|
* - 绝不能阻断 npm install(所有异常静默吞掉)
|
|
@@ -33,7 +34,7 @@ const timer = setTimeout(() => {
|
|
|
33
34
|
if (timer.unref) timer.unref();
|
|
34
35
|
|
|
35
36
|
try {
|
|
36
|
-
// 1. 检测可用的 AI 平台
|
|
37
|
+
// 1. 检测可用的 AI 平台 CLI
|
|
37
38
|
var hasClaudeCli = false;
|
|
38
39
|
try {
|
|
39
40
|
execSync('claude --version', { stdio: 'ignore', timeout: 1000 });
|
|
@@ -42,9 +43,17 @@ try {
|
|
|
42
43
|
// claude CLI 未安装
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
var hasCodebuddyCli = false;
|
|
47
|
+
try {
|
|
48
|
+
execSync('codebuddy --version', { stdio: 'ignore', timeout: 1000 });
|
|
49
|
+
hasCodebuddyCli = true;
|
|
50
|
+
} catch {
|
|
51
|
+
// codebuddy CLI 未安装
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
// 如果没有任何平台 CLI 可用,静默退出
|
|
46
|
-
// Qoder
|
|
47
|
-
if (!hasClaudeCli) {
|
|
55
|
+
// Qoder / WorkBuddy(IDE 模式)通过插件清单自动发现,无需 CLI 刷新
|
|
56
|
+
if (!hasClaudeCli && !hasCodebuddyCli) {
|
|
48
57
|
process.exit(0);
|
|
49
58
|
}
|
|
50
59
|
|
|
@@ -61,46 +70,80 @@ try {
|
|
|
61
70
|
process.exit(0);
|
|
62
71
|
}
|
|
63
72
|
|
|
64
|
-
//
|
|
65
|
-
|
|
73
|
+
// 读取版本号用于提示
|
|
74
|
+
var pkgVersion = 'unknown';
|
|
66
75
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// claude plugins list 命令失败 → 静默退出
|
|
74
|
-
process.exit(0);
|
|
76
|
+
const pkg = JSON.parse(
|
|
77
|
+
fs.readFileSync(path.join(installDir, 'package.json'), 'utf8')
|
|
78
|
+
);
|
|
79
|
+
pkgVersion = pkg.version;
|
|
80
|
+
} catch {
|
|
81
|
+
// ignore
|
|
75
82
|
}
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
var refreshedPlatforms = [];
|
|
85
|
+
|
|
86
|
+
// 3. Claude Code — 检查是否已注册,若已注册则刷新
|
|
87
|
+
if (hasClaudeCli) {
|
|
88
|
+
try {
|
|
89
|
+
var installedPlugins = execSync('claude plugins list 2>&1', {
|
|
90
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
91
|
+
timeout: 1000,
|
|
92
|
+
encoding: 'utf8',
|
|
93
|
+
});
|
|
94
|
+
if (installedPlugins.toLowerCase().includes('adspecs')) {
|
|
95
|
+
// 已注册 → 重新安装以刷新版本
|
|
96
|
+
var claudeChild = spawn(
|
|
97
|
+
'claude',
|
|
98
|
+
['plugins', 'install', 'adspecs', '--scope', 'user'],
|
|
99
|
+
{
|
|
100
|
+
stdio: 'ignore',
|
|
101
|
+
detached: true,
|
|
102
|
+
windowsHide: true,
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
claudeChild.on('error', () => {});
|
|
106
|
+
claudeChild.unref();
|
|
107
|
+
refreshedPlatforms.push('Claude Code');
|
|
108
|
+
}
|
|
109
|
+
} catch {
|
|
110
|
+
// claude plugins list 失败 → 静默跳过
|
|
111
|
+
}
|
|
80
112
|
}
|
|
81
113
|
|
|
82
|
-
// 4.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
114
|
+
// 4. WorkBuddy — 检查 codebuddy CLI 中是否已注册,若已注册则刷新
|
|
115
|
+
if (hasCodebuddyCli) {
|
|
116
|
+
try {
|
|
117
|
+
var wbPlugins = execSync('codebuddy plugin list 2>&1', {
|
|
118
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
119
|
+
timeout: 1000,
|
|
120
|
+
encoding: 'utf8',
|
|
121
|
+
});
|
|
122
|
+
if (wbPlugins.toLowerCase().includes('adspecs')) {
|
|
123
|
+
// 已注册 → 重新安装以刷新版本
|
|
124
|
+
var wbChild = spawn(
|
|
125
|
+
'codebuddy',
|
|
126
|
+
['plugin', 'install', 'adspecs', '--scope', 'user'],
|
|
127
|
+
{
|
|
128
|
+
stdio: 'ignore',
|
|
129
|
+
detached: true,
|
|
130
|
+
windowsHide: true,
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
wbChild.on('error', () => {});
|
|
134
|
+
wbChild.unref();
|
|
135
|
+
refreshedPlatforms.push('WorkBuddy');
|
|
136
|
+
}
|
|
137
|
+
} catch {
|
|
138
|
+
// codebuddy plugin list 失败 → 静默跳过
|
|
90
139
|
}
|
|
91
|
-
|
|
92
|
-
child.on('error', () => {
|
|
93
|
-
// 静默忽略
|
|
94
|
-
});
|
|
95
|
-
child.unref();
|
|
140
|
+
}
|
|
96
141
|
|
|
97
|
-
//
|
|
98
|
-
if (process.stdout.isTTY) {
|
|
99
|
-
const pkg = JSON.parse(
|
|
100
|
-
fs.readFileSync(path.join(installDir, 'package.json'), 'utf8')
|
|
101
|
-
);
|
|
142
|
+
// 输出一行提示(仅当有平台被刷新)
|
|
143
|
+
if (refreshedPlatforms.length > 0 && process.stdout.isTTY) {
|
|
102
144
|
console.log(
|
|
103
|
-
|
|
145
|
+
'\n🔄 adspecs@' + pkgVersion + ' — ' +
|
|
146
|
+
refreshedPlatforms.join(' / ') + ' 插件注册已自动刷新\n'
|
|
104
147
|
);
|
|
105
148
|
}
|
|
106
149
|
} catch {
|
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
|
+
* - .workbuddy-plugin/plugin.json
|
|
12
13
|
*
|
|
13
14
|
* 也可手动运行:`npm run sync-version`
|
|
14
15
|
*
|
|
@@ -77,6 +78,15 @@ function main() {
|
|
|
77
78
|
updated.push(`.qoder-plugin/plugin.json (${old} → ${newVersion})`);
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
// 4. .workbuddy-plugin/plugin.json — 始终与 package.json 保持版本一致
|
|
82
|
+
const wbPlugin = readJson('.workbuddy-plugin/plugin.json');
|
|
83
|
+
if (wbPlugin && wbPlugin.version !== newVersion) {
|
|
84
|
+
const old = wbPlugin.version;
|
|
85
|
+
wbPlugin.version = newVersion;
|
|
86
|
+
writeJson('.workbuddy-plugin/plugin.json', wbPlugin);
|
|
87
|
+
updated.push(`.workbuddy-plugin/plugin.json (${old} → ${newVersion})`);
|
|
88
|
+
}
|
|
89
|
+
|
|
80
90
|
if (updated.length === 0) {
|
|
81
91
|
console.log('✅ 所有清单版本已一致,无需更新');
|
|
82
92
|
} else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "adspecs-adversarial-review"
|
|
3
3
|
description: "使用对抗策略对需求文件、系统设计文件和开发任务清单进行一致性与质量审查。支持单文档模式(仅 PRD)和三文档联合模式。引入多个红队角色从不同立场挑战文档中的假设、缺失、矛盾与歧义"
|
|
4
|
+
agent_created: true
|
|
4
5
|
argument-hint: "指定1~3个文档路径。单文档:PRD路径;三文档:PRD路径 系统设计路径 任务清单路径"
|
|
5
6
|
compatibility: "需要 docs/ 目录体系:docs/20-prd(需求)+ docs/30-system-design(系统设计+tasks)+ CLAUDE.md。单文档模式仅需 PRD"
|
|
6
7
|
metadata:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "adspecs-analyze"
|
|
3
3
|
description: "对 PRD、系统设计文档(_system-design.md)和 tasks.md 进行非破坏性的 ECP 全链路一致性分析。"
|
|
4
|
+
agent_created: true
|
|
4
5
|
argument-hint: "指定功能名或系统设计文档路径,如 M06-01 或 docs/30-system-design/crm/M06-01-销售预测_system-design.md"
|
|
5
6
|
compatibility: "需要 docs/ 目录体系:docs/20-prd(PRD)+ docs/30-system-design(系统设计+tasks)+ CLAUDE.md(ECP 编码宪章)"
|
|
6
7
|
metadata:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "adspecs-architecture-planning"
|
|
3
3
|
description: "基于自然语言项目/业务描述,支持3种架构规划类型:①功能架构 ②子模块依赖关系 ③统一数据建模(含Mermaid ER图)。用户可选择执行1种、2种或全部3种,后两者依赖功能架构完成"
|
|
4
|
+
agent_created: true
|
|
4
5
|
argument-hint: "描述项目名称、行业领域、核心业务和系统边界,如:华峰铝业CRM平台,覆盖销售全生命周期"
|
|
5
6
|
compatibility: "需要 adspecs 项目结构及 docs/ 目录"
|
|
6
7
|
metadata:
|