bmad-method 6.6.1-next.3 → 6.6.1-next.5

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.
@@ -238,12 +238,13 @@
238
238
  {
239
239
  "id": "B8",
240
240
  "_pattern": "process-discipline",
241
+ "timeout": 900,
241
242
  "prompt": "Run headless. Create a product brief for InsuLens (smartphone app that pairs with thermal imaging accessories for homeowner insulation audits, target suburban homeowners 35-65 with houses pre-2000, 50 user interviews with 78% willingness to pay $49, Series A pitch input). Generate a distillate \u2014 this brief will feed downstream PRD work.",
242
- "expected_output": "distillate.md exists alongside brief.md and decision-log.md. The distillate is meaningfully shorter than the brief. Content of the distillate matches the brief without introducing new facts. The transcript shows the bmad-distillator subagent invoked.",
243
+ "expected_output": "distillate.md exists alongside brief.md and decision-log.md. The distillate is a meaningful condensation of the brief. Content of the distillate matches the brief without introducing new facts. The transcript shows the bmad-distillator subagent invoked.",
243
244
  "files": [],
244
245
  "expectations": [
245
246
  "distillate.md exists in the run folder alongside brief.md and decision-log.md",
246
- "distillate.md is shorter than brief.md (file size, in characters, is at least 30% smaller)",
247
+ "distillate.md is a meaningful condensation of brief.md \u2014 substantially more concise and capturing only the key decisions, target audience, validation evidence, and known unknowns needed for downstream PRD work, not a near-verbatim copy",
247
248
  "distillate.md does not introduce facts or claims not present in brief.md (no inventions on compression)",
248
249
  "The transcript contains a Skill tool call invoking bmad-distillator"
249
250
  ]
@@ -259,7 +260,7 @@
259
260
  "The final JSON status block artifact paths reference test-output/ rather than _bmad-output/",
260
261
  "brief.md body is written in Spanish \u2014 the majority of prose content (headings, section bodies) is in Spanish, not English",
261
262
  "brief.md covers the TaskFlow concept: freelancer daily planning, multi-client context, the sticky-notes-plus-calendar-plus-spreadsheet problem",
262
- "brief.md is right-sized for a bootstrapped side project (250-600 words, no investor-grade framing such as TAM/SAM/SOM or Series A language)",
263
+ "brief.md is right-sized for a bootstrapped side project — appropriate depth and scope for a solo-founder app with no investor audience, no TAM/SAM/SOM framing, no Series A language, and no sections that pad for enterprise credibility",
263
264
  "The assistant's non-document output (transcript text content outside of brief.md) contains at least one marker of British informal register (e.g., 'mate', 'cheers', 'brilliant', 'sorted', 'innit', 'blimey', 'proper', 'right then', or equivalent pub-idiom phrasing)"
264
265
  ]
265
266
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method",
4
- "version": "6.6.1-next.3",
4
+ "version": "6.6.1-next.5",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -29,13 +29,13 @@ Briefs produced here are honest, right-sized to purpose, and built for what come
29
29
 
30
30
  **Create.** A brief the user is proud of, that meets their needs, drawn out through real conversation — do not assume: instead converse and understand, and then help craft the best product brief for their needs. Begin in `## Discovery` before drafting; the brief comes after the picture is on the table. Shape follows the product and need. Treat `{workflow.brief_template}` as a starting structure, not a contract: drop sections that do not earn their place, add sections the product needs, reorder freely - create sections for specialized domains or concerns also as needed. The brief serves the product's story, not the template's shape. Bind `{doc_workspace}` to a fresh folder at `{workflow.output_dir}/{workflow.output_folder_name}/` and write `brief.md` there with YAML frontmatter (title, status, created, updated). For Update and Validate, `{doc_workspace}` is the existing folder of the brief being targeted.
31
31
 
32
- **Update.** Reconcile an existing brief with a change signal (edit request, downstream artifact, anything). Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — past decisions and rejected ideas matter. Then run the `## Discovery` posture against the change signal before proposing changes. Identify what is now stale or wrong, propose changes, apply on agreement, bump `updated`. If the change signal contradicts prior decisions, surface the conflict before changing anything. In headless mode, if the prompt clearly signals intent to override the contradicted decision, proceed with the change and autonomously write the full audit trail — a new `decision-log.md` entry naming the reversal and its rationale, and an `addendum.md` override section without waiting for user confirmation; if intent to override is ambiguous, halt with `blocked` status naming the specific conflict. If the change is fundamental, name it as a re-draft and offer Create instead. If `distillate.md` exists, regenerate it after changes are applied (re-invoke `bmad-distillator` per Finalize step 3); if unavailable, flag the distillate as stale.
32
+ **Update.** Reconcile an existing brief with a change signal (edit request, downstream artifact, anything). Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — past decisions and rejected ideas matter. Then run the `## Discovery` posture against the change signal before proposing changes. Identify what is now stale or wrong, propose changes, apply on agreement, bump `updated`, and write a new `decision-log.md` entry recording what changed and why — every update, clean or override, must be logged. If the change signal contradicts prior decisions, surface the conflict before changing anything. In headless mode, if the prompt clearly signals intent to override the contradicted decision, write the full audit trail first, then apply the changeyou must: (1) add a new entry to `decision-log.md` naming the decision being reversed and its rationale, (2) add an override section to `addendum.md` (creating it if absent). Both are mandatory before modifying `brief.md`; do not wait for user confirmation. If intent to override is ambiguous, halt with `blocked` status naming the specific conflict. If the change is fundamental, name it as a re-draft and offer Create instead. If `distillate.md` exists, you must regenerate it after changes are applied by invoking `bmad-distillator`; this step is required, not optional. If `bmad-distillator` is unavailable, flag the distillate as stale in the JSON output.
33
33
 
34
- **Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Offer to roll findings into an Update.
34
+ **Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Always offer to roll findings into an Update, even in headless mode — include `"offer_to_update": true` in the JSON status block.
35
35
 
36
36
  ## Headless Mode
37
37
 
38
- When invoked headless, do not ask. Complete the intent using what is provided, what exists in `{doc_workspace}`, or what you can discover yourself. If intent remains ambiguous after inference, halt with a `blocked` JSON status and a `reason` field — do not prompt. End with a JSON response listing status, intent, and artifact paths, for example:
38
+ When invoked headless, do not ask. Complete the intent using what is provided, what exists in `{doc_workspace}`, or what you can discover yourself. If intent remains ambiguous after inference, halt with a `blocked` JSON status and a `reason` field — do not prompt. End with a JSON response listing status, intent, and artifact paths. The `intent` field must match the detected intent: `"create"`, `"update"`, or `"validate"`. Examples:
39
39
 
40
40
  ```json
41
41
  {
@@ -49,6 +49,14 @@ When invoked headless, do not ask. Complete the intent using what is provided, w
49
49
  }
50
50
  ```
51
51
 
52
+ ```json
53
+ {
54
+ "status": "complete",
55
+ "intent": "validate",
56
+ "offer_to_update": true
57
+ }
58
+ ```
59
+
52
60
  Omit keys for artifacts that were not produced.
53
61
 
54
62
  ## Discovery
@@ -77,6 +77,7 @@ Discover and load context documents using smart discovery. Documents can be in t
77
77
  - {planning_artifacts}/**
78
78
  - {output_folder}/**
79
79
  - {project_knowledge}/**
80
+ - {implementation_artifacts}/investigations/**
80
81
  - docs/**
81
82
 
82
83
  Also - when searching - documents can be a single markdown file, or a folder with an index and multiple files. For Example, if searching for `*foo*.md` and not found, also search for a folder called *foo*/index.md (which indicates sharded content)
@@ -86,6 +87,8 @@ Try to discover the following:
86
87
  - Research Documents (`/*research*.md`)
87
88
  - Project Documentation (generally multiple documents might be found for this in the `{project_knowledge}` or `docs` folder.)
88
89
  - Project Context (`**/project-context.md`)
90
+ - Investigation Files (`{implementation_artifacts}/investigations/*-investigation.md`) — `bmad-investigate` case files
91
+ when the PRD is being driven by a forensic investigation rather than greenfield ideation.
89
92
 
90
93
  <critical>Confirm what you have found with the user, along with asking if the user wants to provide anything else. Only after this confirmation will you proceed to follow the loading rules</critical>
91
94
 
@@ -120,6 +123,7 @@ Try to discover the following:
120
123
  - Product briefs: {{briefCount}} files {if briefCount > 0}✓ loaded{else}(none found){/if}
121
124
  - Research: {{researchCount}} files {if researchCount > 0}✓ loaded{else}(none found){/if}
122
125
  - Brainstorming: {{brainstormingCount}} files {if brainstormingCount > 0}✓ loaded{else}(none found){/if}
126
+ - Investigations: {{investigationCount}} files {if investigationCount > 0}✓ loaded{else}(none found){/if}
123
127
  - Project docs: {{projectDocsCount}} files {if projectDocsCount > 0}✓ loaded (brownfield project){else}(none found - greenfield project){/if}
124
128
 
125
129
  **Files loaded:** {list of specific file names or "No additional documents found"}
@@ -128,6 +132,10 @@ Try to discover the following:
128
132
  📋 **Note:** This is a **brownfield project**. Your existing project documentation has been loaded. In the next step, I'll ask specifically about what new features or changes you want to add to your existing system.
129
133
  {/if}
130
134
 
135
+ {if investigationCount > 0}
136
+ 🔎 **Note:** Investigation files have been loaded. The evidence-graded findings (Confirmed / Deduced / Hypothesized), timeline, and fix direction are available as context while we scope requirements.
137
+ {/if}
138
+
131
139
  Do you have any other documents you'd like me to include, or shall we continue to the next step?"
132
140
 
133
141
  ### 4. Present MENU OPTIONS
@@ -63,6 +63,7 @@ Read the frontmatter from `{outputFile}` to get document counts:
63
63
  - `briefCount` - Product briefs available
64
64
  - `researchCount` - Research documents available
65
65
  - `brainstormingCount` - Brainstorming docs available
66
+ - `investigationCount` - bmad-investigate case files available
66
67
  - `projectDocsCount` - Existing project documentation
67
68
 
68
69
  **Announce your understanding:**
@@ -71,6 +72,7 @@ Read the frontmatter from `{outputFile}` to get document counts:
71
72
  - Product briefs: {{briefCount}}
72
73
  - Research: {{researchCount}}
73
74
  - Brainstorming: {{brainstormingCount}}
75
+ - Investigations: {{investigationCount}}
74
76
  - Project docs: {{projectDocsCount}}
75
77
 
76
78
  {{if projectDocsCount > 0}}This is a brownfield project - I'll focus on understanding what you want to add or change.{{else}}This is a greenfield project - I'll help you define the full product vision.{{/if}}"
@@ -88,3 +88,8 @@ skill = "bmad-create-story"
88
88
  code = "ER"
89
89
  description = "Party mode review of all work completed across an epic"
90
90
  skill = "bmad-retrospective"
91
+
92
+ [[agent.menu]]
93
+ code = "IN"
94
+ description = "Forensic case investigation with evidence-graded findings, calibrated to the input"
95
+ skill = "bmad-investigate"
@@ -0,0 +1,194 @@
1
+ ---
2
+ name: bmad-investigate
3
+ description: Forensic case investigation with evidence-graded findings, calibrated to the input. Use when the user asks to investigate a bug, trace what caused an incident, walk through unfamiliar code, or build a mental model of a code area before working on it.
4
+ ---
5
+
6
+ # Investigate
7
+
8
+ ## Overview
9
+
10
+ Reconstruct what's happening, or what an unfamiliar area does, from the available evidence. Produce a structured case
11
+ file another engineer can pick up cold. Calibrate continuously between defect-chasing (symptom-driven) and
12
+ area-exploration (no symptom); the same discipline applies on both ends.
13
+
14
+ **Args:** A ticket ID, log file path, diagnostic archive, error message, code area name, problem description, or a path
15
+ to an existing case file. The last form resumes a prior investigation; everything else opens a new case.
16
+
17
+ **Output:** `{implementation_artifacts}/{workflow.case_file_subdir}/{workflow.case_file_filename}`. Reference inputs
18
+ are recorded; raw content is not read into the parent context until an outcome calls for it.
19
+
20
+ `{slug}` is the ticket ID when one is provided, otherwise a short descriptive name agreed with the user, sanitized to
21
+ lowercase alphanumeric with hyphens. On collision with an existing case file at the resolved path, ask whether to
22
+ rename to `slug-YYYY-MM-DD.md` or resume the existing file (resuming routes to Outcome 0).
23
+
24
+ After every outcome, present what was learned and pause for the user before continuing.
25
+
26
+ ## Principles
27
+
28
+ - **Evidence grading.**
29
+ - **Confirmed.** Directly observed; cite `path:line`, log timestamp, or commit hash.
30
+ - **Deduced.** Logically follows from Confirmed evidence; show the chain.
31
+ - **Hypothesized.** Plausible but unconfirmed; state what would confirm or refute it.
32
+ - **Stronghold first.** Anchor in one Confirmed piece of evidence and expand outward. Never start from a theory and
33
+ hunt for support. When evidence is sparse, switch to evidence-light mode (Outcome 1 branch).
34
+ - **Challenge the premise.** The user's description is a hypothesis, not a fact. Verify independently; if evidence
35
+ contradicts, say so.
36
+ - **Follow the evidence, not the narrative.** When evidence contradicts the working theory, update the theory — never
37
+ the other way around. Resist confirmation bias even when the user is convinced.
38
+ - **Hypotheses are never deleted.** Update Status (Open / Confirmed / Refuted) and add a Resolution. Wrong turns are
39
+ part of the deliverable.
40
+ - **Missing evidence is itself a finding.** Document the gap, what it would resolve, and how to obtain it.
41
+ - **Write it down early.** Initialize the case file as soon as the slug is agreed; it is the persistent state across
42
+ interruptions.
43
+ - **Path:line citations** use CWD-relative format, no leading `/`, so they're clickable in IDE-embedded terminals.
44
+ - **Delegation discipline.** When a step requires reading 5+ files or any file >10K tokens, delegate to a subagent
45
+ that returns structured JSON only. Cite `path:line` from the result; don't re-read in the parent.
46
+ - **Issue independent operations in parallel** (multi-grep, multi-read, parallel inventories) — one message, multiple
47
+ tool calls.
48
+ - **Communication.** Evidence-first language ("the evidence shows", "unconfirmed, requires X to verify"). No hedging,
49
+ no narrative.
50
+
51
+ ## On Activation
52
+
53
+ ### Step 1: Resolve the workflow block
54
+
55
+ Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
56
+
57
+ If the script fails, stop and surface the error.
58
+
59
+ ### Step 2: Execute prepend steps
60
+
61
+ Run each entry in `{workflow.activation_steps_prepend}` in order.
62
+
63
+ ### Step 3: Load persistent facts
64
+
65
+ Treat each entry in `{workflow.persistent_facts}` as foundational context. `file:` prefixes are paths or globs under
66
+ `{project-root}` (load contents); other entries are facts verbatim.
67
+
68
+ ### Step 4: Load config
69
+
70
+ Load `{project-root}/_bmad/bmm/config.yaml` and resolve `{user_name}`, `{communication_language}`,
71
+ `{document_output_language}`, `{implementation_artifacts}`, `{project_knowledge}`. If `{implementation_artifacts}` is
72
+ unresolved, fall back to `./investigations/` and surface the fallback before initializing.
73
+
74
+ ### Step 5: Greet
75
+
76
+ Greet `{user_name}` in `{communication_language}`.
77
+
78
+ ### Step 6: Execute append steps
79
+
80
+ Run each entry in `{workflow.activation_steps_append}` in order.
81
+
82
+ ### Step 7: Acknowledge and route
83
+
84
+ Acknowledge the input as a reference (record paths and IDs; don't read raw content). Path to an existing case file →
85
+ Outcome 0. Otherwise → Outcome 1.
86
+
87
+ ## Procedure
88
+
89
+ ### Outcome 0: Existing case is loaded and surfaced
90
+
91
+ Read the case file. Surface, in order: open hypotheses (Status = Open) with their confirm/refute criteria; open
92
+ backlog (Status ≠ Done); missing-evidence rows; last Conclusion with confidence. Ask which thread to pull. New
93
+ evidence opens a new `## Follow-up: {YYYY-MM-DD}` block (append `#2`, `#3` on same-day reentry). Pause for user with the recap above; wait for direction.
94
+
95
+ ### Outcome 1: Scope and stronghold are established
96
+
97
+ Acknowledge each input shape — record location, scope, time window only; bulk reads happen in Outcome 2.
98
+
99
+ - **Issue tracker ticket.** Fetch full details via available MCP tools.
100
+ - **Diagnostic archive.** Record path, file count, time window.
101
+ - **Log file or stack trace.** Record path and time window; only the stack frame already in the user's message is in
102
+ scope here.
103
+ - **Free-text description.** Capture verbatim; treat as hypothesis.
104
+ - **Code area name** (no symptom). Record entry point.
105
+ - **Recent commit area.** Record commit range.
106
+
107
+ If the user arrived with a hypothesis, register it as Hypothesis #1. Find the stronghold *independently*; the user's
108
+ hypothesis is one of the things the stronghold validates or refutes.
109
+
110
+ Find a stronghold: a Confirmed piece of evidence (error message, function name, HTTP route, config parameter, test
111
+ case). Anchor here.
112
+
113
+ **Initialize `{case_file}` before branching.** The path is
114
+ `{implementation_artifacts}/{workflow.case_file_subdir}/{workflow.case_file_filename}` with `{slug}` substituted (slug
115
+ and collision rules in Overview). Create the file from `{workflow.case_file_template}` and fill Hand-off Brief
116
+ (rough), Case Info, Problem Statement, initial Evidence Inventory.
117
+
118
+ **Evidence-light branch.** When no Confirmed evidence is reachable: mark the case evidence-light in the Hand-off
119
+ Brief; populate the Investigation Backlog with prioritized data-collection items; record "to make progress, I need one
120
+ of: …"; pause for the user to provide evidence or authorize Outcome 2 to scan more broadly.
121
+
122
+ Otherwise present scope, stronghold, file path, proposed approach. Pause for user with the recap above; wait for direction.
123
+
124
+ ### Outcome 2: Evidence perimeter is mapped
125
+
126
+ Survey the scene: inventory available evidence in parallel across these independent categories: diagnostic archives;
127
+ issue tracker; version control; test results; static analysis; source code. For any category exceeding ~10K tokens,
128
+ delegate to a subagent that returns a JSON manifest (paths, sizes, time windows, key fragments cited as `path:line`).
129
+
130
+ Classify each Available, Partial, or Missing — Missing is itself a finding. Update Evidence Inventory and Investigation
131
+ Backlog. Pause for user with the recap above; wait for direction.
132
+
133
+ ### Outcome 3: Cause is reasoned about with discipline
134
+
135
+ - **Trace causality.** Symptom-driven: trace backward from the symptom to producing conditions and the state that
136
+ emerged. Exploration: trace backward from outputs (returns, side effects, messages sent) to producing conditions.
137
+ Same technique, different anchor.
138
+ - **Reconstruct the timeline** by cross-referencing logs, system events, version control, user observations.
139
+ - **Form and test hypotheses.** State, identify confirming/refuting evidence, search, grade
140
+ (Confirmed / Refuted / Open). Update Status. Never delete.
141
+ - **Refutation pass.** Each time a hypothesis transitions toward Confirmed, actively look for refuting evidence first.
142
+ Record the attempt in Resolution.
143
+ - **Verify the user's premise.** If evidence contradicts, say so explicitly.
144
+ - **Add discovered paths to the backlog.** Stay focused on the current thread.
145
+
146
+ Update Confirmed Findings, Deduced Conclusions, Hypothesized Paths, Backlog, Timeline. Highlight contradictions to the
147
+ original premise. Pause for user with the recap above; wait for direction.
148
+
149
+ ### Outcome 4: Source has been traced where it matters
150
+
151
+ Issue these first-pass scans as parallel tool calls in one message: grep for exact error strings; glob the affected
152
+ directory for parallel implementations; `git log` for recent changes.
153
+
154
+ Then sequentially: read the surrounding code; follow the caller chain; watch for language and process boundary
155
+ crossings (compiled→scripts, IPC, host→device, configuration flow).
156
+
157
+ Lean by case type:
158
+
159
+ - **Exploration:** I/O mapping (triggers, outputs, dependencies); frequent-terms scan; control-flow filtering
160
+ (branches, loops, error handling, state-machine transitions).
161
+ - **Symptom-driven:** depth assessment — is the root cause reachable from local context, or is a broader area model
162
+ required? Surface escalations; never silently expand scope. Trivial-fix assessment — off-by-one, missing null check,
163
+ swapped argument → one-line code suggestion or draft diff in the report; non-trivial → stop at the root cause area.
164
+
165
+ Investigation stops at the diagnosis; implementation is out of scope. Update Source Code Trace (Error origin, Trigger,
166
+ Condition, Related files; area model when broader). Pause for user with the recap above; wait for direction.
167
+
168
+ ### Outcome 5: Report is finalized and the hand-off is clean
169
+
170
+ Update `{case_file}`:
171
+
172
+ - **Hand-off Brief** rewritten to final form (3 sentences, 15-second read).
173
+ - **Final Conclusion** with confidence: **High** (Confirmed root cause, deterministic repro), **Medium** (Deduced;
174
+ minor uncertainty), **Low** (Hypothesized; clear data gap).
175
+ - **Fix direction** when applicable (categorize by mechanism if multiple combine).
176
+ - **Diagnostic steps** if uncertainty remains.
177
+ - **Reproduction Plan** when applicable, or a verification plan for exploration cases.
178
+ - **Status:** Active / Concluded / Blocked on evidence.
179
+
180
+ Present the conclusion, then a concrete next-steps menu: trivial fix → `bmad-quick-dev`; scope/plan adjustment →
181
+ `bmad-correct-course`; tracked story → `bmad-create-story`; fresh review → `bmad-code-review`. Recommend the
182
+ highest-value action. Mitigations and workarounds are generated only on explicit request — investigation stops at the
183
+ diagnosis. Execute `{workflow.on_complete}` if non-empty. Pause for user with the recap above; wait for direction.
184
+
185
+ ## Follow-up Iterations
186
+
187
+ Continue work by appending to `{case_file}` under a new `## Follow-up: {YYYY-MM-DD}` block (`#2`, `#3` on same-day
188
+ reentry). The investigation is complete when:
189
+
190
+ - Root cause is Confirmed.
191
+ - Root cause is Hypothesized with a clear data gap.
192
+ - The mental model is sufficient for the user's stated goal (exploration cases).
193
+ - The backlog contains only items requiring unavailable evidence.
194
+ - The user explicitly concludes.
@@ -0,0 +1,62 @@
1
+ # DO NOT EDIT -- overwritten on every update.
2
+ #
3
+ # Workflow customization surface for bmad-investigate. Mirrors the
4
+ # agent customization shape under the [workflow] namespace.
5
+
6
+ [workflow]
7
+
8
+ # --- Configurable below. Overrides merge per BMad structural rules: ---
9
+ # scalars: override wins • arrays (persistent_facts, activation_steps_*): append
10
+ # arrays-of-tables with `code`/`id`: replace matching items, append new ones.
11
+
12
+ # Steps to run before the standard activation (config load, greet).
13
+ # Overrides append. Use for pre-flight loads, compliance checks, etc.
14
+
15
+ activation_steps_prepend = []
16
+
17
+ # Steps to run after greet but before the workflow begins.
18
+ # Overrides append. Use for context-heavy setup that should happen
19
+ # once the user has been acknowledged.
20
+
21
+ activation_steps_append = []
22
+
23
+ # Persistent facts the workflow keeps in mind for the whole run.
24
+ # Use for citation conventions (path:line vs path#L42), grading-scale
25
+ # overrides (ITIL severity 1-5 instead of High/Medium/Low), tone
26
+ # directives (engineering vs exec-facing), or compliance constraints
27
+ # the case file must respect.
28
+ # Distinct from the runtime memory sidecar — these are static context
29
+ # loaded on activation. Overrides append.
30
+ #
31
+ # Each entry is either:
32
+ # - a literal sentence, e.g. "Use ITIL severity 1-5 instead of High/Medium/Low for confidence."
33
+ # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
34
+ # (glob patterns are supported; the file's contents are loaded and treated as facts).
35
+
36
+ persistent_facts = [
37
+ "file:{project-root}/**/project-context.md",
38
+ ]
39
+
40
+ # Scalar: path to the case-file template, resolved from the skill root.
41
+ # Override to point at an org-shaped template (compliance sections,
42
+ # SLA fields, post-mortem hooks, ITIL fields).
43
+
44
+ case_file_template = "references/case-file-template.md"
45
+
46
+ # Scalar: subdirectory under {implementation_artifacts} where case files land.
47
+ # Override for org taxonomies (forensics/, cases/, incidents/, bug-bash/).
48
+
49
+ case_file_subdir = "investigations"
50
+
51
+ # Scalar: filename pattern for new case files. {slug} expands to the
52
+ # ticket ID or a short user-agreed name.
53
+
54
+ case_file_filename = "{slug}-investigation.md"
55
+
56
+ # Scalar: executed when the workflow finalizes the case file at Outcome 5,
57
+ # after the conclusion is presented. Override wins. Use for post-case
58
+ # automation: post the case to Slack/Teams, push fields back to ticketing,
59
+ # link the case to a sprint, trigger a follow-up retro.
60
+ # Leave empty for no custom post-completion behavior.
61
+
62
+ on_complete = ""
@@ -0,0 +1,127 @@
1
+ # Investigation: {title}
2
+
3
+ ## Hand-off Brief
4
+
5
+ 1. **What happened.** {one-sentence problem statement, evidence-graded}
6
+ 2. **Where the case stands.** {status, last finding, what would unblock progress}
7
+ 3. **What's needed next.** {single recommended action with rationale}
8
+
9
+ ## Case Info
10
+
11
+ | Field | Value |
12
+ | ---------------- | -------------------------------------------------------------------------- |
13
+ | Ticket | {ticket-id or "N/A"} |
14
+ | Date opened | {date} |
15
+ | Status | Active |
16
+ | System | {OS, version, relevant environment details} |
17
+ | Evidence sources | {diagnostic archive, logs, crash dump, code, version control, etc.} |
18
+
19
+ ## Problem Statement
20
+
21
+ {User-reported description; the initial claim. May be refined or contradicted by evidence.}
22
+
23
+ ## Evidence Inventory
24
+
25
+ | Source | Status | Notes |
26
+ | -------- | ------------------------------- | --------- |
27
+ | {source} | {Available / Partial / Missing} | {details} |
28
+
29
+ ## Investigation Backlog
30
+
31
+ | # | Path to Explore | Priority | Status | Notes |
32
+ | - | --------------- | --------------------- | ------------------------------------- | --------- |
33
+ | 1 | {description} | {High / Medium / Low} | {Open / In Progress / Done / Blocked} | {context} |
34
+
35
+ ## Timeline of Events
36
+
37
+ | Time | Event | Source | Confidence |
38
+ | ----------- | ------------------- | --------------------- | --------------------- |
39
+ | {timestamp} | {event description} | {log file, commit, …} | {Confirmed / Deduced} |
40
+
41
+ ## Confirmed Findings
42
+
43
+ ### Finding 1: {title}
44
+
45
+ **Evidence:** {citation — `path:line`, log timestamp, or commit hash}
46
+
47
+ **Detail:** {description}
48
+
49
+ ## Deduced Conclusions
50
+
51
+ ### Deduction 1: {title}
52
+
53
+ **Based on:** {which Confirmed Findings}
54
+
55
+ **Reasoning:** {logical chain}
56
+
57
+ **Conclusion:** {what follows}
58
+
59
+ ## Hypothesized Paths
60
+
61
+ ### Hypothesis 1: {title}
62
+
63
+ **Status:** {Open / Confirmed / Refuted}
64
+
65
+ **Theory:** {description}
66
+
67
+ **Supporting indicators:** {what makes this plausible}
68
+
69
+ **Would confirm:** {specific evidence that would prove this}
70
+
71
+ **Would refute:** {specific evidence that would disprove this}
72
+
73
+ **Resolution:** {when Status changes from Open, what evidence settled it}
74
+
75
+ ## Missing Evidence
76
+
77
+ | Gap | Impact | How to Obtain |
78
+ | ---------------- | ------------------------------------ | --------------- |
79
+ | {what's missing} | {what it would confirm or eliminate} | {how to get it} |
80
+
81
+ ## Source Code Trace
82
+
83
+ | Element | Detail |
84
+ | ------------- | ------------------------------------------- |
85
+ | Error origin | {file:line, function name} |
86
+ | Trigger | {what causes this code to execute} |
87
+ | Condition | {what state produces the observed behavior} |
88
+ | Related files | {other files in the same code path} |
89
+
90
+ ## Conclusion
91
+
92
+ **Confidence:** {High / Medium / Low}
93
+
94
+ {Summary stating what is Confirmed vs. what remains Hypothesized. If a root cause is identified, state it; otherwise
95
+ name the most promising hypothesized paths and what would resolve the remaining uncertainty.}
96
+
97
+ ## Recommended Next Steps
98
+
99
+ ### Fix direction
100
+
101
+ {What needs to change and why. Categorize by mechanism when multiple issues combine.}
102
+
103
+ ### Diagnostic
104
+
105
+ {Steps to confirm the root cause: additional logging, targeted tests, data to collect.}
106
+
107
+ ## Reproduction Plan
108
+
109
+ {Setup, trigger, expected results. Scale from isolated proof to full system reproduction.}
110
+
111
+ ## Side Findings
112
+
113
+ Tangential observations surfaced during the investigation, evidence-graded, with citation when applicable.
114
+
115
+ - {observation}
116
+
117
+ ## Follow-up: {date}
118
+
119
+ ### New Evidence
120
+
121
+ ### Additional Findings
122
+
123
+ ### Updated Hypotheses
124
+
125
+ ### Backlog Changes
126
+
127
+ ### Updated Conclusion
@@ -31,3 +31,4 @@ BMad Method,bmad-code-review,Code Review,CR,Story cycle: If issues back to DS if
31
31
  BMad Method,bmad-checkpoint-preview,Checkpoint,CK,Guided walkthrough of a change from purpose and context into details. Use for human review of commits branches or PRs.,,,4-implementation,,,false,,
32
32
  BMad Method,bmad-qa-generate-e2e-tests,QA Automation Test,QA,Generate automated API and E2E tests for implemented code. NOT for code review or story validation — use CR for that.,,,4-implementation,bmad-dev-story,,false,implementation_artifacts,test suite
33
33
  BMad Method,bmad-retrospective,Retrospective,ER,Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC.,,,4-implementation,bmad-code-review,,false,implementation_artifacts,retrospective
34
+ BMad Method,bmad-investigate,Investigate,IN,Forensic case investigation calibrated to the input. Evidence-graded analysis with hypothesis tracking. Produces a structured case file.,,4-implementation,,,false,implementation_artifacts,investigation report