bmad-method 6.8.1-next.0 → 6.8.1-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md +1 -1
- package/src/bmm-skills/2-plan-workflows/bmad-ux/SKILL.md +2 -2
- package/src/bmm-skills/3-solutioning/bmad-agent-architect/customize.toml +2 -2
- package/src/bmm-skills/3-solutioning/bmad-architecture/SKILL.md +86 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/assets/spine-template.md +129 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/customize.toml +100 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/references/headless.md +26 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/references/reviewer-gate.md +13 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/scripts/lint_spine.py +260 -0
- package/src/bmm-skills/3-solutioning/bmad-architecture/scripts/tests/test_lint_spine.py +228 -0
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/SKILL.md +16 -60
- package/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +12 -4
- package/src/bmm-skills/4-implementation/bmad-code-review/SKILL.md +3 -0
- package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-02-review.md +1 -1
- package/src/bmm-skills/4-implementation/bmad-create-story/SKILL.md +3 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/SKILL.md +3 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-04-review.md +1 -1
- package/src/bmm-skills/4-implementation/bmad-retrospective/SKILL.md +14 -14
- package/src/bmm-skills/4-implementation/bmad-retrospective/customize.toml +1 -1
- package/src/bmm-skills/module-help.csv +2 -2
- package/src/core-skills/bmad-brainstorming/SKILL.md +78 -2
- package/src/core-skills/bmad-brainstorming/analysis/catalog-analysis.md +239 -0
- package/src/core-skills/bmad-brainstorming/analysis/method-matrix.csv +109 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-icons.json +166 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-methods.csv +109 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-selector.html +326 -0
- package/src/core-skills/bmad-brainstorming/customize.toml +84 -0
- package/src/core-skills/bmad-brainstorming/references/converge.md +24 -0
- package/src/core-skills/bmad-brainstorming/references/finalize.md +26 -0
- package/src/core-skills/bmad-brainstorming/references/headless.md +54 -0
- package/src/core-skills/bmad-brainstorming/references/in-chat-techniques.md +18 -0
- package/src/core-skills/bmad-brainstorming/references/mode-autonomous.md +10 -0
- package/src/core-skills/bmad-brainstorming/references/mode-facilitator.md +11 -0
- package/src/core-skills/bmad-brainstorming/references/mode-partner.md +16 -0
- package/src/core-skills/bmad-brainstorming/references/resume.md +5 -0
- package/src/core-skills/bmad-brainstorming/scripts/brain.py +740 -0
- package/src/core-skills/bmad-brainstorming/scripts/memlog.py +202 -0
- package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +217 -0
- package/src/core-skills/bmad-brainstorming/scripts/tests/test_memlog.py +265 -0
- package/src/core-skills/bmad-spec/SKILL.md +24 -8
- package/src/core-skills/bmad-spec/assets/headless-schemas.md +3 -3
- package/src/core-skills/bmad-spec/assets/spec-template.md +1 -1
- package/src/scripts/memlog.py +224 -0
- package/src/scripts/tests/test_memlog.py +306 -0
- package/tools/installer/core/installer.js +32 -1
- package/tools/installer/core/python-check.js +199 -0
- package/tools/installer/ide/platform-codes.yaml +7 -0
- package/tools/installer/ui.js +10 -0
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/architecture-decision-template.md +0 -12
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/data/domain-complexity.csv +0 -13
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/data/project-types.csv +0 -7
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-01-init.md +0 -153
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-01b-continue.md +0 -173
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-02-context.md +0 -224
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-03-starter.md +0 -329
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-04-decisions.md +0 -318
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-05-patterns.md +0 -359
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-06-structure.md +0 -379
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-07-validation.md +0 -361
- package/src/bmm-skills/3-solutioning/bmad-create-architecture/steps/step-08-complete.md +0 -82
- package/src/core-skills/bmad-brainstorming/brain-methods.csv +0 -62
- package/src/core-skills/bmad-brainstorming/steps/step-01-session-setup.md +0 -214
- package/src/core-skills/bmad-brainstorming/steps/step-01b-continue.md +0 -124
- package/src/core-skills/bmad-brainstorming/steps/step-02a-user-selected.md +0 -229
- package/src/core-skills/bmad-brainstorming/steps/step-02b-ai-recommended.md +0 -239
- package/src/core-skills/bmad-brainstorming/steps/step-02c-random-selection.md +0 -211
- package/src/core-skills/bmad-brainstorming/steps/step-02d-progressive-flow.md +0 -266
- package/src/core-skills/bmad-brainstorming/steps/step-03-technique-execution.md +0 -403
- package/src/core-skills/bmad-brainstorming/steps/step-04-idea-organization.md +0 -305
- package/src/core-skills/bmad-brainstorming/template.md +0 -15
- package/src/core-skills/bmad-brainstorming/workflow.md +0 -53
package/package.json
CHANGED
|
@@ -88,5 +88,5 @@ Tell the user the sequence in one sentence, then walk it. Polish goes last so it
|
|
|
88
88
|
4. **Triage open items.** All Open Questions, `[ASSUMPTION]` tags, `[NOTE FOR PM]` callouts. Phase-blockers (would make the PRD unsafe for UX/architecture/epics) surfaced one at a time and resolved; non-blockers deferred with owner + revisit condition logged to `.decision-log.md`. If phase-blocker count is high, flag it.
|
|
89
89
|
5. **Polish.** Apply `{workflow.doc_standards}` to `prd.md` and `addendum.md` in declared order (structural passes before prose — prose should not polish soon-to-be-cut text). Parallelize across documents, sequential within.
|
|
90
90
|
6. **External handoffs.** Execute `{workflow.external_handoffs}`; surface returned URLs/IDs. Skip and flag unavailable tools.
|
|
91
|
-
7. **Close.** Set `prd.md` frontmatter `status: final` and `updated` to `{date}` so future invocations distinguish this PRD from in-progress drafts. Record finalization to `.decision-log.md`. Share artifact paths. Common next: `bmad-ux`, `bmad-
|
|
91
|
+
7. **Close.** Set `prd.md` frontmatter `status: final` and `updated` to `{date}` so future invocations distinguish this PRD from in-progress drafts. Record finalization to `.decision-log.md`. Share artifact paths. Common next: `bmad-ux`, `bmad-architecture`, `bmad-create-epics-and-stories`; invoke `bmad-help` for authoritative routing.
|
|
92
92
|
8. Run `{workflow.on_complete}` if non-empty.
|
|
@@ -33,7 +33,7 @@ UX may lead, follow, or stand alone. Inherit `sources:` by reference; the spines
|
|
|
33
33
|
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
|
|
34
34
|
2. Run `{workflow.activation_steps_prepend}`. Treat `{workflow.persistent_facts}` as foundational context (entries prefixed `file:` are loaded). `{workflow.external_sources}` is an org-configured registry of internal tools; consult them alongside generic web research on the same triggers, org tools preferred when their directive matches.
|
|
35
35
|
3. Load `{project-root}/_bmad/bmm/config.yaml` (+ `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. Missing keys → neutral defaults; never block.
|
|
36
|
-
4. If headless, follow `references/headless.md` for the whole run. Otherwise greet the user **by name** using `{user_name}` and **in their language** using `{communication_language}` — and stay in `{communication_language}` for every turn. In the greeting, let the user know `bmad-party-mode` and `bmad-advanced-elicitation` are always available. Then scan for misroute on the first message: PRD → `bmad-prd`; architecture → `bmad-
|
|
36
|
+
4. If headless, follow `references/headless.md` for the whole run. Otherwise greet the user **by name** using `{user_name}` and **in their language** using `{communication_language}` — and stay in `{communication_language}` for every turn. In the greeting, let the user know `bmad-party-mode` and `bmad-advanced-elicitation` are always available. Then scan for misroute on the first message: PRD → `bmad-prd`; architecture → `bmad-architecture`; game UX → BMad GDS; agent/skill → `bmad-workflow-builder`; brief → `bmad-product-brief`.
|
|
37
37
|
5. Detect intent: **Create**, **Update**, **Validate**. For Create, before binding a fresh workspace, scan `{workflow.ux_output_path}` for prior in-progress runs (folders matching `{workflow.run_folder_pattern}` whose `DESIGN.md` frontmatter `status` is not `final`) and offer to resume rather than starting over.
|
|
38
38
|
|
|
39
39
|
Run `{workflow.activation_steps_append}`.
|
|
@@ -87,4 +87,4 @@ Outcomes, in order:
|
|
|
87
87
|
- **Key-screen mocks rendered.** Key-screens tool → `.working/` for surfaces where layout drives behavior or anchors visual language.
|
|
88
88
|
- **Mock coverage confirmed.** Walk every IA surface; classify *mocked* vs *spine-only*. Ask: *"These will be built from spine tables alone — any need a visual reference?"* Render more if named; log spine-only choices.
|
|
89
89
|
- **Layout extracted, artifacts promoted.** Distill subagent re-reads each `.working/` and `imports/` artifact; lifts visual decisions into DESIGN.md and behavioral decisions into EXPERIENCE.md. Promote `.working/` keepers to `mockups/` (HTML) or `wireframes/` (Excalidraw); imports stay. Inline relative links at relevant spine sections; state spines-win-on-conflict once.
|
|
90
|
-
- **Polished, handed off, closed.** Apply `{workflow.doc_standards}` in order. Execute `{workflow.external_handoffs}`; surface URLs. Set both files' `status: final`, `updated: {date}`. Log finalization. Share paths. Common next: `bmad-
|
|
90
|
+
- **Polished, handed off, closed.** Apply `{workflow.doc_standards}` in order. Execute `{workflow.external_handoffs}`; surface URLs. Set both files' `status: final`, `updated: {date}`. Log finalization. Share paths. Common next: `bmad-architecture`, `bmad-create-epics-and-stories`, `bmad-dev-story`. Run `{workflow.on_complete}`.
|
|
@@ -56,8 +56,8 @@ principles = [
|
|
|
56
56
|
|
|
57
57
|
[[agent.menu]]
|
|
58
58
|
code = "CA"
|
|
59
|
-
description = "
|
|
60
|
-
skill = "bmad-
|
|
59
|
+
description = "Produce the architecture spine: the invariants that keep independently-built units consistent"
|
|
60
|
+
skill = "bmad-architecture"
|
|
61
61
|
|
|
62
62
|
[[agent.menu]]
|
|
63
63
|
code = "IR"
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bmad-architecture
|
|
3
|
+
description: 'Produce the architecture: a lean spine of invariants that keeps everything built from it consistent, projected into whatever format the work needs. Use when the user says "create the architecture", "create technical architecture", "architecture spine", or "create a solution design".'
|
|
4
|
+
---
|
|
5
|
+
# BMad Architecture
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
You produce an **architecture spine**: a consistency contract that fixes only the **invariants** keeping independently-built units from diverging — the design paradigm, the boundary and dependency rules, how state is mutated, who owns shared data. Everything structural (stack, tree, full data shape) is **seed**: true at cold-start, owned by the code once it exists. A spine is not a design document; its worth is the durable calls a future builder *can't* read off compliant code. Lead with a named paradigm — it carries a whole model for free — and keep the seed minimal.
|
|
10
|
+
|
|
11
|
+
One test decides what belongs:
|
|
12
|
+
|
|
13
|
+
> If two units one level down built this independently, could they choose incompatibly? Fix it here only when the answer is yes, **and** the call is non-obvious, **and** it's a real trade-off. Otherwise name it under Deferred and move on.
|
|
14
|
+
|
|
15
|
+
Default output is a **build substrate** — terse and convergent, so small agents and humans on small intents don't drift. When the goal is instead to align people, lead with a **discussion** doc that keeps the open questions in front. Match the spine to what's in front of you: a few decisions for a small thing, comprehensive for a platform; the whole system or the one slice a feature touches.
|
|
16
|
+
|
|
17
|
+
Record decisions, not rationale (rationale lives in the memlog). Carry shape in diagrams, not prose. Verify any named technology's current version and fit on the web before binding it.
|
|
18
|
+
|
|
19
|
+
## How you work
|
|
20
|
+
|
|
21
|
+
You're a coach, and the **Coaching path is the default** — this runs against the model's instinct to just produce an architecture, so hold the line on it. The choice (offered as an Activation step, in the user's language, before any drafting): **Coaching path** (we work it together — open-ended questions, I pull the decisions out of you and push back where one is thin) or **Fast path** (I draft the whole spine fast with `[ASSUMPTION]` tags you correct in review). Unless the user clearly wants speed, **coach; don't silently draft.** A finished architecture produced from two quick questions is the failure mode, not the win — the elicitation is the value. On the Coaching path, the load-bearing calls — paradigm, stack or starter, the major boundaries — are *shown, not silently made*: lay out the realistic alternatives you weighed and why you lean one way, then let the user choose. That rationale lives in the conversation and the memlog, never in the terse spine.
|
|
22
|
+
|
|
23
|
+
Elicit, don't quiz: open-ended "how are you thinking about X?" beats a multiple-choice menu; reserve a crisp either/or for a genuinely binary fork. When you catch yourself picking the boundaries, the stack, or the phases for the user, hand the pen back — unless you're on the Fast path, where inferring and tagging *is* the job.
|
|
24
|
+
|
|
25
|
+
When the stack is open — greenfield, or a small/beginner project that could sit on a paved path — **recommend a well-known current starter** (verify the going choice on the web first): a good one pre-decides a coherent slab of the architecture for free and beats hand-rolling for a less-experienced user. For brownfield, **investigate before you decide** — read enough of the real code (and `project-context.md`; if there is none, offer to invoke the `bmad-document-project` skill) to ratify the conventions already there rather than invent new ones.
|
|
26
|
+
|
|
27
|
+
## Read the input to know the job
|
|
28
|
+
|
|
29
|
+
The input itself tells you what kind of job this is — read it rather than quizzing the user about it. A spec package (`SPEC.md` + its memlog) is the richest start and the spine's home, so fold the spine back into it. But you'll also get a raw idea, a sprawling architecture document to distill down, an existing codebase to derive a spine *from* (ratify the conventions the code already shows — don't re-document them), the slice of one a new feature touches, or an existing spine to extend or pressure-test. Prefer a `.memlog.md` over re-reading the source it came from. Distill whatever you're given; mark real gaps as open questions instead of inventing answers. The spine's **altitude** mirrors what it augments and keeps the level below coherent — initiative→features, feature→epics, epic→stories.
|
|
30
|
+
|
|
31
|
+
**Inheriting a parent spine** (e.g. pointed at one epic of a spec whose feature/initiative spine already exists): load the parent `ARCHITECTURE-SPINE.md` first and treat its `AD`s, conventions, and paradigm as **binding, read-only** constraints — log each as a `constraint` entry, list them under the spine's *Inherited Invariants* (parent `AD` IDs, never renumbered), and don't re-derive them. Your job is only what the parent **left open**: its `Deferred` items plus the divergences this epic's stories could hit. A new `AD` that contradicts or weakens an inherited one is a **conflict to surface**, not a local override. An epic spine fixes the invariants the epic's stories must share — it does **not** expand per-story detail; that's deferred to story time, when you invoke the `bmad-create-story` skill.
|
|
32
|
+
|
|
33
|
+
## How a run works
|
|
34
|
+
|
|
35
|
+
The **memlog** (`.memlog.md`) is the run's working memory: every decision, constraint, version, assumption, and open question lands as one append-only line — for a decision, capture what it binds and the divergence it prevents. It is the shared canonical memlog (the same `{project-root}/_bmad/scripts/memlog.py` bmad-spec writes through), so it carries no lifecycle status — terminal moments are logged as `event` entries, not a frontmatter flag. The spine is **distilled from the memlog at the end**, not written as you go. Each surviving decision becomes an `AD-n` (stable ID, `Binds`/`Prevents`/`Rule`, `[ADOPTED]` when the user or existing reality already settled it); a decision that lives only in a diagram still gets logged. Resume a prior run by reloading its memlog.
|
|
36
|
+
|
|
37
|
+
Writes go through the shared script (don't read the file back except on resume):
|
|
38
|
+
|
|
39
|
+
- `python3 {project-root}/_bmad/scripts/memlog.py init --workspace {doc_workspace} --field scope="…" --field purpose="…" --field altitude="…"`
|
|
40
|
+
- `python3 {project-root}/_bmad/scripts/memlog.py append --workspace {doc_workspace} --type <decision|constraint|version|assumption|question|direction|event> --text "…"`
|
|
41
|
+
- A terminal moment (spine finalized, a validation verdict) is an `append --type event` entry — there is no status field to set.
|
|
42
|
+
|
|
43
|
+
## Resolution rules
|
|
44
|
+
|
|
45
|
+
- Bare paths and `{skill-root}` (e.g. `references/headless.md`) resolve from this skill's installed directory.
|
|
46
|
+
- `{project-root}` → the project working directory; `{skill-name}` → the skill directory's basename.
|
|
47
|
+
- `{workflow.<name>}` → a merged `customize.toml` field; `{doc_workspace}` → the bound run folder.
|
|
48
|
+
- Forward slashes only. Config variables already contain `{project-root}` in their resolved values — never double-prefix.
|
|
49
|
+
|
|
50
|
+
## On Activation
|
|
51
|
+
|
|
52
|
+
**Forwarded activation:** if a caller (e.g. the `bmad-create-architecture` shim) invoked you with a stated intent and pre-resolved customization fields, honor them verbatim — skip your own intent inference, use the supplied values for those named fields, and resolve only the remaining fields from your own `customize.toml`. So a legacy per-project override still reaches the run.
|
|
53
|
+
|
|
54
|
+
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` (on failure read `{skill-root}/customize.toml`, use defaults). Run `{workflow.activation_steps_prepend}`, then `{workflow.activation_steps_append}`. Hold `{workflow.persistent_facts}` as standing context — the default loads `project-context.md`, load-bearing for brownfield — and consult `{workflow.external_sources}` on demand.
|
|
55
|
+
2. Load `{project-root}/_bmad/bmm/config.yaml` (+ `config.user.yaml`) for `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`; missing keys take neutral defaults, never block.
|
|
56
|
+
3. Headless (no interactive user) → follow `references/headless.md` for the whole run. Otherwise greet `{user_name}` in `{communication_language}`. Detect the intent from the conversation and input — **create** (the default), **update** an existing spine, or **validate** one (see those sections). If the real ask is requirements / UX / a capability contract / epic breakdown / an agent, invoke the `bmad-prd`, `bmad-ux`, `bmad-spec`, `bmad-create-epics-and-stories`, or `bmad-workflow-builder` (if the BMad Builder module is installed) skill instead.
|
|
57
|
+
4. If a run folder for this target already exists under `{workflow.spine_output_path}`, offer to resume from its memlog rather than restart.
|
|
58
|
+
5. Interactive create: offer the working mode in `{communication_language}` — **Coaching path** (default) or **Fast path** (see *How you work*) — before any drafting; default to Coaching unless the user asks for speed.
|
|
59
|
+
6. **Mandatory, both paths, before drafting:** ask whether the spine is the only deliverable — and if not, draw out the *purpose and audience* rather than a document type. "An architecture doc" balloons into bloat; what they actually need might be a one-detail explainer for a single team or a non-technical vision piece for a board. Purpose right-sizes the artifact and may call for extra elicitation up front, not just a finale add-on.
|
|
60
|
+
|
|
61
|
+
For a new spine, bind `{doc_workspace}` to `{workflow.spine_output_path}/{workflow.run_folder_pattern}/`, seed `ARCHITECTURE-SPINE.md` from `{workflow.spine_template}`, run `memlog.py init`, and tell the user the path. **At epic altitude, scope the folder to the epic** (set `run_folder_pattern` per `customize.toml`) so per-epic runs don't collide.
|
|
62
|
+
|
|
63
|
+
## Reviewer Gate
|
|
64
|
+
|
|
65
|
+
The spine's pre-handoff review — full mechanics in `references/reviewer-gate.md`. Load it when finalizing or validating: a deterministic `lint_spine.py` pass, then a rubric walker (good-spine checklist) + every `{workflow.finalize_reviewers}` lens dispatched as parallel subagents against `ARCHITECTURE-SPINE.md`, scaled to stakes. At Finalize you apply the clear fixes; under the Validate intent you deliver a bespoke HTML report and change nothing.
|
|
66
|
+
|
|
67
|
+
## Finalize
|
|
68
|
+
|
|
69
|
+
Walk the sequence; reviewer fixes land before polish.
|
|
70
|
+
|
|
71
|
+
1. **Distill.** Write the spine from the memlog (brownfield: + the code sweep) — invariants first, seed minimal, every `AD` carrying Binds/Prevents/Rule, `Deferred` naming what it won't decide. No placeholders; never invent to fill a gap. A long coaching run distills cleaner in a subagent; the parent falls back inline (distill is the terminal step, so that's safe).
|
|
72
|
+
2. **Reconcile inputs.** A subagent per load-bearing input checks it against the spine and returns what didn't land — especially a quiet requirement (a tone, a constraint) the `AD` structure dropped. Before the gate.
|
|
73
|
+
3. **Reviewer pass.** Run the Reviewer Gate (`references/reviewer-gate.md`). Resolve before polish.
|
|
74
|
+
4. **Triage.** Open questions and `[ASSUMPTION]` tags: blockers (unsafe for what's next) resolved one at a time; the rest deferred with a revisit condition in the memlog.
|
|
75
|
+
5. **Renderings & polish.** The spine is the build deliverable; with it and the memlog now in place, produce any *additional* human-facing artifact the user needs, scoped to the purpose and audience drawn out up front. The up-front question already flagged whether one's needed; if it wasn't, still offer one here, seeding concrete options: an interactive HTML+SVG deck to walk a team through the architecture and drive discussion, a fuller HTML/md solution design, a C4 set, or a view of how the work splits across teams/epics. Build only what they pick, right-sized to that purpose; apply `{workflow.doc_standards}` polish to that prose only, never to the spine.
|
|
76
|
+
6. **External handoffs.** Run `{workflow.external_handoffs}`; surface returned URLs/IDs. Offer to invoke the `bmad-spec` skill to adopt the spine as a companion, keeping `AD` IDs stable so downstream can cite them.
|
|
77
|
+
7. **Close.** Set the spine's own frontmatter `status: final`, `updated: {date}`; log a `memlog.py append --type event --text "spine finalized"` (the memlog has no status field). Share paths. Next, **lead with `bmad-spec`** — recommend adopting/refreshing the spine as a spec companion (always the top recommendation when a spec was an input, and a useful next step even when it wasn't), then `bmad-create-epics-and-stories` or — epic altitude — `bmad-create-story`; or invoke `bmad-help` to route.
|
|
78
|
+
8. Run `{workflow.on_complete}`.
|
|
79
|
+
|
|
80
|
+
## Update
|
|
81
|
+
|
|
82
|
+
Amend an existing spine. Resume from its `.memlog.md` (the authority on what was decided), not the rendered spine. Capture the change as new memlog entries; **keep `AD` IDs stable** — amend a Rule in place, add the next `AD-n` for a new decision, never renumber or reuse a retired ID. Then re-distill (Finalize step 1), run the Reviewer Gate (`references/reviewer-gate.md`), and close as in Finalize. An update that overrides something from a source input: offer to update that source too, so upstream and the spine don't silently diverge.
|
|
83
|
+
|
|
84
|
+
## Validate
|
|
85
|
+
|
|
86
|
+
The standalone intent — critique an existing spine without changing it. Run the Reviewer Gate (`references/reviewer-gate.md`) against it and deliver the bespoke HTML report, then offer to roll the findings into an Update. (At Finalize the same gate runs as your own pre-handoff check, where you apply the fixes instead of reporting.)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: '{name}'
|
|
3
|
+
type: architecture-spine
|
|
4
|
+
purpose: build-substrate # build-substrate (default) · discussion · report · deck
|
|
5
|
+
altitude: feature # initiative (keeps features) · feature (keeps epics) · epic (keeps stories)
|
|
6
|
+
paradigm: '{named design pattern, e.g. hexagonal, layered, pipes-and-filters, actor}'
|
|
7
|
+
scope: '{what this spine governs}'
|
|
8
|
+
status: draft # draft · final
|
|
9
|
+
created: '{date}'
|
|
10
|
+
updated: '{date}'
|
|
11
|
+
stack: # SEED — verified current at authoring; the code owns this once it exists
|
|
12
|
+
languages: []
|
|
13
|
+
frameworks: []
|
|
14
|
+
key_deps: [] # name@version
|
|
15
|
+
binds: [] # capability / unit IDs governed (from the driving spec; at epic altitude, also the parent AD IDs inherited)
|
|
16
|
+
sources: []
|
|
17
|
+
companions: []
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Architecture Spine — {name}
|
|
21
|
+
|
|
22
|
+
> A consistency contract, not a design document. It fixes the **invariants** that keep the
|
|
23
|
+
> independently-built level below ({features | epics | stories}) coherent — the durable rules a
|
|
24
|
+
> clean codebase can't reveal. Structure is **seed**: the code owns the detail, the spine keeps the shape.
|
|
25
|
+
> Decisions, not rationale (that lives in the memlog). Diagrams over prose.
|
|
26
|
+
>
|
|
27
|
+
> **Scale to the job — drop any section a project doesn't need.** A small intent may be just a
|
|
28
|
+
> paradigm + a few `AD`s + conventions, seed omitted; a platform earns the full set. An inherited
|
|
29
|
+
> epic spine is usually mostly Inherited Invariants + a thin Deferred. Empty sections are cut, not left as headers.
|
|
30
|
+
|
|
31
|
+
## Design Paradigm
|
|
32
|
+
|
|
33
|
+
Name the pattern — a known one loads a whole model for free — and map its layers to namespaces /
|
|
34
|
+
directories. The smallest, most durable thing in the file.
|
|
35
|
+
|
|
36
|
+
## Inherited Invariants
|
|
37
|
+
|
|
38
|
+
Present only when this spine inherits a parent at a higher altitude (e.g. an epic spine under a
|
|
39
|
+
feature/initiative spine). The parent's `AD`s, conventions, and paradigm that bind here, listed by
|
|
40
|
+
their original parent IDs — **read-only, never renumbered, not re-derived**. This spine adds only
|
|
41
|
+
what the parent left open; anything here that a local decision would contradict is a conflict to
|
|
42
|
+
surface, not override.
|
|
43
|
+
|
|
44
|
+
| Inherited | From parent | Binds here |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| {AD-n / convention} | {parent spine} | {what it constrains in this scope} |
|
|
47
|
+
|
|
48
|
+
## Invariants & Rules
|
|
49
|
+
|
|
50
|
+
The durable heart: the calls a future builder can't read from compliant code. Each `AD-n` has a
|
|
51
|
+
stable ID (never reused), a binding scope, the divergence it prevents, and an enforceable rule.
|
|
52
|
+
Cover the boundary/dependency rules (who may depend on whom) and how state is mutated — a
|
|
53
|
+
dependency-direction diagram says these better than prose. An `AD-n` the user asserted as
|
|
54
|
+
already-settled (or one verified from existing reality) carries an `[ADOPTED]` tag after its
|
|
55
|
+
title, so its provenance is legible versus decisions made here.
|
|
56
|
+
|
|
57
|
+
```mermaid
|
|
58
|
+
flowchart LR
|
|
59
|
+
%% arrows = allowed dependency direction (a rule, not just structure)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### AD-1 — {decision}
|
|
63
|
+
|
|
64
|
+
- **Binds:** {capability / unit IDs, areas, or `all`}
|
|
65
|
+
- **Prevents:** {the divergence this stops}
|
|
66
|
+
- **Rule:** {the constraint downstream must follow}
|
|
67
|
+
|
|
68
|
+
## Consistency Conventions
|
|
69
|
+
|
|
70
|
+
The defaults that bind everything where independent builders would otherwise drift. Cut rows that
|
|
71
|
+
don't apply.
|
|
72
|
+
|
|
73
|
+
| Concern | Convention |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Naming (entities, files, interfaces, events) | |
|
|
76
|
+
| Data & formats (IDs, dates, error shapes, envelopes) | |
|
|
77
|
+
| State & cross-cutting (mutation, errors, logging, config, auth) | |
|
|
78
|
+
|
|
79
|
+
## Structural Seed
|
|
80
|
+
|
|
81
|
+
Cold-start scaffolding, kept minimal — include an item only where its shape is non-obvious at this
|
|
82
|
+
altitude (at epic altitude the parent usually already fixed it, so the seed is often empty). The code
|
|
83
|
+
owns the **detail** (every file, every column); once code exists it becomes the source of truth for
|
|
84
|
+
detail, and this seed is a starting scaffold, not a mirror to maintain against it. Evolve a seed item
|
|
85
|
+
only when the **shape** itself changes — a new container, a new core entity, a stack bump — and let
|
|
86
|
+
the memlog keep the history.
|
|
87
|
+
|
|
88
|
+
- **Stack & Versions** — the substrate (mirrors frontmatter `stack`).
|
|
89
|
+
- **System Shape** — a container/context view (at epic altitude, the slice of the parent system this scope touches). Use `flowchart` with a `subgraph` per boundary; C4 mermaid is experimental and won't render in most viewers.
|
|
90
|
+
- **Core Entities** — an ERD of entities and their relationships. Names and relationships only; attributes belong to the code unless one is itself an invariant (then it's an `AD`, not seed).
|
|
91
|
+
- **Project Structure** — a minimal source tree, only as deep as consistency needs.
|
|
92
|
+
|
|
93
|
+
```mermaid
|
|
94
|
+
flowchart TD
|
|
95
|
+
user(["{actor}"])
|
|
96
|
+
subgraph sys["{system boundary}"]
|
|
97
|
+
a["{container}<br/>{tech} — {role}"]
|
|
98
|
+
end
|
|
99
|
+
db[("{datastore}")]
|
|
100
|
+
ext["{external system}"]
|
|
101
|
+
user --> a
|
|
102
|
+
a --> db
|
|
103
|
+
a -->|{via port}| ext
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```mermaid
|
|
107
|
+
erDiagram
|
|
108
|
+
ENTITY_A ||--o{ ENTITY_B : "{relationship}"
|
|
109
|
+
ENTITY_B ||--o| ENTITY_C : "{relationship}"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
{root}/
|
|
114
|
+
{dir}/ # {what lives here}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Capability → Architecture Map
|
|
118
|
+
|
|
119
|
+
Bridges the spec's capabilities to the architecture (and is the consistency auditor's checklist).
|
|
120
|
+
Present when a spec drove this run.
|
|
121
|
+
|
|
122
|
+
| Capability / Area | Lives in | Governed by |
|
|
123
|
+
| --- | --- | --- |
|
|
124
|
+
| {CAP-n / area} | {component / module} | {AD-n, convention, paradigm} |
|
|
125
|
+
|
|
126
|
+
## Deferred
|
|
127
|
+
|
|
128
|
+
Decisions intentionally pushed down, each with the reason it can wait. The half of the contract
|
|
129
|
+
that keeps the spine lean.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# DO NOT EDIT -- overwritten on every update.
|
|
2
|
+
#
|
|
3
|
+
# Workflow customization surface for bmad-architecture.
|
|
4
|
+
#
|
|
5
|
+
# Override files (not edited here):
|
|
6
|
+
# {project-root}/_bmad/custom/bmad-architecture.toml (team)
|
|
7
|
+
# {project-root}/_bmad/custom/bmad-architecture.user.toml (personal)
|
|
8
|
+
|
|
9
|
+
[workflow]
|
|
10
|
+
|
|
11
|
+
# --- Configurable below. Overrides merge per BMad structural rules: ---
|
|
12
|
+
# scalars: override wins • arrays: append
|
|
13
|
+
|
|
14
|
+
# Steps to run before the standard activation (config load, greet).
|
|
15
|
+
# Use for pre-flight loads, approved-stack policy checks, etc.
|
|
16
|
+
activation_steps_prepend = []
|
|
17
|
+
|
|
18
|
+
# Steps to run after greet but before the workflow begins.
|
|
19
|
+
# Use for context-heavy setup that should happen once the user has been acknowledged.
|
|
20
|
+
activation_steps_append = []
|
|
21
|
+
|
|
22
|
+
# Persistent facts the workflow keeps in mind for the whole run
|
|
23
|
+
# (approved stacks, banned dependencies, platform constraints, compliance guardrails).
|
|
24
|
+
# Each entry is either a literal sentence, a skill prefixed with `skill:`, or a `file:`-prefixed
|
|
25
|
+
# path/glob whose contents are loaded as facts.
|
|
26
|
+
#
|
|
27
|
+
# Default loads project-context.md if bmad-generate-project-context produced one — giving the
|
|
28
|
+
# architect persistent awareness of the project's tech, domain, and conventions (load-bearing
|
|
29
|
+
# for brownfield). Common opt-ins (set in team/user override TOML):
|
|
30
|
+
# "Our org is AWS-only -- do not propose GCP or Azure."
|
|
31
|
+
# "file:{project-root}/docs/engineering-standards.md"
|
|
32
|
+
persistent_facts = [
|
|
33
|
+
"file:{project-root}/**/project-context.md",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
# Executed when the workflow completes (after the spine is final and the user has been told).
|
|
37
|
+
# String scalar (single instruction) or array of instructions executed in order. Empty for none.
|
|
38
|
+
on_complete = ""
|
|
39
|
+
|
|
40
|
+
# The architecture spine template. Treated as expert prior knowledge, not a checklist — the LLM
|
|
41
|
+
# adapts it to the project, altitude, and domain, and drops sections a project genuinely doesn't
|
|
42
|
+
# need. Override the path in team/user TOML to enforce a different spine shape.
|
|
43
|
+
spine_template = "assets/spine-template.md"
|
|
44
|
+
|
|
45
|
+
# Run folder location. ARCHITECTURE-SPINE.md, its .memlog.md, and any fuller rendering the run
|
|
46
|
+
# produces all land inside `{spine_output_path}/{run_folder_pattern}/`. Resume-check scans
|
|
47
|
+
# `{spine_output_path}` for prior unfinished runs.
|
|
48
|
+
#
|
|
49
|
+
# The default pattern fits the common case (one spine per project, at the altitude above epics).
|
|
50
|
+
# At EPIC altitude, override run_folder_pattern to carry the epic identity so per-epic runs don't
|
|
51
|
+
# collide on the same day — e.g. set it (team/user TOML) to "architecture-epic-{epic_id}", binding
|
|
52
|
+
# {epic_id} from the driving spec / the activating payload. Headless callers may instead pass an
|
|
53
|
+
# explicit doc_workspace and bypass the pattern entirely.
|
|
54
|
+
spine_output_path = "{planning_artifacts}/architecture"
|
|
55
|
+
run_folder_pattern = "architecture-{project_name}-{date}"
|
|
56
|
+
|
|
57
|
+
# Prose-editorial standards applied at finalize ONLY to a fuller prose document the run produces
|
|
58
|
+
# (a discussion report, full architecture doc, or design addendum) — never to the spine or other
|
|
59
|
+
# short, structured outputs, which are terse and carry decisions in AD-n blocks and diagrams by
|
|
60
|
+
# design. Each entry is a `skill:`, `file:`, or plain-text directive applied before the user sees
|
|
61
|
+
# the polished draft. Suggested order: structural passes first, prose mechanics last. Append-only.
|
|
62
|
+
doc_standards = [
|
|
63
|
+
"skill:bmad-editorial-review-structure",
|
|
64
|
+
"skill:bmad-editorial-review-prose",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
# External-source registry. Natural-language directives describing knowledge bases, MCP tools, or
|
|
68
|
+
# internal systems the LLM may consult ON DEMAND during the run (not preemptively) — approved-stack
|
|
69
|
+
# catalogs, internal platform docs, version registries. Each entry names the tool, the trigger
|
|
70
|
+
# condition, and any fields it needs. If a named tool is unavailable at runtime, the LLM falls back
|
|
71
|
+
# to standard behavior (e.g. web research) and notes the gap. Empty by default.
|
|
72
|
+
#
|
|
73
|
+
# Examples (set in team/user override TOML):
|
|
74
|
+
# "When choosing a datastore, consult corp:platform_catalog before recommending one."
|
|
75
|
+
# "For current library versions, query corp:artifact_registry before web search."
|
|
76
|
+
external_sources = []
|
|
77
|
+
|
|
78
|
+
# External-handoff routing applied at Finalize to push outputs beyond local files (Confluence,
|
|
79
|
+
# Notion, ticket systems). Each entry names the MCP tool, the destination, and required fields.
|
|
80
|
+
# Runs after polish; returned URLs/IDs are surfaced. Unavailable tools are skipped and flagged;
|
|
81
|
+
# local files always exist. Empty by default.
|
|
82
|
+
external_handoffs = []
|
|
83
|
+
|
|
84
|
+
# --- Finalize reviewers ---
|
|
85
|
+
# Extra review lenses spawned as parallel subagents at the validation gate (Finalize and the
|
|
86
|
+
# Validate intent), on top of the skill's built-in good-spine checklist and the lint_spine.py
|
|
87
|
+
# mechanical floor. The GATE is stakes-gated — a throwaway spine may run it quietly or skip it —
|
|
88
|
+
# but whenever the gate runs, every entry here runs with it (the configured floor, never cherry-
|
|
89
|
+
# picked); only ad-hoc lenses are optional, and headless never skips the gate.
|
|
90
|
+
#
|
|
91
|
+
# Entries follow the standard prefix convention:
|
|
92
|
+
# "skill:NAME" invoke the named review skill as a subagent against ARCHITECTURE-SPINE.md
|
|
93
|
+
# "file:PATH" load the file as a review prompt; spawn an adversarial subagent applying it
|
|
94
|
+
# plain text use the text directly as the subagent's review prompt
|
|
95
|
+
#
|
|
96
|
+
# Resolved on-demand (not at activation). Override TOML may append.
|
|
97
|
+
finalize_reviewers = [
|
|
98
|
+
"Verify every committed decision was web-researched or reality-checked rather than asserted from training data: current library/framework versions, that each named technology still exists and fits, and — greenfield — the live defaults of any starter it leans on. Flag anything that could be out of date and wasn't confirmed against the web, the existing project, or the current starter.",
|
|
99
|
+
"Attack the spine as an adversary: construct two units one level down that each obey every AD to the letter yet still build incompatibly — clashing shared-data shapes, two owners of one entity, conflicting state-mutation paths. Every pair you find is a hole to close with a new or tightened AD.",
|
|
100
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Headless
|
|
2
|
+
|
|
3
|
+
No interactive user: infer everything, ask nothing, but never invent — record inferences as `assumptions[]` and gaps that need a human as `open_questions[]`. Detect headless from a `headless: true` flag, a non-interactive / no-TTY invocation, an activation hook that declares it, or a first message that pre-supplies all inputs and asks for an artifact path back; when ambiguous, default to interactive.
|
|
4
|
+
|
|
5
|
+
Drive the run from the payload in the first message — `intent`, `altitude`, `purpose`, the driving input (spec package / PRD / raw intent / brownfield path), a parent spine path at lower altitude, and `doc_workspace` if a specific folder is required. Infer anything absent from the inputs or workspace; don't invent stack, constraints, or scope to fill a gap. You still verify named tech on the web (you can't ask, but you can check) and still drive every write through the shared `{project-root}/_bmad/scripts/memlog.py`. Run the full Reviewer Gate (`references/reviewer-gate.md`) non-interactively: `scripts/lint_spine.py` plus **every `{workflow.finalize_reviewers}` lens as a parallel subagent** (and any ad-hoc lens the spine's criticality warrants). Headless skips only the human picking from the menu — never the reviewers themselves; apply the clear fixes and record anything unresolved in `open_questions[]`. For a true authority collision, list it in `conflicts_with_prior_decisions[]`. For the Validate intent, always write the report to `{doc_workspace}` and add `"offer_to_update": true`. If intent stays ambiguous after inference, halt blocked.
|
|
6
|
+
|
|
7
|
+
End with JSON only, omitting keys for artifacts not produced — the shape below is the fully-produced (`complete`) case; a `blocked` run produces no spine, so it omits `spine`, `memlog`, and `companions` entirely (see the note under the block):
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"status": "complete | partial | blocked",
|
|
12
|
+
"intent": "create | update | validate",
|
|
13
|
+
"altitude": "initiative | feature | epic",
|
|
14
|
+
"purpose": "build-substrate | discussion",
|
|
15
|
+
"doc_workspace": "<resolved run folder>",
|
|
16
|
+
"spine": "{doc_workspace}/ARCHITECTURE-SPINE.md",
|
|
17
|
+
"memlog": "{doc_workspace}/.memlog.md",
|
|
18
|
+
"companions": [],
|
|
19
|
+
"assumptions": [],
|
|
20
|
+
"open_questions": [],
|
|
21
|
+
"conflicts_with_prior_decisions": [],
|
|
22
|
+
"reason": "<one line, only when blocked>"
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`complete` stands alone · `partial` (spine produced, but `open_questions[]` non-empty or critical inputs inferred) means review before downstream use · `blocked` means no spine produced — return only `status`, `intent`, `reason`, and `doc_workspace` (if bound), omitting `spine`, `memlog`, `companions`, and the artifact arrays that don't exist.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Reviewer Gate
|
|
2
|
+
|
|
3
|
+
The spine's pre-handoff review. Runs at Finalize (after distill + reconcile) and *is* the Validate intent. The difference is the ending: at Finalize you apply the clear fixes yourself; under Validate you report and don't change the spine.
|
|
4
|
+
|
|
5
|
+
Cheap deterministic pass first: `python3 {skill-root}/scripts/lint_spine.py --workspace {doc_workspace}` settles the mechanical misses (placeholders, duplicate `AD` IDs, missing Binds/Prevents/Rule, unpinned deps), so reviewers spend judgment on the semantic half.
|
|
6
|
+
|
|
7
|
+
Assemble the menu: a **rubric walker** that judges the spine against the good-spine checklist below, **+ every entry in `{workflow.finalize_reviewers}`**, + ad-hoc lenses you invent or offer as the spine's rigor, altitude, and criticality warrant — a security/compliance lens for regulated stakes, a seam reviewer cross-team, a data-integrity lens for a heavy data model. Scale *whether and how heavily the gate runs* to the stakes: a throwaway prototype may run it quietly or skip the gate entirely; a high-criticality or platform-altitude spine earns more lenses and the explicit all / subset / skip menu. But once the gate runs, the `{workflow.finalize_reviewers}` always run — they are the configured floor, never cherry-picked out; only the ad-hoc lenses are optional. (Headless never skips the gate.)
|
|
8
|
+
|
|
9
|
+
Dispatch every entry as a **parallel subagent against `ARCHITECTURE-SPINE.md`** (prefix convention: `skill:` / `file:` / plain text). Each writes its full review to `{doc_workspace}/review-{slug}.md` and returns ONLY a compact summary (verdict, top 2–5 findings, file path) — the parent never holds full review text. An inline self-check does not count: the independent context is the point, because a fresh reviewer finds the divergences the author talks past. If subagents are unavailable, run sequentially — write the file first, then flush it from context.
|
|
10
|
+
|
|
11
|
+
**Good-spine checklist** (what the rubric walker judges): it fixes the real divergence points for the level below and misses none; every `AD`'s Rule is enforceable and actually prevents its stated divergence; nothing under Deferred could let two units diverge; named tech is verified-current; it ratifies rather than contradicts a brownfield codebase; if a spec drove it, it covers that spec's capabilities; and if a parent spine is inherited, no new `AD` weakens or contradicts an inherited one.
|
|
12
|
+
|
|
13
|
+
Surface findings tiered, never dumped: a one-sentence gate verdict, then critical + high; medium/low roll into a tail ("plus N more in {file}"). Per finding: autofix, discuss, defer to Deferred / open items, or ignore. **At Finalize this is your own gate — apply the clear fixes rather than handing over a list; surface only what genuinely needs the user.** Under the **Validate intent**, fold every reviewer's output into one bespoke HTML + markdown report and open the HTML.
|