bmad-planning-orchestrator/skills/bmad-investigate/SKILL.md
Forensic bug and issue triage. Produces a graded investigation case file: symptoms, evidence (graded A/B/C by confidence), ranked hypotheses, suspected components, and a recommended planning response. INVESTIGATES and DOCUMENTS only — does NOT fix code, run tests, or implement. Hands off as a story to an external dev tool. Use when the user says: - "investigate this bug" / "triage this issue" / "debug triage" - "what's causing [symptom]" / "why is [feature] broken" - "something's wrong with [component]" / "users are reporting [problem]" - "figure out what happened" / "root cause this" - "I need a bug report" / "create an investigation case file" - "forensic analysis" / "diagnose this" - "error triage" / "issue investigation" - "what do we know about [incident/issue]" Three intents: Create (new case file), Update (add evidence to open case), Validate (check draft for completeness before handoff). Output lands in bmad-output/; a fix story is drafted on handoff.
npx skillsauth add aj-geddes/claude-code-bmad-skills bmad-investigateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
| Source | Why |
|--------|-----|
| bmad-output/project-context.md | Project constitution — architecture, stack, ownership |
| bmad-output/architecture.md | Component boundaries, module responsibilities |
| bmad-output/prd.md or tech-spec.md | Requirements the broken behavior should satisfy |
| bmad-output/decision-log.md | Prior decisions that may relate to the issue |
| User-provided symptom description | Primary input — what is failing, when, how |
| Logs / error messages the user pastes in | Raw 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.
Ask which intent applies if ambiguous.
Use TodoWrite to track progress through these steps.
Before investigating, confirm exactly what is observable. Ask (or infer from context):
Record these as the "Symptom Summary" — this is the anchor for all grading later.
Read all available inputs listed above. Extract:
Collect all available evidence. Assign each item an evidence grade:
| Grade | Meaning | |-------|---------| | A | Directly observed, reproducible, or confirmed by multiple independent sources. High confidence. | | B | Single-source, inferred from logs, or plausible but not yet reproduced. Medium confidence. | | C | Speculative, based on code reading only, or pattern-matched without direct confirmation. Low confidence. |
Evidence types to gather:
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.
Based on all grade-A and grade-B evidence, draft 2–5 hypotheses. For each:
Order hypotheses from most to least plausible.
For each top-2 hypothesis, list:
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.
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.
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]
Check the draft case file against this contract checklist:
Report pass/fail per item. Do not edit unless asked.
| Grade | Label | Typical Sources | |-------|-------|----------------| | A | Confirmed | Direct logs, reproducible steps, two-source corroboration | | B | Probable | Single logs, code-read inference, intermittent reproduction, user reports | | C | Speculative | Educated 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.
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.
bmad-output/decision-log.md — threaded decision recordbmad-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.
testing
Solutioning-phase UX planning skill (optional; activate when the project has a UI). Produces TWO planning documents: DESIGN.md (the visual system — design tokens, color palette, typography, spacing, component specs, WCAG 2.1 AA contract) and EXPERIENCE.md (user journeys, flow diagrams, screen states, error/empty/loading handling). Use when the user says "design the UX", "create UX planning docs", "define the design system", "map the user flows", "UX for this feature", "wireframe the flows", "what are the user journeys", "accessibility design", "WCAG compliance", "design tokens", "responsive design plan", "mobile-first design", or "create DESIGN.md / EXPERIENCE.md". Runs after architecture is drafted and before stories are created. Supports Create / Update / Validate intents.
testing
Quick Flow lightweight technical specification for small-scope work (1-15 stories). Replaces the full PRD + architecture pair when scope is small and requirements are clear. Produces bmad-output/tech-spec.md as the single planning artifact before story creation. Use when the user says: "write a tech spec", "create a technical specification", "I need a tech spec for this feature", "quick spec", "small project spec", "we don't need a full PRD", "just a tech spec", "spec out this change", "document this feature". QUICK FLOW TRACK ONLY (1-15 stories). If scope grows beyond ~15 stories or involves multiple teams / external integrations at scale, stop and redirect to bmad-prd + bmad-architecture instead — those skills are built for that complexity. Supports three intents: Create (new spec), Update (revise an existing tech-spec.md), Validate (review a draft for completeness against BMAD criteria).
tools
Orchestration handoff bridge: emits and maintains sprint-status.yaml as the project's sequencing system-of-record. Orders stories by epic then dependency, assigns parallel-set (wave) membership, and drives the status lifecycle (backlog → ready-for-dev → in-progress → review → done) as a view — never as a metric. Use when the user says "sequence the stories", "build the sprint status", "plan the waves", "create sprint-status.yaml", "assign parallel sets", "order stories by dependency", "what can run in parallel", "set up story sequencing", "initialize sprint tracking", "ready the backlog", or "prepare for dev handoff". Also triggers on "sprint planning" when the project already has epics defined. SCOPE: SEQUENCING AND ORCHESTRATION ONLY. No velocity, no burndown, no committed points, no coverage metrics. Capacity is expressed as wave width (concurrent story count), not points. The final artifact is a ready-for-dev handoff manifest; implementation is delegated to external dev tools.
development
Distills ANY messy input — brain dump, transcript, long PRD, stakeholder notes, feature request, voice memo — into a tight five-field SPEC.md kernel that any downstream planning skill can consume. The five fields are: Problem, Capabilities, Constraints, Non-Goals, Success Metrics. Use when the user says "create a spec", "write a spec for", "distill this into a spec", "I have a brain dump", "turn this into something structured", "clean up these notes", "make a SPEC from", "I want to define the problem", "help me scope this", "summarize what we're building", "I have a PRD but need a kernel", "what are we actually solving?", or drops raw text/transcript and asks for structure. Also use when starting any new initiative and a clean shared definition is missing.