adspecs 0.1.13 → 0.1.15
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 +23 -23
- package/.claude-plugin/plugin.json +18 -14
- package/README.md +1 -11
- package/package.json +1 -1
- package/src/commands/plugin.js +28 -7
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "adspecs-marketplace",
|
|
3
|
-
"owner": {
|
|
4
|
-
"name": "Qingwen Chen",
|
|
5
|
-
"email": "cqinwn@qq.com",
|
|
6
|
-
"url": "https://gitee.com/yuebon/adspecs",
|
|
7
|
-
"github": "https://gitee.com/yuebon/adspecs"
|
|
8
|
-
},
|
|
9
|
-
"plugins": [
|
|
10
|
-
{
|
|
11
|
-
"name": "adspecs",
|
|
12
|
-
"description": "AI Coding研发协同开发插件",
|
|
13
|
-
"version": "0.1.
|
|
14
|
-
"source": "./",
|
|
15
|
-
"author": {
|
|
16
|
-
"name": "Qingwen Chen",
|
|
17
|
-
"email": "cqinwn@qq.com",
|
|
18
|
-
"url": "https://gitee.com/yuebon/adspecs",
|
|
19
|
-
"github": "https://gitee.com/yuebon/adspecs"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "adspecs-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Qingwen Chen",
|
|
5
|
+
"email": "cqinwn@qq.com",
|
|
6
|
+
"url": "https://gitee.com/yuebon/adspecs",
|
|
7
|
+
"github": "https://gitee.com/yuebon/adspecs"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "adspecs",
|
|
12
|
+
"description": "AI Coding研发协同开发插件",
|
|
13
|
+
"version": "0.1.15",
|
|
14
|
+
"source": "./",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Qingwen Chen",
|
|
17
|
+
"email": "cqinwn@qq.com",
|
|
18
|
+
"url": "https://gitee.com/yuebon/adspecs",
|
|
19
|
+
"github": "https://gitee.com/yuebon/adspecs"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "adspecs",
|
|
3
|
-
"displayName": "adspecs AI Plugin",
|
|
4
|
-
"description": "AI first工程规范驱动开发插件",
|
|
5
|
-
"version": "0.1.
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "Qingwen Chen",
|
|
8
|
-
"email": "cqinwn@qq.com",
|
|
9
|
-
"url": "https://gitee.com/yuebon/adspecs"
|
|
10
|
-
},
|
|
11
|
-
"skills": "./skills/",
|
|
12
|
-
"license": "apache-2.0",
|
|
13
|
-
"keywords": [
|
|
14
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "adspecs",
|
|
3
|
+
"displayName": "adspecs AI Plugin",
|
|
4
|
+
"description": "AI first工程规范驱动开发插件",
|
|
5
|
+
"version": "0.1.15",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Qingwen Chen",
|
|
8
|
+
"email": "cqinwn@qq.com",
|
|
9
|
+
"url": "https://gitee.com/yuebon/adspecs"
|
|
10
|
+
},
|
|
11
|
+
"skills": "./skills/",
|
|
12
|
+
"license": "apache-2.0",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"adspecs",
|
|
15
|
+
"ai",
|
|
16
|
+
"development"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/README.md
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-

|
|
11
10
|
## 简介
|
|
12
11
|
|
|
13
12
|
AdSpecs 是一个基于 Claude Code 的 AI 工程研发协同插件,提供:
|
|
@@ -24,8 +23,6 @@ AdSpecs 是一个基于 Claude Code 的 AI 工程研发协同插件,提供:
|
|
|
24
23
|
|
|
25
24
|
## AI Coding六维魔方
|
|
26
25
|
|
|
27
|
-

|
|
28
|
-
|
|
29
26
|
WAF六个架构维度。每个面由多个能力模块组成,每个方块代表一个可独立使用的能力颗粒。
|
|
30
27
|
|
|
31
28
|
**D1·意图传递**
|
|
@@ -45,8 +42,6 @@ AI Coding能力从个人复制到团队与组织,形成可推广的资产和
|
|
|
45
42
|
|
|
46
43
|
## 解决什么问题
|
|
47
44
|
|
|
48
|
-

|
|
49
|
-
|
|
50
45
|
AdSpecs不同于CC、codex、XXwork等产品,其要真正要解决的,是让 AI 从“个人助手”进入“团队正式交付系统”,这是它的核心价值。
|
|
51
46
|
|
|
52
47
|
我们也就擅长干这个,干单体用户的场景咱也干不过这些模型厂商啥的。
|
|
@@ -84,7 +79,7 @@ AI 可以写得更快,但必须跑测试、过 Review、留审计、受权限
|
|
|
84
79
|
## 核心思路-基于 CR 的全流程协作与贯穿
|
|
85
80
|
|
|
86
81
|
AdSpecs 是以 **CR(Change Request)工作容器**为核心,CR 不是简单的需求单,而是一次变更从想法、需求、设计、任务、代码、测试、评审的工作容器,协作过程组织成一个可追踪、可评审、可沉淀的闭环。
|
|
87
|
-
|
|
82
|
+
|
|
88
83
|
### 1. 基于 CR 的协作闭环
|
|
89
84
|
|
|
90
85
|
每个 CR 承载一次需求变更或功能交付,从需求输入开始,逐步沉淀为设计、任务、代码、测试与评审结论。所有角色围绕同一个 CR 协同,避免需求、设计、实现、测试分散在不同上下文中。
|
|
@@ -114,11 +109,6 @@ AdSpecs 是以 **CR(Change Request)工作容器**为核心,CR 不是简单
|
|
|
114
109
|
|
|
115
110
|
---
|
|
116
111
|
|
|
117
|
-
## 总体流程
|
|
118
|
-
|
|
119
|
-

|
|
120
|
-
|
|
121
|
-
|
|
122
112
|
## 插件结构
|
|
123
113
|
|
|
124
114
|
```
|
package/package.json
CHANGED
package/src/commands/plugin.js
CHANGED
|
@@ -39,13 +39,21 @@ function getPluginName() {
|
|
|
39
39
|
/**
|
|
40
40
|
* 安装(注册)插件到 Claude Code
|
|
41
41
|
*
|
|
42
|
+
* Claude Code 的 marketplace 命令期望路径指向包含 `.claude-plugin/marketplace.json`
|
|
43
|
+
* 的目录,因此传入 PLUGIN_DIR(而非 PLUGIN_DIR/.claude-plugin)。
|
|
44
|
+
*
|
|
42
45
|
* @param {object} options
|
|
43
46
|
* @param {string} options.scope - 安装范围: user|project
|
|
44
47
|
*/
|
|
45
48
|
exports.install = async function install(options) {
|
|
46
49
|
const scope = options.scope || 'user';
|
|
47
50
|
const pluginName = getPluginName();
|
|
48
|
-
|
|
51
|
+
|
|
52
|
+
// marketplace.json 必须存在,否则无法注册
|
|
53
|
+
const marketplaceJson = path.join(PLUGIN_DIR, '.claude-plugin', 'marketplace.json');
|
|
54
|
+
if (!fs.existsSync(marketplaceJson)) {
|
|
55
|
+
throw new Error(`未找到 marketplace 清单: ${marketplaceJson}`);
|
|
56
|
+
}
|
|
49
57
|
|
|
50
58
|
console.log(chalk.cyan('🔌 adspecs 插件注册'));
|
|
51
59
|
console.log('');
|
|
@@ -65,25 +73,36 @@ exports.install = async function install(options) {
|
|
|
65
73
|
process.exit(1);
|
|
66
74
|
}
|
|
67
75
|
|
|
68
|
-
// 2. 注册 marketplace
|
|
76
|
+
// 2. 注册 marketplace
|
|
77
|
+
// 注意:传入 PLUGIN_DIR,claude 会去找 <PLUGIN_DIR>/.claude-plugin/marketplace.json
|
|
69
78
|
console.log(chalk.gray(' → 注册 marketplace...'));
|
|
79
|
+
let marketplaceRegistered = false;
|
|
70
80
|
try {
|
|
71
81
|
execSync(
|
|
72
|
-
`claude plugins marketplace add "${
|
|
82
|
+
`claude plugins marketplace add "${PLUGIN_DIR}" --scope ${scope}`,
|
|
73
83
|
{ stdio: 'pipe' }
|
|
74
84
|
);
|
|
75
85
|
console.log(chalk.green(' ✅ marketplace 注册成功'));
|
|
86
|
+
marketplaceRegistered = true;
|
|
76
87
|
} catch (err) {
|
|
77
88
|
const stderr = err.stderr ? err.stderr.toString() : '';
|
|
78
|
-
|
|
89
|
+
const stdout = err.stdout ? err.stdout.toString() : '';
|
|
90
|
+
const combined = stderr + stdout;
|
|
91
|
+
if (combined.includes('already exists') || combined.includes('already registered')) {
|
|
79
92
|
console.log(chalk.yellow(' ⏭ marketplace 已存在,跳过'));
|
|
93
|
+
marketplaceRegistered = true; // 已存在也视为可用
|
|
80
94
|
} else {
|
|
81
|
-
|
|
95
|
+
// 把真实错误输出,方便排查,不再静默吞掉
|
|
96
|
+
console.log(chalk.red(` ❌ marketplace 注册失败: ${combined.trim() || err.message}`));
|
|
82
97
|
}
|
|
83
98
|
}
|
|
84
99
|
|
|
85
100
|
// 3. 安装插件
|
|
101
|
+
// 只有 marketplace 注册成功(或已存在)时,才能按名称安装
|
|
86
102
|
console.log(chalk.gray(' → 安装插件...'));
|
|
103
|
+
if (!marketplaceRegistered) {
|
|
104
|
+
throw new Error('marketplace 未注册成功,无法按名称安装插件,请检查上方错误');
|
|
105
|
+
}
|
|
87
106
|
try {
|
|
88
107
|
execSync(`claude plugins install ${pluginName} --scope ${scope}`, {
|
|
89
108
|
stdio: 'pipe',
|
|
@@ -91,10 +110,12 @@ exports.install = async function install(options) {
|
|
|
91
110
|
console.log(chalk.green(` ✅ ${pluginName} 插件安装成功`));
|
|
92
111
|
} catch (err) {
|
|
93
112
|
const stderr = err.stderr ? err.stderr.toString() : '';
|
|
94
|
-
|
|
113
|
+
const stdout = err.stdout ? err.stdout.toString() : '';
|
|
114
|
+
const combined = stderr + stdout;
|
|
115
|
+
if (combined.includes('already installed')) {
|
|
95
116
|
console.log(chalk.yellow(` ⏭ ${pluginName} 已安装,跳过`));
|
|
96
117
|
} else {
|
|
97
|
-
throw new Error(`插件安装失败: ${
|
|
118
|
+
throw new Error(`插件安装失败: ${combined.trim() || err.message}`);
|
|
98
119
|
}
|
|
99
120
|
}
|
|
100
121
|
|