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.
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "adspecs",
12
12
  "description": "AI Coding研发协同开发插件",
13
- "version": "0.1.41",
13
+ "version": "0.1.42",
14
14
  "source": "./",
15
15
  "author": {
16
16
  "name": "Qingwen Chen",
@@ -2,7 +2,7 @@
2
2
  "name": "adspecs",
3
3
  "displayName": "adspecs AI Plugin",
4
4
  "description": "AI first工程规范驱动开发插件",
5
- "version": "0.1.41",
5
+ "version": "0.1.42",
6
6
  "author": {
7
7
  "name": "Qingwen Chen",
8
8
  "email": "cqinwn@qq.com",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adspecs",
3
3
  "displayName": "adspecs AI 工程规范驱动开发插件",
4
- "version": "0.1.41",
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.41",
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.41",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adspecs",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "AI first 工程规范驱动开发插件 — 支持 npm 安装和 CLI 初始化",
5
5
  "bin": {
6
6
  "adspecs": "bin/adspecs.js"
@@ -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/,故把占位符替换为项目 hooks 目录绝对路径(正斜杠,JSON 安全)。
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 absHooksDir = hooksDir.split(path.sep).join('/');
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(absHooksDir);
566
+ const rewritten = raw.split('${CLAUDE_PLUGIN_ROOT}').join(absProjectRoot);
566
567
  if (rewritten !== raw) {
567
568
  fs.writeFileSync(copiedJson, rewritten, 'utf8');
568
569
  }