dev-playbooks-cn 1.0.6 → 1.0.9
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/bin/devbooks.js +14 -72
- package/package.json +1 -1
- package/templates/dev-playbooks/README.md +80 -113
- package/templates/dev-playbooks/docs/DevBooks/351/205/215/347/275/256/346/214/207/345/215/227.md +204 -0
- package/templates/dev-playbooks/docs/workflow-diagram.svg +203 -0
- package/templates/dev-playbooks/docs//346/216/250/350/215/220MCP.md +1923 -0
- package/templates/claude-commands/devbooks/apply.md +0 -38
- package/templates/claude-commands/devbooks/archive.md +0 -33
- package/templates/claude-commands/devbooks/backport.md +0 -19
- package/templates/claude-commands/devbooks/bootstrap.md +0 -19
- package/templates/claude-commands/devbooks/c4.md +0 -19
- package/templates/claude-commands/devbooks/challenger.md +0 -19
- package/templates/claude-commands/devbooks/code.md +0 -19
- package/templates/claude-commands/devbooks/debate.md +0 -19
- package/templates/claude-commands/devbooks/delivery.md +0 -19
- package/templates/claude-commands/devbooks/design.md +0 -19
- package/templates/claude-commands/devbooks/entropy.md +0 -19
- package/templates/claude-commands/devbooks/federation.md +0 -19
- package/templates/claude-commands/devbooks/gardener.md +0 -19
- package/templates/claude-commands/devbooks/impact.md +0 -19
- package/templates/claude-commands/devbooks/index.md +0 -19
- package/templates/claude-commands/devbooks/judge.md +0 -19
- package/templates/claude-commands/devbooks/plan.md +0 -19
- package/templates/claude-commands/devbooks/proposal.md +0 -19
- package/templates/claude-commands/devbooks/quick.md +0 -42
- package/templates/claude-commands/devbooks/review.md +0 -19
- package/templates/claude-commands/devbooks/router.md +0 -19
- package/templates/claude-commands/devbooks/spec.md +0 -19
- package/templates/claude-commands/devbooks/test-review.md +0 -19
- package/templates/claude-commands/devbooks/test.md +0 -19
package/bin/devbooks.js
CHANGED
|
@@ -202,26 +202,6 @@ function copyDirSync(src, dest) {
|
|
|
202
202
|
return count;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
function copyCodexPromptsSync(srcDir, destDir) {
|
|
206
|
-
if (!fs.existsSync(srcDir)) return 0;
|
|
207
|
-
fs.mkdirSync(destDir, { recursive: true });
|
|
208
|
-
|
|
209
|
-
let count = 0;
|
|
210
|
-
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
|
|
211
|
-
for (const entry of entries) {
|
|
212
|
-
if (!entry.isFile()) continue;
|
|
213
|
-
if (!entry.name.endsWith('.md')) continue;
|
|
214
|
-
|
|
215
|
-
const srcPath = path.join(srcDir, entry.name);
|
|
216
|
-
const destName = entry.name.startsWith('devbooks-') ? entry.name : `devbooks-${entry.name}`;
|
|
217
|
-
const destPath = path.join(destDir, destName);
|
|
218
|
-
fs.copyFileSync(srcPath, destPath);
|
|
219
|
-
count++;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return count;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
205
|
function getSkillsSupportLabel(level) {
|
|
226
206
|
switch (level) {
|
|
227
207
|
case SKILLS_SUPPORT.FULL:
|
|
@@ -327,40 +307,6 @@ async function promptToolSelection(projectDir) {
|
|
|
327
307
|
return selectedTools;
|
|
328
308
|
}
|
|
329
309
|
|
|
330
|
-
// ============================================================================
|
|
331
|
-
// 安装 Slash 命令
|
|
332
|
-
// ============================================================================
|
|
333
|
-
|
|
334
|
-
function installSlashCommands(toolIds, projectDir) {
|
|
335
|
-
const slashSrcDir = path.join(__dirname, '..', 'templates', 'claude-commands', 'devbooks');
|
|
336
|
-
|
|
337
|
-
if (!fs.existsSync(slashSrcDir)) {
|
|
338
|
-
return { results: [], total: 0 };
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
const results = [];
|
|
342
|
-
|
|
343
|
-
for (const toolId of toolIds) {
|
|
344
|
-
const tool = AI_TOOLS.find(t => t.id === toolId);
|
|
345
|
-
if (!tool) continue;
|
|
346
|
-
|
|
347
|
-
let destDir;
|
|
348
|
-
if (tool.slashDir) {
|
|
349
|
-
destDir = path.join(projectDir, tool.slashDir);
|
|
350
|
-
} else if (tool.globalSlashDir) {
|
|
351
|
-
destDir = expandPath(tool.globalSlashDir);
|
|
352
|
-
} else {
|
|
353
|
-
continue;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const count = toolId === 'codex'
|
|
357
|
-
? copyCodexPromptsSync(slashSrcDir, destDir)
|
|
358
|
-
: copyDirSync(slashSrcDir, destDir);
|
|
359
|
-
results.push({ tool: tool.name, count, path: destDir });
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return { results, total: results.length };
|
|
363
|
-
}
|
|
364
310
|
|
|
365
311
|
// ============================================================================
|
|
366
312
|
// 安装 Skills(Claude Code, Codex CLI, Qoder)
|
|
@@ -624,6 +570,7 @@ function createProjectStructure(projectDir) {
|
|
|
624
570
|
'dev-playbooks/specs/architecture',
|
|
625
571
|
'dev-playbooks/changes',
|
|
626
572
|
'dev-playbooks/scripts',
|
|
573
|
+
'dev-playbooks/docs',
|
|
627
574
|
'.devbooks'
|
|
628
575
|
];
|
|
629
576
|
|
|
@@ -641,6 +588,18 @@ function createProjectStructure(projectDir) {
|
|
|
641
588
|
{ src: '.devbooks/config.yaml', dest: '.devbooks/config.yaml' }
|
|
642
589
|
];
|
|
643
590
|
|
|
591
|
+
// 动态添加 docs 目录下的所有文件
|
|
592
|
+
const docsDir = path.join(templateDir, 'dev-playbooks', 'docs');
|
|
593
|
+
if (fs.existsSync(docsDir)) {
|
|
594
|
+
const docFiles = fs.readdirSync(docsDir).filter(f => f.endsWith('.md'));
|
|
595
|
+
for (const docFile of docFiles) {
|
|
596
|
+
templateFiles.push({
|
|
597
|
+
src: `dev-playbooks/docs/${docFile}`,
|
|
598
|
+
dest: `dev-playbooks/docs/${docFile}`
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
644
603
|
let copiedCount = 0;
|
|
645
604
|
for (const { src, dest } of templateFiles) {
|
|
646
605
|
const srcPath = path.join(templateDir, src);
|
|
@@ -750,15 +709,6 @@ async function initCommand(projectDir, options) {
|
|
|
750
709
|
return;
|
|
751
710
|
}
|
|
752
711
|
|
|
753
|
-
// 安装 Slash 命令
|
|
754
|
-
const slashSpinner = ora('安装 Slash 命令...').start();
|
|
755
|
-
const slashResults = installSlashCommands(selectedTools, projectDir);
|
|
756
|
-
slashSpinner.succeed(`安装了 ${slashResults.results.length} 个工具的 Slash 命令`);
|
|
757
|
-
|
|
758
|
-
for (const result of slashResults.results) {
|
|
759
|
-
console.log(chalk.gray(` └ ${result.tool}: ${result.count} 个命令`));
|
|
760
|
-
}
|
|
761
|
-
|
|
762
712
|
// 安装 Skills(仅完整支持的工具)
|
|
763
713
|
const fullSupportTools = selectedTools.filter(id => {
|
|
764
714
|
const tool = AI_TOOLS.find(t => t.id === id);
|
|
@@ -824,10 +774,8 @@ async function initCommand(projectDir, options) {
|
|
|
824
774
|
// 下一步提示
|
|
825
775
|
console.log(chalk.bold('下一步:'));
|
|
826
776
|
console.log(` 1. 编辑 ${chalk.cyan('dev-playbooks/project.md')} 添加项目信息`);
|
|
827
|
-
console.log(` 2. 使用 ${chalk.cyan('
|
|
777
|
+
console.log(` 2. 使用 ${chalk.cyan('devbooks-proposal-author')} Skill 创建第一个变更提案`);
|
|
828
778
|
console.log();
|
|
829
|
-
console.log(chalk.yellow('重要提示:'));
|
|
830
|
-
console.log(' Slash 命令在 IDE 启动时加载,请重启你的 AI 工具以使命令生效。');
|
|
831
779
|
}
|
|
832
780
|
|
|
833
781
|
// ============================================================================
|
|
@@ -861,12 +809,6 @@ async function updateCommand(projectDir) {
|
|
|
861
809
|
});
|
|
862
810
|
console.log(chalk.blue('ℹ') + ` 检测到已配置的工具: ${toolNames.join(', ')}`);
|
|
863
811
|
|
|
864
|
-
// 更新 Slash 命令
|
|
865
|
-
const slashResults = installSlashCommands(configuredTools, projectDir);
|
|
866
|
-
for (const result of slashResults.results) {
|
|
867
|
-
console.log(chalk.green('✓') + ` ${result.tool}: 更新了 ${result.count} 个 slash 命令`);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
812
|
// 更新 Skills
|
|
871
813
|
const skillsResults = installSkills(configuredTools, true);
|
|
872
814
|
for (const result of skillsResults) {
|
package/package.json
CHANGED
|
@@ -46,28 +46,7 @@ AI 编码助手很强大,但往往**不可预测**:
|
|
|
46
46
|
|
|
47
47
|
## 工作原理
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
DevBooks 工作流
|
|
51
|
-
|
|
52
|
-
PROPOSAL 阶段 APPLY 阶段 ARCHIVE 阶段
|
|
53
|
-
(禁止编码) (角色隔离强制) (质量闸门)
|
|
54
|
-
|
|
55
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
56
|
-
│ /devbooks: │ │ 对话 A │ │ /devbooks: │
|
|
57
|
-
│ proposal │ │ ┌───────────┐ │ │ gardener │
|
|
58
|
-
│ impact │────────────│ │Test Owner │ │────────────│ delivery │
|
|
59
|
-
│ design │ │ │(先跑 Red) │ │ │ │
|
|
60
|
-
│ spec │ │ └───────────┘ │ │ 质量闸门: │
|
|
61
|
-
│ plan │ │ │ │ ✓ Green 证据 │
|
|
62
|
-
└─────────────────┘ │ 对话 B │ │ ✓ 任务完成 │
|
|
63
|
-
│ │ ┌───────────┐ │ │ ✓ 角色边界 │
|
|
64
|
-
▼ │ │ Coder │ │ │ ✓ 无失败 │
|
|
65
|
-
┌─────────────────┐ │ │(禁改测试!)│ │ └─────────────────┘
|
|
66
|
-
│ 三角对辩 │ │ └───────────┘ │
|
|
67
|
-
│ Author/Challenger│ └─────────────────┘
|
|
68
|
-
│ /Judge │
|
|
69
|
-
└─────────────────┘
|
|
70
|
-
```
|
|
49
|
+

|
|
71
50
|
|
|
72
51
|
**核心约束**:Test Owner 与 Coder **必须在独立对话**中工作。这是硬性约束,不是建议。Coder 不能修改 `tests/**`,完成由测试/构建验证,而非 AI 自评。
|
|
73
52
|
|
|
@@ -77,19 +56,18 @@ AI 编码助手很强大,但往往**不可预测**:
|
|
|
77
56
|
|
|
78
57
|
### 支持的 AI 工具
|
|
79
58
|
|
|
80
|
-
| 工具 |
|
|
81
|
-
|
|
82
|
-
| **Claude Code** |
|
|
83
|
-
| **Codex CLI** |
|
|
84
|
-
| **
|
|
85
|
-
| **
|
|
86
|
-
| **
|
|
87
|
-
| **
|
|
88
|
-
| **
|
|
89
|
-
| **
|
|
90
|
-
| **Cline** | - | 支持 | `.clinerules` |
|
|
59
|
+
| 工具 | 支持级别 | 配置文件 |
|
|
60
|
+
|------|----------|----------|
|
|
61
|
+
| **Claude Code** | 完整 Skills | `CLAUDE.md` |
|
|
62
|
+
| **Codex CLI** | 完整 Skills | `AGENTS.md` |
|
|
63
|
+
| **Qoder** | 完整 Skills | `AGENTS.md` |
|
|
64
|
+
| **Cursor** | Rules 系统 | `.cursor/rules/` |
|
|
65
|
+
| **Windsurf** | Rules 系统 | `.windsurf/rules/` |
|
|
66
|
+
| **Gemini CLI** | Rules 系统 | `GEMINI.md` |
|
|
67
|
+
| **Continue** | Rules 系统 | `.continue/rules/` |
|
|
68
|
+
| **GitHub Copilot** | 自定义指令 | `.github/copilot-instructions.md` |
|
|
91
69
|
|
|
92
|
-
>
|
|
70
|
+
> **提示**:使用自然语言调用 Skills,例如:"运行 devbooks-proposal-author skill..."
|
|
93
71
|
|
|
94
72
|
### 安装与初始化
|
|
95
73
|
|
|
@@ -119,7 +97,7 @@ npx dev-playbooks-cn@latest init
|
|
|
119
97
|
|
|
120
98
|
初始化后:
|
|
121
99
|
- Claude Code:`~/.claude/skills/devbooks-*`
|
|
122
|
-
- Codex CLI
|
|
100
|
+
- Codex CLI:`~/.codex/skills/devbooks-*`
|
|
123
101
|
|
|
124
102
|
### 快速集成
|
|
125
103
|
|
|
@@ -130,7 +108,7 @@ DevBooks 使用两个目录根:
|
|
|
130
108
|
| `<truth-root>` | 当前规格(只读真理) | `dev-playbooks/specs/` |
|
|
131
109
|
| `<change-root>` | 变更包(工作区) | `dev-playbooks/changes/` |
|
|
132
110
|
|
|
133
|
-
详见
|
|
111
|
+
详见 `docs/DevBooks配置指南.md`。
|
|
134
112
|
|
|
135
113
|
---
|
|
136
114
|
|
|
@@ -138,20 +116,20 @@ DevBooks 使用两个目录根:
|
|
|
138
116
|
|
|
139
117
|
### 使用 Router(推荐)
|
|
140
118
|
|
|
119
|
+
告诉 AI 你的需求,让 Router 分析并输出执行计划:
|
|
120
|
+
|
|
141
121
|
```
|
|
142
|
-
|
|
122
|
+
请运行 devbooks-router skill,分析需求:<你的需求>
|
|
143
123
|
```
|
|
144
124
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### 直达命令
|
|
125
|
+
### Skills 直达
|
|
148
126
|
|
|
149
127
|
熟悉流程后,直接调用 Skill:
|
|
150
128
|
|
|
151
129
|
**1. Proposal 阶段(禁止编码)**
|
|
152
130
|
|
|
153
131
|
```
|
|
154
|
-
|
|
132
|
+
请运行 devbooks-proposal-author skill,创建提案:添加 OAuth2 用户认证
|
|
155
133
|
```
|
|
156
134
|
|
|
157
135
|
产物:`proposal.md`(必需)、`design.md`、`tasks.md`
|
|
@@ -162,10 +140,10 @@ Router 分析需求并输出执行计划,告诉你下一步用哪个命令。
|
|
|
162
140
|
|
|
163
141
|
```
|
|
164
142
|
# 对话 A - Test Owner
|
|
165
|
-
|
|
143
|
+
请运行 devbooks-test-owner skill,变更 ID:add-oauth2
|
|
166
144
|
|
|
167
145
|
# 对话 B - Coder
|
|
168
|
-
|
|
146
|
+
请运行 devbooks-coder skill,变更 ID:add-oauth2
|
|
169
147
|
```
|
|
170
148
|
|
|
171
149
|
- Test Owner:写 `verification.md` + 测试,先跑 **Red**
|
|
@@ -174,64 +152,64 @@ Router 分析需求并输出执行计划,告诉你下一步用哪个命令。
|
|
|
174
152
|
**3. Review 阶段**
|
|
175
153
|
|
|
176
154
|
```
|
|
177
|
-
|
|
155
|
+
请运行 devbooks-code-review skill,变更 ID:add-oauth2
|
|
178
156
|
```
|
|
179
157
|
|
|
180
158
|
**4. Archive 阶段**
|
|
181
159
|
|
|
182
160
|
```
|
|
183
|
-
|
|
161
|
+
请运行 devbooks-spec-gardener skill,变更 ID:add-oauth2
|
|
184
162
|
```
|
|
185
163
|
|
|
186
164
|
---
|
|
187
165
|
|
|
188
|
-
##
|
|
166
|
+
## Skills 参考
|
|
189
167
|
|
|
190
168
|
### Proposal 阶段
|
|
191
169
|
|
|
192
|
-
|
|
|
193
|
-
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
|
170
|
+
| Skill | 说明 |
|
|
171
|
+
|-------|------|
|
|
172
|
+
| `devbooks-router` | 智能路由到合适的 Skill |
|
|
173
|
+
| `devbooks-proposal-author` | 创建变更提案 |
|
|
174
|
+
| `devbooks-impact-analysis` | 跨模块影响分析 |
|
|
175
|
+
| `devbooks-proposal-challenger` | 质疑和挑战提案 |
|
|
176
|
+
| `devbooks-proposal-judge` | 裁决提案 |
|
|
177
|
+
| `devbooks-proposal-debate-workflow` | 三角对辩(Author/Challenger/Judge) |
|
|
178
|
+
| `devbooks-design-doc` | 创建设计文档 |
|
|
179
|
+
| `devbooks-spec-contract` | 定义规格与契约 |
|
|
180
|
+
| `devbooks-c4-map` | 生成 C4 架构地图 |
|
|
181
|
+
| `devbooks-implementation-plan` | 创建实现计划 |
|
|
204
182
|
|
|
205
183
|
### Apply 阶段
|
|
206
184
|
|
|
207
|
-
|
|
|
208
|
-
|
|
209
|
-
|
|
|
210
|
-
|
|
|
211
|
-
|
|
|
185
|
+
| Skill | 说明 |
|
|
186
|
+
|-------|------|
|
|
187
|
+
| `devbooks-test-owner` | Test Owner 角色(必须独立对话) |
|
|
188
|
+
| `devbooks-coder` | Coder 角色(必须独立对话) |
|
|
189
|
+
| `devbooks-design-backport` | 回写发现到设计文档 |
|
|
212
190
|
|
|
213
191
|
### Review 阶段
|
|
214
192
|
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
|
|
|
193
|
+
| Skill | 说明 |
|
|
194
|
+
|-------|------|
|
|
195
|
+
| `devbooks-code-review` | 代码评审(可读性/一致性) |
|
|
196
|
+
| `devbooks-test-reviewer` | 测试质量与覆盖率评审 |
|
|
219
197
|
|
|
220
198
|
### Archive 阶段
|
|
221
199
|
|
|
222
|
-
|
|
|
223
|
-
|
|
224
|
-
|
|
|
225
|
-
|
|
|
200
|
+
| Skill | 说明 |
|
|
201
|
+
|-------|------|
|
|
202
|
+
| `devbooks-spec-gardener` | 规格维护与去重 |
|
|
203
|
+
| `devbooks-delivery-workflow` | 完整交付闭环 |
|
|
226
204
|
|
|
227
205
|
### 独立技能
|
|
228
206
|
|
|
229
|
-
|
|
|
230
|
-
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
207
|
+
| Skill | 说明 |
|
|
208
|
+
|-------|------|
|
|
209
|
+
| `devbooks-entropy-monitor` | 系统熵度量 |
|
|
210
|
+
| `devbooks-federation` | 跨仓库联邦分析 |
|
|
211
|
+
| `devbooks-brownfield-bootstrap` | 存量项目初始化 |
|
|
212
|
+
| `devbooks-index-bootstrap` | 生成 SCIP 索引 |
|
|
235
213
|
|
|
236
214
|
---
|
|
237
215
|
|
|
@@ -353,7 +331,7 @@ DevBooks 跟踪四维系统熵:
|
|
|
353
331
|
| 测试熵 | 测试覆盖率和质量衰减 |
|
|
354
332
|
| 依赖熵 | 外部依赖健康度 |
|
|
355
333
|
|
|
356
|
-
用
|
|
334
|
+
用 `devbooks-entropy-monitor` 生成报告,识别重构机会。
|
|
357
335
|
|
|
358
336
|
脚本(位于 `~/.claude/skills/devbooks-entropy-monitor/scripts/`):`entropy-measure.sh`、`entropy-report.sh`
|
|
359
337
|
|
|
@@ -362,13 +340,8 @@ DevBooks 跟踪四维系统熵:
|
|
|
362
340
|
<details>
|
|
363
341
|
<summary><strong>存量项目初始化</strong></summary>
|
|
364
342
|
|
|
365
|
-
当 `<truth-root>`
|
|
366
|
-
|
|
367
|
-
```
|
|
368
|
-
/devbooks:bootstrap
|
|
369
|
-
```
|
|
343
|
+
当 `<truth-root>` 为空时,使用 `devbooks-brownfield-bootstrap` 生成:
|
|
370
344
|
|
|
371
|
-
生成:
|
|
372
345
|
- 项目画像和术语表
|
|
373
346
|
- 从现有代码生成基线规格
|
|
374
347
|
- 最小验证锚点
|
|
@@ -380,13 +353,7 @@ DevBooks 跟踪四维系统熵:
|
|
|
380
353
|
<details>
|
|
381
354
|
<summary><strong>跨仓库联邦</strong></summary>
|
|
382
355
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
```
|
|
386
|
-
/devbooks:federation
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
分析跨仓库边界的契约和依赖,支持协调变更。
|
|
356
|
+
多仓库分析用 `devbooks-federation`,分析跨仓库边界的契约和依赖,支持协调变更。
|
|
390
357
|
|
|
391
358
|
</details>
|
|
392
359
|
|
|
@@ -405,27 +372,23 @@ DevBooks Skills 支持 MCP(Model Context Protocol)优雅降级:在没有 M
|
|
|
405
372
|
|
|
406
373
|
| MCP 状态 | 行为 |
|
|
407
374
|
|----------|------|
|
|
408
|
-
| CKB 可用 |
|
|
375
|
+
| CKB 可用 | 增强模式:符号级影响分析/引用查找/调用图/热点 |
|
|
409
376
|
| CKB 不可用 | 基础模式:Grep + Glob 文本搜索(功能完整,精度降低) |
|
|
410
377
|
|
|
411
378
|
### 自动检测
|
|
412
379
|
|
|
413
|
-
- 需要 MCP 的 Skills
|
|
380
|
+
- 需要 MCP 的 Skills 会先探测可用性(2s 超时)
|
|
414
381
|
- 超时/失败 → 静默降级到基础模式,不阻塞执行
|
|
415
382
|
- 无需手动选择"基础/增强"模式
|
|
416
383
|
|
|
417
|
-
如需启用增强能力:按
|
|
384
|
+
如需启用增强能力:按 `docs/推荐MCP.md` 配置 CKB,并运行 `devbooks-index-bootstrap` 生成 `index.scip`。
|
|
418
385
|
|
|
419
386
|
</details>
|
|
420
387
|
|
|
421
388
|
<details>
|
|
422
389
|
<summary><strong>提案对辩工作流</strong></summary>
|
|
423
390
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
```
|
|
427
|
-
/devbooks:debate
|
|
428
|
-
```
|
|
391
|
+
严格提案审查用三角对辩 `devbooks-proposal-debate-workflow`:
|
|
429
392
|
|
|
430
393
|
三个角色:
|
|
431
394
|
1. **Author**:创建并捍卫提案
|
|
@@ -462,7 +425,6 @@ dev-playbooks-cn migrate --from openspec --keep-old
|
|
|
462
425
|
- `openspec/changes/` → `dev-playbooks/changes/`
|
|
463
426
|
- `openspec/project.md` → `dev-playbooks/project.md`
|
|
464
427
|
- 所有路径引用自动更新
|
|
465
|
-
- AI 工具命令目录自动清理(`.claude/commands/openspec/` 等)
|
|
466
428
|
|
|
467
429
|
### 从 GitHub spec-kit 迁移
|
|
468
430
|
|
|
@@ -507,30 +469,35 @@ dev-playbooks-cn migrate --from speckit --keep-old
|
|
|
507
469
|
1. 运行 `dev-playbooks-cn init` 设置 DevBooks Skills
|
|
508
470
|
2. 检查 `dev-playbooks/` 中的迁移文件
|
|
509
471
|
3. 更新 `verification.md` 文件的 AC 映射
|
|
510
|
-
4. 如需基线规格,运行
|
|
472
|
+
4. 如需基线规格,运行 `devbooks-brownfield-bootstrap`
|
|
511
473
|
|
|
512
474
|
---
|
|
513
475
|
|
|
514
|
-
##
|
|
476
|
+
## 目录结构
|
|
515
477
|
|
|
516
478
|
```
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
479
|
+
dev-playbooks/
|
|
480
|
+
├── README.md # 本文档
|
|
481
|
+
├── constitution.md # 项目宪法(GIP 原则)
|
|
482
|
+
├── project.md # 项目上下文(技术栈/约定)
|
|
483
|
+
├── specs/ # 当前规格(只读真理)
|
|
484
|
+
│ ├── _meta/ # 元数据(术语表、项目画像)
|
|
485
|
+
│ └── architecture/ # 架构规格(fitness-rules)
|
|
486
|
+
├── changes/ # 变更包(工作区)
|
|
487
|
+
├── scripts/ # 辅助脚本
|
|
488
|
+
└── docs/ # 文档
|
|
489
|
+
├── workflow-diagram.svg # 工作流程图
|
|
490
|
+
├── 推荐MCP.md # MCP 配置建议
|
|
491
|
+
└── DevBooks配置指南.md # 配置指南
|
|
523
492
|
```
|
|
524
493
|
|
|
525
494
|
---
|
|
526
495
|
|
|
527
496
|
## 文档
|
|
528
497
|
|
|
529
|
-
- [
|
|
530
|
-
- [
|
|
531
|
-
- [
|
|
532
|
-
- [集成模板(协议无关)](../docs/DevBooks集成模板(协议无关).md)
|
|
533
|
-
- [安装提示词](../docs/DevBooks安装提示词.md)
|
|
498
|
+
- [工作流程图](docs/workflow-diagram.svg)
|
|
499
|
+
- [MCP 配置建议](docs/推荐MCP.md)
|
|
500
|
+
- [配置指南](docs/DevBooks配置指南.md)
|
|
534
501
|
|
|
535
502
|
---
|
|
536
503
|
|