Commit Graph

6 Commits

Author SHA1 Message Date
Brian Madison ebbb5ccb3b bmm: address PR review on memlog standardization
- Delete orphaned bmad-brainstorming/scripts/tests/test_memlog.py: it
  imported the bundled memlog.py removed in this PR (ModuleNotFoundError on
  collection) and its unique tests asserted the now-removed status-lifecycle
  behavior. The canonical src/scripts/tests/test_memlog.py is the corrected
  superset, so no coverage is lost.
- Make runnable memlog command examples self-contained with the full
  'uv run {project-root}/_bmad/scripts/memlog.py ... --workspace {doc_workspace}'
  form across bmad-brainstorming (converge/finalize/headless), bmad-prd, and
  bmad-ux. Terse checklist back-references left short by design.
- bmad-product-brief Update: init .memlog.md if missing (legacy/pre-standard
  briefs), matching bmad-prd and bmad-ux; fix the --type override invocation.
2026-06-20 17:39:54 -05:00
Brian Madison aa00389027 bmm: invoke scripts with 'uv run' instead of python3/bare uv
Bare 'uv {path}.py' does not execute (uv treats the path as a subcommand and errors); only 'uv run {path}' runs the script. Fixes the broken bare-uv memlog form shipped earlier in this branch and converts python3 script calls to 'uv run' across the 6 touched skills (memlog.py, resolve_customization.py, brain.py, lint_spine.py). Inline 'python3 -c' one-liners and .py shebangs are left as-is.
2026-06-20 01:23:28 -05:00
Brian Madison 5911db8b3c bmm: standardize memlog usage across skills
- Point all memlog writes at the canonical core script (uv {project-root}/_bmad/scripts/memlog.py) in bmad-spec, bmad-brainstorming, and bmad-architecture; drop the python3/{skill-root} invocations and remove the bundled memlog.py copy from bmad-brainstorming.
- Migrate bmad-prd, bmad-ux, and bmad-product-brief off the hand-authored decision-log.md onto the memlog standard: .memlog.md written only via memlog.py (init/append), distilled-toward not authored, no lifecycle status; rename the headless decision_log JSON key to memlog.
- Fix bmad-spec capability rendering: nested bullets so intent/success break onto their own lines instead of collapsing into one blob.
- Update EN + FR docs (getting-started, workflow-map, core-tools) to reference .memlog.md.
- Remove the bmad-product-brief eval suite (to be replaced with a new format).
2026-06-20 01:08:48 -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
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
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