dev-playbooks-cn 2.5.0 → 2.5.2
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/CHANGELOG.md +62 -0
- package/bin/devbooks.js +22 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,68 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.5.2] - 2026-01-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **init 命令支持 Factory 和 Cursor**:
|
|
13
|
+
- 将 Factory 添加为完整 Skills 支持的工具
|
|
14
|
+
- 将 Cursor 从 Rules 系统升级为完整 Skills 支持
|
|
15
|
+
- 现在运行 `dev-playbooks-cn init` 时可以选择 Factory 和 Cursor
|
|
16
|
+
- Skills 会正确安装到 `.factory/skills/` 和 `.cursor/skills/`
|
|
17
|
+
|
|
18
|
+
- **更通用的 Skills 安装逻辑**:
|
|
19
|
+
- 移除硬编码的工具 ID 检查
|
|
20
|
+
- 支持所有定义了 `skillsDir` 的工具
|
|
21
|
+
- 支持相对路径的 `skillsDir`(如 `.factory/skills`)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## [2.5.1] - 2026-01-23
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- 修复 `dev-playbooks-cn update` 命令的 changelog 显示功能
|
|
30
|
+
- 添加完整的 2.5.0 版本变更记录
|
|
31
|
+
- 确保用户可以看到最新版本的详细变更信息
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## [2.5.0] - 2026-01-23
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **Factory 原生 Skills 支持**:添加 `.factory/skills/` 目录,支持 Factory Droid
|
|
40
|
+
- 使用符号链接指向现有 `skills/` 目录,保持单一数据源
|
|
41
|
+
- 所有 18 个 DevBooks skills 可在 Factory 中原生使用
|
|
42
|
+
- 符合 Factory Skills 标准(YAML frontmatter + Markdown)
|
|
43
|
+
|
|
44
|
+
- **Cursor 原生 Skills 支持**:添加 `.cursor/skills/` 目录,支持 Cursor Agent
|
|
45
|
+
- 使用符号链接指向现有 `skills/` 目录,保持单一数据源
|
|
46
|
+
- 所有 18 个 DevBooks skills 可在 Cursor 中原生使用
|
|
47
|
+
- 符合 Cursor Agent Skills 标准
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **README 优化**:
|
|
52
|
+
- 移除"30秒电梯演讲"章节,简化文档结构
|
|
53
|
+
- 更新"支持的 AI 工具"表格,添加 Factory 和 Cursor 原生支持
|
|
54
|
+
- 明确标注各工具的 Skills 目录位置
|
|
55
|
+
|
|
56
|
+
- **package.json 更新**:
|
|
57
|
+
- 添加 `.factory/` 和 `.cursor/` 到 npm 发布文件列表
|
|
58
|
+
- 确保 Skills 目录随包一起发布
|
|
59
|
+
|
|
60
|
+
### Technical Details
|
|
61
|
+
|
|
62
|
+
- 使用符号链接(symlinks)而非复制文件,确保:
|
|
63
|
+
- 单一数据源(Single Source of Truth)
|
|
64
|
+
- 自动同步更新
|
|
65
|
+
- 减少维护成本
|
|
66
|
+
- 避免文件不一致
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
8
70
|
## [2.3.0] - 2026-01-23
|
|
9
71
|
|
|
10
72
|
### Added
|
package/bin/devbooks.js
CHANGED
|
@@ -98,13 +98,26 @@ const AI_TOOLS = [
|
|
|
98
98
|
available: true
|
|
99
99
|
},
|
|
100
100
|
|
|
101
|
-
// ===
|
|
101
|
+
// === Factory(原生 Skills 支持)===
|
|
102
|
+
{
|
|
103
|
+
id: 'factory',
|
|
104
|
+
name: 'Factory',
|
|
105
|
+
description: 'Factory Droid',
|
|
106
|
+
skillsSupport: SKILLS_SUPPORT.FULL,
|
|
107
|
+
slashDir: null,
|
|
108
|
+
skillsDir: '.factory/skills', // 项目级
|
|
109
|
+
instructionFile: null,
|
|
110
|
+
available: true
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
// === Cursor(原生 Skills 支持)===
|
|
102
114
|
{
|
|
103
115
|
id: 'cursor',
|
|
104
116
|
name: 'Cursor',
|
|
105
117
|
description: 'Cursor AI IDE',
|
|
106
|
-
skillsSupport: SKILLS_SUPPORT.
|
|
118
|
+
skillsSupport: SKILLS_SUPPORT.FULL,
|
|
107
119
|
slashDir: '.cursor/commands/devbooks',
|
|
120
|
+
skillsDir: '.cursor/skills', // 项目级
|
|
108
121
|
rulesDir: '.cursor/rules',
|
|
109
122
|
instructionFile: null,
|
|
110
123
|
available: true
|
|
@@ -903,7 +916,11 @@ async function promptInstallScope(projectDir, selectedTools) {
|
|
|
903
916
|
function getSkillsDestDir(tool, scope, projectDir) {
|
|
904
917
|
// 根据安装范围确定目标目录
|
|
905
918
|
if (scope === INSTALL_SCOPE.PROJECT) {
|
|
906
|
-
//
|
|
919
|
+
// 项目级安装:如果 skillsDir 是相对路径,使用项目目录
|
|
920
|
+
if (tool.skillsDir && !path.isAbsolute(tool.skillsDir)) {
|
|
921
|
+
return path.join(projectDir, tool.skillsDir);
|
|
922
|
+
}
|
|
923
|
+
// 兼容旧的硬编码逻辑
|
|
907
924
|
if (tool.id === 'claude') {
|
|
908
925
|
return path.join(projectDir, '.claude', 'skills');
|
|
909
926
|
} else if (tool.id === 'codex') {
|
|
@@ -925,8 +942,8 @@ function installSkills(toolIds, projectDir, scope = INSTALL_SCOPE.GLOBAL, update
|
|
|
925
942
|
const tool = AI_TOOLS.find(t => t.id === toolId);
|
|
926
943
|
if (!tool || tool.skillsSupport !== SKILLS_SUPPORT.FULL) continue;
|
|
927
944
|
|
|
928
|
-
//
|
|
929
|
-
if (
|
|
945
|
+
// 所有支持完整 Skills 的工具
|
|
946
|
+
if (tool.skillsDir) {
|
|
930
947
|
const skillsSrcDir = path.join(__dirname, '..', 'skills');
|
|
931
948
|
const skillsDestDir = getSkillsDestDir(tool, scope, projectDir);
|
|
932
949
|
|