Commit Graph

674 Commits

Author SHA1 Message Date
pbean c845e78aab fix(bmad-module): correctness — channel/.git, config-gen, install-plan, module resolution
- channel-resolver: strip a trailing slash before `.git` so `…/r.git/` resolves
  to repo `r` (was `r.git`, which broke stable-tag lookup).
- config-gen: drop orphaned [agents.*] blocks owned by this module (module=
  fallback) on regenerate, not only those still in the current module.yaml.
- install-plan: only honor file sources for the fixed-file Claude surfaces
  (hooks/mcpServers/lspServers/settings) so the rewritten manifest never points
  at an uncopied file; anchor customize.schemas rewrites on the owning skill dir
  so nested schema paths survive.
- cli: reject unknown flags with a usage error instead of running with defaults.
- project-root: prefer a resolution's exact moduleYamlPath over the first
  module.yaml found under the repo root (multi-module repos).
- official-modules: read the flattened _bmad/<code>/module.yaml first so new-spec
  modules honor their declared working directories.
- Add channel-resolver `.git/` regression cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 15:58:13 -07:00
pbean 08c73796a6 fix(bmad-module): prevent atomicSwapDir data loss + harden ide-sync/wds cleanup paths
- atomicSwapDir: back the existing target up to a sibling before swapping the
  staged dir in, and roll back on a failed rename so an interrupted update can
  no longer leave neither the old nor the new install.
- ide-sync cleanup: only remove _bmad/ skill source dirs when EVERY IDE synced
  successfully (so failed targets remain retryable), and containment-check each
  CSV-derived path before fs.remove so a malformed row can't escape _bmad/.
- module-dirs: validate untrusted wds_folders entries for traversal/absolute
  escape before mkdir.
- Regenerate the vendored ide-sync bundle (vendor:check clean).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 15:57:38 -07:00
pbean 02806ba4cd fix(bmad-module): harden source/remove/update paths and channel input
Address automated review findings on PR #2482:
- source.mjs: validate URL-derived subdir with safePathInsideRoot so a
  ../ subdir can't copy out of the shared clone cache; run cleanup() if
  the terminal copyDir throws so the temp working dir never leaks.
- install.mjs: reject unknown --channel values (e.g. a 'stabl' typo)
  instead of silently treating them as the 'next' default.
- remove.mjs / update.mjs: containment-check manifest/CLI-derived paths
  before destructive fs.rm / atomic swap, reusing safePathInsideRoot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 19:22:07 -07:00
pbean 24d4f6426f test(bmad-module): track fixture .mcp.json so CI install test passes
The acme-devlog fixture's .mcp.json was swallowed by the global
.gitignore '.mcp.json' rule, so it was never committed. The skill's
install test asserts _bmad/devlog/.mcp.json exists, which passed
locally (file on disk) but failed on CI's clean checkout. Add a
negation for the test-fixtures path and commit the fixture.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 17:07:43 -07:00
pbean ddac866ad6 Merge remote-tracking branch 'origin/main' into feat/bmad-marketplace-plugin
# Conflicts:
#	test/test-installation-components.js
#	tools/installer/core/installer.js
2026-06-19 15:48:38 -07:00
Brian 9d5739d992
Party Mode: configurable custom parties, run modes, and a rewritten explainer (#2479)
* Add configurable parties to bmad-party-mode

Party mode gains a customize.toml config surface and a guided
authoring flow, while the out-of-the-box default room is unchanged.

- customize.toml: party_members (custom personas), party_groups
  (named rooms with an optional freeform `scene`), default_party,
  and party_mode (auto/session/subagent/agent-team). Universal
  hooks wired (activation steps, persistent_facts, on_complete).
- Roster model: collective = installed agents + custom members
  (the pool, summonable by name). Default room stays installed-only
  so customs never crowd it. Groups curate subsets; open-cast groups
  (no members) are cast from the scene on the fly.
- scripts/resolve_party.py: lazy roster resolver (installed-only
  default, group menu by name, one group's detail on demand,
  alias/override merge) + unit tests.
- references/create-party.md: create/edit parties, distill personas
  from data for focus groups, persist ad-hoc casts; writes overrides
  via bmad-customize.
- Ships a "Code Review Crew" group (5 adversarial review lenses),
  available via --party but absent from the default room.

* Rework party-mode modes + rewrite the docs explainer

Skill:
- How It Runs is now a compact router; one mode active per session,
  runtime --mode wins over the customize default, all degrade to session
- Default mode is `session`; `auto`/`subagent`/`agent-team` carved to
  references/mode-*.md, loaded only when that mode is active
- Add references/mode-auto.md (spawn-vs-voice rubric), mode-subagent.md,
  mode-agent-team.md
- resolve_party.py fallback default auto -> session
- customize.toml: party_mode default session; trim duplicated mode gloss
- Trim restated script-contract prose; collapse "Following the User's Lead";
  add scene/persona-binding and web-search rules; offer an HTML keepsake
  at wrap-up

Docs:
- Full rewrite of docs/explanation/party-mode.md: the four modes, custom
  parties (personas, scenes, shapes), the shipped Code Review Crew as one
  example beside the module-based default, launch examples, party ideas,
  and the multi-group bonus tip

* Keep party energy up and route the keepsake to a config output dir

- SKILL.md: add "Keep It Feeling Like a Party" guidance so the room stays
  fun and engaging and doesn't drift into Q&A or a report
- Keepsake now writes to {workflow.output_dir}; step 2 resolves
  {output_folder} and {date}
- customize.toml: add output_dir = {output_folder}/party-mode, overridable
  in team/user TOML (matches the bmad-brainstorming output pattern)
2026-06-18 00:57:26 -05:00
Dov Benyomin Sohacheski cfafc89cf6
feat(skills): track retrospective action items in sprint-status (#2465)
Retrospective Step 12 appends agreed action items to a new action_items
section in sprint-status.yaml and updates the previous epic's entries from
the Step 4 follow-through. Sprint-status parses the section, validates its
statuses, and surfaces open items in the summary and data mode.
Sprint-planning preserves the section when regenerating the file.
2026-06-17 22:34:20 -05:00
Brian 2417f0048d
bmad-architecture: lean directives, breadth coverage, redesigned spine template (#2475)
* bmad-architecture: breadth coverage + lean directives; reviewer reports to subfolder

- Inline forward-readiness (inherit upstream silently; thin input -> suggest bmad-spec or hybrid-capture) and brownfield (ratify, don't re-tell) directives in place of a standalone spine-checklist
- Use {workflow.persistent_facts} instead of hardcoded project-context.md
- Reviewer gate writes per-reviewer reports to reviews/ subfolder so the deliverable folder stays clean
- Require breadth coverage at distill and in the gate rubric: every altitude-owned dimension decided/deferred/open, flagging the operational/environmental envelope a domain-focused draft skips
- Trim repeated directives and human-facing justification prose

* Redesign spine template and move stack pinning to a body table

Rework spine-template.md so it stops forcing fixed structure: guidance
moves into single-line HTML comments (stripped at distill), the always-two
diagrams and empty-mermaid render bugs are gone, and the structural-seed
framing opens up so the operational/environmental envelope isn't skipped.
Stack moves from nested frontmatter into a ## Stack | Name | Version | table.

lint_spine.py drops the frontmatter dep check for find_unpinned_stack, which
parses the Stack table and flags real-name/blank-version rows while skipping
{token} skeletons. Tests reworked to match; 24 passing.

SKILL.md Finalize tightened to act-then-strip template comments and sweep
altitude-owned breadth.

* Harden find_unpinned_stack: blank fences, locate columns, looser heading

Address PR review (CodeRabbit + Augment): find_unpinned_stack scanned raw
body, so pipe-rows or ## headings inside a fenced block could be misread as
live Stack content and misreport version_pin. Now blanks fences first, like
find_placeholders and find_ad_issues, honoring the linter's fences-are-non-live
contract.

Also locate both Name and Version columns from the header (a reordered table
now pairs name to version correctly) and match the heading on a word boundary
(## Stack & Versions still counts). Add regression tests for fenced rows,
fenced headings, renamed heading, and reordered columns (28 passing).

Reword stale 'unpinned deps' / 'unpinned dependency versions' to 'unpinned
Stack versions' to match the body-table model.
2026-06-17 16:00:52 -05:00
Brian 242dc6ef75
bmad-architecture part 1: replace bmad-create-architecture with a lean spine skill (#2467)
* Rework solutioning architecture skill into bmad-architecture (spine)

- Rename canonical skill bmad-tech-plan -> bmad-architecture; output is ARCHITECTURE-SPINE.md
- Convert bmad-create-architecture to a deprecated husk forwarding to bmad-architecture (create intent); strip steps/data/template
- Finalize: spine is the default, then offers fuller renderings + a self-contained HTML view; doc_standards polish applies to prose docs only
- Reviewer Gate: add adversarial divergence-hunter, on by default at high/regulated/cross-team stakes
- Fix references in module-help.csv, bmad-prd, bmad-ux, bmad-agent-architect; reword help entry for when-to-offer
- bmad-spec: flag recognized-but-unaddressed domain implications as open_questions

* bmad-architecture: extract Finalize/reviewer-menu to references, add grade_spine script

- Move the Finalize sequence out of SKILL.md into references/finalize.md
- Make references/validate.md own the canonical reviewer menu and prompts
- Add scripts/grade_spine.py (+ tests) so validation grade is computed
  deterministically instead of derived by hand
- Tighten SKILL.md spine/memlog framing

* bmad-architecture: outcome-driven rewrite + spawned reviewer gate

Re-express SKILL.md as goals/outcomes rather than procedure: intent is read
from the input (raw idea, large doc, codebase, feature slice, existing spine)
instead of a Create/Update/Validate x mode matrix. Restore the counter-default
coaching invariants that over-compression had stripped — Guided is the default,
load-bearing calls are shown with alternatives and the user chooses, recommend a
known starter when the stack is open, investigate brownfield before deciding.

Adopt the bmad-prd/product-brief shape: a dedicated Reviewer Gate that always
spawns finalize_reviewers as parallel subagents against the spine (lint floor
first; ad-hoc lenses scaled to rigor/altitude/criticality), and a numbered
Finalize that calls it. Headless runs the full gate non-interactively.

Reframe the structural seed as the living source of truth for shape (code owns
detail; evolve on shape change; memlog keeps history). Fix template mermaid
(C4 -> flowchart, valid one-attr-per-line erDiagram). Ship two default
finalize_reviewers (currency/reality check, adversarial divergence hunter).
Remove grade_spine.py and the inlined discovery/inputs/validate/finalize refs.

* bmad-architecture: review fixes — shared memlog, epic altitude, lint hardening

Pre-PR review fixes for the new architecture-spine skill:

- Adopt the shared canonical memlog (#2462); drop the vendored copy and the
  status-flag lifecycle in favor of `event` entries
- Wire epic-altitude inheritance: parent-spine load+bind, Inherited Invariants
  template section, epic-scoped run folder, parent-contradiction lens; state
  that per-story detail is deferred to bmad-create-story
- Add the Update intent; honor a forwarded-activation handoff from the
  deprecated bmad-create-architecture shim
- Rename modes to Coaching path / Fast path (suite-consistent with prd/brief)
  and sequence the offer as an activation step
- Fix the brownfield project-context.md default path ({output_folder} no-op)
- lint_spine: line-exact frontmatter, fence-blanking (AD-in-fence + accurate
  line numbers), map-form key_deps, AD-0 fix; soften template-token severity;
  add 8 tests
- Carve the Reviewer Gate to references/ to stay under the SKILL.md token budget
- Template: entities-only ERD, scale-down guidance, softened seed framing;
  gitignore .memlog.md

* bmad-architecture: address PR review (augment + coderabbit)

- REF-03: use canonical "invoke the `skill` skill" language for all cross-skill
  references in SKILL.md (was "route to / offer / hand to / Next:")
- lint_spine: scan frontmatter for unfilled template tokens / TBD (paradigm,
  scope, date were uncatchable in the body-only pass)
- lint_spine: guard read_text() so a bad-encoding/unreadable spine returns error
  JSON and exit 0, honoring the documented contract
- reviewer-gate: resolve the "always run" vs "may skip" ambiguity — the gate
  scales/skips by stakes, but finalize_reviewers always run once it does
- tests: +3 (frontmatter token, frontmatter TBD, unreadable spine); use next()

* bmad-architecture: align finalize-reviewers wording + headless blocked output

- customize.toml: reword finalize_reviewers comment to match reviewer-gate.md —
  the gate is stakes-gated, but its reviewers always run once it does (coderabbit)
- headless.md: state explicitly that a blocked run omits spine/memlog/companions,
  matching the "omit keys for artifacts not produced" contract (coderabbit)

* bmad-architecture: ask deliverable purpose up front, offer presentable renderings, lead next-steps with bmad-spec
2026-06-14 15:42:37 -05:00
Brian b9431d6d99
Shared canonical memlog script (src/scripts/memlog.py) + bmad-spec as first consumer (#2462)
* bmad-spec: make the memlog canonical, SPEC.md a derived view

Replace the bespoke .decision-log.md with the shared memlog script
(_bmad/scripts/memlog.py, same location as resolve_customization.py).
The append-only memlog becomes the single source of truth; SPEC.md and
spec-authored companions are re-derived from it (plus cited sources for
raw content) on each run instead of hand-patched. This makes bmad-spec
the sole writer of the spec and lets the surrounding steps (PRD, UX,
architecture, epics) feed one spec in any order without merge drift.

- New "Memory and derivation" section: memlog canonical, SPEC.md a
  projection, single-writer rule, append/init via the shared script,
  no status field (terminal moments are event entries).
- Operation reads the prior memlog (not the rendered SPEC.md) as the
  authority on decisions and capability IDs on update.
- Conflict-surfacing: live sources/companions that disagree on a field
  are raised to the user, resolution logged as a new entry.
- Rename .decision-log.md -> .memlog.md across SKILL.md and assets.

* core: add shared canonical memlog.py in src/scripts

Single source-of-truth memlog: append-only, chronological working-memory
log for skills. Installs to _bmad/scripts/memlog.py via the existing
src/scripts sync (beside resolve_customization.py), so any skill can call
it at runtime — bmad-spec is the first consumer.

Merges the neutral API (--workspace, free-form --type/--by, generic set)
with crash-safe fsync atomic writes. No lifecycle status by design: a
memory log records completion as an event entry, never a frontmatter flag.
Also accepts --path for callers that hold the file path directly. 30 tests.

* bmad-spec: include event in memlog --type list

The documented append --type set omitted event while the next line
requires --type event for terminal moments. Align the list.

* Fix memlog Python floor and exclude tests from install

- memlog.py: add 'from __future__ import annotations' so PEP 585/604
  hints stay lazy; the script runs on Python 3.8+ instead of crashing
  below 3.10. Correct the requires-python header to >=3.8.
- installer.js: filter tests/, __pycache__/, .pytest_cache/, and *.pyc
  out of _installSharedScripts so dev-only files never ship to users.
2026-06-11 08:17:03 -05:00
PinkyD fdd65dc3d9
fix(skills): pass diff output inline to the blind-hunter reviewer (#2463)
The Blind Hunter subagent intentionally has no tool access, but the
review steps never said how {diff_output} should be delivered. Orchestrators
typically wrote the diff to a temp file and asked the agent to read it,
which silently fails (0 tool calls), and the 10-finding requirement then
pushes the agent to hallucinate findings against code it never saw.

State explicitly that the diff is passed inline in the subagent prompt,
in both bmad-code-review step 2 and bmad-quick-dev step 4.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 11:23:26 -05:00
pbean 1e4033fba8 Merge remote-tracking branch 'origin/main' into feat/bmad-marketplace-plugin 2026-06-09 12:12:22 -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
pbean b41c3b0a04 feat(bmad-module): reach installer parity on source parsing, channels, and clone cache
Close the remaining capability gaps where the skill's custom-module install was
narrower than the canonical installer (tools/installer/modules/custom-module-manager.js
+ channel-resolver.js). The new-spec install path was already shared code and the
legacy resolver a faithful port, so this targets only the independently-implemented
source/channel/cache plumbing.

- source.mjs parseSource: accept `owner/repo@ref`, and browser-style deep-path
  git URLs (tree/blob, GitLab `-/tree`, Gitea `src/branch`, `?path=`), extracting
  the embedded ref + repo subdirectory — so a module in a monorepo subfolder
  installs directly. URL-based parsing handles Azure DevOps `_git`, nested
  groups, and dotted repo names.
- lib/cache.mjs: shared clone cache at ~/.bmad/cache/custom-modules/<host>/<owner>/<repo>/
  with .bmad-source.json/.bmad-channel.json metadata, matching the installer
  (reuse on matching ref, fetch/refresh otherwise, keep stale copy on fetch
  failure). materializeSource copies the module root out of the cache into a
  throwaway temp tree so the cache is never mutated.
- lib/channel-resolver.mjs: node:-only port of resolveChannel (stable/next/pinned);
  `stable` resolves the latest non-prerelease GitHub tag, falling back to next.
  semver-lite gains prerelease/compare/rcompare so it stays registry-free.
- install.mjs/update.mjs: resolve channel+ref before clone; update re-resolves the
  channel the module was installed with.

Tests + CI:
- test/test-bmad-module-source.mjs: unit coverage for parseSource, semver-lite, and
  channel-resolver, at parity with the installer's test-parse-source-urls.js /
  test-installer-channels.js.
- Wire the skill's unit test (test:skill-source) and its end-to-end integration
  test (test:skill) into npm test, npm run quality, and the quality.yaml CI job —
  the integration test was previously committed but only ever run by hand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 15:06:48 -07:00
pbean 34b2fb1c78 feat(bmad-module): install legacy marketplace.json modules in the skill
The standalone bmad-module skill only understood the new plugin.json#bmad
spec, so installing a legacy repo (marketplace.json + module.yaml, e.g.
bmad-code-org/bmad-module-game-dev-studio) failed with exit 20. Legacy
support existed only in the full installer's PluginResolver, which the
skill can't import (it ships self-contained under .claude/skills/).

Port that resolver into lib/legacy-resolver.mjs (strategies 1-5): when a
repo has no plugin.json#bmad but has a marketplace.json, resolve it into a
synthetic manifest of the same shape readAndValidateManifest produces, then
run it through the existing buildCopyPlan -> rewrite -> stage -> swap
pipeline unchanged. buildCopyPlan already copies marketplace.json verbatim,
flattens arbitrary skill paths to skills/<basename>, and flattens
moduleDefinition/moduleHelpCsv, so almost no downstream change is needed.

- plugin-json.mjs: extract validateManifestObject(m, {allowReserved}) and
  add hasBmadPluginJson(dir). Legacy installs pass allowReserved:true so
  first-party codes (gds, bmm, ...) install; new-spec authors still get
  exit 21.
- install.mjs: detect new-spec -> legacy -> neither in §3; write
  synthesized module.yaml/module-help.csv into the temp clone for the
  strategy-5 fallback.
- cli.mjs: add --module <code> to disambiguate a multi-module marketplace
  (otherwise exit 20 lists the available codes).
- help-catalog.mjs: export MODULE_HELP_CSV_HEADER for the synthesizer.
- tests: legacy fixtures (strategy-1, reserved code, synthesize fallback)
  + integration assertions. SKILL.md/README updated.

Verified: full install of the real game-dev-studio repo resolves gds and
lands 250 files under _bmad/gds/. Integration suite 97/0, installer
component tests 374/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 11:49:31 -07: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
pbean 08f25d0588 refactor(bmad-module): tighten SKILL.md and drop dead exit code 40
- Remove EXIT.FILE_OVERLAP (40): never thrown anywhere; its docs
  described code 70 (path traversal). Dropped from exit.mjs and the
  cli.mjs --help listing.
- Document --channel on the update verb (already wired through the
  scripts for both install and update).
- Trim the SKILL.md exit-code table to the codes that change what the
  agent tells the user (5, 10, 80, 90); defer the full list to the
  script's --help, removing the triplicated/drifting table.
- Lightly tighten the intro and script-path prose loaded on every
  skill activation; no behavioral change.

Integration suite 73 pass / 0 fail; validate:refs clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 15:11:26 -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
pbean bca9388750 docs(bmad-module): drop stale temp-repo references and install paths
This work was developed in a separate bmad-marketplace repo and is now
landing directly in BMAD-METHOD, so the migration framing is obsolete:

- remove links to docs/spec.md (only existed in the temp repo) and the
  bmad-marketplace / 'upstream patch' / 'sibling checkout' references in
  README, the integration test, and the acme-md-lint fixture
- drop dead 'spec §N' pointers in install.mjs, install-plan.mjs, and
  plugin-json.mjs (including a user-facing reserved-code error message)
- reword the manifest-generator 'patch' note as in-repo behavior
- correct the documented install path from _bmad/ to the IDE skills
  directories the installer now distributes skills to (.claude/skills/, etc.)

No behavior change. Integration suite: 73 pass / 0 fail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 18:00:32 -07:00
pbean 4d036bc18b docs(bmad-module): correct script location to installed IDE skills dir
Step 4 pointed at _bmad/core/skills/bmad-module/, but the new module
system distributes skills verbatim into the selected IDE directories
(.claude/skills/, .agents/skills/, etc.). Resolve the script relative
to SKILL.md instead, and route the missing-script case to the existing
exit-code-5 reinstall guidance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:44:34 -07:00
pbean 546826b451 feat(bmad-module): complete custom-module install to match the installer CLI
The bmad-module skill copied a module's files and distributed skills to IDEs,
but skipped four post-copy steps the full `bmad install --custom-source` path
performs, leaving modules incompletely installed:

- Merge each module's module-help.csv into _bmad/_config/bmad-help.csv (the
  catalog bmad-help reads) — new lib/help-catalog.mjs
- Generate [modules.<code>] / [agents.<code>] blocks in config.toml /
  config.user.toml from module.yaml (defaults + --set overrides), via a
  targeted merge that preserves [core] and sibling modules — new lib/config-gen.mjs
- Create the working directories a module declares under `directories:`
  (with move-on-path-change and wds_folders) — new lib/module-dirs.mjs
- Run `npm install --omit=dev` in place when a module ships package.json
  (opt out via bmad.install.skipNpm) — new lib/npm-deps.mjs

All four run as a shared finishModuleInstall step wired into install, update,
and remove; every step is non-fatal so a module already committed to _bmad/
isn't lost to a post-copy hiccup. Adds a repeatable --set <code>.<key>=<value>
flag mirroring the installer.

Also fixes two latent issues in the manifest-driven copy that the new steps
depend on:
- moduleDefinition / moduleHelpCsv are now flattened to the module root even
  when they live inside a declared skill dir (the setup-skill assets pattern);
  previously claimedSrc dedup skipped them and the rewritten plugin.json
  pointed at a non-existent ./module.yaml.
- package.json / package-lock.json are now copied so npm deps can install.

Tests: extends the integration suite with config/agent-roster, --set,
directory-creation, help-catalog, removal-cleanup, and npm assertions
(73/73 pass); adds a minimal-npm fixture and rewrites the comprehensive
fixture's module-help.csv to the canonical schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 09:52:52 -07: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
pbean af52c7baf9 feat(bmad-module): distribute installed skills to the user's chosen IDEs
The bmad-module skill staged community modules under _bmad/<code>/ but never
pushed their skills out to the coding assistants the user selected at
`bmad install` time, so a freshly installed module was invisible to Claude
Code / Cursor / Copilot / etc. until a full reinstall; remove left skills
orphaned in the IDE dirs.

install/update/remove now distribute (or prune) skills to every IDE listed in
_bmad/_config/manifest.yaml and clean the redundant skill dirs from _bmad/,
matching how official modules end up.

Single engine, three callers — no fork:
- New tools/installer/core/ide-sync.js (syncIdes) wraps the real
  IdeManager.setupBatch + platform-codes engine. The full installer
  (_setupIdes/_cleanupSkillDirs), the new `bmad ide-sync` command, and the
  skill all route through it, so new IDEs and engine changes propagate
  everywhere automatically.

Local, dependency-free delivery — no npx/network at runtime:
- build-ide-sync.mjs esbuild-bundles the engine into vendor/ide-sync.mjs
  (+ platform-codes.yaml), aliasing ../prompts and ../project-root to small
  shims so @clack and the installer graph are dropped. The bundle ships inside
  the skill tree (like yaml.mjs); the skill execs it locally. It's
  generated-from-source and gated by vendor:check, refreshed on every install.

update/remove pass --prune with the module's canonicalIds so skills dropped
between versions (or on uninstall) are removed from IDE dirs + command
pointers. Graceful degradation: if the bundle is unreachable, the verb still
succeeds and points the user at `bmad ide-sync`.

Tests: new test/test-ide-sync.js drift-guard (engine == bundle, incl. prune),
integration.test.sh IDE-distribution section (offline), bundle self-check in
the build. All gates green (vendor:check, lint, format, test:install 349/349).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 20:30:46 -07:00
Brian Madison 6a62b2e0ba unwrapped prose 2026-05-29 21:31:23 -05:00
pbean 6addf6464d Merge remote-tracking branch 'origin/main' into feat/bmad-marketplace-plugin
# Conflicts:
#	.prettierignore
#	package.json
2026-05-29 14:52:46 -07:00
pbean ce461c09cc style(bmad-module): apply prettier formatting to README and SKILL
Formatting-only; no content changes. Brings both docs in line with the
repo's prettier config (a leftover from the .js→.mjs migration).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:30:23 -07:00
pbean bd63b83f72 test(bmad-module): make integration suite self-contained
The suite resolved its reference modules from `<repo>/examples`, which
existed only in the sibling bmad-marketplace checkout — so after the
skill moved into BMAD-METHOD core every install/list/remove assertion
failed with "local source not a directory".

Vendor the two reference modules (acme-md-lint, acme-devlog) under
tests/fixtures/examples/ and point EXAMPLES there; drop the now-unused
REPO_DIR. Also correct the comprehensive-install assertion: hooks are
flattened to the canonical root slot (hooks.json), matching .mcp.json
and rewriteManifestPaths — not a hooks/ subdir.

Suite now passes 41/41.

Note: these fixtures are copies of the bmad-marketplace examples and
must be re-synced if those reference modules change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:29:59 -07:00
pbean dfae0291ca fix(bmad-module): copy file-typed agents/commands entries on install
The copy planner treated every skills/agents/commands entry as a
directory and ran it through addDirRecursive, which lists files *under*
the path. For a subagent declared as a file (e.g.
`"agents": ["./agents/foo.md"]` — a standard Claude-Code shape) that
listed nothing, so the agent was silently dropped from the install even
though rewriteManifestPaths already remapped it to `./agents/foo.md`.

Stat each entry and branch: directories recurse as before, files are
queued directly (honoring the ignore matcher). Verified by the
comprehensive fixture's changelog-archivist.md agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:29:40 -07:00
pbean 354b252abd feat(bmad-module): register skill in core module-help.csv
The bmad-module skill installed but was absent from the core help
registry, so it never surfaced in the bmad-help menu (every other core
skill has a row). Add it as menu-code MM ("Manage Modules").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:29:18 -07:00
pbean 6d49cc505b feat(bmad-module): manifest-driven copy plan with canonical path rewriting
Replace the flat copy-list staging with a manifest-driven copy plan:

- buildCopyPlan maps declared skills/agents/commands and string-typed
  Claude-Code surfaces into canonical install slots, copies conventional
  top-level metadata, and drops anything not covered (no more leaking of
  tools/, website/, .github/, etc.).
- rewriteManifestPaths emits a plugin.json whose paths point at the
  canonical post-install locations, keeping the on-disk manifest
  self-consistent inside _bmad/<code>/.
- stageCopyPlan stages the plan plus synthesized files (rewritten
  plugin.json) into the tmp dir for the atomic swap.

install.mjs and update.mjs switch to the new plan/skillDestDirs flow and
drop the now-unused copy-list helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:20:35 -07: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
pbean 1fb1cf5ee6 bug: fixed atomicwrites 2026-05-23 22:13:25 -07:00
pbean a0fba4b824 fix(bmad-module): make skill self-contained so it works after npx install
The skill is copied into _bmad/core/skills/bmad-module/ by the installer,
which strips node_modules, ships no package.json under the skill, and never
runs npm install there. Bare `import 'yaml'`/`import 'semver'` therefore
crashed at module load (ERR_MODULE_NOT_FOUND, exit 1) before any structured
exit code could fire. Every other installed script is zero-third-party-dep.

- Vendor the real yaml@2.8.4 as a deterministic esbuild single-file bundle
  (scripts/lib/vendor/yaml.mjs), imported by relative path. Guarantees
  byte-identical manifest.yaml round-trips with BMAD core's writer, which uses
  the same library + options (tools/installer/core/manifest.js).
- Drop semver for a node:-only semver-lite.mjs (valid/validRange),
  parity-tested against the real semver across 469 cases (400 fuzzed).
- Fix a third bare yaml import that the original report missed (frontmatter.mjs).
- Make bmad-module.mjs a zero-import launcher that maps any load failure to a
  new documented EXIT.TOOLING (5) with reinstall guidance instead of leaking a
  raw ESM stack trace; the verb dispatcher moves to cli.mjs.
- Enforce vendor freshness so a yaml/esbuild bump can't ship a stale bundle:
  build-vendor.mjs --check is wired into npm test (pre-commit), npm run quality,
  and the quality.yaml CI validate job. Adds vendor:build / vendor:check scripts.
- Ignore the generated vendor/ dir in eslint + prettier; document the rationale
  in SKILL.md, README.md, and vendor/README.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 17:29:46 -07: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
pbean e96f16bf31 feat/bmad-module: community module manager skill created 2026-05-22 13:19:05 -07: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