Files
magnus919_agent-skills/bmad/references/adoption.md
Magnus HedemarkandGitHub e10508b034 feat(bmad): add BMad control-plane protocol skill (#400)
* feat(bmad): add BMad control-plane protocol skill

New standalone methodology skill that lets any agent run the BMad method
(Breakthrough Method of Agile AI-Driven Development) as a harness-agnostic
control-plane protocol: five-field intent contracts, direct/bounded/initiative
classification, review-as-triage, failure routing by layer, and autonomy gating
with machine-readable spec status.

- SKILL.md protocol core with progressive disclosure + When not to use
- README.md human-facing install guide
- 9 references: protocol, classification, spec, lifecycle, project-context,
  review-and-failure-routing, autonomy, party-mode, adoption
- 4 templates: SPEC, INTENT, STORY, REVIEW
- scripts/check-spec.py + 16 tests (stdlib, deterministic spec validation)
- evals/evals.json: 9 output-quality cases
- Routing seams from bmad to adjacent skills and back from
  spec-driven-development, product-shaping, implementation-planning, neckbeard
- Catalog updates: root README, skill-triggers, marketplace/plugin/llms.txt

Closes #399

* fix(bmad): address droid-review findings

- check-spec.py: skip headings inside fenced/indented code blocks so a spec
  cannot PASS on section text that only appears in a code sample
- check-spec.py: catch UnicodeDecodeError on non-UTF-8 files and report FAIL
  instead of crashing
- STORY.md template: add created key for resumability/traceability parity
- SPEC.md template: split in-progress and in-review status bullets
- add 2 regression tests (heading-in-fence, non-UTF-8)

* fix(bmad): address droid-review round 2

- check-spec.py: read specs with utf-8-sig so a UTF-8 BOM cannot silently
  disable the frontmatter status check
- check-spec.py: handle standard YAML inline comments after status values
  (status: draft  # pending review) without a false FAIL
- references/protocol.md: make lifecycle phrasing consistent with
  lifecycle.md — four phases plus a learning closeout
- add 2 regression tests (BOM, inline comment)

* fix(bmad): tolerate trailing whitespace on frontmatter delimiters

A spec whose --- delimiter lines carry trailing spaces or tabs would silently
disable the status check and let an invalid status PASS. Relax the delimiter
pattern and add a regression test.

* fix(bmad): ignore inline comments in quoted status values

* fix(bmad): tolerate leading blank lines before frontmatter

* fix(bmad): fail closed on unparseable frontmatter, matching fence markers

Address droid-review round 5 and 6 findings as a single closed class:
- Fail closed when a file opens with a --- delimiter that cannot be parsed,
  so no whitespace/frontmatter permutation can silently disable the status
  check (previously: unparseable frontmatter was treated as 'no status'
  warning, letting an invalid status PASS).
- Track fence opener markers in collect_headings so a mismatched fence no
  longer closes a code block early (false-PASS on missing sections) and an
  unclosed fence no longer swallows real headings.
- Accept empty well-formed frontmatter (---\n---) and closing delimiters
  without a trailing newline.
- STORY.md template: parent-spec points at the sibling SPEC.md.
- README: status vocabulary is not a strict linear chain; blocked is a
  resumable routing signal.

Whitespace/frontmatter mutation sweep: 9 formatting variants x valid/invalid
status all verdict correctly; malformed delimiters fail closed. 29 tests.
2026-08-24 08:05:43 -04:00

4.8 KiB

Adoption: Incremental Protocol, Then Automation

Do not begin by converting every project to a full BMad installation. Begin with a small protocol trial and add autonomy only after acceptance is testable.

Step 1: Establish a project-context boundary

Create or audit AGENTS.md. Keep only: repository policies; non-obvious commands; conventions that differ from defaults; cross-component invariants; known, observed pitfalls; pointers to authoritative documents. Do not use AGENTS.md as a generated encyclopedia. See project-context.md.

Step 2: Require an intent contract for meaningful work

Before implementation, capture Why, Capabilities, Constraints, Non-goals, and Success signal. For trivial changes this can be five short bullets in the agent conversation. For a larger initiative it becomes a versioned spec file. See spec.md and the templates.

Step 3: Route by complexity and coordination risk

  • Tiny and obvious → direct implementation.
  • Bounded but non-trivial → intent contract, short plan, implementation, review.
  • Cross-component or multi-story → analysis, PRD or SPEC, architecture, stories, readiness gate, sequential implementation.
  • High-risk or regulated → add explicit human and independent evaluation gates.

Step 4: Add autonomy only after acceptance is testable

Do not start with unattended execution. First make sure:

  • the story boundary is coherent;
  • acceptance criteria are observable;
  • tests and evaluations exist;
  • the agent can report status;
  • blocked work can be escalated;
  • unrelated findings can be deferred;
  • repository isolation and rollback work.

See autonomy.md.

Step 5: Close the loop

After an epic or substantial change:

  • compare the result with the original intent;
  • review seams between stories;
  • record defects that isolation hid;
  • reconcile any contract drift;
  • update context only when a lesson is expensive to rediscover;
  • create follow-up work explicitly rather than letting it leak into the next task.

Mapping to a dark-factory system

BMad concept Likely implementation
Named agent Role-specific skill, prompt, or subagent profile
Workflow skill Reusable protocol with explicit inputs, outputs, and gates
Product brief / PRD / SPEC Versioned Markdown contracts
Architecture spine ADRs, C4 context, interface contracts, system invariants
Epics and stories Dispatchable work units
Sprint status Machine-readable state file or database row
Build The implementation harness
Build Auto A controlled autonomous runner
Code review Independent reviewer and repair loop
Retrospective Evidence-based evaluation and learning update
Project context AGENTS.md plus carefully curated repository rules
Party Mode A deliberation protocol with selectable single-model or independent-agent modes

The strongest combination with a dark-factory architecture:

  1. Human states an objective.
  2. Analyst/PM-style workflow compresses it into an intent contract.
  3. Human approves the contract and important trade-offs.
  4. Architect-style workflow establishes boundaries and invariants.
  5. Story sharder creates bounded work units.
  6. Orchestrator dispatches one unit at a time.
  7. Developer agent implements in an isolated worktree.
  8. Automated tests and domain evaluations run.
  9. Independent review agent triages findings.
  10. The orchestrator routes done, blocked, deferred, or rework.
  11. Human reviews the final product at the appropriate checkpoint.
  12. Retrospective updates the process and only the durable project context.

Division of labor: BMad-style workflows own understanding and handoff quality; the factory orchestrator owns scheduling and policy; the implementation agent owns local code changes; evaluators own evidence; the human owns intent, authority, and acceptance.

Known limitations to keep honest

  • Role-play is not independence — use actual subagents, independent model calls, or an external evaluator when independence matters.
  • Better documents do not guarantee better decisions — human judgment and evidence remain necessary.
  • Documentation can become a tax — strongest when artifacts preserve load-bearing decisions; counterproductive when every minor change produces ceremony or stale plans compete with the code.
  • A self-reviewing agent can miss its own blind spots — add independent checks for high-risk work.
  • Autonomy can amplify bad intent — the more capable the execution loop, the more important it is to freeze the right intent before it runs.
  • Version drift is real — BMad is actively evolving; when installing official tooling, pin versions and follow current docs.
  • Not a complete dark factory — the method supplies the control plane; you still need the queue, dispatch, isolation, policy, observability, and budget layers.