Files
BMAD-METHOD/docs/zh-cn/reference/modules.md
T
Emmanuel Atsé cede485217 feat(docs): Add sidebar order validator for doc frontmatter (#2409)
* feat(docs): add sidebar order validator

Adds tools/validate-sidebar-order.js to validate sidebar.order values
in YAML frontmatter across English and translated docs.

Checks for duplicate orders, gaps in sequence, and missing order fields.
For translations, also warns on order drift from English counterparts.
Wired into the quality script as docs:validate-sidebar.

* fix(validate-sidebar): tighten language detection and drift guard, add docstrings

* fix(validate-sidebar): replace subdirectory heuristic with locale pattern matching

detectLanguageDirs() previously classified any top-level docs/ directory
containing subdirectories as a translation language. This was too broad —
if an English section ever gained nested subfolders it would be silently
excluded from validation.

Replaced with a BCP 47 locale-code regex (/^[a-z]{2}(?:-[a-zA-Z]{2})?$/)
that matches known patterns (cs, fr, vi-vn, zh-cn) and won't falsely
classify content sections like explanation/ or reference/.

* fix(validate-sidebar): guard drift check against undefined order values

extractSidebarOrder() returns { hasSidebar: false } when no sidebar block
exists, leaving order as undefined rather than null. The drift check only
guarded against null, allowing undefined values to emit noisy warnings
like "Order drift: ... order undefined".

Changed the guard to typeof === 'number' which correctly excludes both
undefined and null without relying on a specific sentinel value.

* chore(validate-sidebar): add JSDoc docstrings to all functions

Adds @param and @returns annotations to extractSidebarOrder,
detectLanguageDirs, getEnglishSections, checkDirectory,
checkTranslationDrift, and relativePath.

* fix(validate-sidebar): add to pre-commit hook

* refactor(validate-sidebar): harden parsing and edge-case handling

Refactor to main() wrapper with pure return-based APIs, single directory
scan, and shared reporting. Harden frontmatter parsing (anchored delimiter,
direct-child-only order extraction, flow mapping support) and validation
(Infinity/zero guard, gap flood cap, multi-segment locales, graceful ENOENT).

* docs: fix sidebar.order duplicates and gaps across all locales

Resolves all validator errors flagged by the new
tools/validate-sidebar-order.js check.

English (docs/{explanation,how-to,reference}/):
- Renumbered to remove duplicates; established reading order
  for new explanation pages added since orders were last set.

Translations (cs, fr, vi-vn, zh-cn):
- Mirrored English structural ordering where files exist, then
  compacted to 1..N within each directory to eliminate gaps
  caused by missing translation files.

Non-blocking drift warnings remain where translation directories
have fewer files than English; these are expected per the
validator's design.

---------

Co-authored-by: Brian Madison <bmadcode@gmail.com>
2026-05-25 10:15:37 -05:00

3.9 KiB
Raw Blame History

title, description, sidebar
title description sidebar
官方模块 BMad 可选模块参考:能力边界、适用场景与外部资源
order
5

BMad 通过可选模块扩展能力。你可以在安装时按需选择模块,为当前项目增加特定领域的 agentworkflowskill

:::tip[安装模块] 运行 npx bmad-method install,在交互步骤中勾选所需模块。安装器会自动生成对应 skills 并写入当前 IDE 的 skills 目录。 :::

先看总览

模块 代码 最适合 核心能力
BMad Builder bmb 扩展 BMad 本身 构建自定义 agent / workflow / module
Creative Intelligence Suite cis 前期创意与问题探索 头脑风暴、设计思维、创新策略
Game Dev Studio gds 游戏方向研发 游戏设计文档、原型推进、叙事支持
Test ArchitectTEA tea 企业级测试治理 测试策略、可追溯性、质量门控

BMad Builderbmb

用于“构建 BMad”的元模块,重点是把你的方法沉淀成可复用能力。

你会得到:

  • Agent Builder:创建具备特定专业能力的 agent
  • Workflow Builder:设计有步骤与决策点的 workflow
  • Module Builder:将 agent/workflow 打包为可发布模块
  • 交互式配置与发布支持(YAML + npm)

外部资源(英文):

Creative Intelligence Suitecis

用于前期探索与创意发散,帮助团队在进入规划前澄清问题与方向。

你会得到:

  • 多个创意向 agent(如创新策略、设计思维、头脑风暴)
  • 问题重构与系统化思考支持
  • 常见构思框架(含 SCAMPER、逆向头脑风暴等)

外部资源(英文):

Game Dev Studiogds

面向游戏开发场景,覆盖从概念到实现的结构化 workflow。

你会得到:

  • 游戏设计文档(GDD)生成流程
  • 面向快速迭代的 Quick Dev 模式
  • 叙事设计支持(角色、对话、世界观)
  • 多引擎适配建议(Unity/Unreal/Godot 等)

外部资源(英文):

Test ArchitectTEAtea

面向高要求测试场景的独立模块。与内置 QA 相比,TEA 更强调策略、追溯与发布门控。

你会得到:

  • Murat 测试架构师 agent
  • 覆盖测试设计、ATDD、自动化、审查、追溯的 workflow
  • NFR 评估、CI 集成与测试框架脚手架
  • P0-P3 风险优先级策略与可选工具集成

外部资源(英文):

如何选择模块

  • 你要“扩展框架能力”而不是只用框架:优先 bmb
  • 你还在探索方向、需要结构化创意过程:优先 cis
  • 你是游戏项目:优先 gds
  • 你需要测试治理、质量门控或审计追溯:优先 tea

:::note[模块可以组合安装] 模块之间不是互斥关系。你可以按项目阶段增量安装,并在后续重新运行安装器同步 skills。 :::

相关参考