Logo Bmad Spec

Bmad Spec

Tổ chứcPhổ biến
bmad-code-org
bmad-spec

Condense any input — an idea, brief, PRD, transcript, or mixed notes — into a short spec: one kernel file plus supporting files that downstream skills build from. Also updates and validates existing specs. Use when the user says "create a spec", "distill this into a spec", "validate this spec", or "update the spec"

Tổng quan

Nhà phát hànhbmad-code-org
Kho mãBMAD-METHOD
Tên kỹ năngbmad-spec
Sao
53.7K
Bản fork
6.1K
Tệp đi kèm
4
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được bmad-code-org công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Bmad Spec trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/bmad-code-org/BMAD-METHOD/tree/main/skills/bmad-spec
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bmad-code-org/BMAD-METHOD.git /tmp/BMAD-METHOD
mkdir -p .claude/skills
cp -r /tmp/BMAD-METHOD/skills/bmad-spec .claude/skills/bmad-spec
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Bmad Spec trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Bmad Spec ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Bmad Spec không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

BMad Spec

Overview

Canonical transformer for the BMad spec-kernel ecosystem. Takes any intent input — vague idea, brain dump, PRD, GDD, RFC, brief, Slack thread, customer email, meeting transcript, mockups, mixed multi-source — and produces spec-{slug}.md carrying the five-field kernel (Why, Capabilities, Constraints, Non-goals, Success signal) plus companion files for load-bearing content that does not fit or would bloat the kernel with expansive line-item detail. Together they are the machine contract every downstream BMad skill consumes.

Multiple skills may call to update the same spec over time.

Conventions

  • Bare paths (e.g. assets/spec-template.md) resolve from the skill root.
  • {skill-root} is this skill's install dir; {project-root} is the nearest folder containing _bmad/, starting at the working dir and moving up through its parents.
  • {workflow.<name>} resolves to fields in customize.toml.

On Activation

  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 directly.
  2. Run {workflow.activation_steps_prepend}. Treat {workflow.persistent_facts} as foundational context (file: entries are loaded).
  3. 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.
    • 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.
  4. Detect mode. Headless when any of: no TTY, programmatic caller (another skill or non-interactive runner), or the first message pre-supplies all inputs and asks for an artifact path back. Interactive otherwise. In interactive mode, greet the user and mention that bmad-party-mode and bmad-advanced-elicitation are available for deeper exploration on any field.

Run {workflow.activation_steps_append}.

Activation is complete. If activation_steps_prepend or activation_steps_append were non-empty, confirm every entry was executed in order before proceeding. Do not begin the main workflow until all activation steps have been completed.

Workspace

The spec is always a folder named {workflow.spec_output_path}/{workflow.run_folder_pattern}, resolving by default to {output_folder}/{active_initiative}/spec-{slug}/.

{slug} describes the thing being specced, not the input shape:

  • Source artifact already carries a slug (e.g., prd-foo-bar/): inherit (foo-bar).
  • Sparse, in-chat, or multi-source input: interactive asks; headless caller provides it as part of the input. If absent and underivable, headless blocks with error_code: "missing_slug".
  • Same slug = same folder. A second invocation with the same {slug} lands at the existing spec folder and updates in place, preserving capability IDs.

No input. Interactive: ask the user to share a file path, paste content, explain the idea in detail, or point to a source. Headless: respond with JSON containing error_code: "insufficient_intent".

Inside the spec folder:

<spec-folder>/
  spec-<slug>.md           ← the kernel, named after the folder — DERIVED from .memlog.md, never hand-edited
  <companion-1>.md         ← optional, content-typed (e.g. glossary.md); spec-authored ones are derived too
  <companion-2>.md
  .memlog.md               ← canonical, append-only memory; what spec-{slug}.md is distilled from

Memory and derivation

.memlog.md is canonical — an append-only, chronological record of every decision, constraint, capability (with its stable CAP-N), assumption, open question, and bit of user direction, one line each in the order it happened, never edited or reordered. spec-{slug}.md and every spec-authored companion are derived on each run from the memlog (the decision-of-record) plus the sources it cites for raw content — never hand-patched.

Deriving the contract from a living log instead of editing the contract in place is what lets the steps around the spec (PRD, UX, architecture, epics) run in any order and feed the same spec without merge drift: the log only accumulates, the artifact is re-rendered. So the spec is updated only by re-deriving it here — bmad-spec is its single writer; a hand-edit to spec-{slug}.md from outside is unsupported and is overwritten on the next derive.

Writes go through the shared script — {project-root}/_bmad/scripts/memlog.py, the same location as resolve_customization.py (atomic; never read it back except to resume):

  • uv run {project-root}/_bmad/scripts/memlog.py init --workspace {spec-folder} --field topic="<what is being specced>" — once, at create.
  • uv run {project-root}/_bmad/scripts/memlog.py append --workspace {spec-folder} --type <decision|constraint|capability|assumption|question|direction|note|event> --text "<one-line gist, reason included>" — as each lands.
  • Terminal moments (a validation verdict, "spec finalized") are --type event entries; the memlog carries no status field.

The Operation

Read the input and its ancillary linked materials. If there is no input, follow the no-input branch in Workspace (ask or block). If a prior .memlog.md exists at the target folder, read it — the operation becomes an update, and the memlog (not the rendered spec-{slug}.md) is the authority on what was decided and on capability IDs. Preserve those IDs; new capabilities get the next unused CAP-N; never reuse retired IDs. Otherwise this is a create, and the first move is memlog.py init.

When the input is structured and pre-sorted (a PRD with an addendum, a GDD, a brief produced by an upstream BMad skill), trust the authored separation: lift kernel-fitting content into spec-{slug}.md, lift overflow into appropriately-named companions. When the input is mixed (a brain dump, a transcript, an RFC, a customer email), do the sorting yourself: walk each claim, apply the three-lens load-bearing test (Spec Law rule 7), and route to the kernel field or a companion.

Distill the input into the five-field kernel using {workflow.spec_template} as the skeleton. When input is rich, extract directly — no elicitation. When input is sparse, choose: express (best-effort distill, every gap becomes an open_questions[] entry) or guided (walk the five fields with the user one at a time). Headless defaults to express and logs the choice. Interactive asks.

A recognized domain implication the input leaves unaddressed is such a gap — name it as an open_questions[] entry (healthcare input silent on PHI/HIPAA, payments silent on PCI, control systems silent on fail-safe) and move on. Flag it; never invent the answer or coach toward it. If these dominate, the input is too thin — suggest bmad-prd.

Write lean from the first pass: every sentence must earn its place. Decoration costs tokens and dilutes downstream readers.

Log each decision, capability, constraint, and accepted change to .memlog.md as it is made — that running record is what the render reads. Because the log is append-only, a later entry supersedes an earlier one on the same point while the history stays intact. When two currently-live sources or companions disagree on the same field, or an either/or never got resolved, surface it to the user rather than silently choosing — the resolution is itself a new memlog entry.

If the input is genuinely too thin to distill (e.g. "an app for hikers" with no surrounding context), stop and suggest bmad-prd (or sibling ceremony skill). This skill distills; it does not coach.

Load-bearing

A claim is load-bearing if any consumer (downstream skill, implementing agent, verification pass) would change a decision without it.

Companions

When load-bearing content does not fit the five-field kernel, it lives in a companion. The kernel cites it; the companion holds it. Companions are part of the contract; every consumer reads companions: in spec-{slug}.md frontmatter to discover them. Companions follow the same lean discipline as spec-{slug}.md (Spec Law rule 8).

Spawn a companion when the content needs more than one kernel-shape line: multi-item catalogs (per-entity matrices like archetypes, drinks, modes, routes), tables, diagrams (always), editorial voice rules, long-form reference material the kernel cites by name (glossary, brownfield notes, project conventions). Single-line decision-benders stay in Constraints; intent+success pairs stay in Capabilities. If a kernel field is starting to bullet into sub-bullets, the content has outgrown the kernel and wants a companion.

Companions are either:

  • Spec-authored companions are written by bmad-spec and live as siblings of spec-{slug}.md (e.g., glossary.md, patron-archetypes.md). bmad-spec owns them and may edit them on update operations.
  • Adopted companions are load-bearing artifacts written by an upstream skill that downstream still needs to read. bmad-spec references them into companions: by relative path but does NOT edit them (e.g., a DESIGN.md or EXPERIENCE.md from a UX run, an integration partner's API spec). The originating skill owns them.

Two rules govern companions:

  1. Name spec-authored companions for the content type they hold. glossary.md, <entity-class>.md (e.g. patron-archetypes.md, medication-routes.md, flight-modes.md), stack.md, conventions.md, brownfield.md, architecture-diagrams.md, state-machines.md, failure-modes.md, compliance-references.md. The principle: "a reader should know what is inside before opening it." Adopted companions keep whatever name their originating skill gave them.
  2. Diagrams always land in a companion, regardless of size. spec-{slug}.md kernel holds prose only. Mermaid blocks, ASCII diagrams, and image references all live in a companion (e.g. architecture-diagrams.md), with sibling image files referenced from there.

Pre-existing project-wide docs (e.g. project-context.md) that downstream needs are listed as adopted companions, never duplicated into spec-{slug}.md or a spec-authored companion.

Spec Law

Every spec must satisfy these eight rules. The operation aims for them; the self-validate sweep enforces them.

  1. Each capability has both intent and success. Missing either = not a capability.
  2. Intents describe WHAT, not HOW. Implementation prescription belongs in a companion (stack, conventions).
  3. Constraints actually bend design decisions. A "constraint" that rules nothing out is decoration.
  4. Non-goals are explicit. At least one. Absence means downstream skills fill the vacuum.
  5. Success signal is concrete enough to test or demonstrate against. "Users love it" doesn't qualify.
  6. Capability IDs are stable and unique. Never reused, never renumbered.
  7. Preservation. Every load-bearing source claim lands in spec-{slug}.md or a companion. Wrapper ceremony does not.
  8. Lean prose. Every sentence carries load-bearing content. Cut decoration, hedges, backstory, throat-clearing. Applies to spec-{slug}.md, companions, and .memlog.md.

Self-Validate

After every create or update, sweep the resulting artifact in two passes before presenting.

Pass 1 — Coherence. Judge the spec against Spec Law rules 1–6 and 8. For anything that fails or feels weak, attempt to fix it without inventing content the input did not support. Calls made without direct confirmation become assumptions[]; gaps that could not be filled become open_questions[].

Pass 2 — Preservation. Walk the source claim by claim. Confirm each load-bearing claim landed in spec-{slug}.md or a companion. Wrapper-ceremony drops are logged under "Wrapper-only content" so the drop is on the record, not silent.

Record the verdict for each pass to .memlog.md (append --type event). In interactive mode, review it with the user. In headless mode, .memlog.md is one of the files returned, so the caller (or its downstream LLM) reads the verdict there.

Spec with no change signal

When the user points the skill at an existing spec folder (or its spec-{slug}.md) with no change signal, offer to review assumptions or open questions, or determine what they want to do.

Handing off to bmad-ticket (optional, interactive-only)

Requires spec-{slug}.md on disk — run the normal Operation first if it doesn't exist yet. Headless runs never do this, even when the invocation text asks for it: if mode detection (On Activation, step 4) resolved headless, skip this section entirely and proceed with the normal headless response. In interactive mode, offer the handoff at most once per run when the input reads as multiple independently shippable slices; a decline ends the offer for this run, not forever.

Hand the spec folder to bmad-ticket as the requirement source: it plans the work with the user as an epic whose tickets.toml entries cite this spec's CAP-N ids, and it runs the board from there. Load-bearing detail the slicing conversation surfaces (a constraint, a design decision) comes back here as a spec update, never into a ticket alone.

When a spec update runs, search the ticket root for this spec folder's path in References; where tickets cite it, name the entries and tickets whose description no longer matches and offer to re-slice them with bmad-ticket. The update itself never edits a ticket.

Output

Interactive — share the spec folder path conversationally. Name the capability count, the companions produced, and the verdict in one or two sentences. If assumptions[] or open_questions[] are non-empty, list them (short — one line each) and invite the user to walk through them. Make clear that addressing them can update the source input (if it was a file), the spec, or both — whichever combination the user prefers. Do not dump JSON or present a wall of output.

Headless — return JSON per assets/headless-schemas.md.

Run {workflow.on_complete} if set.

After Spec is Output

Any update to the spec — resolved assumptions, answered open questions, other changes — is appended to .memlog.md as it happens. When a change overrides something that came from a source input, offer to update that source too, so upstream and the spec don't silently diverge.

Frontmatter conventions

  • companions: array of .md files downstream MUST read alongside spec-{slug}.md to have the full contract. Paths may point inside the spec folder (spec-authored companions like glossary.md) or outside it (adopted companions like ../ux-foo-bar/DESIGN.md). The split between spec-authored and adopted is implicit by path; downstream treats both the same.
  • sources: array of paths to files that were fully absorbed into the SPEC, with no remaining downstream value (e.g., a PRD whose every load-bearing claim is now in the kernel). Listed for audit and for bmad-spec to re-read on update. Downstream does NOT read these. Files that downstream still needs to read belong in companions:, not here.
  • Do not list the memlog, README files, organizational artifacts, or any operational record of how upstream skills produced their artifacts. Those are not source content; they are process metadata that downstream consumers don't need.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Bmad Spec làm được gì?

Condense any input — an idea, brief, PRD, transcript, or mixed notes — into a short spec: one kernel file plus supporting files that downstream skills build from. Also updates and validates existing specs. Use when the user says "create a spec", "distill this into a spec", "validate this spec", or "update the spec"

Vì sao nên dùng Bmad Spec trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Bmad Spec là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Bmad Spec trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/bmad-code-org/BMAD-METHOD/tree/main/skills/bmad-spec. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Bmad Spec?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Bmad Spec với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Bmad Spec với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Bmad Spec có miễn phí không?

Kỹ năng này được bmad-code-org phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇