Files
BMAD-METHOD/docs/cs/explanation/why-solutioning-matters.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

2.9 KiB
Raw Blame History

title, description, sidebar
title description sidebar
Proč je solutioning důležitý Pochopení toho, proč je fáze solutioningu klíčová pro projekty s více epicy
order
4

Fáze 3 (Solutioning) překládá co budovat (z plánování) na jak to budovat (technický návrh). Tato fáze zabraňuje konfliktům agentů v projektech s více epicy tím, že dokumentuje architektonická rozhodnutí před zahájením implementace.

Problém bez solutioningu

Agent 1 implementuje Epic 1 pomocí REST API
Agent 2 implementuje Epic 2 pomocí GraphQL
Výsledek: Nekonzistentní design API, integrační noční můra

Když více agentů implementuje různé části systému bez sdíleného architektonického vedení, dělají nezávislá technická rozhodnutí, která si mohou odporovat.

Řešení se solutioningem

Architektonický workflow rozhodne: "Použít GraphQL pro všechna API"
Všichni agenti dodržují architektonická rozhodnutí
Výsledek: Konzistentní implementace, žádné konflikty

Explicitní dokumentací technických rozhodnutí všichni agenti implementují konzistentně a integrace se stává přímočarou.

Solutioning vs. plánování

Aspekt Plánování (Fáze 2) Solutioning (Fáze 3)
Otázka Co a proč? Jak? Pak jaké jednotky práce?
Výstup FR/NFR (požadavky) Architektura + epicy/stories
Agent PM Architect → PM
Publikum Zainteresované strany Vývojáři
Dokument PRD (FR/NFR) Architektura + soubory epiců
Úroveň Obchodní logika Technický design + rozklad práce

Klíčový princip

Učiňte technická rozhodnutí explicitní a zdokumentovaná, aby všichni agenti implementovali konzistentně.

Toto zabraňuje:

  • Konfliktům stylu API (REST vs GraphQL)
  • Nekonzistencím v návrhu databáze
  • Neshodám v řízení stavu
  • Nesouladu konvencí pojmenování
  • Variacím v bezpečnostním přístupu

Kdy je solutioning vyžadován

Cesta Solutioning vyžadován?
Quick Flow Ne — přeskočte úplně
BMad Method Simple Volitelný
BMad Method Complex Ano
Enterprise Ano

:::tip[Pravidlo palce] Pokud máte více epiců, které by mohly být implementovány různými agenty, potřebujete solutioning. :::

Cena přeskočení

Přeskočení solutioningu u složitých projektů vede k:

  • Integračním problémům objeveným uprostřed sprintu
  • Přepracování kvůli konfliktním implementacím
  • Delšímu celkovému času vývoje
  • Technickému dluhu z nekonzistentních vzorů

:::caution[Multiplikátor nákladů] Zachycení problémů se zarovnáním v solutioningu je 10× rychlejší než jejich objevení během implementace. :::