Commit Graph

649 Commits

Author SHA1 Message Date
Brian a74ad5df1d
Merge 9799d10123 into 397b2a5c87 2026-06-09 10:35:14 +07:00
Oneby Wang 072d0a7458
fix(skills): renumber retrospective workflow steps (#2448)
Co-authored-by: Brian <bmadcode@gmail.com>
2026-06-06 20:37:51 -05:00
duliangang b178f27c01
fix(bmad-create-epics-and-stories): discover bmad-ux spine outputs (#2446) 2026-06-06 20:32:47 -05:00
Alex Verkhovsky c9d9316e97
fix: clarify quick dev subagent use (#2450)
* fix: clarify quick dev subagent use

* fix: clarify subagent use in more workflows
2026-06-04 04:49:40 -07:00
Brian feab3d5e4e
bmad-brainstorming: facilitation modes, append-only memlog, and a visual session composer (#2445)
* Initial draft: brainstorming improved

* bmad-brainstorming: apply quality-analysis fixes

- Add ## Overview heading (prose was already present)
- Fix resume scan to glob output_dir/*/session.md (per-session subfolders);
  handle multiple in-progress sessions
- Anchor brain_methods to {skill-root} and always pass --file to brain.py
  (--file before subcommand); drop the unreliable conditional
- Log decisions, dismissed E3 false positive, verified tests (15 passed)

* bmad-brainstorming: memlog session memory + facilitation refinements

Replace the running-log concept with a generic, append-only memlog
(scripts/memlog.py): a flat, chronological, write-only session memory any
skill can reuse. Entries land at the end in the order they happen; --type
tags the kind (idea/insight/question/decision/technique); nothing is
grouped, reordered, or rewritten. The file is .memlog.md, read only on resume.

- scripts/memlog.py (init/append/set) + test_memlog.py (20 tests)
- SKILL.md: reordered into framing + flow; lean Memlog framing; batch
  technique model (Facilitator Chosen / Browse / Category / Inventive Flow);
  Progressive removed; facilitation stance preserved
- references/finalize.md: two-move synthesis + opt-in artifacts, each derived
  from the memlog via subagent
- references/headless.md, customize.toml: memlog wiring + per-topic folders

* bmad-brainstorming: gate technique-flow choice and stop full-catalog dumps

- brain.py: `list` now requires --category or --all; a bare `list` is refused so the full ~100-technique catalog can no longer flood context. --all is the deliberate full-dump escape hatch.
- SKILL.md: technique-flow selection is now a hard gate (present the four ways, wait for the user's pick) instead of a soft default that got skipped; Stance "no multiple-choice" rule scoped to generation, with an explicit carve-out for that one process menu.
- headless.md: use `list --all` deliberately, passing --file.
- customize.toml: fix stale "progressive flows" wording to match the four real flows.
- test_brain.py: regression tests for the list guard (bare refused, --all dumps all).

* bmad-brainstorming: remove .decision-log.md build-time artifact

The workflow-builder writes .decision-log.md to track its own build session; it is a build-time artifact, not part of the shipped skill, so it should not be committed to the project.

* bmad-brainstorming: facilitation modes, attributed memlog, and the selection composer

- Three facilitation modes chosen up front (Facilitator / Creative Partner / Ideate for me), each a loaded frame; SKILL.md routes mode + technique selection primarily through the selection page, with the in-chat menus as fallback.
- memlog: optional --by user|coach attribution (required in Creative Partner) so authorship stays visible in the log.
- brain.py: generates a self-contained "browse all" selection page (brain-selector.html) - a session composer with facilitation mode, a hand-picked + Random + Invent + AI-picks technique strategy, category toggle-chips and a category-aware filter, and a copy-to-clipboard prompt with a paste-back banner. Category-tinted cards, 13 crafted category icons, and a hand-assigned icon for each of the 100 techniques. `html` writes to a file (never dumps the catalog into context); a snapshot test keeps the shipped page in sync with the CSV.
- Drop the now-unused Six Thinking Hats detail file; the catalog needs no detail files.
- finalize.md: synthesis is mode-aware and the "hand them the mirror" step reads the by-attribution tags.

* bmad-brainstorming: fix code-review findings

memlog.py
- Parse frontmatter by the first line that is exactly `---`, so a `---` inside a
  topic/goal value no longer truncates the block, drops `status`, and breaks resume
  forever. Neutralize newlines in field values on render too.

brain.py (selector page + CLI)
- Composer: category toggles now define session scope; the text filter is a pure
  browse aid. checked() and the random pool both key off scope (offCats), so hidden
  cards are never silently copied and a stray filter term can't starve a random draw.
- Clipboard: only show the "Copied!" banner when the copy actually succeeds; on
  failure show a warning and a prefilled prompt() so the text is never lost.
- category_style: fall back to the neutral glyph instead of KeyError if the hue/glyph
  dicts ever desync.
- random: clamp -n so a negative/oversized value returns cleanly instead of crashing.
- --extra: merge a JSON overlay of additional_techniques into every command, so the
  browse page and category draws include custom techniques/categories as advertised.

docs
- SKILL.md: fix dangling `## Choosing Your Mode` anchor and the "Copy selection"
  button label; document --extra in the regen instructions.
- mode-autonomous.md: persist the mode flip when handing off from autonomous, so a
  resume restores the new stance.
- finalize.md: grammar/typo fixes (CodeRabbit).

tests
- Regression tests for the memlog `---` fix, --extra merge, negative -n, and the
  category fallback; regenerated the snapshot-tested selection page. Renamed the
  shadowing `type`/`l` locals flagged by CodeRabbit. 52 passing.

* bmad-brainstorming: composer header polish + dark mode

- Center header content (.hwrap) so it aligns with the card column on wide screens.
- Replace the text filter with jump-nav: category chips smooth-scroll to their
  section (offset for the sticky header); drop the category exclude-toggle, so
  Random/AI draw from the whole catalog.
- Fix narrow-screen crowding between the chips and the Copy prompt button.
- Move Copy prompt to the end of the Techniques row, anchored to the Total readout.
- Add a per-mode hint line that explains the selected facilitation stance.
- Dark mode: refactor all colors to CSS variables + a dark palette, with a header
  toggle (☾/☀) that defaults to system preference and persists in localStorage; an
  inline head script applies the theme before first paint to avoid a flash. Category
  hues are lifted toward white on dark surfaces to stay legible.

Regenerated the snapshot-tested selection page; SKILL.md wording updated (chips are
jump-nav, not a filter). 52 Python tests passing.

* bmad-brainstorming: condense SKILL.md, extract resume + in-chat technique frames

- Rewrite SKILL.md: consolidate framing, merge session setup into Run a
  Session, descriptive (non-imperative) Overview true across all 3 stances
  (~2,790 -> ~2,070 tokens)
- Extract Resuming to references/resume.md (loads only on resume)
- Extract in-chat technique selection to references/in-chat-techniques.md
  (loads only when the composer page is declined)
- Add HTML-open recovery guidance to the composer-page step
- Ideate-for-me now auto-produces the HTML keepsake (finalize.md +
  mode-autonomous.md) instead of asking first

* Enhance bmad-brainstorming: goal facet, proven grouping, convergence, icon sidecar

Catalog (brain-methods.csv -> 108 methods):
- Add provenance / good_for / audience columns (additive, backward-compatible)
- Add 8 researched classic methods: How Might We, Job to Be Done, Empathy Map,
  Backcasting, TRIZ Contradiction, Fishbone Diagram, Build on What Works, Scenario Cross

Selector page (brain.py generator):
- "Proven & Professional" lead group (29 named methods, cross-category)
- Super-group ordering (Structured/Creative/Wild/Introspective) replacing alphabetical
- "Great for" goal filter driven by good_for tags
- Per-category "Invent a ... technique" cards reusing the invent flow

Convergence:
- New references/converge.md (diverge -> converge -> finalize); wired into SKILL.md

Maintainability:
- Extract category + technique icons to assets/brain-icons.json; brain.py loads the
  sidecar, with logic and fallbacks staying in code (8 new icons added, full coverage)

Docs:
- Add analysis/ (catalog-analysis.md + method-matrix.csv): the 4-axis review behind these changes

All 52 tests pass.
2026-06-02 22:54:43 -05:00
Brian fae7015226
Redesign party-mode skill as conversation-first, subagents opt-in (#2441)
Reframes the party-mode skill around outcomes instead of a rigid
subagent script, addressing issue #2280.

- Voicing the room is the default; subagents become opt-in (--subagents)
  for rounds that genuinely need independent thinking.
- Removes the lossy 400-word context cap and the 'Do NOT use tools'
  constraint that drove subagents to fabricate on grounded questions.
- Adds a 'What Good Feels Like' bar: short in-character turns, real
  drama over consensus, brevity by default.
- Adds orchestrator weaving so independently-produced turns read as one
  conversation without altering what any persona actually argued.
- Slims SKILL.md from 128 to 75 lines.
2026-05-30 00:39:22 -05:00
Brian Madison 9799d10123 fix(installer): address second-round code-review criticals
writeGlobalUserCore now line-surgery upserts only the [core] keys it owns
into the existing file content — no read-parse-merge-emit round-trip. Hand
edits in shapes the minimal parseSimpleToml dropped (arrays, single-quoted
strings, dotted/quoted keys, \uXXXX escapes, custom sections) survive
byte-for-byte. Dead emitTomlSections helper removed.

writeModuleTomls emits core's shipped defaults under top-level [core], not
nested [modules.core] — matches where writeCentralConfig writes core deltas
and where resolve_config.py consumers read core.* from.

tomlString auto-infers TOML type from --set values: true/false → bool,
integer pattern → int, decimal pattern → float, otherwise quoted string.
Explicit-string escape hatch: --set k='"true"' writes "true" as a string.
Previously every --set value was wrapped in quotes, so --set bmm.workers=4
wrote "4" and downstream numeric comparisons broke.

upsertTomlKey's inline-comment detector now tracks double-quoted string
state via findInlineCommentStart, so a # inside a basic-string value
(legal per the TOML spec, contrary to the previous defending comment)
is no longer truncated. tomlHasKey and upsertTomlKey both use a new
isSectionHeader matcher that tolerates trailing inline comments on the
header line and walks every section occurrence — fixes mis-routing on
hand-edited files with [core]  # comment headers or duplicate sections.

Python test harnesses (test_resolve_config.py, test_resolve_customization_cascade.py)
now force BMAD_HOME to the synthetic isolation path unconditionally
instead of env.get(BMAD_HOME, default), which was a no-op when the
developer had BMAD_HOME set in their shell.

Adds 21 JS assertions covering the new behaviors directly: tomlString
type inference, # inside string values, inline-comment headers, and
writeGlobalUserCore round-trip preservation of hand-edited shapes.

Tests: 405 JS + 21 Python pass. Lint, markdownlint, prettier green.
2026-05-26 00:52:16 -05:00
Brian Madison 579c78d2aa fix(installer): address code-review findings on config refactor
Nine fixes covering bugs caught by my code-review, Augment, and CodeRabbit:

quickUpdate identity overwrite (official-modules.js): collectModuleConfigQuick
now lazy-loads globalConfig and falls back through ~/.bmad/config.user.toml
before getDefaultUsername(), so `bmad update` no longer silently overwrites
the user's global identity with the OS username.

computeProcessedDefault placeholder asymmetry (manifest-generator.js): build
a shipped-defaults crossKeyDefaults map and feed BOTH writeCentralConfig and
writeModuleTomls through it. Previously stripDefaults resolved {output_folder}
against user answers while module.toml resolved it against shipped defaults —
overriding output_folder silently reverted every derived path on read.

parseTomlScalar escape order (global-config.js): single-pass regex replacer
so `\\n` round-trips as backslash+n instead of collapsing to a newline.
Windows paths and any TOML string with literal `\n`/`\t`/`\r` survive.

writeGlobalUserCore nested-table corruption (manifest-generator.js): emit
nested objects as proper dotted sub-tables (`[modules.bmm]`) instead of
serializing them as `"[object Object]"` strings inside the parent section.

extractAgentBlocks dead code (manifest-generator.js): deleted. The agent
preservation invariant was intentionally retired by Task F (agents live in
module.toml floor); the function had no callers.

applySetOverrides 3-tier routing (set-overrides.js): consults
~/.bmad/config.user.toml first, then project config.user.toml, then routes
known core scope:user keys (user_name, communication_language per core
schema) to global when neither file owns them. Prevents
`bmad install --set core.user_name=Alice` from polluting project team config.

BMAD_HOME tilde expansion (global-config.js): JS resolver now matches
Python's Path.expanduser() so installer and resolver agree on the global
location when BMAD_HOME is set in non-shell contexts (.env, Docker, Windows).

resolve_config.py fail-fast (resolve_config.py): when --project-root is
explicitly passed but _bmad/ doesn't exist, exit 1 with a clear error
instead of silently returning {}. Global-only mode (no --project-root)
remains permissive.

_MODULE_SKILLS_RE hyphen support (resolve_customization.py): allow hyphens
in module slugs (e.g. `foo-bar-skills/`) so qualified-name skill matching
works for hyphenated modules.

Tests: 383 JS tests + 21 Python tests pass; lint, markdownlint, prettier all
green. Suite 44 now isolates BMAD_HOME and asserts the new 3-tier routing
contract for `--set` overrides.
2026-05-25 23:52:24 -05:00
Brian Madison bec2c04a6d feat(installer): cross-platform global config + lean per-project overrides
Phase 1 of the config refactor. Splits configuration into three clearly-owned
layers and removes per-install duplication:

- Global tier (~/.bmad/, $BMAD_HOME override): one-time identity + machine-wide
  defaults. config.user.toml holds scope:user core answers (user_name, language)
  so they're asked once per machine, not once per project.
- Per-module shipped-defaults floor (_bmad/{module}/module.toml): regenerated
  every install; the resolver's lowest-priority layer.
- Project overrides (_bmad/config.toml): lean — only emits deltas from module
  defaults. No more [agents.X] sections (agents live in module.toml floor).

Resolver chain (src/scripts/resolve_config.py) is now 7 tiers and supports
global-only operation (no _bmad/config.toml required). Customization cascade
(resolve_customization.py) splits cleanly from config: customize.toml files at
global, project, and custom tiers; never reads config.toml.

Installer (tools/installer/):
- New global-config.js: cross-platform resolver + dependency-free TOML reader.
- official-modules.js: silently reuses scope:user globals; logs a friendly note
  showing what was reused/seeded and where to edit it.
- manifest-generator.js: writes per-module module.toml with placeholder
  resolution for cross-key references (e.g. {output_folder}); routes core
  scope:user answers to ~/.bmad/config.user.toml.
- Removed --ask flag.

Tests: 11 new Python resolver tests, 8 new customization-cascade tests,
suites 35/37/38/45/46 in test-installation-components.js updated/added for the
new contract (with BMAD_HOME isolation to avoid touching real ~/.bmad).
2026-05-25 23:05:18 -05:00
Jacob du Toit 7b31b1accd
feat: expand advanced elicitation methods with 19 new techniques (#2062)
Adds 19 new elicitation methods across 7 categories including a new
'framing' category. All existing 50 methods preserved. Entries sorted
alphabetically by category then method name.

New methods added:
- advanced: Chain-of-Thought Scaffolding, Few-Shot Exemplar Priming
- collaboration: Six Thinking Hats, Delphi Method
- core: Second-Order Thinking, Inversion Analysis, Problem Decomposition,
  Analogy Mapping, Steelmanning
- creative: Constraint Injection, Morphological Analysis
- framing (new): Abstraction Laddering, Reframe the Question,
  Stakeholder Lens Rotation
- learning: Deliberate Practice Loop
- research: Source Triangulation
- risk: Assumption Audit, Cascading Failure Simulation
- technical: Boundary & Edge Case Sweep

Closes #2061

Co-authored-by: Brian <bmadcode@gmail.com>
Co-authored-by: Alex Verkhovsky <alexey.verkhovsky@gmail.com>
2026-05-25 14:09:17 -05:00
SevenSteven 9a2fba97a3
fix: capture dev story baseline commits (#2403)
Co-authored-by: Brian <bmadcode@gmail.com>
2026-05-25 13:50:08 -05:00
Jérôme Revillard 436845493f
fix(skills): strengthen activation guardrails to prevent LLM short-circuiting (#2398)
* fix(skills): strengthen activation guardrails for all workflow skills

Add explicit "Activation is complete" boundary markers that require
confirming activation_steps_prepend and activation_steps_append were
fully executed before beginning the main workflow.

Previously, the guardrail was either missing (bmad-product-brief,
bmad-prd, bmad-investigate) or too weak ("Begin the workflow below").
LLM agents would short-circuit complex activation sequences (INCLUDE →
READ → RUN → CHECK → FILTER → CD) by guessing variables instead of
executing steps in order, causing append steps and on_complete hooks
to be silently skipped.

The new guardrail explicitly names both prepend and append steps,
requiring confirmation before proceeding. This prevents agents from
starting the main workflow in parallel with activation.

23 skills updated: bmad-product-brief, bmad-prd, bmad-prfaq,
bmad-investigate, bmad-create-story, bmad-dev-story,
bmad-quick-dev, bmad-code-review, bmad-correct-course,
bmad-sprint-planning, bmad-sprint-status, bmad-retrospective,
bmad-qa-generate-e2e-tests, bmad-checkpoint-preview,
bmad-check-implementation-readiness, bmad-create-architecture,
bmad-create-epics-and-stories, bmad-generate-project-context,
bmad-create-ux-design, bmad-document-project, bmad-market-research,
bmad-technical-research, bmad-domain-research.

* fix(skills): extend activation gate to agent + new skills, refine placement

- bmad-product-brief / bmad-prd: pull activation_steps_append out of
  the numbered list so the sentinel reads as a paragraph break, not
  as the next list item.
- bmad-investigate: move the sentinel above Step 7 (routing) — Step 7
  is workflow routing, not activation; the gate must fire first.
- bmad-agent-{analyst,tech-writer,pm,ux-designer,architect,dev}: add
  the same gate between Step 7 (append) and Step 8 (menu dispatch).
  Persona skills had the same short-circuit risk but no sentinel.
- bmad-ux, bmad-spec: new skills introduced on main after this branch
  forked; apply the same gate so the pattern stays consistent.
- removals.txt: register bmad-create-ux-design as renamed to bmad-ux.

---------

Co-authored-by: Brian Madison <bmadcode@gmail.com>
2026-05-25 09:59:38 -05:00
Alex Verkhovsky 1a5df418b3
fix: keep brainstorming idea flow collaborative (#2402)
Co-authored-by: Brian <bmadcode@gmail.com>
2026-05-25 09:34:49 -05:00
Dov Benyomin Sohacheski bfecb6ee95
fix(bmm-skills): define project_context in dev-story, sprint-planning, sprint-status (#2422)
Co-authored-by: Brian <bmadcode@gmail.com>
2026-05-25 09:33:05 -05:00
Rayan Salhab f28d04a92a
fix: write customization JSON as UTF-8 (#2414)
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-05-24 14:42:45 -05:00
Brian aa6dece05d
feat(bmad-spec): introduce Spec kernel distiller skill (#2417)
* feat(bmad-spec): add Spec kernel distiller skill

New 2-plan-workflows skill that distills any intent input (brain dump,
PRD, transcript, brief) into a spec.md carrying the five-field kernel:
Problem, Capabilities, Constraints, Non-goals, Success signal. Headless
callers receive JSON; interactive runs close conversationally with the
spec path and gap-coverage invitations.

Includes:
- SKILL.md with activation contract and conventions
- customize.toml exposing template path, output path, run-folder pattern
- assets/spec-template.md (five-field skeleton)
- assets/headless-schemas.md (JSON IO contracts)

* remove brain-dump fallback config from bmad-spec customize.toml

* refactor(bmad-spec): companions+sources model, routing tilt, flat output path

- Collapse `related:` into `companions:`; companion paths may point inside the spec folder (spec-authored) or outside it (adopted from an upstream skill), distinguished implicitly by path
- `sources:` reserved for fully-absorbed inputs; downstream does NOT read these
- Soften mutation contract: bmad-spec owns SPEC.md and spec-authored companions; adopted companions belong to their originating skill
- Add "when to spawn a companion" tilt: multi-item catalogs, tables, diagrams (always), editorial voice rules; sub-bullets in a kernel field signal it has outgrown the kernel
- Fix Spec Law rule 7 and Pass 2: load-bearing content lands in SPEC.md or a companion, not the decision log (the log records wrapper-drops only)
- Flatten output path to `{planning_artifacts}/specs/spec-{slug}-{date}/`, mirroring `prds/` and `ux-designs/`; drop `spec_folder_name` (no longer used)
- Extract Load-bearing definition into its own section above Spec Law

* chore(core): retire bmad-distillator, promote bmad-spec to core

- Delete bmad-distillator/ and all registry + doc references (superseded by bmad-spec; no skill or workflow in any BMad module invoked it)
- Add bmad-distillator to removals.txt so installer cleans it from existing IDE skill directories on update
- Move bmad-spec from bmm-skills/2-plan-workflows/ to core-skills/ (universal scope: game design, research hypotheses, editorial briefs, policy, business plans, not just software)
- Register bmad-spec in core module-help.csv and bmad-pro-skills marketplace plugin
- Drop bmad-distillator section from core-tools.md (en, vi-vn, cs, fr, zh-cn) and vi-vn dev guide; renumber subsequent sections

* refactor(bmad-spec): add lean-prose discipline + generalize help text

- Add Spec Law rule 8: lean prose. Every sentence carries load-bearing content; cut decoration, hedges, backstory, throat-clearing. Applies to SPEC.md, companions, and decision log.
- Update Self-Validate Pass 1 to enforce rules 1-6 and 8 (rule 7 stays in Pass 2)
- Prime the operation up-front: write lean from the first pass, every sentence must earn its place
- Note in Companions section that companions follow the same lean discipline
- Generalize core module-help.csv entry: domain-agnostic framing (software, game design, research, editorial, policy, business, anything intent-bearing); call out succinct, no-fluff and "locks the WHAT before the HOW" as the value props

* fix(bmad-spec): address PR review findings (CodeRabbit + Augment)

- headless-schemas.md: rewrite spec_path examples to point at the spec folder (not a file), rename source_artifact to sources[] array, add companions[] array, update verdict from "six rules" to "eight rules", disambiguate reason requirement (only when status=blocked)
- SKILL.md activation: fix config path from {project-root}/_bmad/config.yaml to {project-root}/_bmad/core/config.yaml (matches other BMM skills)
- customize.toml + SKILL.md Workspace: drop {date} from default run_folder_pattern (spec-{slug}); same slug = same folder = trivial in-place update, no glob-and-pick-most-recent needed. Override available for users who want dated history.
- spec-template.md: rename "## Success signals" (plural) to "## Success signal" (singular) to match SKILL.md kernel naming
- SKILL.md Frontmatter conventions: fix adopted-companion example path from _bmad-output/ux-designs/foo-ux/DESIGN.md to ../../ux-designs/ux-foo-bar-2026-05-23/DESIGN.md (matches actual flat-output convention)
- SKILL.md Spec Law: fix double-period typo in rule 2 ((stack, conventions)..)
- SKILL.md Overview: fix awkward "bloat with expansive line item details the kernel" phrasing; drop software-flavored downstream consumer list since bmad-spec is now a core skill serving any domain

* fix(bmad-spec): drop {planning_artifacts} dependency; output to {output_folder}/specs

bmad-spec is a core skill but its default path used {planning_artifacts}, a bmm-module variable. Core-only installs (no bmm) would fail at activation when the resolver tried to expand the path.

Land specs directly under {output_folder}/specs/spec-{slug}/ instead. Works in any install regardless of installed modules, and aligns with the long-term BMad direction of grouping artifacts as siblings under {output_folder}/<type>/ rather than nested under planning vs implementation parents.

In bmm installs, adopted-companion paths from spec to UX/PRD pick up one extra .. (e.g., ../planning-artifacts/ux-designs/<run>/DESIGN.md) since the spec folder is now one level up from planning-artifacts. Examples in SKILL.md and headless-schemas.md updated. module-help.csv output-location updated and stale -{date} fragment removed.

* docs(bmad-spec): add reference docs, trim headless schema, tighten defaults

- Add full bmad-spec entry to docs/reference/core-tools.md and table-row
  stubs to cs/fr/vi-vn/zh-cn (full translation pending).
- Strip headless-schemas.md to a minimal {status, files} success response
  and {status, error_code, reason} blocked response. Drop spec_path,
  capabilities, verdict, decision_log_path — all derivable from the files
  themselves.
- Narrow customize.toml persistent_facts default from recursive glob to
  single {project-root}/project-context.md; document override path.
- Drop unused {doc_workspace} convention line from SKILL.md.
- Clarify Self-Validate verdict handling for interactive vs headless.
- Document missing_slug error code in SKILL.md + headless schema.
2026-05-24 14:08:34 -05:00
Brian ee47e30cf6
refactor(bmad-ux): spine-based UX skill (DESIGN.md + EXPERIENCE.md) (#2413)
* refactor(bmad-ux): replace bmad-create-ux-design with lean spine-based bmad-ux

* refactor(bmad-ux): adopt DESIGN.md spec, split into two-file spine, align prd/brief

DESIGN.md (visual identity per the Google Labs spec) and EXPERIENCE.md
(behavior, flow, IA) replace the single design.md spine. EXPERIENCE.md
cross-references DESIGN.md tokens via the spec's {path.to.token} syntax.

Example suite restructure
- 3 DESIGN.md examples: editorial (Stitch source / Linen & Logic), calm
  native mobile (Quill), shadcn-on-Tailwind web SaaS (Drift)
- 2 paired EXPERIENCE.md examples (Quill, Drift); Linen & Logic unpaired
  to model the Stitch handoff scenario
- Replaces the prior 2-example combined spine set

Discovery additions (outcome-driven, one line each)
- Source scan: glob {planning_artifacts}/ for candidates, parent never reads
- Form-factor: resolve before IA closes; journeys often derive it
- Surface closure: every stated need has a surface, every surface a journey
- Named-protagonist journeys (Mary, not "the user")
- Design handoff working mode (extensible producer registry, default: Stitch)

PRD and brief alignment with same insights
- bmad-prd: dropped standalone Primary Persona section from template;
  renamed "Personas + Journeys" entry to "Journey-led"; named-protagonist
  rule on UJs; form-factor probe; validation checklist updated
- bmad-product-brief: form-factor surfaced in Discovery topics

Quality scan fixes
- Added ## Overview heading; renamed ## Activation to ## On Activation
- Replaced ../ paths in example assets with {planning_artifacts}/
- Sources section compressed (abstract delta-only rule)
- Working mode aligned to "Fast path" / "Coaching path" BMad-wide convention

New
- references/design-md-spec.md: working summary of the spec for the LLM
- customize.toml: design_md_examples, experience_md_examples,
  design_handoffs registries
- .prettierignore: ignore .analysis/ quality-scan artifacts repo-wide

* refactor(bmad-ux): activation parity with prd/brief, opt-in reviewer gate, no headline grade

- Restructure On Activation as numbered six-step list mirroring bmad-prd
  and bmad-product-brief, restoring the explicit key-resolution list that
  earlier crammed-paragraph form had dropped (planning_artifacts and
  friends were silently unresolved at Create).
- Make Reviewer Gate opt-in and lens-selectable. At Finalize, ask before
  spending tokens on parallel reviewer subagents; at Validate intent,
  skip that question but still confirm lens picks. Stops the auto-run
  WCAG audit on hobby-stakes work.
- Drop the overall validation grade. Per-category verdicts and severity
  counts already say what is true; a single headline grade conflated
  design rigor with release readiness and led "POOR" pills landing on
  reports whose own bodies described the work as strong. Removed from
  references/validate.md (ladder rule + markdown twin), HTML template
  (grade pill div + CSS vars + classes).
- Trim creative-tools.md: drop the Custom entries section. Runtime
  prompt files should only carry what the LLM needs to act in this
  moment; how-to-extend-via-TOML is setup-time human documentation
  already covered by customize.toml comments.

* fix(bmad-ux): align validation report template with 8-category rubric

Template placeholders referenced 'Decision-readiness' and 'seven dimensions'
from the prior rubric. Replace with TEMPLATE_CATEGORY_NAME and inline the
eight canonical categories from references/validate.md so the synthesis pass
names them verbatim.

* fix(validate-skills): remove stale WF-01/WF-02 rules

WF-01/WF-02 were originally scoped to workflow.md files (now mostly gone)
but had been generalized to flag name/description in any non-SKILL.md
markdown. That over-captured legitimate spec files — e.g. DESIGN.md
examples in bmad-ux/assets/ that carry name/description per the Google
Labs DESIGN.md spec.

Step files are already covered by STEP-06. Rule count: 14 → 12.

* fix(bmad-ux): address PR review followups

- validation-report-template.html: severity badge class is badge-sev-*,
  not sev-* (the comment misled the synthesis pass).
- Sweep dangling bmad-create-ux-design references: module-help.csv,
  bmad-agent-ux-designer/customize.toml, bmad-prd/SKILL.md handoff list,
  workflow-map.md (en + 4 translations), getting-started.md (en + 4
  translations). Workflow-map output column updated to DESIGN.md +
  EXPERIENCE.md.
- references/validate.md: Markdown capitalized as a proper noun.
2026-05-22 23:16:06 -05:00
Brian 74cf467d57
v6.7.0: bundle module registry, retire marketplace, refresh display names (#2388)
* feat(installer): bundle module registry, retire marketplace, refresh display names

Prepares v6.7.0 for release:

- Moves bundled module list from tools/installer/modules/registry-fallback.yaml
  to bmad-modules.yaml at repo root; renames to reflect single-source-of-truth role.
- Retires the remote marketplace registry fetch in ExternalModuleManager; the
  installer now reads the bundled YAML only.
- Adds WDS (Whiteport Design Studio) entry alongside BMM, BMB, BMA, CIS, GDS, TEA.
- Refreshes display names and descriptions on every bundled module; TEA
  repositioned after BMM in the picker.
- Adds plugin_name override field on registry entries so modules whose
  marketplace.json declares a plugin under a different name than the installer
  code (e.g. WDS uses bmad-wds) match without falling back to the single-plugin
  heuristic.
- Removes the community modules picker from the interactive installer; previously
  installed community modules are preserved on update and can still be installed
  via --custom-source.
- Renames the custom-source confirm prompt for clarity.

CHANGELOG.md updated with the full v6.7.0 entry.

* feat(installer): fully retire community catalog plumbing

Removes the last marketplace network connections from the installer.
The v6.7.0 first pass retired the official-registry fetch but left
CommunityModuleManager + RegistryClient in place, which still
fetched community-index.yaml and categories.yaml on every install
to support the channel-gate and update flows.

This commit:

- Deletes tools/installer/modules/community-manager.js and
  registry-client.js entirely.
- Strips CommunityModuleManager calls from ui.js (channel gate +
  update channels), core/manifest.js (getModuleVersionInfo),
  core/installer.js (resolution + installed-modules listing), and
  modules/official-modules.js (findModuleSource fallback +
  pre-install plugin resolution + post-install manifest entry).
- Simplifies installFromResolution: community branch removed; all
  non-external installs are now treated as custom-source.
- Removes corresponding test suites (CommunityModuleManager unit
  tests and the entire RegistryClient suite).
- Updates CHANGELOG with the migration note.

After this commit, grep confirms zero references to the bmad-plugins-
marketplace registry from the installer. The only remaining 'marketplace'
references are about per-repo .claude-plugin/marketplace.json files,
which the installer reads from cloned custom-source repos.
2026-05-17 17:47:25 -05:00
Brian 71136bc6af
feat(bmad-prd): overhaul facilitation, discipline, and validation (#2385)
* feat(bmad-prd): voice rules, probing reference, and operational hardening

- Session Posture section (voice prohibitions, record-as-you-go, anti-caving, register-matching)
- New references/probing.md: seven probing categories, six critical assumptions, PRD/solution-design boundary
- Intent detection signals (create/update/validate) on activation step 6
- Update intent: inline conflict-detection procedure against decision-log.md
- Activation step 1 falls back to customize.toml instead of halting on resolver failure
- Restructure Discovery into five sub-sections (Posture, Brain dump, Four-dimension read, Right-skill check, Working mode)
- Regroup PRD Discipline into three clusters (Artifact shape, Substance, Honesty about scope)
- Define phase-blockers in Finalize step 4
- Em-dash strip in prose; preserve [v2 — out of MVP] callout convention
- Move bmad-party-mode / bmad-advanced-elicitation mention into the greeting step

* feat(bmad-prd): funnel discipline, UJ depth, and UX reframing

Template discipline for downstream AI extraction:
- §3 Glossary: exact-use enforcement (FRs, UJs, SMs use Glossary terms verbatim)
- §4 Features: FRs now use "#### FR-N: Name" heading with Realizes UJ-X cross-reference, testable consequences, and optional per-FR Out of Scope
- §7 Success Metrics: SM-N / SM-CN numbering with Validates FR-X cross-reference

User journeys:
- §2.4 UJ format expanded from one-liner to named-persona mini-flow (persona, 3-5 steps, edge cases, optional capability surfacing); hobby can collapse to one-liners
- Strip "job of UX" / "not this PRD" gatekeeping from template; depth is the team's call
- Strengthen UX-as-input / UX-as-output patterns for bidirectional PRD <-> UX flow
- SKILL.md Discovery Posture: push for two to three named-persona UJs in non-trivial scope

Validation checklist:
- Q-3 Traceability tightened to require Realizes UJ-X on FRs and Validates FR-X on SMs
- Q-7 (new): FR testability — every FR has at least one testable consequence
- S-1 Glossary integrity: now covers FR descriptions, consequences, UJ flows, SM definitions
- S-2: SM added to ID continuity scope
- S-5 (new): UJ persona linkage — every UJ names a persona by exact §2 label
- STK-2 (new): UJ density gate — non-hobby scope needs at least two UJs

* docs(bmad-prd): anonymize validation-findings JSON example

Replace project-specific values (Plantsona prd_name, frozen timestamp, §16 location, premium-conversion finding) with generic placeholder content. Swap the example finding to demonstrate Q-7 FR testability so it doubles as a primer on the new checklist item.

* feat(bmad-prd): reviewer pass redesign and consolidate facilitation

- finalize_reviewers TOML field replaces inline review lenses; entries
  follow the skill:/file:/plain-text prefix convention, resolved on-demand
  so reviewer data has zero context cost on runs that skip the pass.
- Subagent contract: reviewers write to {doc_workspace}/review-{slug}.md
  and return summary-only (verdict, top findings, file path); parent
  never holds full review text.
- Section-by-section walk-through UX at Finalize and Validate; user
  decides per finding whether to autofix, discuss, defer, or ignore.
- Finalize entry names the sequence in one sentence so users understand
  the polish-last order.
- Template philosophy moved from prd-template.md to SKILL.md PRD
  Discipline; template is now pure shape menu (preamble and Notes for
  facilitator stripped).
- facilitation-guide.md content folded into SKILL.md Discovery posture
  (story-shape UJ walk, four MVP types, state-inference-don't-quiz);
  guide file deleted.

* feat(bmad-prd): tighten SKILL.md, extract Reviewer Gate and Validate playbook

- SKILL.md: trim activation/posture/discovery bloat; sharpen Right-skill
  check; extract Reviewer Gate to its own section (dedup with Finalize
  step 3 and Validate intent).
- references/validate.md: rename from validation-render.md and expand to
  the full Validate intent playbook (orient, run gate, structural
  validator pipeline, render, close).
- references/probing.md: drop stale facilitation-guide.md reference.
- assets/prd-template.md: redesign §2.4 User Journeys with named-scene
  default shape, worked example, and scope dial.

* fix(bmad-prd): make Brain dump a hard first-move rule

Discovery was being skipped: the LLM treated the user's opening
message as the full picture and jumped to multiple-choice intake.
Strengthen the ordering so Brain dump always comes first for Create
and Update, before any questions or working-mode choices.

- Add explicit Discovery ordering at the section top.
- Rewrite Brain dump as a non-negotiable first move with an anti-
  pattern callout naming the exact failure mode.
- Add timing prefix to Working mode reinforcing the order.

* refactor(bmad-prd): aggressive trim and quality fixes from analysis

SKILL.md cut 49% (143 -> 84 lines); references/validate.md 35%;
references/headless.md 22%. Package-wide ~21% reduction.

Customization sweep:
- {finalize_reviewers} -> {workflow.finalize_reviewers} (was a silent
  override no-op)
- Add canonical ## Conventions block
- Rename decision-log.md -> .decision-log.md across SKILL, refs, schemas
- customize.toml: validation_checklist -> validation_checklist_template,
  output_dir -> prd_output_path, output_folder_name -> run_folder_pattern;
  lifecycle comments on external_sources / external_handoffs

New behavior:
- Activation step 4: explicit by-name greeting using {user_name},
  {communication_language} persisted for every turn (not just greeting)
- Right-skill scan on first message before brain dump
- Neutral defaults when config.yaml is missing; never block on it
- Headless: Detection section + per-intent Inputs section + 'partial'
  status semantics + Update conflict-override rationale
- Brownfield Update bootstraps .decision-log.md via subagent when absent
- Reviewer Gate findings-overwhelm fix: tiered surfacing
  (verdict -> critical/high -> medium/low rolled into tail)
- Discovery edge cases: conditional MVP question, persona/UJ push
  contextually triggered, working modes renamed as outcomes
  (Fast path / Coaching path)
- Subagent discipline: Finalize step 2 return-format contract,
  step 5 structure->prose ordering, explicit no-subagent fallback

Tests:
- scripts/tests/test_render_validation_html.py (17 passing, covers
  grade thresholds, category mapping, stats, score-bar rendering)

* refactor(bmad-prd): replace mechanical checklist+renderer with quality rubric and LLM-synthesized report

The structural checklist + Python renderer produced mechanical pass/warn/fail
reports that didn't speak to actual PRD quality, and additional reviewers
(adversarial) wrote separate review-*.md files that never made it into the
HTML. Replaces that pipeline with:

- A judgment rubric across seven PRD-quality dimensions (decision-readiness,
  substance over theater, strategic coherence, done-ness clarity, scope
  honesty, downstream usability, shape fit) that adapts to stakes and PRD
  shape. Rubric walker writes review-rubric.md with per-dimension verdicts.
- HTML skeleton with TEMPLATE_* placeholders the synthesis pass fills
  directly — no substitution engine, no Python.
- Synthesis pipeline in references/validate.md: parent reads every
  review-*.md, fills the skeleton, writes validation-report.html plus
  markdown twin, opens via webbrowser. Folds every reviewer's findings
  into one report; grade derives from rubric verdicts and severity counts.
- Drops scripts/render-validation-html.py and scripts/tests/ entirely.
- finalize_reviewers defaults to empty (adversarial removed from defaults —
  too brutal and frequently wrong against PRDs; teams can append in
  override TOML).
- Headless mode now writes both HTML and markdown; skips browser-open.

* refactor(bmad-prd): faster working-mode entry, elicitation discipline, drop probing.md

Discovery rewrite: Brain dump -> Stakes calibration -> Working mode -> mode-scoped
work. Users in a hurry reach the Fast/Coaching choice in two or three turns instead
of ten. Brain dump explicitly invites existing inputs (briefs, research,
transcripts, prior PRD draft, design docs) alongside verbal context.

Elicitation discipline made explicit: Discovery pulls the user's vision out, never
inserts the LLM's. UJs and phasing must be user-articulated, not strawman-proposed
for rubber-stamp.

Coaching path now offers entry-point choice: Vision+Features (capability-first),
Personas+Journeys (user-first), or let-me-suggest. Capability-thinkers walk
features directly.

Template framing in PRD Discipline: Essential Spine is the expected default,
Adapt-In Menu is conditional, and the LLM is authorized to invent sections when
concerns don't match any cluster. Concern scan beat in Discovery surfaces real
domain concerns without forcing a fixed shape.

Web grounding: light targeted use at load-bearing moments authorized; deep
research is suggested to the user via dedicated research skills, accepting
gracefully if declined.

references/probing.md deleted; its load-bearing content was either LLM-default
PM instincts or already covered by SKILL.md.

Misroute list now includes bmad-workflow-builder for agent/custom-agent signals.

* fix(bmad-prd): align opener with Fast path naming, normalize misroute list

* refactor(bmad-prd, bmad-product-brief): bring skills to parity, default-on web research

Cross-skill consistency fixes:
- Brief renames {workflow.output_dir} -> {workflow.brief_output_path} and
  {workflow.output_folder_name} -> {workflow.run_folder_pattern} to match PRD's
  naming pattern.
- Decision-log filename unified on .decision-log.md (dotfile convention) across
  both skills.
- Brief picks up PRD's fallback on customization-resolve failure (read TOML
  directly instead of halt).
- Brief picks up PRD's persistent_facts default that auto-loads
  project-context.md.
- Brief greeting now enforces {communication_language} for the entire run, not
  just the greeting.

PRD additions, propagated from brief:
- File-roles paragraph in Conventions (boundary rules for .decision-log.md vs
  addendum.md; capture during conversation, not at finalize; audit/override
  never goes in addendum).
- Greeting now tells the user they can invoke bmad-party-mode or
  bmad-advanced-elicitation at any point.
- Create intent now writes prd.md with status: draft and creates the
  .decision-log.md skeleton at workspace init.
- Resume-check on activation: scans prd_output_path for prior in-progress runs
  (status not final) and offers to resume.
- Finalize Close sets status: final + updated date so resume-check can
  distinguish finalized from in-progress.
- Stakes-calibrated length guidance in PRD Discipline.

Web research, default-on for any scope:
- Reframed external_sources lines in both skills to distinguish org-configured
  registry (internal tools) from generic web research; both fire on the same
  triggers.
- New Research subagents (default) beat in PRD Discovery: spawn web-research
  subagents to ground the picture; AI especially where training data ages by
  the week. Subagent searches; parent receives a digest. Deep work routes to
  bmad-market-research / bmad-domain-research / bmad-technical-research.
- Brief Discovery picks up the same posture in lighter form.

* fix(bmad-prd, bmad-product-brief): drop phantom v2 callout, add Fast/Coaching to brief

- Drop `[v2 — out of MVP]` from PRD validation rubric Dimension 5. It was
  flagged for absence but never instructed for use anywhere — the template uses
  `[NOTE FOR PM]` for v2/v3 deferrals, which is the de-facto convention.
- Add Fast path / Coaching path working-mode choice to brief Discovery so the
  "I'm pitching tomorrow" user has an express option. Note that the opener's
  pressure-calibration philosophy primarily shapes Coaching path; Fast path
  swaps pushback for [ASSUMPTION] tags the user can correct in review.

* refactor(bmad-prd): tighten Research subagents beat
2026-05-16 19:16:45 -05:00
Brian c52c9b5b0e
feat(bmad-prd): new PRD skill + product-brief updates (#2378)
* feat(bmm): add bmad-prd skill and extend product-brief with external integrations

Consolidates the legacy create-prd/edit-prd/validate-prd trio into a single
lean facilitator with create/update/validate intent modes, following the
bmad-product-brief pattern. Both skills gain external_sources and
external_handoffs customize.toml fields for routing through corporate MCP
tools (Confluence, Jira, etc.) with graceful degradation, plus a File roles
constraint clarifying decision-log (audit trail) vs addendum (preserved
depth for downstream docs).

* refactor(bmad-prd): tighten SKILL.md and operationalize source-extractor pattern

- Compress Overview to remove coaching prose duplicated in Discovery
- Operationalize "Extract, don't ingest" with explicit subagent return contract; reference from Update, Validate, and Finalize input reconciliation instead of inline "read N documents"
- Fix Overview H1 -> H2 (was breaking pre-pass tooling)
- Move full headless JSON schemas to assets/headless-schemas.md; keep minimal example inline
- Compress File roles bullet; tighten Finalize step 1

SKILL.md: 124 -> 105 lines, ~4729 -> ~4467 tokens

* feat(bmad-prd): open-items gate, drop distillate, persona discipline, decision-log metadata

- Add Finalize "Open-items review" step (new step 4): counts OQs / [ASSUMPTION] / [NOTE FOR PM], walks them with user, flags high density as red flag against agreed stakes
- Validate now treats open-items density as a first-class finding category
- Resume / continuity surfaces open items deterministically as the first orientation step
- Drop the PRD's own distillate output and the bmad-distillator finalize step. Downstream workflows (UX, architecture, story creation) source-extract from prd.md directly via the canonical source-extractor pattern. Headless schemas, customize.toml comments, and template updated accordingly.
- Drop "status: draft" from PRD frontmatter and template; version/state transitions logged to decision-log.md instead. Finalize step 7 records the version transition entry.
- Add PRD Discipline bullet: personas must be research-grounded or marked [ILLUSTRATIVE]; must drive decisions; 2-4 personas max. Discipline pass enforces.
- Expand File roles bullet: competitive-analysis detail beyond a one-line landscape and operational/cost mechanics (rate-limiting, compression) belong in addendum

* feat(bmad-prd): outcome-driven trim, swappable validation checklist, HTML report

SKILL.md trim (4.7K -> ~3.2K tokens, 124 -> 93 lines):
- Cut anchor enumerations (HIPAA/PCI/NIST list, API/Mobile/Web list, hobby->regulated list, "fast/easy/scalable/intuitive", input enumerations, etc.) the LLM already knows
- Cut derivable reasoning (synonyms-cause-drift explanation, hobby-vs-enterprise examples, etc.)
- Cut good/bad examples that anchor LLM attention (password/SendGrid example, persona quote, "let me also add this nearby thing")
- Drop SMART-ceremony language from Measurable bullet (keep judgment-not-ritual; SMART principles fine)

Progressive disclosure to references/:
- Headless mode rules + JSON minimal example moved to references/headless.md (loaded only when invoked headless)
- On Activation step 6 gates mode detection: headless -> read references/headless.md and follow

Swappable validation checklist:
- New assets/prd-validation-checklist.md (15 items: Quality / Discipline / Structural / Stakes-gated, each one line)
- New customize.toml field validation_checklist (override per org)
- Used by Validate intent AND Finalize Step 3 -- same subagent, same checklist, two moments
- Replaces bmad-validate-prd's 13-step micro-file architecture; kept the valuable check dimensions (density, measurability, traceability, implementation leakage, etc.) and dropped the ceremony

HTML validation report:
- New scripts/render-validation-html.py (PEP 723, stdlib only, ~175 lines) renders structured findings JSON into a styled HTML report with pass/warn/fail grade, inline SVG score bar, category grouping
- New assets/validation-report-template.html (inline CSS, native <details>, no JS, no external deps) -- swappable via customize.toml validation_report_template
- New references/validation-render.md documents the subagent output contract and renderer invocation; loaded only when validate flow runs
- Auto-opens browser on interactive runs; headless skips the open

Mode flow consistency:
- Create and Update both now explicitly "proceed to ## Finalize"
- Validate / analyze is standalone -- explicit "does NOT enter ## Finalize"; renderer auto-opens the HTML
- analyze is a synonym for validate; intent detection routes both
- Update mode no longer has its own light-close validation step (Finalize Step 3 covers it)

* refactor(product-brief,bmad-prd): remove distillation from brief and PRD workflows

Drop bmad-distillator integration from bmad-product-brief (finalize step,
update mode, headless JSON, constraints) and clean up customize.toml comments.
Distillation is the wrong layer — story self-containment via epic solution
design docs is the right answer for downstream context.

Also commit pending bmad-prd changes: working mode selector (Express vs
Facilitative), open-items triage into phase-blocking/resolvable/deferred
buckets, persistence wording fix, and facilitation-guide reference.

* refactor(bmad-prd): aggressive SKILL.md compression, remove LLM-obvious content

* feat(bmad-prd,bmad-product-brief): surface party-mode and advanced-elicitation at opening

* refactor(bmm): retire bmad-create-prd/edit/validate, point docs and PM agent at bmad-prd

Removes the three separate PRD skills (create, edit, validate) in favor of the
unified bmad-prd skill. Updates module-help.csv, PM agent menu, workflow map,
getting-started tutorial, commands reference, customize/help SKILL.md examples,
and the website workflow-map diagram. Adds Recipe 6 (Advanced Integration
Patterns) to expand-bmad-for-your-org.md covering external_sources,
external_handoffs, doc_standards, and swappable templates.

* test(bmad-product-brief): drop distillate from evals

Distillate was removed from the product-brief workflow in 1a88f001
but the eval suite still checked for distillate.md artifacts, the
bmad-distillator subagent invocation, and the polish→distillate phase
ordering. Strip all distillate references from A1/A5/B1/B2/B3/B5/B6,
remove B4 (phase-ordering eval centered on distillate) and B8 (pure
distillate eval), update _design_notes, and delete the orphan
distillate.md fixture from the forkbird-brief input set. IDs preserved
(gaps at B4, B8) so existing references stay stable.

* fix(bmad-prd): validation report only on explicit analysis request

Reconciles a contradiction across SKILL.md, validation-render.md,
headless.md, and headless-schemas.md about when validation-report.{html,md}
gets written. Rule: a report file is only written when the user has
specifically asked for analysis — Validate intent, or a mid-session
"produce a report" request. The Finalize discipline pass during
Create/Update keeps findings in-conversation: autofix obvious issues,
ask on ambiguous ones, never write a file.

- SKILL.md: Finalize step 3 no longer renders a report; Validate intent
  wording softened from "HTML report" to "validation report".
- references/validation-render.md: drops the severity-based conditional
  for markdown emission. Script now always writes both HTML and MD
  side-by-side when invoked; trigger gating happens upstream.
- assets/headless-schemas.md: drops the "may be omitted in interactive
  mode" caveat; validation_report is required for Validate intent.
- scripts/render-validation-html.py: adds render_markdown_report()
  emitting a severity-grouped markdown companion at output_path.with_suffix('.md').
  Returns markdown path in the stdout JSON summary alongside HTML path.

* fix(bmm-skills): address remaining PR review nits

- headless-schemas.md: Update schema gains `external_handoffs` to match
  SKILL.md which routes Update through Finalize (handoffs execute there).
- bmad-product-brief/SKILL.md: "Use the bmad-help skill" → "Invoke
  bmad-help" to align with REF-03 and the bmad-prd phrasing.
- bmad-product-brief/SKILL.md: hyphenate "high-quality draft".

* feat(bmm): add deprecation shims for retired PRD skills

Re-adds bmad-create-prd, bmad-edit-prd, bmad-validate-prd as thin
compatibility shims so existing invocations by name and
_bmad/custom/bmad-{create,edit,validate}-prd.toml override files keep
working post-consolidation. Each shim contains only SKILL.md and
customize.toml — no steps, data, or templates.

On activation, each shim:
1. Resolves customization via resolve_customization.py, picking up any
   legacy override files for the four legacy fields (activation_steps_*,
   persistent_facts, on_complete).
2. Emits a one-time deprecation notice in {communication_language},
   pointing at bmad-prd and the migration path for override files.
3. Invokes bmad-prd with the appropriate intent (create / update /
   validate), passes through the resolved legacy customization with
   instruction to use these values instead of re-resolving from
   bmad-prd's own customize.toml, and forwards the original user input
   verbatim.

bmad-prd continues to read its own customize.toml + bmad-prd.toml
overrides for the new-only fields (prd_template, validation_checklist,
doc_standards, output_dir, output_folder_name, external_sources,
external_handoffs, validation_report_template). Users wanting those
fields must migrate to invoking bmad-prd directly.

* polish(bmm): refine PRD deprecation shim wording

Three small revisions applied uniformly to all three shims
(bmad-create-prd, bmad-edit-prd, bmad-validate-prd):

- Tighten the frontmatter description to a single sentence naming the
  intent and signaling v7 removal.
- Drop the redundant "On failure, surface the diagnostic and halt."
  trailer from the resolve-customization step; resolve_customization.py
  surfaces errors itself.
- Extend the user-facing deprecation notice to clarify that legacy
  override fields still resolve under bmad-prd, so migration is for
  unlocking new fields rather than restoring lost functionality.

* fix(bmad-prd): normalize status casing and add friendly file errors

- compute_stats: lower-case `status` before bucketing so findings with
  any casing (e.g. "Pass") feed the stat buckets and the score bar
  fills correctly. Matches the .lower() pattern already used in
  render_finding and render_finding_md.
- main: wrap findings/template read_text calls; emit a one-line error
  to stderr and return 1 on FileNotFoundError or JSONDecodeError
  instead of dumping a raw traceback. Script is LLM-invoked, so a
  clean diagnostic is the contract.

Addresses augmentcode review comments 3235100013 and 3235100018.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(expand): refresh "five recipes" copy to reflect Recipe 6

Recipe 6 (Advanced Integration Patterns) was added but three earlier
mentions still said "five": the frontmatter description, the intro
sentence at line 8, and the "Combining Recipes" paragraph. Update all
three to "six" and extend the Combining-Recipes example to call out
Recipe 6 (external_sources / external_handoffs) alongside the others.

Addresses coderabbitai review comment 3235107194 and the two
outside-diff observations on lines 3 and 8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(bmad-prd): utf-8 encoding on render script, correct workflow-map outputs

- render-validation-html.py reads findings/template and writes HTML/MD with
  explicit utf-8 encoding so non-ASCII content (smart quotes, em-dashes,
  non-English text under {document_output_language}) does not break on
  platforms whose default encoding is not utf-8.
- workflow-map.md 'Produces' column for bmad-prd now distinguishes
  Create/Update outputs from the Validate intent's validation-report
  artifacts.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:45:17 -05:00
Brian Madison c19f6cd72a fix(bmad-product-brief): tighten update/validate rules and eval expectations
- Update: audit trail (decision-log + addendum) is now mandatory before
  modifying brief.md in headless mode; distillate regeneration is required
- Validate: always emits offer_to_update in headless JSON output
- Headless: added validate example to JSON status block docs
- Evals B8: add 900s timeout, replace hard 30%-smaller check with
  meaningful-condensation expectation
- Eval B9: sharpen right-sized expectation wording
2026-05-09 18:59:37 -05:00
Brian 24a81706ca
feat(bmm): add bmad-investigate skill
feat(bmm): add bmad-investigate skill
2026-05-09 17:30:52 -05:00
Brian Madison 32258a53a6 fix(bmad-investigate): collapse multi-line description to single line 2026-05-09 17:30:45 -05:00
Brian 1c1abaa5b1
refactor(bmm): streamline bmad-product-brief into lean facilitator (#2370)
* refactor(bmm): streamline bmad-product-brief into lean facilitator

Rewrites bmad-product-brief as an outcome-driven, intent-routed
facilitator with a configurable reviewer panel.

- Replace scripted prompt files with a concise SKILL.md
- Add brief-shape detection and intent routing
- Make the reviewer panel config-driven via customize.toml
- Harden the required-reviewer gate
- Add helper scripts and tests for panel resolution
- Replace embedded resources with a single brief-template asset
- Register skill metadata in module.yaml

* refactor(bmm): tighten bmad-product-brief discovery and polish flow

- Discovery now invites a brain dump and source material upfront,
  followed by "anything else?" before drilling
- Create and Update modes explicitly invoke Discovery before drafting
- Calibrate "make them sweat" to ease as the brief firms up
- Update mode regenerates distillate.md when changes apply
- Replace polish_skills with polish_passes: polymorphic entries
  (skill:/file:/plain-text), parallel subagents, applied automatically
  so the user sees a polished draft, not a polish review
- Default persistent_facts to empty with opt-in examples instead of an
  unbounded project-context.md glob
- Remove research-librarian, field-researcher, and skeptic agents no
  longer needed with this rework

* refactor(bmm): make persistence and resume explicit in bmad-product-brief

- Replace "Hold a working memory" with "Persistence is real-time": the
  workspace exists on disk and the user knows the path the moment Create
  intent is confirmed; decision-log.md is canonical memory so walk-away
  leaves nothing in the conversation
- Add "Continuity across sessions": prior in-progress drafts for this
  project surface a resume offer

* test(bmm): scaffold evals for bmad-product-brief

Adds an eval suite for bmad-product-brief following the Anthropic skill-creator
schema, plus a new "Extract, don't ingest" constraint on the skill itself.

Skill change:
- New constraint: source artifacts (user-provided or run-discovered) enter the
  parent conversation as relevance-filtered extracts via subagents, not loaded
  wholesale. Keeps the parent context lean against transcripts, brainstorms,
  research reports, code, web results, and prior briefs.

Evals (evals/bmm-skills/bmad-product-brief/):
- evals.json: 8 artifact/behavioral evals covering Create one-shot,
  source-memo ingest, Update with contradiction surfacing, Validate inline,
  Headless mode, brainstorm filtering, research-report filtering, persona
  filtering. All scenarios use fictional entities (InsuLens, Branfield CC,
  Forkbird Kitchen, Mossridge Library, Sproutkeeper, Hatchet & Loop Studio,
  Brightway, Pantry Bridge).
- triggers.json: 15 description-firing checks (7 should-fire, 8 should-not-fire)
  to catch under-triggering and adjacent-skill poaching.
- files/: realistic fixtures including a brainstorm with the relevant idea
  buried at the end, a 3000-word market research report with the relevant
  section in the middle, and customer interviews with the target persona in
  position 3 of 4 — each shaped to test that filtering happens against the
  user's stated focus regardless of where the relevant material sits.

Eval directory placement: top-level evals/ outside src/, matching the convention
in anthropics/skills (zero of 17 production skills include an evals/ subdir;
their skill-creator places dev workspaces as siblings to skill folders). Keeps
evals out of any installer or marketplace.json distribution path.

* refactor(bmm): rename brief workflow knobs and resolve PR review

- polish_passes -> doc_standards (TOML key + SKILL.md reference). Name
  generalizes for every doc-producing skill: encodes standards applied at
  finalize, not options.
- {run_folder} -> {doc_workspace}. Bound in Create to
  {workflow.output_dir}/{workflow.output_folder_name}/; reused by Update,
  Validate, Headless, and Finalize as the active brief's folder.
- On Activation Step 4 now resolves {date} explicitly (used by
  output_folder_name default).
- Headless Mode: ambiguous-intent fallback is a `blocked` JSON status with
  a `reason` field, no prompting. Resolves the activation/headless
  contradiction flagged in review.

* test(bmm): overhaul product-brief evals into A/B/C pattern split

Refactor evals from 8 numbered single-shot tests into 16 typed evals:
- Pattern A (A1-A8): artifact-correctness tests with headless prompts and
  precise, falsifiable expectations (no invented facts, right-sized output,
  file boundary enforcement)
- Pattern B (B1-B8): process-discipline tests verifying decision-log fidelity,
  polish phase ordering, contradiction detection, and distillate generation
- Pattern C (C1): config-compliance test for custom output paths and
  document_output_language

Also tighten SKILL.md: add dependencies frontmatter, clarify headless override
autonomy in Update (proceed when intent is clear; block when ambiguous), and
make distillate skip explicit when bmad-distillator is not installed.
2026-05-09 17:24:28 -05:00
AJ Côté 697d92e355
fix(bmm): tighten bmad-investigate per review and quality findings
Maintainer review (PR #2364):
- shorten frontmatter description
- add customize.toml for case-file template, output subdir, filename,
  persistent_facts, prepend/append steps, on_complete
- subagent delegation discipline for context-heavy investigation steps
- replace ambiguous "Halt" closer at each outcome with self-documenting
  "Pause for user with the recap above; wait for direction."

Workflow-builder quality findings:
- move case-file-template.md to references/ (path standards)
- align activation with sibling 4-implementation skills (customize.toml
  resolution, persistent_facts, greet)
- operationalize promised flows: existing-case resume (Outcome 0),
  evidence-light branch (Outcome 1), refutation pass (Outcome 3),
  trivial-fix hand-off (Outcome 4)
- define High/Medium/Low confidence in Outcome 5
- name concrete next-step skills at Outcome 5 (bmad-quick-dev,
  bmad-correct-course, bmad-create-story, bmad-code-review)
- add Hand-off Brief and Side Findings to case-file template
2026-05-08 12:53:03 -04:00
AJ Côté 7b590b0a90
fix(bmm): unwrap case-file template, tighten PRD discovery glob
Two PR review fixes:

- Strip the surrounding markdown code fence from case-file-template.md
  so initializing a case file doesn't nest the whole artifact inside a
  code block. The template is now the structure directly, with usage
  notes in an HTML comment that doesn't render. Matches the BMM idiom
  used by bmad-create-story/template.md.
- Drop the stale `*-archaeology.md` reference from bmad-create-prd
  step-01 discovery. The single-procedure restructure removed
  archaeology as a distinct mode, so case files only carry the
  `*-investigation.md` suffix. Tighten the glob accordingly.
2026-05-08 12:53:03 -04:00
AJ Côté 380590aa8b
feat(bmm): add bmad-investigate skill
Forensic case investigation under Amelia's menu (IN). Evidence-graded
findings (Confirmed / Deduced / Hypothesized), hypothesis discipline,
structured case-file artifact. Single procedure that calibrates between
defect-chasing and area-exploration based on the input.

Wires bmad-create-prd discovery to pick up case files as PRD input.
Public explainer doc, workflow-map Phase 4 row, EN + FR.
2026-05-08 12:53:00 -04:00
Alex Verkhovsky e36f219c81
refactor(catalog): rename after/before to preceded-by/followed-by (#2360)
* refactor(catalog): rename after/before columns to preceded-by/followed-by

The bare prepositions `after` and `before` had no subject anchor, leaving
the dependency direction ambiguous: "X has Y in its `after` column" reads
plausibly as either "Y comes after X" or "X comes after Y". An LLM
catalog consumer just got the direction wrong because of this.

`preceded-by` / `followed-by` are passive-voice participles whose grammar
locks the subject (the skill in this row) and forces a single reading:
"X is preceded by Y" can only mean Y comes first.

Rename applied to:
- module-help.csv headers (bmm-skills, core-skills)
- bmad-help SKILL.md schema doc + descriptions
- installer.js mergeModuleHelpCatalogs header string
- plugin-resolver.js _buildSynthesizedHelpCsv header string
- bmad-manifest.json keys (bmad-product-brief, bmad-prfaq)
- distillate-format-reference.md example manifest

The separate `required` column continues to carry hard-gate semantics;
the renamed columns are pure soft sequencing hints, as already documented
in bmad-help.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* style(installer): wrap long header strings per prettier

* feat(installer): warn on non-canonical module-help.csv headers

mergeModuleHelpCatalogs now compares each per-module file's header
against the canonical schema and emits a one-shot prompts.log.warn per
module on drift, naming both the expected and actual header. Data
continues to load positionally so external modules built against the
old after/before schema still install cleanly — the warning is the
maintainer signal to rename their columns.

Centralize the canonical header in modules/module-help-schema.js so the
merger and the synthesizer (PluginResolver._buildSynthesizedHelpCsv)
read the same source of truth; future column renames are one edit.

Verified by installing all four bmad-org external modules
(bmb, cis, gds, tea) — every one ships the legacy after/before header
today and now fires an advisory warning while still merging cleanly
into _bmad/_config/bmad-help.csv with the canonical column names.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 12:28:50 -07:00
Brian 48a7ec8bff
fix: align bmad-help.csv with documented schema and clean up source rows (#2278) (#2349)
* fix(installer): preserve module-help.csv schema in merged bmad-help.csv (#2278)

The installer's mergeModuleHelpCatalogs was rewriting the merged catalog
under a different schema (module,phase,name,code,sequence,workflow-file,...)
than the documented source schema in every module's module-help.csv
(module,skill,display-name,menu-code,description,action,args,phase,...).

Worse, the parsing assumed the wrong source column order, so column data
was scrambled in the merged output. SKILL.md docs the source schema, so
the bmad-help skill was navigating a catalog whose actual columns no
longer matched its mental model.

Drop the transformation and the agent enrichment columns (which had no
consumers anywhere in the codebase). Emit rows verbatim in the source
schema, padding short rows and filling empty module fields. Sort by
module then phase, stable within phase to preserve authored order.

Closes #2278

* fix(catalog): normalize module-help.csv rows to documented 13-column schema

Many rows in core-skills/module-help.csv and bmm-skills/module-help.csv
were missing one column between description and phase, leaving them at
12 fields instead of 13. CSV consumers that read by header position
were silently mapping data into the wrong columns (description into
action, phase into args, required into before, etc).

Inserted an empty cell at column index 5 across all 31 affected rows
to restore alignment with the documented header
(module,skill,display-name,menu-code,description,action,args,phase,
after,before,required,output-location,outputs).
2026-04-27 23:54:21 -05:00
Brian 3da984a491
fix(config): promote project_name to core (closes #2279) (#2348)
* fix(config): promote project_name to core, fixes #2279

project_name was a bmm-specific prompt despite being a universal
project-level concept used by every module — including core skills like
bmad-brainstorming, which loads from _bmad/core/config.yaml and was
silently broken because project_name lived under bmm. Users without bmm
installed could not run brainstorming at all.

Move:
- src/core-skills/module.yaml: declare project_name with prompt
  "What is your project called?" and default {directory_name}, matching
  what bmm previously had.
- src/bmm-skills/module.yaml: remove the bmm definition; add project_name
  to the "Variables from Core Config inserted" header comment so
  contributors can see what's inherited.

Migration for existing installs:
- tools/installer/modules/official-modules.js: after loadExistingConfig
  reads each per-module config.yaml, hoist any keys that are now declared
  in core but appear under non-core modules. Without this, the partition
  logic in writeCentralConfig (which strips core keys from non-core
  buckets) would silently drop the user's prior project_name on the next
  quick-update. Generic — handles project_name today and any future
  module→core promotions.
- The hoist preserves precedence: an existing core value beats a stale
  module-side copy.

--yes seed:
- tools/installer/ui.js: add project_name to the hardcoded core seed
  (using path.basename(directory) to match the {directory_name} default)
  so non-interactive fresh installs populate it. Without this the seed
  silently omits project_name and core skills fall back to literals.

Tests:
- test/test-installation-components.js Suite 43 (9 assertions) covers
  the schema move, the loadExistingConfig hoist, and the precedence rule.
- Suite 35 fixture updated: project_name moved from bmm bucket to core,
  with a stale bmm copy left in place to verify it gets stripped.

Verified manually:
- Fresh install -y: project_name lands in [core] of config.toml.
- Existing install with project_name in bmm/config.yaml: quick-update
  hoists it to [core] and strips it from [modules.bmm].

* fix(installer): harden config-load against malformed config.yaml

Per augment review on #2348: loadExistingConfig stored any truthy
yaml.parse result (including scalars like '42'), which would later crash
_hoistCoreKeysFromLegacyModuleConfigs at \`key in cfg\` with
"Cannot use 'in' operator to search for ... in 42".

- loadExistingConfig: only keep parses that are plain objects (not
  scalars or arrays). A corrupt config.yaml is now treated the same as
  a parse error — skipped, not crashed-on.
- _hoistCoreKeysFromLegacyModuleConfigs: belt-and-suspenders type guards
  on _existingConfig.core (in case it's populated by some other path)
  and on each module cfg in the loop.
- Test Suite 43 adds 2 assertions covering a scalar core/config.yaml:
  loadExistingConfig must not crash, and bmm.project_name must still
  hoist into a clean core bucket.
2026-04-27 23:31:59 -05:00
Brian 815600e4ca
fix(create-architecture): unprime step-07 validation checklist (#2292) (#2347)
step-07-validation template shipped with all 16 completeness checkboxes
pre-checked and Overall Status hard-coded to READY FOR IMPLEMENTATION,
defeating the gate. Reset checkboxes to unchecked, replace status with a
templated choice tied to the checklist and gap analysis, and instruct the
agent to only mark items the validation actually confirms.

Closes #2292
2026-04-27 23:14:23 -05:00
AJ Côté 1ad1f91e38
feat(workflows): add brownfield epic scoping to detect file churn (#1823) (#1826)
Add design completeness gate, file overlap check, and validation
to prevent unnecessary file churn when epics target the same component.
2026-04-26 17:37:56 -05:00
Pablo Ontiveros c29b72ecc0
fix(create-story): read UPDATE files before generating dev notes (#2274)
When a story modifies existing files, create-story must read those
files before generating dev notes. Without this, dev agents improvise
design decisions without knowing the current state of the code, leading
to regressions caught only at review time.

Adds a step at the end of Step 3 (Architecture analysis) that reads
every file marked UPDATE in the architecture directory structure and
documents its current state, what the story changes, and what must
be preserved.

Fixes #2273

Co-authored-by: Brian Madison <bmadcode@gmail.com>
2026-04-24 18:21:10 -05:00
Jérôme Revillard e7a213ed07
feat: uniform customize.toml support across all BMM workflows (#2308)
* feat: extend customize.toml to all 6 developer-execution workflows (#2303)

Add uniform customization support to dev-story, code-review,
sprint-planning, sprint-status, quick-dev, and checkpoint-preview,
matching the same 4 extension points (activation_steps_prepend,
activation_steps_append, persistent_facts, on_complete) already
available on 17 BMM workflows from PR #2287.

- Create customize.toml for each workflow
- Add 6-step activation block to SKILL.md (merge workflow.md
  content in, delete workflow.md per PR #2287 pattern)
- Wire on_complete at terminal steps (inline <action> for XML
  workflows, ## On Complete section for step-file workflows)
- Fix pre-existing step number reference in dev-story (Step 6 → 9)

* fix: correct goto step="6" → step="9" in dev-story

The XML goto at line 203 still pointed to step 6 ("Author
comprehensive tests") instead of step 9 ("Story completion and mark
for review"), which is the actual completion gate. This was the
same class of pre-existing bug fixed in the text (M-1) but
missed in the XML action.

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2026-04-24 17:45:25 -05:00
Brian 87292cd86a
feat(skills): wire on_complete into terminal steps; add full customize.toml comments (#2290)
All 16 bare workflow customize.toml files now have the same thorough comment
block as the well-documented ones, with skill-specific on_complete descriptions
that name the exact terminal step and exit condition.

on_complete is now executed at the true end of each workflow's terminal step
rather than lazily referenced in SKILL.md:

- Linear workflows: ## On Complete block appended to the final step file
  (create-prd step-12, create-ux-design step-14, create-architecture step-08,
  generate-project-context step-03, check-implementation-readiness step-06,
  epics-and-stories step-04, all three research step-06 files, prfaq verdict,
  document-project both sub-workflow instruction files)
- Multi-path workflows: on_complete inline on each true exit path only
  (edit-prd fires on [S] Summary and [X] Exit, not on [V] Validate or [E] Edit;
  validate-prd fires on [X] Exit only, not on [R], [E], or [F])
- Inline XML workflows: <action> tag at the close of the final step
  (correct-course step-6, create-story step-6, retrospective step-12,
  qa-generate-e2e-tests appended to SKILL.md)
2026-04-20 22:53:23 -05:00
Brian b63086f22e
feat(core-skills): add bmad-customize — guided authoring for _bmad/custom overrides (#2289)
* feat(core-skills): add bmad-customize for authoring _bmad/custom overrides

A conversational guide skill that helps users author or update TOML overrides
in _bmad/custom/ for customizable BMad agents and workflows. Covers per-skill
agent and workflow surfaces; central config is out of scope for v1.

- SKILL.md: six-step flow (intent, discover, route, compose, team-vs-user,
  show-confirm-write-verify) with baked-in agent-vs-workflow routing heuristic
  and a template-swap subroutine
- scripts/list_customizable_skills.py: stdlib-only scanner that enumerates
  customizable skills across standard IDE install paths, reports surface type
  and override status, PEP 723, 10 unit tests
- Reuses _bmad/scripts/resolve_customization.py for post-write verification
- Registered in core-skills/module-help.csv with menu code BC

* refactor(bmad-customize): apply QA pass (top 3 recommendations)

Applies the three highest-payoff themes from the quality analysis:

- Labeling + completion contracts: rename ## Purpose to ## Overview,
  add domain framing (what customization means in BMad, typical user
  arrival shapes), add an explicit Completion block with testable
  conditions for "skill run is done"
- Hostile-environment robustness: add On-Activation preflight that
  classifies no-BMad / BMad-without-resolver / full-install states,
  instruct Step 2 to surface scanner errors[] and scanned_roots on
  empty results, add resolver-missing fallback to Step 6.4, add a
  re-enter-Step-4 recovery loop when verify shows the override didn't
  take effect
- Returning-user and iteration experience: add "Audit / iterate"
  intent class in Step 1, lead discovery with already-overridden
  skills for that intent, read existing overrides in Step 3 before
  composing, frame Step 4 as additive-on-top rather than fresh
  authoring, give Cross-cutting intent an explicit Step 3 branch
  that walks agent-vs-workflow with the user

Resolves 12 of 18 observations from the quality report. Lint clean
(scan-path-standards and scan-scripts both 0 findings). Unit tests
still 10/10.

* refactor(bmad-customize): derive skills root from install location

Previously the scanner hardcoded a list of IDE skill directories
(.claude/skills, .cursor/skills, .cline/skills, .continue/skills) and
scanned them relative to the project root. That was wrong: skills can
be installed either project-local or user-global, the IDE determines
the convention, and the set of valid locations is open-ended.

The scanner now derives its primary skills root from __file__ — the
running skill's own install directory is the authoritative location
for finding siblings. --skills-root overrides the default; --extra-root
(repeatable) adds additional locations for the rare mixed-install case.

Changes:
- list_customizable_skills.py: remove SKILL_ROOTS constant, add
  default_skills_root() derived from __file__, rename scan_project
  to scan_skills(skills_roots, project_root), add --skills-root and
  --extra-root flags, de-dupe skills when the same name appears in
  multiple roots (first wins)
- SKILL.md: update Step 2 to describe the scanner's derive-from-install
  behavior and when to use --extra-root; drop the hardcoded IDE path
  list from Notes
- tests: refactor setUp to place skills under a generic skills root
  (not .claude/skills), add 3 new tests for multiple-roots merge,
  duplicate-name precedence, and missing-root error reporting

* docs(customization): point users at bmad-customize as the guided path

Surface the new bmad-customize skill across the three customization
docs so users know they don't need to hand-author TOML to benefit
from the surface:

- customize-bmad.md: prominent tip at the top introducing the skill
  as the guided authoring helper; updated the "Need to see what's
  customizable?" troubleshooting tip to recommend the skill first
- expand-bmad-for-your-org.md: tip under prereqs noting every recipe
  can be applied via the skill, with the recipes remaining the
  reference for what to override
- named-agents.md: short paragraph in the customization section and a
  link entry under the references list

Hand-authoring still works the same way; the skill is additive.
Central-config overrides are flagged as the current exception.

* docs(bmad-customize): steer users at bmad-builder instead of 'forking'

* fix(bmad-customize): reword description to pass file-ref validator

* refactor(bmad-customize): tighten description and expand module-help entry

- SKILL.md description: drop the catch-all 'or asks how to change the
  behavior of a specific BMad skill' trigger clause that would fire in
  casual discussion; keep the four explicit phrase triggers.
- module-help.csv: rewrite the description so bmad-help has real
  routing material — names the concrete capabilities (persistent
  facts, template swaps, activation hooks, menus), the scope routing,
  and the value prop (no TOML hand-authoring). Matches the 'Use
  when...' pattern other Core entries use.

* fix(module-help): quote bmad-customize description field that contains commas

* fix(bmad-customize): address PR #2289 review findings

- SKILL.md preflight: load root config from _bmad/config.toml and
  config.user.toml (not .yaml) — the installer emits TOML; the YAML
  references would have made the skill silently miss real user config
- SKILL.md resolver fallback (Step 6.4): read all three merge layers
  when present (base / team / user) and describe the merge in
  base → team → user order; the prior wording could describe the wrong
  effective merge when the user wrote .user.toml on top of an existing
  team .toml
- SKILL.md: replace bare 'docs/how-to/customize-bmad.md' references
  (3 locations) with the public docs URL so users installing the skill
  aren't pointed at a path they don't have locally
- list_customizable_skills.py: catch UnicodeDecodeError in
  read_frontmatter_description so a non-UTF-8 SKILL.md can't abort
  the whole scan
- list_customizable_skills.py: clarify exit-code contract in the
  module docstring — errors[] is non-fatal by design, exit 2 is
  reserved for invocation errors
- customize-bmad.md: tighten the tip to scope bmad-customize to the
  per-skill surface; central-config is out of scope v1
- expand-bmad-for-your-org.md: same scoping — Recipes 1-4 can be
  applied by the skill; Recipe 5 (central config) stays hand-authored

* fix(bmad-customize): markdownlint MD034 and validate-file-refs

- Wrap the three docs.bmad-method.org references as
  [text](url) markdown links instead of bare URLs (MD034)
- Drop the {project-root}/ prefix on line 41's config.toml
  references. validate-file-refs strips the template prefix and
  tries to resolve 'config.toml' as 'src/config.toml'; sibling
  skills (party-mode, retrospective, advanced-elicitation) all
  reference '_bmad/config.toml' bare and pass CI — match that
  pattern. The '(root level under {project-root}, installer-owned)'
  parenthetical preserves the disambiguation.

* refactor(bmad-customize): cut token-wasting prose from SKILL.md

Down from 175 lines to 110. Removed:
- 'What customization means in BMad' architecture backgrounder — the
  LLM reads the live customize.toml in Step 3; doesn't need the lore
- 'Desired Outcomes' section — retrospective narration of what the
  6 steps already instruct
- 'Role' section — fluff; the flow itself defines the role
- 'Notes' section — sparse-override rule already in Step 4, IDE-path
  note is commentary, docs link duplicates the out-of-scope section
- 'The scanner derives its skills directory from...' and 'returns JSON
  with...' — commentary the LLM doesn't need; it runs the script and
  sees the output
- 'that file IS the schema' and similar editorial asides throughout
- Explanatory clauses like 'silently drifts on every release' and
  'trust the user's domain knowledge'

Kept everything that's load-bearing: preflight conditionals, intent
classification, routing heuristic, merge semantics, template-swap
subroutine, team-vs-user defaults, verify fallback and recovery loop,
completion conditions, out-of-scope list.
2026-04-20 22:14:54 -05:00
Brian ffdd9bc69e
feat(skills): add TOML workflow customization to 17 bmm-skills (#2287)
* feat(skills): add TOML workflow customization to 17 bmm-skills

Flattens each skill's workflow.md into SKILL.md and adds a customize.toml
surface with a 6-step activation block (resolve_customization, prepend,
persistent_facts, config, greet, append). Core-skills and developer
execution skills (dev-story, code-review, sprint-planning, sprint-status,
quick-dev, checkpoint-preview) are intentionally excluded.

Customized: document-project, prfaq, domain/market/technical-research,
create-prd, create-ux-design, edit-prd, validate-prd,
check-implementation-readiness, create-architecture,
create-epics-and-stories, generate-project-context, correct-course,
create-story, qa-generate-e2e-tests, retrospective.

* fix(skills): address PR review findings on workflow customization

- bmad-create-story: drop stale {project_context} variable reference
  from step 2 note; content is already loaded via persistent_facts
- research skills (market/domain/technical): derive research_topic_slug
  before writing output filename to prevent path injection and invalid
  filesystem characters
- bmad-correct-course: reconcile step 1 verify list and HALT with the
  "Missing documents" rule — Architecture and UI/UX are optional, HALT
  only fires when PRD or Epics are missing
- fix grammar in Micro-file Design bullets across 5 migrated skills
  (self contained → self-contained, adhere too 1 file → adhere to one
  file at a time)
- docs/how-to/customize-bmad.md: document workflow activation order
  and frame the baseline fields as a stable initial pass with targeted
  per-workflow customization points coming later
2026-04-20 20:10:22 -05:00
Brian 1251458173
feat(agents): set team to software-development on BMM agents (#2286)
* feat(agents): set team to software-development on BMM agents

All six BMM agents (analyst, tech-writer, PM, UX designer, architect,
dev) now explicitly declare `team: software-development` in the
module.yaml roster instead of falling back to the module-code default
of `bmm`.

This matches the BMad-wide team convention where agents across modules
that collaborate on software delivery share one named team. Tea's Murat
joins the same team via a parallel PR in bmad-method-test-architecture-
enterprise so party-mode, help catalog, and retrospective skills can
route the full software-delivery roster as a single unit.

* test: update team assertions for explicit software-development
2026-04-20 00:11:16 -05:00
Brian 4405b817a9
refactor(skills): remove bmad-skill-manifest yaml; introduce central config.toml (#2285)
* refactor: remove bmad-skill-manifest yaml; introduce four-layer central config.toml

- Agent essence moves from per-skill bmad-skill-manifest.yaml files
  into each module.yaml's `agents:` block (code, name, title, icon,
  description). Per-agent customize.toml remains the deep-behavior
  source of truth.
- Installer emits four TOML files:
    _bmad/config.toml              team install answers + agent roster
    _bmad/config.user.toml         user install answers
    _bmad/custom/config.toml       team overrides stub
    _bmad/custom/config.user.toml  personal overrides stub
  Prompts declare scope: user to route answers to config.user.toml.
- resolve_config.py merges four layers: base-team -> base-user ->
  custom-team -> custom-user.
- Three consumer skills (party-mode, advanced-elicitation,
  retrospective) switched from agent-manifest.csv to the resolver.
- installer.js mergeModuleHelpCatalogs now takes the in-memory
  agent list from ManifestGenerator -- no CSV roundtrip.
- Deleted: 6 bmad-skill-manifest.yaml files, agent-manifest.csv
  emission, collectAgents/getAgentsFromDirRecursive,
  paths.agentManifest().

* fix(installer): strip core-key pollution from [modules.*]; soften config headers

- writeCentralConfig now always strips core-module keys from every
  [modules.<code>] bucket, even when the module's schema is not
  available in src/ (external / marketplace modules like cis, bmb).
  Core values belong in [core] only; workflows read them directly.
- When the module's own schema IS available (built-in modules),
  also drop any key it does not declare as a prompt — same
  spread-pollution filter as before, now layered on top.
- Section-aware headers on both _bmad/config.toml and
  _bmad/config.user.toml: [core] / [modules.*] values are
  editable (installer reads them as defaults on next install);
  [agents.*] is regenerated from module.yaml and will be wiped —
  overrides for agents go in _bmad/custom/config*.toml instead.

* docs: cover central config.toml + Diataxis prose pass across three files

Document the new four-file central configuration surface (_bmad/config.toml,
config.user.toml, and custom/ overrides) alongside the existing per-skill
customize.toml. Make editing rules, scope partitioning, and when-to-use-which
guidance explicit.

- customize-bmad.md: new "Central Configuration" section with editing rules,
  three worked examples (rebrand, fictional agent, module settings override),
  and a "when to use which surface" table. Converted five h4 headers to
  bold paragraph intros per style guide.
- expand-bmad-for-your-org.md: two-layer mental model extended to three;
  new Recipe 5 with three variants (rebrand, custom crew, pinned team
  settings); reinforcement table extended.
- named-agents.md: noted the dual customization surface — per-skill shapes
  behavior, central config shapes roster identity.

Diataxis prose pass applied across all three files: banned vocabulary
check, em-dash cap, hypophora / metanoia / amplificatio / stakes-inflation
cleanup, rhythm and burstiness fixes. Structural conformance verified;
markdownlint and prettier clean.

* test+docs: add central config unit tests; fix stale recipe count

- test: two new suites (35 + 36) covering writeCentralConfig and
  ensureCustomConfigStubs. Verifies scope partitioning (user_name
  lands only in config.user.toml), core-key pollution stripping
  from [modules.*], unknown-schema fallthrough (external modules
  survive without schema), agent roster baked into config.toml
  [agents.*] only, stub-preservation on re-install. 44 new
  assertions.
- docs: fixed four stale "four recipes" references to say "five"
  after Recipe 5 (Customize the Agent Roster) was added. Touches
  frontmatter, opening paragraph, Combining Recipes paragraph,
  and the named-agents cross-link blurb.

* fix: address PR review feedback on central config

- resolve_config.py argparse: three-layer → four-layer description
- SKILL/workflow/explanation docs: document all four layers including
  _bmad/config.user.toml (was missing from merge-stack descriptions)
- customize-bmad.md + installer headers: drop the false "direct edits to
  config.toml persist" claim; installer reads from per-module config.yaml,
  not central TOML, so direct edits get clobbered. Route users to
  _bmad/custom/config.toml for durable overrides
- writeCentralConfig: warn loudly when a module.yaml can't be parsed
  (previously silent — user-scoped keys could mis-file into team config)
- writeCentralConfig: preserve [agents.*] blocks for modules that didn't
  contribute fresh agents this run (e.g. quickUpdate skipping modules
  whose source is unavailable) so the roster doesn't silently shrink
- add extractAgentBlocks helper + Test Suite 37 covering preservation

Addresses comments from augmentcode and coderabbitai on PR #2285.
2026-04-19 23:11:44 -05:00
Brian 0dbfae675b
feat(skills): TOML-based agent and workflow customization (#2284)
* feat(skills): TOML-based agent customization with stdlib Python resolver

Re-applies PR #2282's three-layer customization model (skill defaults →
team → user) but swaps YAML for TOML and uv for stdlib tomllib. Users
no longer need uv, pip, or a virtualenv — plain python3 (3.11+) is
sufficient, since tomllib shipped in the standard library.

## Schema changes vs PR #2282

- Flat agent schema: fields live directly under [agent], no nested
  metadata/persona sub-tables. Easier to author, less indentation.
- Non-configurable identity: name and title are declared in
  customize.toml as source-of-truth metadata (for future skill-manifest
  generation) but SKILL.md ignores overrides there — identity is
  hardcoded to preserve brand recognition.
- role redefined: now describes what the skill does for the user
  within its module phase, not a restatement of the title.
- persistent_facts replaces the activation-time file-context load AND
  the old memories concept. Entries can be literal sentences or
  file: prefixed paths/globs; avoids collision with the upcoming
  runtime memory sidecar.
- activation_steps_prepend / activation_steps_append harmonized across
  agents and workflows (replaces agent-specific critical_actions).
- [workflow] namespace mirrors [agent] for workflow customization.
  Same four structural rules, same field vocabulary.

## Resolver (src/scripts/resolve_customization.py)

Four purely structural merge rules, zero field-name hardcoding:

  - Scalars: override wins
  - Tables: deep merge
  - Arrays of tables where every item has `code` or `id`: merge by
    that key (matching keys replace, new keys append)
  - Any other array: append

No removal mechanism — overrides cannot delete base items. Fork the
skill or override by code with a no-op value to suppress defaults.

## Agents ported (6)

All six BMad agents now ship customize.toml + rewritten SKILL.md:
analyst (Mary), tech-writer (Paige), pm (John), ux-designer (Sally),
architect (Winston), dev (Amelia). Each uses the same 8-step
activation template: resolve → execute prepend → adopt persona →
load persistent facts → load config → greet (with {agent.icon}) →
execute append → dispatch or present menu.

Step 8 supports fast-path invocation: "hey Mary, let's brainstorm"
dispatches the matching menu item directly after greeting, skipping
the menu render when intent is clear. Chat, clarifying questions,
and bmad-help remain available when nothing on the menu fits.

## Installer + tooling

- _bmad/scripts/ provisioned on install (copies src/scripts/)
- _bmad/custom/ seeded with .gitignore for *.user.toml on fresh install
- Non-module-dir filter extended to skip _memory, memory, docs,
  scripts, and custom when scanning for modules
- Dead _config/agents/ directory no longer created
- metadata.capabilities removed from agent-manifest.csv and schema
- eslint config extended to cover src/scripts/**
- validate-file-refs.js knows about custom/ as install-only

## Deferred for follow-up

- bmad-product-brief workflow port (the pilot that demonstrates
  [workflow] + on_complete)
- Translated docs (cs/fr/vi-vn/zh-cn) — regenerate from English

* feat(skills): port bmad-product-brief to TOML workflow customization

Completes the customization surface rollout by giving the product-brief
workflow the same override model as the six BMad agents, under the
[workflow] namespace instead of [agent].

## customize.toml

Mirrors the agent shape under [workflow] with:
- activation_steps_prepend / activation_steps_append (harmonized across
  agents and workflows — same field names, same append semantics)
- persistent_facts with the file: convention, seeded with
  file:{project-root}/**/project-context.md
- on_complete scalar (renamed from PR #2282's skill_end for clarity —
  reads cleaner as "what runs when the workflow completes")

## SKILL.md

7-step workflow activation:
  1. Resolve workflow block
  2. Execute prepend steps
  3. Load persistent facts (file: or literal)
  4. Load config
  5. Greet if not already
  6. Execute append steps
  7. Stage 1 — Understand Intent

python3 + stdlib tomllib invocation; no uv required.

## Prompt file changes

- Path normalization: ../agents/ → agents/, ../resources/ → resources/,
  bare foo.md → prompts/foo.md. All references now resolve from the
  skill root (matches the convention documented in SKILL.md).
- Paths: meta-line added to each of the 4 prompt files that reference
  other files, reinforcing "bare paths resolve from skill root" so the
  LLM doesn't lose the convention when operating two hops into a
  prompt chain.
- finalize.md terminal stage now calls the resolver for
  workflow.on_complete — non-empty values run as the final step.

## Validation

- Resolver output verified: 4 workflow fields returned cleanly.
- validate-file-refs.js: 254 files scanned, 139 refs checked, 0 broken.
- test:refs: passing.

* docs(skills): enterprise customization recipes + workflow template variable

Three independent improvements bundled because they share the same
surface (workflow/agent customization) and landed from the same design
discussion:

## Fallback sentence disambiguated (7 SKILL.md files)

The "if the script fails" fallback used to say `{project-root}/_bmad/
custom/{skill-name}.toml` for the team override and then just `{skill-
name}.user.toml` for the user override, leaving the user file's
location implicit. LLMs could reasonably guess skill root or project
root instead. Replaced with an unambiguous numbered list that spells
out the full path for every file in the merge chain.

## Product-brief: stage promotion + brief_template variable

- Promoted `## Stage 1: Understand Intent` from a nested step inside
  "On Activation" to a top-level section. The previous "Step 7: Stage
  1 — Understand Intent → Proceed to Stage 1 below" was mechanical
  numbering pretending to be a step. Activation now ends cleanly at
  Step 6; Stage 1 is a peer section.
- Added `brief_template` as a workflow-level scalar customization
  defaulting to `resources/brief-template.md`. Stage 4 reads
  `{workflow.brief_template}` instead of the hardcoded path, so orgs
  can point at their own template under `{project-root}/...` without
  forking the skill.

## New doc: docs/how-to/extend-bmad-for-your-org.md

Four worked recipes that together cover most enterprise scenarios:

1. Shape an agent across every workflow it dispatches (dev agent +
   Context7 MCP + Linear search — the highest-leverage pattern)
2. Enforce org conventions inside a specific workflow (product-brief
   + compliance-field persistent_facts)
3. Publish completed outputs to external systems (product-brief +
   Confluence + Jira via MCP, gated on user confirmation for Jira)
4. Swap in your own output template (product-brief + brief_template
   variable swap)

Opens with the two-layer mental model (agent spans workflows,
workflow is local) so readers pick the right granularity before
reading any recipe. Closes with a "Combining Recipes" section
showing all four composed. Cross-linked from customize-bmad.md.

## Validation

- Resolver: workflow.brief_template returns the default cleanly.
- validate-file-refs.js: 254 files scanned, 146 refs checked
  (+7 from this commit), 0 broken.

* docs(skills): encourage CLAUDE.md/AGENTS.md reinforcement of critical rules

Added a "Reinforce Global Rules in Your IDE's Session File" section to
extend-bmad-for-your-org.md. BMad customizations only load when a
skill activates, but IDE session files (CLAUDE.md, AGENTS.md, cursor
rules, copilot-instructions) load every turn — worth restating the
most critical rules there too so they survive ad-hoc chat outside a
BMad skill.

Includes a one-line example reinforcing the Recipe 1 Context7 rule,
plus a scope table that clarifies what each layer is for:
  - IDE session file: universal, every session, keep succinct
  - Agent customization: persona-specific, every dispatched workflow
  - Workflow customization: one workflow run

Emphasizes brevity — noise in the session file crowds out signal.

* docs(skills): add Named Agents explanation doc

New docs/explanation/named-agents.md walking through the three-legged
stool (skills + named agents + customization) with the "Hey Mary,
let's brainstorm" activation flow as the narrative thread.

Covers:
- Why named agents vs menu-driven or prompt-driven alternatives
- The 8-step activation flow and what each step contributes
- How customization scales the model beyond a single developer
- Cross-links to the how-to docs for implementation details

Sits alongside brainstorming.md, quick-dev.md, party-mode.md in the
explanation folder — feature narratives for users who want to
understand why BMad is designed the way it is, not just how to use it.

* docs(skills): clarify that keyed-merge requires a single identifier key per array

Review feedback (PR #2284) flagged that the merge-rules wording was
ambiguous: "every item has a `code` or `id` field" could reasonably
be read as "each item individually has at least one of the two",
allowing arrays to mix `code` and `id` across items.

The resolver has always required all items share the *same* identifier
key (all `code`, or all `id`). Mixed arrays fall through to append —
intentional, because mixing identifier keys within one array is a
schema smell and any guess about which key should merge creates a
worse trap than the append-fallback.

Clarified in three places:
- Merge-rules table in customize-bmad.md: "every item shares the
  **same** identifier field"
- `code`/`id` convention paragraph: "pick **one** convention ... and
  stick with it across the whole array"
- Resolver docstring and `_detect_keyed_merge_field` docstring:
  explicit note that mixed arrays fall through with rationale

No behavior change.

* docs(skills): address CodeRabbit review — fallback rules, OS claim, headless greeting

Three fixes from PR #2284 review feedback:

## 1. Fallback merge wording (7 SKILL.md files)

Every SKILL.md told the LLM to merge the three customization files
"in priority order (later wins)" when the resolver fails. That reads
as shallow last-write-wins — but the resolver does structural merge
(scalars override, tables deep-merge, code/id-keyed arrays merge by
key, other arrays append). Following the old wording manually would
have silently stripped base `principles`, `persistent_facts`, and
`menu` items whenever a team override was present.

Expanded the fallback sentence to restate the four structural rules
explicitly, matching the resolver's behavior.

Applied to all 6 agents + bmad-product-brief workflow.

## 2. Python 3.11 / OS shipping claim (customize-bmad.md)

The docs claimed "macOS 13+, Ubuntu 22.04+, Debian 12+, Fedora 37+
all ship 3.11 or newer." Inaccurate — Ubuntu 22.04 defaults `python3`
to 3.10.6 (3.11 is a separate package), and macOS doesn't really
ship Python by default anymore.

Replaced with honest guidance: check `python3 --version` and note
that macOS without Homebrew and Ubuntu 22.04 default to 3.10 or
earlier.

## 3. Autonomous mode greeting gate (bmad-product-brief)

Product-brief's activation-mode detection documents autonomous mode
as "produce complete brief without interaction" — but Step 5 greeted
unconditionally, adding conversational output before the headless
artifact. Gated the greeting on `{mode}` != `autonomous`.

## Dismissed (replied on thread)

- `.gitignore` migration from *.user.yaml to *.user.toml: YAML
  installer code was in reverted #2282, never released. No users
  affected. Same rationale as Augment's earlier thread.

Validated: 254 files, 146 refs, 0 broken. test:refs 7/7,
test:install 242/242.

* docs: rename Extend to Expand throughout customization docs
2026-04-19 19:30:29 -05:00
Brian e550df2474
Revert "feat(skills): YAML-based agent customization with Python resolver (#2282)" (#2283)
This reverts commit bd1c0053d5.
2026-04-19 11:09:21 -05:00
Brian bd1c0053d5
feat(skills): YAML-based agent customization with Python resolver (#2282)
Three-layer customization (skill defaults → team → user) for BMad agents    
  and any skill that opts in. Users edit `_bmad/custom/{skill-name}.yaml`
  (team, committed) or `{skill-name}.user.yaml` (personal, gitignored);       
  customizations survive updates.                                             
                                                                              
  Resolver is a Python script using PEP 723 inline metadata, invoked via      
  `uv run` so deps auto-install into a cached isolated env on first call.     
  This aligns with Anthropic's Agent Skills spec and BMB conventions, and     
  keeps the dependency declared (scannable by pip-audit/Dependabot) rather    
  than vendored.                                                              
                                                                              
  ## Design choices                                                           
                                                                              
  - **Agent identity is hardcoded** in SKILL.md (name, title, Overview prose) 
    so skills can be invoked reliably by role *or* default name. Brand
    recognition is preserved; customization shapes behavior, not identity.    
  - **Luminary-anchored personas** (e.g. "Channels Martin Fowler's            
    pragmatism and Werner Vogels's cloud-scale realism") deliver ~55%
    token savings per agent while preserving distinctive voice beats.         
  - **Universal per-field merge rules** with v6.1-compatible agent            
    semantics: metadata shallow-merge, persona replace, critical_actions      
    and memories append, menu merge-by-code, all else deep-merge.             
  - **Workflow customization** shares the same surface — `bmad-product-brief`
    pilots `activation_steps_prepend`, `activation_steps_append`, and         
    `skill_end` hooks that any workflow-style skill can adopt.                
                                                                              
  ## Infrastructure                                                           
                                                                              
  - `_bmad/scripts/` houses shared Python scripts (resolver + future).        
  - `_bmad/custom/` is provisioned empty with a seeded `.gitignore` for
    `*.user.yaml` on fresh installs.                                          
  - Installer filters ensure `scripts/`, `custom/`, and sidecar-generated   
    `memory/` directories are never treated as modules.                       
  - Dead v6.1 code cleaned up: `_config/agents/` no longer created,         
    `metadata.capabilities` removed from schema and CSV manifest.
2026-04-18 23:13:31 -05:00
Brian 5f848c27c8
Merge branch 'main' into fix/prd-scoping-permission-model 2026-04-13 00:21:44 -05:00
Brian Madison 83f374c254 fix(installer): source built-in modules locally instead of from registry
Core and BMM modules live in this repo (src/core-skills, src/bmm-skills)
but the installer UI sourced them from the remote registry. When the
registry was unreachable (VPN, proxy, firewall), the fallback YAML only
had the 4 external modules, so core and bmm disappeared from the install
list entirely.

Now _selectOfficialModules and getDefaultModules always read built-in
modules from the local source via OfficialModules.listAvailable(), then
append external modules from the registry. Network failures only affect
external modules.

Closes #2239
2026-04-12 22:41:40 -05:00
Alex Verkhovsky 17da5ca8ca
feat(quick-dev): sync sprint-status.yaml on epic-story implementation (#2234)
* feat(quick-dev): sync sprint-status.yaml on epic-story implementation

When quick-dev infers the intent is an epic story, resolve the full
sprint-status key during step-01's previous-story-continuity sub-step,
then sync sprint-status.yaml at the two workflow boundaries code-review
already owns the trailing half of:

- step-03 start: flip the story to in-progress and lift the parent
  epic out of backlog if needed.
- step-05 end: flip the story to review. Code-review keeps ownership
  of review -> done.

Resolution uses exact numeric-segment equality on the {epic}-{story}
prefix (never string-prefix match), so 1-1 no longer collides with
1-10. Both sync blocks are idempotent so step-04 loopbacks do not
clobber human edits or bump last_updated without cause. Skips silently
when sprint-status.yaml is missing or the intent is not an epic story.

* feat(quick-dev): add sprint-status sync to one-shot route

Epic stories do get implemented via one-shot in practice. Add the same
in-progress / review sync pair that step-03 and step-05 already have,
with identical idempotency guards and skip-on-missing behavior.

* refactor(quick-dev): extract sprint-status sync into shared file

Replace inline sync blocks in step-03, step-05, and step-oneshot with
one-line callouts to sync-sprint-status.md. The shared file owns all
edge-case handling (idempotency, epic lift, missing file/key) and is
parameterized by {target_status}. Any future route picks it up with a
single Follow line.

* fix(quick-dev): resolve story_key on early-exit resume paths

Extract story-key resolution into a shared subsection referenced by
all early-exit paths and INSTRUCTIONS, ensuring sprint-status sync
works for resumed epic stories.

* refactor(quick-dev): tighten story-key resolution prompt

Remove mechanical details the LLM can infer; keep only the
collision-prevention constraint.
2026-04-10 10:03:53 -07:00
Alex Verkhovsky f5030c7084
feat(review): enforce model parity for all review subagents (#2236)
Prevent review subagents from being downgraded to cheaper models.
Rare findings from the Acceptance Auditor tend to be high-severity,
and research shows smaller models have worse recall on rare-event
detection.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 05:53:54 -07:00
Alex Verkhovsky 202c842826
fix(code-review): remove dead Batch-apply option from patch menu (#2225)
The Batch-apply option (added in 9c3e2804) was instructed to "skip
any finding that requires judgment" — but step-03-triage already
guarantees patch findings are unambiguous (the decision-needed
bucket exists precisely to absorb ambiguous ones). The option had
no distinct work to do that option 1 did not already cover, and
its label suggested a meaningful difference that did not exist.

- Delete option 0 and the >3 findings conditional
- Rename "Fix them automatically" -> "Apply every patch", with
  explicit scope (patches only; defer/decision-needed untouched)
- Rename "Walk through each" -> "Walk through each patch" for the
  same scope clarity
- Unify <Z> placeholder with the existing <P> patch count
- Strip stale (or "0" for batch) notes from HALT lines
2026-04-09 21:02:07 -07:00
Alex Verkhovsky 3ba51e1bac
feat(quick-dev): add epic context compilation to step-01 (#2218)
* feat(quick-dev): add epic context compilation to step-01

Fork step-01 context loading: epic stories get a sub-agent that
compiles planning docs into a cached epic-{N}-context.md, while
freeform intents keep the lightweight directory-listing path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(quick-dev): tighten epic context loading per PR review

- Validate cached epic-<N>-context.md is non-empty and starts with the
  expected header before loading; treat invalid cache as missing.
- Replace inline {N} placeholders with <N> so the skill validator does
  not flag them as unresolved workflow variables.
- Replace ambiguous "fall back to path B" with an explicit instruction
  to scan/load planning artifacts using path B's procedure, with a note
  not to re-evaluate path B's gating clause.

Addresses CodeRabbit and Augment review comments on PR #2218.

* refactor(quick-dev): tighten compile-epic-context prompt

- Restructure with Task/Steps opening and Exact Output Format section.
- Switch Stories template to bullet form for clarity.
- Add "no hallucination" and explicit "omit empty sections except Goal
  and Stories" rules.
- Use <N> instead of {N} in the filename for consistency with step-01.

* refactor(quick-dev): restructure epic-story context loading

Reshape path A of step-01 into five explicit numbered steps and add an
inline-compilation fallback for runtimes that cannot spawn sub-agents
(Copilot, Codex, local Ollama, older Claude).

- Pull cache validity, compilation, verification, and continuity into
  separate numbered steps instead of nested paragraphs.
- Define "valid cached context" upfront: non-empty and starts with
  `# Epic <N> Context:`.
- Add inline-compilation fallback: runtimes without sub-agent support
  read compile-epic-context.md and follow it directly.
- Make previous-story continuity run regardless of which context source
  succeeded (cache hit, fresh compilation, or path-B raw fallback).

* fix(quick-dev): address review findings on epic context compilation

- Add freshness check to cached epic-N-context.md (invalidate when any
  planning artifact is newer)
- Remove the silent fall-back-to-raw-planning-docs path on compile
  failure; HALT and report instead
- Add explicit "ambiguous → freeform" tiebreakers for both the path A
  header and the epic-number identification step
- Drop "verbatim" from compile-epic-context.md format header to resolve
  the verbatim-vs-omit-empty contradiction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 18:29:17 -07:00
Brian 59b07c33e2
feat(bmad-help): llms.txt support for general questions (#2230)
* feat(bmad-help): add _meta rows and llms.txt support for general questions

Register llms.txt URLs in module-help.csv via _meta rows so bmad-help
can fetch module documentation when users ask questions that don't map
to a specific skill.

* refactor(bmad-help): streamline llms.txt docs into existing skill sections
2026-04-08 09:53:27 -05:00
Alex Verkhovsky f9925eb180
feat(quick-dev): improve checkpoint 1 UX (#2217)
* feat(quick-dev): improve checkpoint 1 UX with clickable link, external editing note, and change detection

Display spec file path as clickable CWD-relative link alongside the
summary. Inform users they can open the spec in another session with
any tool before approving. On approval, re-read the spec from disk
and acknowledge any external edits before proceeding.

* fix(quick-dev): tighten checkpoint 1 [A] flow wording

- Remove stray 'and options' from the editing-note intro so the note's
  position relative to the [A]/[E] menu is unambiguous.
- Restructure the [A] bullet into explicit missing/exists branches so
  the missing-file HALT cannot fall through to status updates and
  recreate a deleted spec.

Addresses augmentcode review comments on PR #2217.

* docs(quick-dev): rewrite checkpoint 1 editing-note

- Drop boilerplate opener about the spec being a regular file.
- Enumerate concrete options: editor, in-session Q&A, or bmad-advanced-elicitation / bmad-party-mode / bmad-code-review skills.
- Flag that skills should ideally run in another session to avoid context bloat.
- Change "add this note" to "display this note" for precision.
2026-04-08 07:27:06 -07:00