Bmad Investigate 标志

Bmad Investigate

社区
aj-geddes
bmad-investigate

以取证方式排查 Bug 和问题。生成分级调查案例文件,包含症状、证据(按可信度分为 A/B/C 级)、按可能性排序的假设、疑似组件,以及建议的规划处理方案。只负责调查和记录,不会修复代码、运行测试或实施更改。之后会将案例作为故事交接给外部开发工具。用户说:“调查这个 Bug”/“分诊这个问题”/“调试分诊”;“是什么导致了[症状]”/“为什么[功能]坏了”;“[组件]好像出了问题”/“用户反映[问题]”;“查明发生了什么”/“找出根本原因”;“我需要一份 Bug 报告”/“创建调查案例文件”;“取证分析”/“诊断这个问题”;“错误分诊”/“问题调查”;“我们对[事件/问题]了解多少”时使用。支持三种意图:Create(新建案例文件)、Update(向未结案例添加证据)、Validate(交接前检查草稿是否完整)。输出保存到 bmad-output/;交接时会起草修复故事。

Add to TypingMind

概览

发布者aj-geddes
代码仓库claude-code-bmad-skills
技能名称bmad-investigate
星标数
492
复刻数
77
附带文件
1
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 aj-geddes 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Bmad Investigate AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/aj-geddes/claude-code-bmad-skills/tree/main/bmad-planning-orchestrator/skills/bmad-investigate
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aj-geddes/claude-code-bmad-skills.git /tmp/claude-code-bmad-skills
mkdir -p .claude/skills
cp -r /tmp/claude-code-bmad-skills/bmad-planning-orchestrator/skills/bmad-investigate .claude/skills/bmad-investigate
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Bmad Investigate,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Bmad Investigate。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Bmad Investigate 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

BMAD Investigate

Forensic triage — plan the fix, don't apply it.

This skill builds a structured, evidence-graded investigation case file so that whoever picks up the story has a clear picture of what is known, what is suspected, and exactly what needs verifying before any code changes. It deliberately stops before implementation; the result of every investigation is a story handed off to an external dev tool.

Persona flavor: Mary (Business Analyst) frames the user impact; Winston (Architect) maps the component topology. The skill is a workflow, not a character.


Scope Law (read first)

This skill PLANS. It reads planning artifacts and existing code to gather evidence. It does NOT write application code, run tests, lint, build, or review diffs. The last artifact it emits is either an updated planning document or a story file marked status: ready-for-dev. If tempted to "fix the bug", "run the suite", or "apply the patch" — STOP. Investigate and hand off.


Inputs (load these first)

SourceWhy
bmad-output/project-context.mdProject constitution — architecture, stack, ownership
bmad-output/architecture.mdComponent boundaries, module responsibilities
bmad-output/prd.md or tech-spec.mdRequirements the broken behavior should satisfy
bmad-output/decision-log.mdPrior decisions that may relate to the issue
User-provided symptom descriptionPrimary input — what is failing, when, how
Logs / error messages the user pastes inRaw evidence to grade and analyze
Existing story files in bmad-output/stories/Check for duplicate or related work

If project-context.md does not exist, ask the user to describe the stack and affected area before proceeding.


Three Intents

Ask which intent applies if ambiguous.

  • Create — new investigation case file from scratch.
  • Update — add new evidence to an existing case file, re-rank hypotheses.
  • Validate — check a draft case file for completeness against the case-file contract.

Workflow — Create

Use TodoWrite to track progress through these steps.

Step 1 — Clarify the Symptom

Before investigating, confirm exactly what is observable. Ask (or infer from context):

  1. Symptom — what behavior is wrong? What is the expected behavior?
  2. Trigger — when does it occur? Every time? Intermittently? Under load?
  3. Scope — which users, environments, or configurations are affected?
  4. First seen — when was the issue introduced or first noticed?
  5. Severity — data loss, service outage, degraded UX, cosmetic?

Record these as the "Symptom Summary" — this is the anchor for all grading later.


Step 2 — Load Context

Read all available inputs listed above. Extract:

  • Affected components — which modules/services does the symptom implicate? (Cross-reference architecture.md for component responsibilities.)
  • Related requirements — which FR or NFR does the broken behavior touch? (Search prd.md for the area.)
  • Recent decisions — any ADR or decision-log entry touching the suspected area?
  • Similar stories — any existing story file referencing the same component?

Step 3 — Gather and Grade Evidence

Collect all available evidence. Assign each item an evidence grade:

GradeMeaning
ADirectly observed, reproducible, or confirmed by multiple independent sources. High confidence.
BSingle-source, inferred from logs, or plausible but not yet reproduced. Medium confidence.
CSpeculative, based on code reading only, or pattern-matched without direct confirmation. Low confidence.

Evidence types to gather:

  • Error messages and stack traces (paste verbatim; mark as grade A if directly from logs)
  • Reproduction steps (grade A if reliably reproduced; B if intermittent)
  • Code paths identified via Grep/Glob (grade B — code reading is inference, not proof)
  • Configuration or environment differences (grade B unless confirmed in both envs)
  • Historical changes — recent commits or PRs that touched the area (grade C without reproduction confirmation)
  • User reports or support tickets (grade B — external, non-reproducible by default)

Use Grep and Glob to search the codebase for error strings, function names, or file paths the user mentions. Read code files to trace call paths. Do NOT run the code — read it.


Step 4 — Form Hypotheses

Based on all grade-A and grade-B evidence, draft 2–5 hypotheses. For each:

  • Hypothesis — a concise statement of the suspected root cause.
  • Supporting evidence — which evidence items support it (cite grade).
  • Contradicting evidence — anything that argues against it.
  • Plausibility rank — High / Medium / Low (derived from weight of A+B evidence).
  • Verification step — what a dev agent would need to do to confirm or refute this.

Order hypotheses from most to least plausible.


Step 5 — Map Suspected Components

For each top-2 hypothesis, list:

  • Component — the module, service, or file suspected.
  • Why suspected — evidence linkage (grade + description).
  • Blast radius — what else could be affected if this hypothesis is correct?
  • Confidence — derived from the highest-grade evidence linking to this component.

Step 6 — Write the Case File

Fill the template:

${CLAUDE_PLUGIN_ROOT}/skills/bmad-investigate/templates/investigation.template.md

Save to: bmad-output/investigation-<issue-slug>-<date>.md

Use Write. Fill every {{placeholder}} from your analysis.


Step 7 — Recommend the Planning Response

After completing the case file, determine the planning response:

Option A — Create a fix story: Draft a story file using the standard story contract from bmad-epics-and-stories. The story Dev Notes MUST cite the investigation case file. Status: ready-for-dev. Naming: {epic}.{story}.{slug}.story.md in bmad-output/stories/.

Option B — Update an existing backlog story: If a related story exists in backlog, recommend updating its Dev Notes and ACs to incorporate the investigation findings. Do NOT edit the story yourself unless asked; describe what needs updating.

Option C — Escalate to planning: If the investigation reveals a systemic issue touching multiple epics, recommend that the user run /bmad-planning-orchestrator:bmad-prd or /bmad-planning-orchestrator:bmad-architecture (Update intent) before a story is created.

Tell the user which option applies and why. If creating a fix story (Option A), draft it now unless the user says otherwise.


Step 8 — Log the Decision

Append to bmad-output/decision-log.md:

## Investigation: [Issue Slug] — [Date]
- Symptom: [one sentence]
- Primary hypothesis: [one sentence]
- Primary suspected component: [name]
- Case file: bmad-output/investigation-<slug>-<date>.md
- Recommended response: [Option A/B/C + story ID if created]

Workflow — Update

  1. Read the existing case file.
  2. Ask: what new evidence has arrived?
  3. Add new evidence items with grades; re-rank hypotheses if the weight shifts.
  4. Increment the case file version in the header.
  5. If the primary hypothesis has changed, note it in the decision-log.

Workflow — Validate

Check the draft case file against this contract checklist:

  • Symptom Summary is concrete and testable (not vague)
  • Every evidence item has a grade (A / B / C)
  • At least two hypotheses are present
  • Each hypothesis has: supporting evidence, contradicting evidence, plausibility rank, verification step
  • Suspected Components section maps each component to specific evidence
  • Recommended Action is stated (Option A / B / C)
  • If Option A: a story draft exists or is clearly specified
  • Decision-log entry exists

Report pass/fail per item. Do not edit unless asked.


Evidence Grading Summary

GradeLabelTypical Sources
AConfirmedDirect logs, reproducible steps, two-source corroboration
BProbableSingle logs, code-read inference, intermittent reproduction, user reports
CSpeculativeEducated guess, pattern match, untested hypothesis only

Never promote a C to an A in the case file — the external dev agent needs to know what is solid and what is guesswork before they start.


Subagent Strategy

For large-scale investigations spanning multiple suspected components, fan out parallel read-only agents:

Agent 1 — Evidence Collector

Read the investigation brief at bmad-output/investigation-scratch/brief.md.
Search the codebase with Grep/Glob for error strings, function names, and file
paths listed. Collect stack-trace context. Write findings (verbatim excerpts +
file paths + line numbers) to bmad-output/investigation-scratch/evidence.md.
Do NOT modify any source files. Grade each item A/B/C.

Agent 2 — Component Mapper

Read bmad-output/architecture.md and the brief at
bmad-output/investigation-scratch/brief.md. For each suspected component,
extract its responsibilities, dependencies, and API contracts.
Write findings to bmad-output/investigation-scratch/components.md.

After agents complete, synthesize evidence.md + components.md into the final case file using the template. Delete scratch files after synthesis.


Reference

  • templates/investigation.template.md
  • bmad-output/decision-log.md — threaded decision record
  • bmad-output/project-context.md — project constitution
  • /bmad-planning-orchestrator:bmad-epics-and-stories — creates the fix story
  • /bmad-planning-orchestrator:bmad-readiness-check — if investigation reveals systemic planning gaps before the fix story is safe to hand off

Part of the BMAD Planning & Orchestrator plugin — a Claude Code harness for the BMAD Method by the BMAD Code Organization (https://github.com/bmad-code-org/BMAD-METHOD). Implements the spirit of bmad-investigate. All methodology credit belongs to the BMAD Code Organization.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Bmad Investigate AI 技能有什么作用?

以取证方式排查 Bug 和问题。生成分级调查案例文件,包含症状、证据(按可信度分为 A/B/C 级)、按可能性排序的假设、疑似组件,以及建议的规划处理方案。只负责调查和记录,不会修复代码、运行测试或实施更改。之后会将案例作为故事交接给外部开发工具。用户说:“调查这个 Bug”/“分诊这个问题”/“调试分诊”;“是什么导致了[症状]”/“为什么[功能]坏了”;“[组件]好像出了问题”/“用户反映[问题]”;“查明发生了什么”/“找出根本原因”;“我需要一份 Bug 报告”/“创建调查案例文件”;“取证分析”/“诊断这个问题”;“错误分诊”/“问题调查”;“我们对[事件/问题]了解多少”时使用。支持三种意图:Create(新建案例文件)、Update(向未结案例添加证据)、Validate(交接前检查草稿是否完整)。输出保存到 bmad-output/;交接时会起草修复故事。

为什么在 TypingMind 中使用 Bmad Investigate?

因为您只需安装一次,就能搭配任何模型使用。Bmad Investigate 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Bmad Investigate?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/aj-geddes/claude-code-bmad-skills/tree/main/bmad-planning-orchestrator/skills/bmad-investigate。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Bmad Investigate?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Bmad Investigate 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Bmad Investigate 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Bmad Investigate AI 技能免费吗?

aj-geddes 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇