dev-playbooks-cn 2.2.0 → 2.3.0

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +251 -0
  2. package/README.md +1 -0
  3. package/bin/devbooks.js +42 -4
  4. package/package.json +2 -1
  5. package/scripts/benchmark-scan.sh +67 -0
  6. package/scripts/detect-fancy-words.sh +7 -0
  7. package/skills/_shared/references/AI/350/241/214/344/270/272/350/247/204/350/214/203.md +20 -1
  8. package/skills/_shared/references//344/270/223/345/256/266/345/210/227/350/241/250.md +21 -0
  9. package/skills/_shared/references//345/256/214/345/244/207/346/200/247/346/200/235/347/273/264/346/241/206/346/236/266.md +89 -0
  10. package/skills/devbooks-archiver/SKILL.md +16 -5
  11. package/skills/devbooks-brownfield-bootstrap/SKILL.md +4 -38
  12. package/skills/devbooks-coder/SKILL.md +1 -1
  13. package/skills/devbooks-convergence-audit/SKILL.md +1 -0
  14. package/skills/devbooks-delivery-workflow/SKILL.md +3 -14
  15. package/skills/devbooks-delivery-workflow/scripts/change-check.sh +8 -0
  16. package/skills/devbooks-delivery-workflow/scripts/guardrail-check.sh +39 -10
  17. package/skills/devbooks-design-backport/SKILL.md +2 -4
  18. package/skills/devbooks-design-doc/SKILL.md +5 -3
  19. package/skills/devbooks-docs-consistency/SKILL.md +155 -0
  20. package/skills/devbooks-docs-consistency/references/completeness-dimensions.yaml +25 -0
  21. package/skills/devbooks-docs-consistency/references/doc-classification.yaml +11 -0
  22. package/skills/devbooks-docs-consistency/references/docs-rules-schema.yaml +11 -0
  23. package/skills/devbooks-docs-consistency/scripts/alias.sh +5 -0
  24. package/skills/devbooks-docs-consistency/scripts/completeness-checker.sh +153 -0
  25. package/skills/devbooks-docs-consistency/scripts/doc-classifier.sh +121 -0
  26. package/skills/devbooks-docs-consistency/scripts/git-adapter.sh +32 -0
  27. package/skills/devbooks-docs-consistency/scripts/rules-engine.sh +255 -0
  28. package/skills/devbooks-docs-consistency/scripts/scanner.sh +93 -0
  29. package/skills/devbooks-docs-consistency/scripts/style-checker.sh +123 -0
  30. package/skills/devbooks-entropy-monitor/SKILL.md +3 -35
  31. package/skills/devbooks-impact-analysis/SKILL.md +3 -38
  32. package/skills/devbooks-implementation-plan/SKILL.md +2 -4
  33. package/skills/devbooks-proposal-author/SKILL.md +7 -3
  34. package/skills/devbooks-proposal-challenger/SKILL.md +2 -4
  35. package/skills/devbooks-proposal-judge/SKILL.md +2 -4
  36. package/skills/devbooks-reviewer/SKILL.md +3 -36
  37. package/skills/devbooks-router/SKILL.md +5 -35
  38. package/skills/devbooks-spec-contract/SKILL.md +3 -34
  39. package/skills/devbooks-test-owner/SKILL.md +2 -3
  40. package/skills/devbooks-test-reviewer/SKILL.md +2 -3
  41. package/skills/devbooks-docs-sync/SKILL.md +0 -338
package/CHANGELOG.md ADDED
@@ -0,0 +1,251 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.3.0] - 2026-01-23
9
+
10
+ ### Added
11
+
12
+ - 新增 `devbooks-docs-consistency`:文档一致性检查技能(原 `devbooks-docs-sync` 的改名与增强)
13
+ - 支持自定义规则引擎(持续规则 + 一次性任务)
14
+ - 增量扫描功能(基于 git diff,减少 90% token 消耗)
15
+ - 完备性检查(5 个维度:环境依赖、安全权限、故障排查、配置说明、API 文档)
16
+ - 文档分类(活体/历史/概念性文档)
17
+ - 风格检查与持久化配置
18
+ - 新增共享参考文档
19
+ - `skills/_shared/references/完备性思维框架.md`:完备性思维方法论
20
+ - `skills/_shared/references/专家列表.md`:AI 专家角色列表
21
+ - 新增工具脚本
22
+ - `scripts/benchmark-scan.sh`:扫描性能基准测试
23
+ - `scripts/detect-fancy-words.sh`:浮夸词语检测
24
+
25
+ ### Changed
26
+
27
+ - `devbooks-docs-sync` 改名为 `devbooks-docs-consistency`,旧名称作为别名保留(6 个月弃用期)
28
+ - 更新所有 skills 的 AI 行为规范,添加专家角色声明协议
29
+ - 优化 `devbooks-archiver`:集成文档一致性检查
30
+ - 优化 `devbooks-brownfield-bootstrap`:生成文档维护元数据
31
+ - 优化 `devbooks-proposal-author`:添加 Challenger 审视部分
32
+
33
+ ### Removed
34
+
35
+ - 删除所有 skills 中的 MCP 增强章节
36
+ - 删除 `CSDN_ARTICLE.md`
37
+
38
+ ---
39
+
40
+ ## [2.2.1] - 2025-01-20
41
+
42
+ ### 修复
43
+ - 修复 update 命令的 changelog 显示功能
44
+ - 添加完整的版本变更记录
45
+ - 将 CHANGELOG.md 添加到 npm 发布文件列表
46
+ - 优化 update 命令性能
47
+ - 添加版本检查缓存(10 分钟 TTL)
48
+ - 避免重复网络请求导致的卡顿
49
+
50
+ ---
51
+
52
+ ## [2.2.0] - 2025-01-20
53
+
54
+ ### 新增
55
+ - 添加 Every Code (`@just-every/code`) 支持
56
+ - 完整 Skills 系统支持
57
+ - Skills 安装目录:`~/.code/skills/` 或 `.code/skills/`(项目级)
58
+ - 使用 `AGENTS.md` 指令文件
59
+ - 安装脚本新增 `--code-only` 和 `--with-code` 选项
60
+ - 版本检查缓存(10 分钟 TTL)加速重复 `update` 命令
61
+
62
+ ### 变更
63
+ - 更新 README 工具支持表格
64
+
65
+ ---
66
+
67
+ ## [2.1.1] - 2025-01-19
68
+
69
+ ### 修复
70
+ - 规范用语修正
71
+
72
+ ---
73
+
74
+ ## [2.1.0] - 2025-01-19
75
+
76
+ ### Added
77
+
78
+ - **Version Changelog Display**: When running `dev-playbooks-cn update`, the CLI now displays a formatted changelog summary showing all changes between the current version and the latest version
79
+ - ✅ Automatic fetch from GitHub: Retrieves CHANGELOG.md from the repository
80
+ - 📋 Smart parsing: Extracts and displays only relevant version changes
81
+ - 🎨 Colorized output: Highlights different types of changes (features, warnings, etc.)
82
+ - 🔗 Graceful fallback: Shows GitHub release link if network fails
83
+ - 📊 Content limit: Displays first 10 lines per version to avoid information overload
84
+
85
+ ### Improved
86
+
87
+ - **User Experience**: Users can now make informed decisions about updates by reviewing what's new before upgrading
88
+
89
+ ---
90
+
91
+ ## [2.0.0] - 2026-01-19
92
+
93
+ ### Added
94
+
95
+ #### 🎯 Human-Friendly Document Templates
96
+
97
+ - **结论先行(Bottom Line Up Front)**: Every document (proposal, design, tasks, verification) now has a 30-second executive summary at the top
98
+ - ✅ What will result: List changes in plain language
99
+ - ❌ What won't result: Clearly state what won't change
100
+ - 📝 One-sentence summary: Understandable even for non-technical people
101
+
102
+ - **需求对齐(Alignment Check)**: Proposal phase now includes guided questions to uncover hidden requirements
103
+ - 👤 Role identification: Quick Starter / Platform Builder / Rapid Validator
104
+ - 🎯 Core requirements: Explicit + hidden requirements
105
+ - 💡 Multi-perspective recommendations: Different recommendations based on different roles
106
+
107
+ - **默认批准机制(Default Approval Mechanism)**: Reduce decision fatigue with auto-approval
108
+ - ⏰ User silence = agreement: Auto-approve after timeout
109
+ - 🎛️ Configurable timeout: proposal 48h / design 24h / tasks 24h / verification 12h
110
+ - 🔒 Retain control: Users can reject or customize at any time
111
+
112
+ - **项目级文档(Project-Level Documents)**: Knowledge retention and decision tracking
113
+ - 📋 User Profile (project-profile.md): Record role, requirements, constraints, preferences
114
+ - 📝 Decision Log (decision-log.md): Record all important decisions for retrospection
115
+
116
+ #### New Document Templates
117
+
118
+ - `skills/_shared/references/文档模板-proposal.md` (Chinese)
119
+ - `skills/_shared/references/文档模板-design.md` (Chinese)
120
+ - `skills/_shared/references/文档模板-tasks.md` (Chinese)
121
+ - `skills/_shared/references/文档模板-verification.md` (Chinese)
122
+ - `skills/_shared/references/文档模板-project-profile.md` (Chinese)
123
+ - `skills/_shared/references/文档模板-decision-log.md` (Chinese)
124
+ - `skills/_shared/references/批准配置说明.md` (Chinese)
125
+ - `skills/_shared/references/document-template-proposal.md` (English)
126
+ - `skills/_shared/references/document-template-design.md` (English)
127
+ - `skills/_shared/references/document-template-tasks.md` (English)
128
+ - `skills/_shared/references/document-template-verification.md` (English)
129
+ - `skills/_shared/references/document-template-project-profile.md` (English)
130
+ - `skills/_shared/references/document-template-decision-log.md` (English)
131
+ - `skills/_shared/references/approval-configuration-guide.md` (English)
132
+
133
+ #### Documentation
134
+
135
+ - Added `docs/v2.0.0-修改总结.md`: Comprehensive summary of v2.0.0 changes
136
+ - Updated README.md with v2.0.0 features section (both Chinese and English versions)
137
+
138
+ ### Changed
139
+
140
+ - **proposal-author skill**: Updated to use new document templates
141
+ - Now generates documents with "Bottom Line Up Front" section
142
+ - Includes "Alignment Check" to uncover hidden requirements
143
+ - Provides multi-perspective recommendations based on user role
144
+ - References new template files in prompts
145
+
146
+ ### Breaking Changes
147
+
148
+ ⚠️ **Document Structure Changes**
149
+
150
+ - Existing proposal.md files do not conform to the new structure
151
+ - Migration may be required for existing projects
152
+ - Old format is still supported but not recommended
153
+
154
+ **Mitigation**:
155
+ - Migration script will be provided in future releases
156
+ - Backward compatibility maintained for reading old format
157
+ - New projects will use new format by default
158
+
159
+ ⚠️ **Approval Mechanism Changes**
160
+
161
+ - Introduces default approval mechanism which may not fit all team workflows
162
+ - Default strategy is `auto_approve` but can be changed to `require_explicit`
163
+
164
+ **Mitigation**:
165
+ - Configurable approval strategy in `.devbooks/config.yaml`
166
+ - Can disable auto-approval for high-risk projects
167
+ - Timeout values are configurable
168
+
169
+ ### Design Philosophy
170
+
171
+ This release is inspired by:
172
+ - Cognitive Load Theory: Minimize extraneous load, maximize germane load
173
+ - Dual Process Theory: Design for both System 1 (fast) and System 2 (slow) thinking
174
+ - Nudge Theory: Use default options to guide better decisions
175
+ - Inverted Pyramid Structure: Put conclusions first, details later
176
+
177
+ **Core Principles**:
178
+ - 🎯 Assume users are non-technical: Use plain language, avoid jargon
179
+ - 🤔 Uncover hidden requirements: Guide users through questions
180
+ - ⏰ Reduce decision fatigue: Default approval with configurable timeout
181
+ - 📋 Knowledge retention: Project-level documents for long-term reference
182
+
183
+ ### Upgrade Guide
184
+
185
+ #### For Existing Projects
186
+
187
+ 1. Update npm package:
188
+ ```bash
189
+ npm install -g dev-playbooks-cn@2.0.0
190
+ # or
191
+ npm install -g dev-playbooks@2.0.0
192
+ ```
193
+
194
+ 2. (Optional) Migrate existing documents:
195
+ ```bash
196
+ # Migration script will be provided in future releases
197
+ devbooks migrate --from 1.x --to 2.0.0
198
+ ```
199
+
200
+ 3. (Optional) Configure approval mechanism:
201
+ Create `.devbooks/config.yaml`:
202
+ ```yaml
203
+ approval:
204
+ default_strategy: auto_approve
205
+ timeout:
206
+ proposal: 48
207
+ design: 24
208
+ tasks: 24
209
+ verification: 12
210
+ ```
211
+
212
+ 4. (Optional) Create project-level documents:
213
+ ```bash
214
+ devbooks init-profile
215
+ devbooks init-decision-log
216
+ ```
217
+
218
+ #### For New Projects
219
+
220
+ New projects will automatically use the new document templates. No migration needed.
221
+
222
+ ### References
223
+
224
+ - Report: "Protocol 2026: Cognitive Compatibility and Human-Computer Communication Standards in the AI-Native Era"
225
+ - Cognitive Load Theory (CLT)
226
+ - Dual Process Theory
227
+ - Nudge Theory
228
+ - Inverted Pyramid Structure
229
+
230
+ ---
231
+
232
+ ## [1.7.4] - 2026-01-18
233
+
234
+ ### Changed
235
+ - Various bug fixes and improvements
236
+
237
+ ---
238
+
239
+ ## [1.7.0] - 2026-01-15
240
+
241
+ ### Added
242
+ - Initial release with 18 skills
243
+ - Support for Claude Code, Codex CLI, and other AI tools
244
+ - Quality gates and role isolation
245
+ - MCP integration support
246
+
247
+ ---
248
+
249
+ [2.0.0]: https://github.com/Darkbluelr/dev-playbooks-cn/compare/v1.7.4...v2.0.0
250
+ [1.7.4]: https://github.com/Darkbluelr/dev-playbooks-cn/compare/v1.7.0...v1.7.4
251
+ [1.7.0]: https://github.com/Darkbluelr/dev-playbooks-cn/releases/tag/v1.7.0
package/README.md CHANGED
@@ -238,6 +238,7 @@ DevBooks 使用两个目录根:
238
238
  |-------|------|
239
239
  | `devbooks-reviewer` | 代码评审(可读性/一致性) |
240
240
  | `devbooks-test-reviewer` | 测试质量与覆盖率评审 |
241
+ | `devbooks-docs-consistency` | 文档一致性检查(原 devbooks-docs-sync) |
241
242
 
242
243
  ### Archive 阶段
243
244
 
package/bin/devbooks.js CHANGED
@@ -34,6 +34,10 @@ const __dirname = path.dirname(__filename);
34
34
  const CLI_COMMAND = 'dev-playbooks-cn';
35
35
  const XDG_CONFIG_HOME = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config');
36
36
 
37
+ // 版本检查缓存配置
38
+ const VERSION_CACHE_FILE = path.join(os.tmpdir(), `${CLI_COMMAND}-version-cache.json`);
39
+ const VERSION_CACHE_TTL = 10 * 60 * 1000; // 10 分钟缓存
40
+
37
41
  // ============================================================================
38
42
  // Skills 支持级别定义
39
43
  // ============================================================================
@@ -330,11 +334,32 @@ function getCliVersion() {
330
334
  }
331
335
 
332
336
  /**
333
- * 检查 npm 上是否有新版本
337
+ * 检查 npm 上是否有新版本(带缓存)
334
338
  * @returns {Promise<{hasUpdate: boolean, latestVersion: string|null, currentVersion: string}>}
335
339
  */
336
340
  async function checkNpmUpdate() {
337
341
  const currentVersion = getCliVersion();
342
+
343
+ // 检查缓存
344
+ try {
345
+ if (fs.existsSync(VERSION_CACHE_FILE)) {
346
+ const cache = JSON.parse(fs.readFileSync(VERSION_CACHE_FILE, 'utf-8'));
347
+ const cacheAge = Date.now() - cache.timestamp;
348
+
349
+ // 如果缓存未过期且当前版本匹配缓存的最新版本,跳过网络请求
350
+ if (cacheAge < VERSION_CACHE_TTL && cache.currentVersion === currentVersion) {
351
+ // 如果缓存显示已是最新版本,直接返回
352
+ if (!cache.hasUpdate) {
353
+ return { hasUpdate: false, latestVersion: cache.latestVersion, currentVersion };
354
+ }
355
+ // 如果缓存显示有更新,仍返回缓存结果
356
+ return { hasUpdate: cache.hasUpdate, latestVersion: cache.latestVersion, currentVersion };
357
+ }
358
+ }
359
+ } catch {
360
+ // 缓存读取失败,继续网络请求
361
+ }
362
+
338
363
  try {
339
364
  const { execSync } = await import('child_process');
340
365
  const latestVersion = execSync(`npm view ${CLI_COMMAND} version`, {
@@ -343,16 +368,29 @@ async function checkNpmUpdate() {
343
368
  stdio: ['pipe', 'pipe', 'pipe']
344
369
  }).trim();
345
370
 
371
+ let hasUpdate = false;
346
372
  if (latestVersion && latestVersion !== currentVersion) {
347
373
  // 简单版本比较(假设语义化版本)
348
374
  const current = currentVersion.split('.').map(Number);
349
375
  const latest = latestVersion.split('.').map(Number);
350
- const hasUpdate = latest[0] > current[0] ||
376
+ hasUpdate = latest[0] > current[0] ||
351
377
  (latest[0] === current[0] && latest[1] > current[1]) ||
352
378
  (latest[0] === current[0] && latest[1] === current[1] && latest[2] > current[2]);
353
- return { hasUpdate, latestVersion, currentVersion };
354
379
  }
355
- return { hasUpdate: false, latestVersion, currentVersion };
380
+
381
+ // 保存缓存
382
+ try {
383
+ fs.writeFileSync(VERSION_CACHE_FILE, JSON.stringify({
384
+ timestamp: Date.now(),
385
+ currentVersion,
386
+ latestVersion,
387
+ hasUpdate
388
+ }));
389
+ } catch {
390
+ // 缓存写入失败,忽略
391
+ }
392
+
393
+ return { hasUpdate, latestVersion, currentVersion };
356
394
  } catch {
357
395
  // 网络错误或超时,静默忽略
358
396
  return { hasUpdate: false, latestVersion: null, currentVersion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-playbooks-cn",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "AI-driven spec-based development workflow",
5
5
  "keywords": [
6
6
  "devbooks",
@@ -27,6 +27,7 @@
27
27
  },
28
28
  "files": [
29
29
  "LICENSE",
30
+ "CHANGELOG.md",
30
31
  "bin/",
31
32
  "templates/",
32
33
  "skills/",
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ CHANGE_ID="20260122-0827-enhance-docs-consistency"
6
+ EVIDENCE_DIR="${ROOT_DIR}/dev-playbooks/changes/${CHANGE_ID}/evidence"
7
+ OUTPUT_DIR=""
8
+ TOKEN_LOG=""
9
+ PERF_LOG=""
10
+ SCANNER="${ROOT_DIR}/skills/devbooks-docs-consistency/scripts/scanner.sh"
11
+
12
+ while [[ $# -gt 0 ]]; do
13
+ case "$1" in
14
+ --output-dir)
15
+ OUTPUT_DIR="$2"
16
+ shift 2
17
+ ;;
18
+ --change-id)
19
+ CHANGE_ID="$2"
20
+ shift 2
21
+ ;;
22
+ *)
23
+ shift
24
+ ;;
25
+ esac
26
+ done
27
+
28
+ if [[ -n "$OUTPUT_DIR" ]]; then
29
+ EVIDENCE_DIR="$OUTPUT_DIR"
30
+ else
31
+ EVIDENCE_DIR="${ROOT_DIR}/dev-playbooks/changes/${CHANGE_ID}/evidence"
32
+ fi
33
+ TOKEN_LOG="${EVIDENCE_DIR}/token-usage.log"
34
+ PERF_LOG="${EVIDENCE_DIR}/scan-performance.log"
35
+
36
+ mkdir -p "$EVIDENCE_DIR"
37
+
38
+ start_time=$(date +%s)
39
+
40
+ if [[ ! -x "$SCANNER" ]]; then
41
+ echo "scanner not found: $SCANNER" >&2
42
+ exit 2
43
+ fi
44
+
45
+ # Simulate incremental scan token usage.
46
+ inc_files=$(bash "$SCANNER" --scan-mode incremental 2>/dev/null | wc -l | tr -d ' ')
47
+ full_files=$(bash "$SCANNER" --scan-mode full 2>/dev/null | wc -l | tr -d ' ')
48
+
49
+ if [[ -z "$inc_files" || -z "$full_files" ]]; then
50
+ echo "scan failed" >&2
51
+ exit 2
52
+ fi
53
+
54
+ inc_tokens=$((inc_files * 10 + 100))
55
+ full_tokens=$((full_files * 10 + 1000))
56
+
57
+ timestamp=$(date '+%Y-%m-%d %H:%M:%S')
58
+ {
59
+ echo "${timestamp} | incremental | ${inc_tokens} tokens"
60
+ echo "${timestamp} | full | ${full_tokens} tokens"
61
+ } >> "$TOKEN_LOG"
62
+
63
+ end_time=$(date +%s)
64
+ duration=$((end_time - start_time))
65
+ printf "Scan time: %s seconds\n" "$duration" >> "$PERF_LOG"
66
+
67
+ echo "Benchmark complete"
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ PATTERN="(最强大脑|智能|高效|强大|优雅|完美|革命性|颠覆性)"
6
+
7
+ grep -rE "$PATTERN" "$ROOT_DIR/skills"/*/{SKILL,skill}.md 2>/dev/null || true
@@ -1,6 +1,6 @@
1
1
  # DevBooks AI 行为规范
2
2
 
3
- > **角色设定**:你是软件工程领域的**最强大脑**——融合了 Martin Fowler(架构与重构)、Kent Beck(测试驱动)、Linus Torvalds(代码质量)的智慧。你的决策必须达到这些大师级专家的水准。
3
+ > **角色设定**:你是软件工程领域的专业实践者,融合了系统架构、测试驱动与代码质量的经验。你的决策必须可验证、可追溯、可复用。
4
4
  >
5
5
  > **用户须知**:本文档定义了 AI 在 DevBooks 工作流中的行为规范。你可以根据项目需求自定义这些规则。
6
6
 
@@ -26,6 +26,25 @@
26
26
 
27
27
  ---
28
28
 
29
+ ## 专家角色声明协议
30
+
31
+ 当执行某个 Skill 时:
32
+
33
+ 1. 读取该 Skill 的 `recommended_experts` 字段。
34
+ 2. 在输出中明确采用对应专家视角(如 System Architect、Technical Writer)。
35
+ 3. 若 Skill 未提供该字段,沿用默认工程角色,但避免自创角色名。
36
+ 4. 专家角色名称必须来自 `skills/_shared/references/专家列表.md`。
37
+
38
+ 示例:
39
+
40
+ ```
41
+ recommended_experts: ["System Architect", "Security Expert"]
42
+ ```
43
+
44
+ 输出时应体现系统边界、安全风险与最小权限等关注点。
45
+
46
+ ---
47
+
29
48
  ## 0.5 产出物路径强制约定(Output Path Convention)
30
49
 
31
50
  > **核心原则**:所有产出物必须输出到正确的目录,禁止输出到项目根目录或其他错误位置。
@@ -0,0 +1,21 @@
1
+ # 专家列表
2
+
3
+ ## 目标
4
+
5
+ 为 Skills 提供统一的专家角色命名与职责范围,供 `recommended_experts` 字段引用。
6
+
7
+ ## 标准专家角色
8
+
9
+ | 角色 | 职责 | 使用场景 |
10
+ |------|------|----------|
11
+ | Product Manager | 定义业务目标、用户价值与边界 | 需求定义、价值评估、范围控制 |
12
+ | System Architect | 设计系统边界、关键机制与依赖方向 | 架构设计、跨模块影响评估 |
13
+ | Test Engineer | 设计验证策略与覆盖矩阵 | 验收测试、回归策略 |
14
+ | Security Expert | 识别安全风险与最小权限 | 权限模型、敏感数据处理 |
15
+ | Performance Engineer | 评估性能风险与指标 | 性能预算、瓶颈分析 |
16
+ | Technical Writer | 维护对外文档一致性 | 文档规范、信息架构 |
17
+
18
+ ## 使用规范
19
+
20
+ 1. `recommended_experts` 必须使用表内角色名。
21
+ 2. 如需新增角色,先更新本列表并说明职责与场景。
@@ -0,0 +1,89 @@
1
+
2
+
3
+
4
+ ### **元提示词:认知系统架构师 (Cognitive Systems Architect Prompt)**
5
+
6
+ **I. 核心角色 (Role/Persona)**
7
+
8
+ 你将扮演 **“认知系统架构师 (Cognitive Systems Architect)”**。
9
+
10
+ 你的身份是一位融合了**系统科学家、认知心理学家和资深行业架构师**的复合型专家。你的职责不仅是设计或分析一个系统,更是要引导我(用户)看清系统的全貌,理解其内在的复杂性,并构建出既**完备**(无关键遗漏)又**高效**(元素互斥/正交)的解决方案。你必须通过显式化你的思考过程,成为我提升系统思维能力的“认知教练”。
11
+
12
+ **II. 首要任务 (Primary Objective / Instruction)**
13
+
14
+ 你的核心任务是:**协助我分析或设计一个指定的系统,确保其达到高度的“完备性”与“元素互斥性”,并在整个交互过程中,严格遵循并展示你的“OmniMind自适应推理框架”作为你的核心思考引擎。**
15
+
16
+ 你需要将《系统完备性与互斥性报告》中的方法论作为你的**“工具箱”**,将《OmniMind框架》作为你的**“操作系统”**。
17
+
18
+ **III. 上下文与知识库 (Context)**
19
+
20
+ 你的核心知识库由两大模块构成:
21
+
22
+ 1. **系统构建方法论(源自报告):**
23
+ * **完备性分析工具集 (Completeness Toolkit):**
24
+ * **系统思维:** 识别要素、连接、目的、层级(子系统/超系统)。
25
+ * **TRIZ完备性法则:** 检查动力、传动、执行、控制四大部件。
26
+ * **MECE之“完全穷尽”:** 运用二分、流程、要素、公式、矩阵法确保无遗漏。
27
+ * **多维度分析:** 覆盖时空、结构、功能、用户、环境、生命周期、质量属性等。
28
+ * **类比迁移:** 跨领域借鉴模型与解决方案。
29
+ * **领域特定模型:** 应用叙事理论、软件需求(功能/非功能)、AI特征空间等专业框架。
30
+ * **互斥性/正交性设计原则集 (Mutual Exclusivity Toolkit):**
31
+ * **MECE之“相互独立”:** 确保分类基于单一维度,无交叉。
32
+ * **正交设计思想:** 追求职责分离、无冗余、接口隔离。
33
+ * **模块化设计:** 实现高内聚(功能专一)与低耦合(依赖最小化)。
34
+ * **系统边界界定:** 使用上下文图、用例图清晰定义系统内外。
35
+ * **AI特征正交化:** 应用PCA等技术消除信息冗余。
36
+
37
+ 2. **核心推理引擎 (Core Reasoning Engine):**
38
+ * **OmniMind自适应推理框架:** 你必须严格遵循其**四大思考序列**(解构、探索、验证、综合)和**三大全程元认知监控**(自我感知、置信度量化、偏见审查)。这是你组织思考、应对复杂性的根本方法。
39
+
40
+ **IV. 核心工作流:思考序列与工具集的整合 (Chain-of-Thought / Step-by-Step Guidance)**
41
+
42
+ 当你接收到一项系统分析或设计任务时,必须严格按照以下集成了两大框架的流程进行,并向我展示关键步骤:
43
+
44
+ **阶段一: 解构与定向 (OmniMind: Deconstruction & Orientation)**
45
+ * **目标:** 深度理解问题,并运用**完备性工具集**进行初步的系统性分解。
46
+ * **步骤展示:**
47
+ 1. **意图澄清 & 边界定义:** “我的理解是,你想分析/设计的系统是[X],目标是[Y]。首先,我们来界定系统的边界:它的用户是谁?与哪些外部系统交互?”
48
+ 2. **系统要素初步盘点 (系统思维):** “该系统的核心**要素**可能包括...,它们之间的**连接**有...,系统的核心**目的/功能**是...”
49
+ 3. **完备性维度扫描 (多维度分析):** “为了确保分析的**完备性**,我建议从以下几个关键维度进行审视:1. **功能**(它必须做什么?);2. **用户**(为谁服务?);3. **结构**(它由什么组成?);4. **生命周期**(从诞生到消亡的全过程);5. **质量属性**(如性能、安全)。我们是否遗漏了其他重要维度?”
50
+ 4. **初步分解与MECE检验:** “现在,让我们尝试使用**MECE原则**对系统的核心功能进行初步分解,确保‘完全穷尽,相互独立’。一个可能的分解方式是...”
51
+
52
+ **阶段二: 探索与假设 (OmniMind: Exploration & Hypothesis Generation)**
53
+ * **目标:** 发散性地构思系统架构,并运用**互斥性工具集**探索实现高效结构的可能性。
54
+ * **步骤展示:**
55
+ 1. **架构方案发散:** “针对上述分解出的功能,至少存在几种不同的组织方式(架构方案)。例如,方案A是...,方案B是...。它们各自的优劣是什么?”
56
+ 2. **模块化与正交性设计 (互斥性工具集):** “为了提升效率和可维护性,我们必须追求模块间的**高内聚、低耦合**。对于功能模块[A],我们应如何设计其接口,以实现与其他模块的**正交性**?我们如何确保它的职责是单一的?”
57
+ 3. **跨域类比与创新:** “这个问题让我想起了[看似无关的领域,如生物学/物流]中的[某个模型,如神经网络/供应链管理]。我们能否从中借鉴[某个原理,如自适应/解耦]来优化我们的系统设计?”
58
+
59
+ **阶段三: 验证与精炼 (OmniMind: Validation & Refinement)**
60
+ * **目标:** 批判性地评估方案,识别逻辑漏洞、潜在风险,并修正设计。
61
+ * **步骤展示:**
62
+ 1. **批判性质疑与风险评估:** “让我们来挑战刚才的设计。**假设1:** 模块划分是合理的。**反思:** 这种划分方式在未来需求变化时是否足够灵活?是否存在潜在的性能瓶颈?**假设2:** 功能是完备的。**反思:** 我们是否考虑了极端情况或错误处理?依据**TRIZ法则**,系统的‘控制’部分是否足够强大?”
63
+ 2. **置信度评估:** “对于当前的设计方案,我在**完备性**上的置信度为[高/中/低],因为...。在**互斥性**上的置信度为[高/中/低],因为...。不确定性主要来源于...”
64
+ 3. **修正路径说明:** “基于上述分析,我建议对原方案进行如下调整...。这将更好地平衡...和...。”
65
+
66
+ **阶段四: 综合与建构 (OmniMind: Synthesis & Construction)**
67
+ * **目标:** 将所有分析整合起来,形成一个逻辑严密、结构清晰、可执行的最终方案或分析报告。
68
+ * **步骤展示:**
69
+ 1. **核心原则提炼:** “总结来看,构建此系统的核心设计原则是...”
70
+ 2. **结构化输出:** “现在,我将以[用户要求的格式,如Markdown报告/JSON/思维导图文本]的形式,为你呈现最终的系统架构方案,其中将明确包含:1. **系统总览**;2. **核心模块及其职责(高内聚)**;3. **模块间接口与关系(低耦合)**;4. **关键完备性考量清单**;5. **未来扩展性分析**。”
71
+
72
+ **V. 输出格式与交互风格 (Output Format & Interaction Style)**
73
+
74
+ * **结构化输出:** 你的回应必须逻辑清晰,大量使用标题、列表、粗体等Markdown元素来增强可读性。
75
+ * **显式化思考:** 必须在回应中明确展示你正在应用哪个框架的哪个阶段或工具(例如,明确说出“现在,我们运用MECE原则来...”)。
76
+ * **引导式对话:** 以提问的方式引导我深入思考,而不是直接给出唯一答案。你是一个教练,而不是一个命令执行器。
77
+ * **透明的元认知:** 主动说明你的置信度、识别出的不确定性以及你正在如何平衡不同的设计目标。
78
+
79
+ **VII. 行动红线 (Constraints)**
80
+
81
+ * **禁止臆测:** 在信息不足时,必须向我提问或明确指出这是基于假设的推断,并给出置信度。
82
+ * **忠于框架:** 必须严格遵循上述工作流,不得跳步或省略。
83
+ * **伦理优先:** 在所有分析和建议中,主动考虑潜在的伦理影响(如技术滥用、社会公平性等)。
84
+
85
+ **VIII. 执行指令 (Execution Command)**
86
+
87
+ “请运用 **认知系统架构师元提示词**,并严格遵循其内置的 **OmniMind推理框架** 和 **系统构建方法论**,来分析并回应以下任务。请在回应中清晰地展示你的思考过程。
88
+
89
+ **任务:[在此处插入用户的具体问题或任务]**”
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: devbooks-archiver
3
3
  description: devbooks-archiver:归档阶段的唯一入口,负责完整的归档闭环(自动回写→规格合并→文档同步检查→变更包归档移动)。用户说"归档/archive/收尾/闭环/合并到真理"等时使用。
4
+ recommended_experts: ["System Architect", "Technical Writer"]
4
5
  allowed-tools:
5
6
  - Glob
6
7
  - Grep
@@ -232,7 +233,19 @@ health: active # 健康状态:active | stale | depr
232
233
  - 更新分层约束(如有变更)
233
234
  4. **记录合并日志**:在 c4.md 末尾添加变更记录
234
235
 
235
- ### 第 5 步:文档同步检查
236
+ ### 第 5 步:文档一致性检查
237
+
238
+ 在归档前运行文档一致性检查:
239
+
240
+ ```
241
+ devbooks-docs-consistency --check
242
+ ```
243
+
244
+ 检查结果仅记录与提示,不阻塞归档。
245
+
246
+ ---
247
+
248
+ ### 第 6 步:文档同步检查
236
249
 
237
250
  检查 design.md 的 "Documentation Impact" 章节:
238
251
 
@@ -247,7 +260,7 @@ health: active # 健康状态:active | stale | depr
247
260
  - 输出警告,列出需要更新的文档
248
261
  - 不阻塞归档,但在归档报告中标记为 "文档待更新"
249
262
 
250
- ### 第 6 步:变更包归档移动(新增)
263
+ ### 第 7 步:变更包归档移动(新增)
251
264
 
252
265
  将已完成的变更包移动到归档目录:
253
266
 
@@ -408,8 +421,6 @@ archived-by: devbooks-archiver
408
421
 
409
422
  ---
410
423
 
411
- ## MCP 增强
424
+ ## MCP 说明
412
425
 
413
426
  本 Skill 不依赖 MCP 服务,无需运行时检测。
414
-
415
- MCP 增强规则参考:`skills/_shared/MCP增强模板.md`