dev-playbooks-cn 2.5.1 → 2.5.3
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 +38 -0
- package/bin/devbooks.js +50 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,44 @@ 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.3] - 2026-01-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **智能 ignore 功能增强**:
|
|
13
|
+
- 自动识别并 ignore DevBooks 工作流产生的临时文件
|
|
14
|
+
- 新增 `evidence/` - 测试证据目录
|
|
15
|
+
- 新增 `dev-playbooks/changes/*/evidence/` - 变更包中的证据
|
|
16
|
+
- 新增 `*.tmp`, `*.bak` - 临时文件和备份文件
|
|
17
|
+
- 新增 `.ckb/` - CKB 代码知识库缓存
|
|
18
|
+
- 自动识别项目级 skills 目录(`.factory/`, `.cursor/` 等)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **更智能的 ignore 规则生成**:
|
|
23
|
+
- 根据选择的 AI 工具自动添加对应的目录
|
|
24
|
+
- 支持相对路径的 skills 目录自动识别
|
|
25
|
+
- 同时更新 `.gitignore` 和 `.npmignore`
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [2.5.2] - 2026-01-23
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **init 命令支持 Factory 和 Cursor**:
|
|
34
|
+
- 将 Factory 添加为完整 Skills 支持的工具
|
|
35
|
+
- 将 Cursor 从 Rules 系统升级为完整 Skills 支持
|
|
36
|
+
- 现在运行 `dev-playbooks-cn init` 时可以选择 Factory 和 Cursor
|
|
37
|
+
- Skills 会正确安装到 `.factory/skills/` 和 `.cursor/skills/`
|
|
38
|
+
|
|
39
|
+
- **更通用的 Skills 安装逻辑**:
|
|
40
|
+
- 移除硬编码的工具 ID 检查
|
|
41
|
+
- 支持所有定义了 `skillsDir` 的工具
|
|
42
|
+
- 支持相对路径的 `skillsDir`(如 `.factory/skills`)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
8
46
|
## [2.5.1] - 2026-01-23
|
|
9
47
|
|
|
10
48
|
### Fixed
|
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
|
|
@@ -637,7 +650,16 @@ const IGNORE_MARKERS = {
|
|
|
637
650
|
function getGitIgnoreEntries(toolIds) {
|
|
638
651
|
const entries = [
|
|
639
652
|
'# DevBooks 本地配置(包含用户偏好,不应提交)',
|
|
640
|
-
'.devbooks/'
|
|
653
|
+
'.devbooks/',
|
|
654
|
+
'',
|
|
655
|
+
'# DevBooks 工作流产生的临时文件',
|
|
656
|
+
'evidence/',
|
|
657
|
+
'dev-playbooks/changes/*/evidence/',
|
|
658
|
+
'*.tmp',
|
|
659
|
+
'*.bak',
|
|
660
|
+
'',
|
|
661
|
+
'# CKB 代码知识库缓存',
|
|
662
|
+
'.ckb/'
|
|
641
663
|
];
|
|
642
664
|
|
|
643
665
|
// 根据选择的工具添加对应的 AI 工具目录
|
|
@@ -653,6 +675,14 @@ function getGitIgnoreEntries(toolIds) {
|
|
|
653
675
|
}
|
|
654
676
|
}
|
|
655
677
|
|
|
678
|
+
// 添加 skills 目录(项目级)
|
|
679
|
+
if (tool.skillsDir && !path.isAbsolute(tool.skillsDir)) {
|
|
680
|
+
const topDir = tool.skillsDir.split('/')[0];
|
|
681
|
+
if (!entries.includes(topDir + '/')) {
|
|
682
|
+
entries.push(`${topDir}/`);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
656
686
|
// 添加 rules 目录
|
|
657
687
|
if (tool.rulesDir) {
|
|
658
688
|
const topDir = tool.rulesDir.split('/')[0];
|
|
@@ -688,6 +718,7 @@ function getNpmIgnoreEntries() {
|
|
|
688
718
|
'# AI 工具配置目录',
|
|
689
719
|
'.claude/',
|
|
690
720
|
'.cursor/',
|
|
721
|
+
'.factory/',
|
|
691
722
|
'.windsurf/',
|
|
692
723
|
'.gemini/',
|
|
693
724
|
'.agent/',
|
|
@@ -702,7 +733,15 @@ function getNpmIgnoreEntries() {
|
|
|
702
733
|
'# DevBooks 指令文件',
|
|
703
734
|
'CLAUDE.md',
|
|
704
735
|
'AGENTS.md',
|
|
705
|
-
'GEMINI.md'
|
|
736
|
+
'GEMINI.md',
|
|
737
|
+
'',
|
|
738
|
+
'# DevBooks 工作流临时文件',
|
|
739
|
+
'evidence/',
|
|
740
|
+
'*.tmp',
|
|
741
|
+
'*.bak',
|
|
742
|
+
'',
|
|
743
|
+
'# CKB 缓存',
|
|
744
|
+
'.ckb/'
|
|
706
745
|
];
|
|
707
746
|
}
|
|
708
747
|
|
|
@@ -903,7 +942,11 @@ async function promptInstallScope(projectDir, selectedTools) {
|
|
|
903
942
|
function getSkillsDestDir(tool, scope, projectDir) {
|
|
904
943
|
// 根据安装范围确定目标目录
|
|
905
944
|
if (scope === INSTALL_SCOPE.PROJECT) {
|
|
906
|
-
//
|
|
945
|
+
// 项目级安装:如果 skillsDir 是相对路径,使用项目目录
|
|
946
|
+
if (tool.skillsDir && !path.isAbsolute(tool.skillsDir)) {
|
|
947
|
+
return path.join(projectDir, tool.skillsDir);
|
|
948
|
+
}
|
|
949
|
+
// 兼容旧的硬编码逻辑
|
|
907
950
|
if (tool.id === 'claude') {
|
|
908
951
|
return path.join(projectDir, '.claude', 'skills');
|
|
909
952
|
} else if (tool.id === 'codex') {
|
|
@@ -925,8 +968,8 @@ function installSkills(toolIds, projectDir, scope = INSTALL_SCOPE.GLOBAL, update
|
|
|
925
968
|
const tool = AI_TOOLS.find(t => t.id === toolId);
|
|
926
969
|
if (!tool || tool.skillsSupport !== SKILLS_SUPPORT.FULL) continue;
|
|
927
970
|
|
|
928
|
-
//
|
|
929
|
-
if (
|
|
971
|
+
// 所有支持完整 Skills 的工具
|
|
972
|
+
if (tool.skillsDir) {
|
|
930
973
|
const skillsSrcDir = path.join(__dirname, '..', 'skills');
|
|
931
974
|
const skillsDestDir = getSkillsDestDir(tool, scope, projectDir);
|
|
932
975
|
|