mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-08-28 19:20:41 +08:00
cede485217
* 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>
2.4 KiB
2.4 KiB
title, description, sidebar
| title | description | sidebar | ||
|---|---|---|---|---|
| 派对模式 | 多智能体协作——将所有 AI 智能体汇聚到一次对话中 |
|
bmad-party-mode 用于多角色协作讨论:把 PM、架构、开发、UX 等视角放到同一轮对话里,快速暴露分歧、对齐取舍。
它是什么
Party Mode 不是单角色问答,也不是单文档改写。它更像一次”有主持人的多方评审会”:
- BMad Master 根据你的问题调度相关角色
- 各角色以自身关注点回应
- 角色间会互相补充、质疑、修正
你可以连续追问,直到形成可执行结论。
什么时候使用
- 面临高影响决策,且存在明确 trade-off
- 需要跨角色快速对齐(产品、技术、交互、测试)
- 出现故障或争议,需要复盘责任和改进方向
- 做 sprint 规划或回顾,需要多视角共识
不适合的场景
- 你只需要单一角色的直接执行(例如仅改一段文案)
- 你已有明确决策,只需进入实现
- 你需要的是对同一输出做深度二次推理
这些场景通常更适合:
bmad-quick-dev(直接进入实现)advanced elicitation(二次推理补强)
价值与边界
Party Mode 的价值在于”更快看见盲区”:
- 优势:视角多、分歧显性、对齐速度快
- 代价:讨论信息量大,需要你主动控节奏和收敛
:::caution[使用建议] 先给清晰议题,再给决策约束(时间、风险、成本、成功标准),讨论质量会明显更高。 :::
若你的目标是结构化发散创意,可先参考 头脑风暴;若你已经有初稿并想做二次推理补强,可参考 高级启发。完整阶段位置见 工作流地图。
与相近模式的区别
| 模式 | 核心目标 | 最佳场景 | 输出形态 |
|---|---|---|---|
bmad-party-mode |
多角色对齐与权衡 | 跨职能决策、复盘、规划 | 共识点、争议点、决策建议 |
bmad-brainstorming |
发散创意并收敛 | 方向探索、创意卡点 | 想法池与优先级 |
advanced elicitation |
对现有输出做二次推理 | 规格/方案补强 | 改进版内容与风险补充 |