Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

bmad-architecture — Claude skill: architecture spine

Writes a short architecture document that pins down only the invariants keeping independently built parts of a system from diverging.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add bmad-code-org/BMAD-METHOD --skill bmad-architecture -a claude-code
Open on GitHub

What bmad-architecture does

The skill produces an architecture spine: a consistency contract. It fixes the design paradigm, boundary and dependency rules, how state is mutated, and who owns shared data. Everything structural — stack, tree, full data shape — is seed, true at cold start and owned by the code afterwards.

A run starts from a ticket file -.md. The skill reads it in full, treats its Requirements as the distilled input, and opens files from sources: or companions: only when the ticket points there. Beside it you may have an existing codebase, an architecture document, or a parent spine. Inherited ADs become binding and read-only; they are never renumbered or re-derived. Decisions land in .memlog.md through uv run {project-root}/_bmad/scripts/memlog.py append, and the spine itself is distilled from that log at the end.

The default is the coaching path: open-ended questions, decisions pulled out of you, pushback where an answer is thin. The fast path drafts the whole spine with [ASSUMPTION] tags for you to correct. Install it when several people or agents build parts of one system. For a one-evening script it is an extra loop.

What it helps with

  • pin down invariants so parallel modules do not drift apart
  • turn a ticket's requirements into a short architecture document
  • derive a spine from an existing codebase without re-documenting its conventions
  • extend a parent spine for one epic without touching its decisions
  • log open questions instead of inventing answers

Example prompts for the agent

  • create the architecture from epic-checkout.md
  • create an architecture spine for this epic, the parent spine already exists
  • validate the existing spine against the codebase

How to install bmad-architecture

1Skills CLI (Vercel)

npx skills add bmad-code-org/BMAD-METHOD --skill bmad-architecture -a claude-code

2Manually: put the files in place

~/.claude/skills/bmad-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/bmad-architecture/

From the same set25

The whole set →
bmad bmad-code-org Coordinates BMad Method modules, recommends the next skill, and tracks project initiatives. Useful when setting up or repairing your workflow. Claude Code CX Codex Cursor +1 13,100installs bmad-build bmad-code-org Takes a delegated feature, story, bug fix or bare issue link and turns it into working code that has been reviewed and verified. Needs BMad set up in the project. Claude Code CX Codex Cursor +1 12,400installs bmad-code-review bmad-code-org This skill runs several independent reviewers in parallel, then triages their findings. Useful when you want changes checked before a merge. Claude Code CX Codex Cursor +1 12,100installs bmad-agent-pm bmad-code-org Activates John, a product manager persona for PRD creation and requirements discovery. It breaks down product ideas into deliverable tickets. Claude Code CX Codex Cursor +1 11,800installs bmad-agent-architect bmad-code-org This skill turns ticket requirements into technical architecture with explicit trade-offs. Use it when you want to work with Winston as the architect. Claude Code CX Codex Cursor +1 11,800installs bmad-brainstorming bmad-code-org The skill runs a brainstorming session: the agent asks one question at a time, rotates creative techniques and logs ideas to a memlog. Useful when you want more options than you'd get alone. Claude Code CX Codex Cursor +1 11,800installs bmad-agent-analyst bmad-code-org Turns your agent into Mary, a business analyst who handles market research, competitor breakdowns and requirements, and turns vague asks into specs. Claude Code CX Codex Cursor +1 11,700installs bmad-agent-dev bmad-code-org Activates Amelia, a senior software engineer persona executing stories through red, green, refactor and acceptance criteria. Claude Code CX Codex Cursor +1 11,700installs

Similar

slack openclaw This skill connects Slack workflows to OpenClaw through the message tool. Use it when an agent needs to read or send Slack messages. Claude Code CX Codex Cursor +1 3,100installs discord openclaw A skill that runs Discord messaging through OpenClaw's message tool: send, edit, delete, pin, react, plus interactive buttons. Useful when your agent needs Discord as a channel for replies and notifications. Claude Code CX Codex Cursor +1 3,000installs knap kepano The skill teaches the agent to call the Knap CLI and render Markdown templates from JSON or CSV, including batch note generation. Claude Code CX Codex Cursor +1 5,200installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. Claude Code 1,424,476installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs handoff Matt Pocock Creates a handoff document from the current conversation so another agent can continue the work. Use it when a task moves to a new session or agent. Claude Code 1,038,491installs grilling Matt Pocock Stress-test a plan, decision, or idea through structured rounds of questions. Use it when you need to expose assumptions before acting. Claude Code 979,543installs

Questions about bmad-architecture

How do I install bmad-architecture in Claude?

Run npx skills add bmad-code-org/BMAD-METHOD --skill bmad-architecture -a claude-code. The skill lands at ~/.claude/skills/bmad-architecture/SKILL.md.

What does bmad-architecture do?

It creates, updates or validates an architecture document that keeps separately built parts of a system consistent. It records decisions, not rationale.

How is the coaching path different from the fast path?

Coaching works the spine out with you through open-ended questions and pushes back on thin calls. Fast path drafts it with [ASSUMPTION] tags you correct in review.

Source text

SKILL.md · MIT
---
name: bmad-architecture
description: 'Work out and record the architecture decisions that keep separately built parts of a system consistent, in a short architecture document. Creates, updates, or validates one; works from a ticket file, with an existing codebase or architecture document beside it. Use when the user says "create the architecture", "create technical architecture", "architecture spine", or "create a solution design"'
---
# BMad Architecture

## Overview

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 — the durable calls a future builder *can't* read off compliant code. Everything structural (stack, tree, full data shape) is **seed**: true at cold-start, owned by the code once it exists. Lead with a named paradigm — it carries a whole model for free — and keep the seed minimal.

One test decides what belongs:

> 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.

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.

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.

## How you work

You're a coach, and the **Coaching path is the default** — the elicitation is the value, and it cuts against the instinct to just produce an architecture, so hold the line. Offer the choice 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.** 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.

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. On the Fast path, inferring and tagging *is* the job.

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** — after the ticket, read enough of the real code (and `{workflow.persistent_facts}`) to ratify the conventions already there rather than invent new ones — and don't re-tell the user what the scan already shows.

## Read the input to know the job

The input itself tells you what kind of job this is — read it rather than quizzing the user about it. A ticket file (the initiative's or epic's `<type>-<slug>.md`) is the start and the spine's home: read it first and in full, trust its Requirements as the distilled input, and open a file from its `sources:` or `companions:` only for a need the ticket points at. The finished spine is adopted as a companion of it. Beside it you may also get an 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. 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. Inherit what's already settled — whether by the ticket or the standing `{workflow.persistent_facts}` — silently; don't re-decide or re-ask it. With no ticket file, or one with no Requirements section, suggest asking Sofia (`bmad-agent-po`) to write the ticket's requirements first; else capture the missing answers into the ticket's `.memlog.md` through the same `memlog.py`, so Sofia can later derive its Requirements without drift.

**Inheriting a parent spine** (e.g. pointed at one epic of an initiative whose spine already exists): read the epic ticket in full, then load the parent spine 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.

## How a run works

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 carries no lifecycle status — terminal moments are logged as `event` entries, not a frontmatter flag. The spine file itself 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.

Writes go through the shared script (don't read the file back except on resume):

- `uv run {project-root}/_bmad/scripts/memlog.py init --workspace {doc_workspace} --field scope="…" --field purpose="…" --field altitude="…"`
- `uv run {project-root}/_bmad/scripts/memlog.py append --workspace {doc_workspace} --type <decision|constraint|version|assumption|question|direction|event> --text "…"`

## Resolution rules

- Bare paths and `{skill-root}` (e.g. `references/headless.md`) resolve from this skill's installed directory.
- `{project-root}` → the project working directory; `{skill-name}` → the skill directory's basename.
- `{workflow.<name>}` → a merged `customize.toml` field; `{doc_workspace}` → the bound run folder.
- Forward slashes only. Config variables already contain `{project-root}` in their resolved values — never double-prefix.

## On Activation

**Forwarded activation:** if a caller 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`.

1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`.
   - Script not found: BMad is not set up here. Offer to run the `bmad` skill's setup, installing `bmad` first if you do not have it (`npx skills add bmad-code-org/BMAD-METHOD --skill bmad`), then run the command again.
   - Any other failure: read `{skill-root}/customize.toml` and use defaults.

   Run `{workflow.activation_steps_prepend}`, then `{workflow.activation_steps_append}`. Hold `{workflow.persistent_facts}` as standing context — empty unless the user opted in — and consult `{workflow.external_sources}` on demand.
2. Resolve config: `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root} --key core.output_folder --key core.active_initiative`. `{date}` is the current system datetime. `{slug}` is what the architecture is about, in kebab-case, or on an epic the epic's slug without `epic-`: the run lands in `architecture-{slug}/architecture-{slug}.md`.
   - Script not found, or no `output_folder`: BMad is not set up here. Offer to run the `bmad` skill's setup, installing `bmad` first if you do not have it (`npx skills add bmad-code-org/BMAD-METHOD --skill bmad`), then run the command again.
   - No `active_initiative`: hand off to the `bmad` skill to set or create one, then run the command again and continue. Headless: write loose.
3. Headless (no interactive user) → follow `references/headless.md` for the whole run. Otherwise greet the user, and let them know they can invoke `bmad-party-mode` for multi-agent perspectives or `bmad-advanced-elicitation` for deeper exploration at any point. 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-agent-po` (Sofia, for the contract and the breakdown), or `bmad-workflow-builder` (if the BMad Builder module is installed) skill instead.
4. If a run folder for this target already exists under `{workflow.spine_output_path}`, or in the epic's folder when the ticket is an epic, offer to resume from its memlog rather than restart.
5. Interactive create: offer the working mode — **Coaching path** (default) or **Fast path** (see *How you work*) — before any drafting; default to Coaching unless the user asks for speed.
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.

For a new spine, bind `{doc_workspace}` to `{workflow.spine_output_path}/{workflow.run_folder_pattern}/`, seed the spine, `{workflow.run_folder_pattern}.md`, from `{workflow.spine_template}`, run `memlog.py init`, and tell the user the path. When the ticket is an epic, the epic's folder takes the place of `{workflow.spine_output_path}`.

## Reviewer Gate

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 the spine, scaled to stakes. At Finalize you apply the clear fixes; under the Validate intent you deliver a bespoke HTML report and then get user input.

## Finalize

Walk the sequence; reviewer fixes land before polish.

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. The template's `<!-- -->` notes are guidance — act on them, then strip them; the finished spine carries no template comment, and only the diagrams that convey the structure (as many as the altitude needs, valid mermaid). Sweep the breadth the altitude owns — every structural dimension is decided, deferred, or an open question; a whole dimension left silent (e.g. the operational/environmental envelope: deployment & environments, infra/provider strategy, operations) is the failure, not a clean spine. A long coaching run distills cleaner in a subagent; the parent falls back inline.
2. **Reconcile inputs.** A subagent for the ticket, and one per other input the run read, 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.
3. **Reviewer pass.** Run the Reviewer Gate (`references/reviewer-gate.md`). Resolve before polish.
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.
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.
6. **External handoffs.** Run `{workflow.external_handoffs}`; surface returned URLs/IDs. Offer to ask Sofia (`bmad-agent-po`) to add the spine to the ticket's References as an adopted companion, keeping `AD` IDs stable so downstream can cite them.
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 Sofia** — recommend asking her to adopt or refresh the spine as a companion of the ticket, then asking her to slice the ticket, incept its epics when it is already sliced, or — epic altitude — `bmad-build`; or invoke the `bmad` skill to route.
8. Run `{workflow.on_complete}`.

## Update

Amend an existing spine or provided artifact. 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 the ticket states: offer to ask Sofia (`bmad-agent-po`) to update the ticket, so it and the spine don't silently diverge.

## Validate

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.)

© bmad-code-org · MIT · bmad-code-org/BMAD-METHOD

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor