adspecs 0.1.41 → 0.1.42
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 +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/.workbuddy-plugin/plugin.json +1 -1
- package/hooks/hooks.json +2 -9
- package/package.json +1 -1
- package/src/lib/scaffolder.js +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adspecs",
|
|
3
3
|
"displayName": "adspecs AI 工程规范驱动开发插件",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.42",
|
|
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.42",
|
|
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.42",
|
|
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/hooks/hooks.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_comment": "跨平台 Hook 配置 — 同时支持 Claude Code、Qoder 和 WorkBuddy。本文件是插件自身 hooks/hooks.json(由 Claude Code 自动发现),命令一律用 ${CLAUDE_PLUGIN_ROOT} 锚定脚本路径,不依赖会话 CWD(历史版本使用相对路径 hooks/xxx.js,当会话中途 cd 到子目录时会解析失败 MODULE_NOT_FOUND)。项目根定位由脚本内 platform.getProjectRoot() 负责:优先 CLAUDE_PROJECT_DIR 环境变量、兜底 process.cwd()。/project-init 复制到目标项目根的 hooks/hooks.json 副本(供 Qoder/WorkBuddy 加载)由 scaffolder 重写为绝对路径。",
|
|
3
2
|
"hooks": {
|
|
4
3
|
"SessionStart": [
|
|
5
4
|
{
|
|
@@ -42,10 +41,7 @@
|
|
|
42
41
|
"type": "command",
|
|
43
42
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/wiki-queue.js\" enqueue"
|
|
44
43
|
}
|
|
45
|
-
]
|
|
46
|
-
"conditions": {
|
|
47
|
-
"filePattern": "\\.(java|py|ts|js|go|rs|cs|md|vue|tsx|jsx)$"
|
|
48
|
-
}
|
|
44
|
+
]
|
|
49
45
|
},
|
|
50
46
|
{
|
|
51
47
|
"matcher": "Write|Edit|SearchReplace",
|
|
@@ -54,10 +50,7 @@
|
|
|
54
50
|
"type": "command",
|
|
55
51
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/commit-queue.js\" enqueue"
|
|
56
52
|
}
|
|
57
|
-
]
|
|
58
|
-
"conditions": {
|
|
59
|
-
"filePattern": "pipeline-manifest\\.json$"
|
|
60
|
-
}
|
|
53
|
+
]
|
|
61
54
|
}
|
|
62
55
|
],
|
|
63
56
|
"Stop": [
|
package/package.json
CHANGED
package/src/lib/scaffolder.js
CHANGED
|
@@ -556,13 +556,14 @@ function scaffoldHooks(targetDir, pluginDir, decision, logger) {
|
|
|
556
556
|
// 重写项目级 hooks/hooks.json 命令:源插件版本用 ${CLAUDE_PLUGIN_ROOT} 锚定,
|
|
557
557
|
// 但该项目根副本供 Qoder/WorkBuddy 加载(它们不做该占位符替换),且相对路径命令
|
|
558
558
|
// 在会话 cwd 切换到子目录时会解析失败(MODULE_NOT_FOUND)。脚本随目录已复制到
|
|
559
|
-
// {targetDir}/hooks
|
|
559
|
+
// {targetDir}/hooks/,命令本身形如 "${CLAUDE_PLUGIN_ROOT}/hooks/xxx.js"(占位符=根,
|
|
560
|
+
// 自带 /hooks/ 段),故把占位符替换为【项目根】绝对路径(正斜杠,JSON 安全)。
|
|
560
561
|
const copiedJson = path.join(hooksDir, 'hooks.json');
|
|
561
562
|
if (fs.existsSync(copiedJson)) {
|
|
562
563
|
try {
|
|
563
|
-
const
|
|
564
|
+
const absProjectRoot = targetDir.split(path.sep).join('/');
|
|
564
565
|
const raw = fs.readFileSync(copiedJson, 'utf8');
|
|
565
|
-
const rewritten = raw.split('${CLAUDE_PLUGIN_ROOT}').join(
|
|
566
|
+
const rewritten = raw.split('${CLAUDE_PLUGIN_ROOT}').join(absProjectRoot);
|
|
566
567
|
if (rewritten !== raw) {
|
|
567
568
|
fs.writeFileSync(copiedJson, rewritten, 'utf8');
|
|
568
569
|
}
|