mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-17 09:45:25 +00:00
brownfield guide draft
This commit is contained in:
parent
24a2271520
commit
f55e822338
1260
docs/bmad-brownfield-guide.md
Normal file
1260
docs/bmad-brownfield-guide.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,79 +6,119 @@
|
||||
|
||||
<workflow>
|
||||
|
||||
<step n="1" goal="Scan for existing work">
|
||||
<action>Search {output_folder}/ for existing BMM artifacts:</action>
|
||||
- PRD files (*prd*.md)
|
||||
- Architecture docs (architecture*.md, architecture*.md, architecture/*)
|
||||
- Briefs (*brief*.md)
|
||||
- Brainstorming docs (brainstorm*.md)
|
||||
- Research docs (*research*.md)
|
||||
- Tech specs (tech-spec*.md)
|
||||
- GDD files (gdd*.md)
|
||||
- Story files (story-*.md)
|
||||
- Epic files (epic*.md)
|
||||
- Documentation files (index.md (and referenced files within), other files in docs or provided)
|
||||
<step n="1" goal="Quick scan and ask user about THEIR work">
|
||||
<output>Welcome to BMad Method, {user_name}!</output>
|
||||
|
||||
Check for existing codebase indicators:
|
||||
<action>Quick scan for context (do NOT analyze in depth yet):</action>
|
||||
|
||||
- src/ or lib/ directories
|
||||
- package.json, requirements.txt, go.mod, Cargo.toml, etc.
|
||||
- .git directory (check git log for commit history age)
|
||||
- README.md (check if it describes existing functionality)
|
||||
- Test directories (tests/, **tests**/, spec/)
|
||||
- Existing source files (_.js, _.py, _.go, _.rs, etc.)
|
||||
- Check for codebase: src/, lib/, package.json, .git, etc.
|
||||
- Check for BMM artifacts: PRD, epics, stories, tech-spec, architecture docs
|
||||
- Store what was found but do NOT infer project details yet
|
||||
|
||||
<action>Also check config for existing {project_name} variable</action>
|
||||
<ask>What's your project called? {{#if project_name}}(Config shows: {{project_name}}){{/if}}</ask>
|
||||
<action>Set project_name</action>
|
||||
<template-output>project_name</template-output>
|
||||
|
||||
<check if="found existing artifacts">
|
||||
<action>Analyze documents to infer project details</action>
|
||||
<action>Guess project type (game vs software) from content</action>
|
||||
<action>Estimate level based on scope:
|
||||
- Level 0: Single atomic change (1 story)
|
||||
- Level 1: Small feature (1-10 stories)
|
||||
- Level 2: Medium project (5-15 stories)
|
||||
- Level 3: Complex system (12-40 stories)
|
||||
- Level 4: Enterprise scale (40+ stories)
|
||||
</action>
|
||||
<action>Detect if greenfield (only planning) or brownfield (has code)</action>
|
||||
<action>Go to Step 2 (Confirm inferred settings)</action>
|
||||
<check if="found artifacts OR found codebase">
|
||||
<output>I found some existing work here. Let me understand what you're working on:</output>
|
||||
|
||||
<check if="found artifacts">
|
||||
<output>
|
||||
**Planning Documents Found:**
|
||||
{{#each artifacts}}
|
||||
- {{artifact_name}} ({{artifact_type}}, {{story_count}} stories, modified {{date}})
|
||||
{{/each}}
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<check if="no artifacts found">
|
||||
<action>Set fresh_start = true</action>
|
||||
<action>Go to Step 3 (Gather project info)</action>
|
||||
<check if="found codebase">
|
||||
<output>
|
||||
**Codebase Found:**
|
||||
- Source code in: {{source_dirs}}
|
||||
- Tech stack: {{detected_tech_stack}}
|
||||
{{#if git_history}}
|
||||
- Git history: {{commit_count}} commits, last commit {{last_commit_date}}
|
||||
{{/if}}
|
||||
</output>
|
||||
</check>
|
||||
|
||||
<ask>Looking at what I found, are these:
|
||||
|
||||
a) **Works in progress you're finishing** - continuing the work described in these documents
|
||||
b) **Documents from a previous effort** - you're starting something NEW and different now
|
||||
c) **The proposed work you're about to start** - these describe what you want to do
|
||||
d) **None of these** - let me explain what I'm actually working on
|
||||
|
||||
Your choice [a/b/c/d]:</ask>
|
||||
|
||||
<check if="choice == a">
|
||||
<action>User is continuing old work - analyze artifacts to get details</action>
|
||||
<action>Set continuing_old_work = true</action>
|
||||
<action>Go to Step 2 (Analyze artifacts for details)</action>
|
||||
</check>
|
||||
|
||||
<check if="choice == b">
|
||||
<action>User is doing NEW work - old artifacts are just context</action>
|
||||
<action>Set continuing_old_work = false</action>
|
||||
<action>Go to Step 3 (Ask about NEW work)</action>
|
||||
</check>
|
||||
|
||||
<check if="choice == c">
|
||||
<action>Artifacts describe proposed work</action>
|
||||
<action>Set continuing_old_work = true</action>
|
||||
<action>Go to Step 2 (Analyze artifacts for details)</action>
|
||||
</check>
|
||||
|
||||
<check if="choice == d">
|
||||
<action>User will explain their situation</action>
|
||||
<action>Go to Step 3 (Ask about their work)</action>
|
||||
</check>
|
||||
</check>
|
||||
|
||||
<check if="NOT found artifacts AND NOT found codebase">
|
||||
<output>I don't see any existing code or planning documents. Looks like we're starting fresh!</output>
|
||||
<action>Go to Step 3 (Ask about their work)</action>
|
||||
</check>
|
||||
</step>
|
||||
|
||||
<step n="2" goal="Confirm inferred settings" if="found artifacts">
|
||||
<output>📊 I found existing work! Here's what I detected:
|
||||
<step n="2" goal="Analyze artifacts for continuing work" if="continuing_old_work == true">
|
||||
<action>Analyze found artifacts in detail:</action>
|
||||
<action>Extract project type from content (game vs software)</action>
|
||||
<action>Count stories/epics to estimate level:
|
||||
- Level 0: 1 story
|
||||
- Level 1: 1-10 stories
|
||||
- Level 2: 5-15 stories
|
||||
- Level 3: 12-40 stories
|
||||
- Level 4: 40+ stories
|
||||
</action>
|
||||
<action>Detect field type from codebase presence (greenfield vs brownfield)</action>
|
||||
|
||||
**Project Name:** {{inferred_project_name}}
|
||||
**Type:** {{inferred_type}}
|
||||
**Complexity:** {{inferred_level_description}}
|
||||
**Codebase:** {{inferred_field_type}}
|
||||
**Current Phase:** {{current_phase}}
|
||||
<output>Based on the artifacts you're continuing, I'm suggesting **Level {{project_level}}** because I found {{story_count}} stories across {{epic_count}} epics.
|
||||
|
||||
Here's the complexity scale for reference:
|
||||
|
||||
**{{field_type}} Project Levels:**
|
||||
|
||||
- **Level 0** - Single atomic change (1 story) - bug fixes, typos, minor updates
|
||||
- **Level 1** - Small feature (1-10 stories) - simple additions, isolated features
|
||||
- **Level 2** - Medium feature set (5-15 stories) - dashboards, multiple related features
|
||||
- **Level 3** - Complex integration (12-40 stories) - platform features, major integrations
|
||||
- **Level 4** - Enterprise expansion (40+ stories) - multi-tenant, ecosystem changes
|
||||
|
||||
**My suggestion:** Level {{project_level}} {{field_type}} {{project_type}} project
|
||||
</output>
|
||||
|
||||
<ask>Is this correct?
|
||||
<ask>Does this match what you're working on? (y/n or tell me what's different)</ask>
|
||||
|
||||
1. **Yes** - Use these settings
|
||||
2. **Start Fresh** - Ignore existing work
|
||||
Or tell me what's different:</ask>
|
||||
|
||||
<check if="choice == 1">
|
||||
<action>Use inferred settings</action>
|
||||
<action>Go to Step 5 (Generate workflow)</action>
|
||||
<check if="user confirms">
|
||||
<action>Use analyzed values</action>
|
||||
<action>Go to Step 4 (Load workflow path)</action>
|
||||
</check>
|
||||
|
||||
<check if="choice == 2">
|
||||
<action>Set fresh_start = true</action>
|
||||
<action>Go to Step 3 (Gather project info)</action>
|
||||
</check>
|
||||
|
||||
<check if="user provides corrections">
|
||||
<action>Update inferred values based on user input</action>
|
||||
<action>Go to Step 5 (Generate workflow)</action>
|
||||
<check if="user corrects">
|
||||
<action>Update values based on user corrections</action>
|
||||
<ask>Updated to: Level {{project_level}} {{field_type}} {{project_type}}. Correct? (y/n)</ask>
|
||||
<action>Go to Step 4 (Load workflow path)</action>
|
||||
</check>
|
||||
|
||||
<template-output>project_name</template-output>
|
||||
@ -87,28 +127,116 @@ Check for existing codebase indicators:
|
||||
<template-output>field_type</template-output>
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Gather project info">
|
||||
<output>Welcome to BMad Method, {user_name}!</output>
|
||||
<step n="3" goal="Ask user about THEIR work">
|
||||
<ask>Tell me about what you're working on. What's the goal?</ask>
|
||||
|
||||
<ask>What's your project called? {{#if project_name}}(Config shows: {{project_name}}){{/if}}</ask>
|
||||
<action>Set project_name</action>
|
||||
<template-output>project_name</template-output>
|
||||
<action>Analyze user's description using keyword detection:
|
||||
|
||||
<ask>Tell me about what you're building. What's the goal? are we adding on to something or starting fresh.</ask>
|
||||
- Level 0 keywords: "fix", "bug", "typo", "small change", "update", "patch", "one file"
|
||||
- Level 1 keywords: "simple", "basic", "small feature", "add", "minor", "single feature"
|
||||
- Level 2 keywords: "dashboard", "several features", "admin panel", "medium", "feature set"
|
||||
- Level 3 keywords: "platform", "integration", "complex", "system", "architecture"
|
||||
- Level 4 keywords: "enterprise", "multi-tenant", "multiple products", "ecosystem", "phased"
|
||||
</action>
|
||||
|
||||
<action>Analyze description to determine project type, level, and field type</action>
|
||||
<action>Set project_type (game or software)</action>
|
||||
<action>Set project_level (0-4 based on complexity)</action>
|
||||
<action>Set field_type (greenfield or brownfield based on description)</action>
|
||||
<action>Make initial determination:
|
||||
|
||||
<ask>Based on your description: Level {{project_level}} {{field_type}} {{project_type}} project.
|
||||
- project_type (game or software)
|
||||
- project_level (0-4) - tentative based on keywords
|
||||
- field_type (greenfield or brownfield)
|
||||
- confidence (high/medium/low) - based on clarity of description
|
||||
</action>
|
||||
|
||||
Is that correct? (y/n or tell me what's different)</ask>
|
||||
<check if="confidence == low OR description is ambiguous">
|
||||
<output>Thanks! Let me ask a few clarifying questions to make sure I route you correctly:</output>
|
||||
|
||||
<ask>1. Roughly how many distinct features or changes do you think this involves?
|
||||
|
||||
- Just one thing (e.g., fix a bug, add one button, update one API)
|
||||
- A small feature (2-5 related changes)
|
||||
- Several features (5-15 related things)
|
||||
- A major addition (15-40 things to do)
|
||||
- A large initiative (40+ changes across many areas)
|
||||
</ask>
|
||||
|
||||
<action>Adjust project_level based on response</action>
|
||||
|
||||
<ask>2. How much of the existing codebase will this touch?
|
||||
|
||||
- Single file or small area
|
||||
- One module or component
|
||||
- Multiple modules (2-4 areas)
|
||||
- Many modules with integration needs
|
||||
- System-wide changes
|
||||
</ask>
|
||||
|
||||
<action>Validate and adjust project_level based on scope</action>
|
||||
|
||||
<check if="project_type unclear">
|
||||
<ask>3. Is this a game or a software application?</ask>
|
||||
<action>Set project_type based on response</action>
|
||||
</check>
|
||||
</check>
|
||||
|
||||
<check if="found codebase BUT field_type still unclear">
|
||||
<ask>I see you have existing code here. Are you:
|
||||
|
||||
1. **Adding to or modifying** the existing codebase (brownfield)
|
||||
2. **Starting fresh** - the existing code is just a scaffold/template (greenfield)
|
||||
3. **Something else** - let me clarify
|
||||
|
||||
Your choice [1/2/3]:</ask>
|
||||
|
||||
<check if="choice == 1">
|
||||
<action>Set field_type = "brownfield"</action>
|
||||
</check>
|
||||
|
||||
<check if="choice == 2">
|
||||
<action>Set field_type = "greenfield"</action>
|
||||
<output>Got it - treating as greenfield despite the scaffold.</output>
|
||||
</check>
|
||||
|
||||
<check if="choice == 3">
|
||||
<ask>Please explain your situation:</ask>
|
||||
<action>Analyze explanation and set field_type accordingly</action>
|
||||
</check>
|
||||
</check>
|
||||
|
||||
<action>Build reasoning for suggestion</action>
|
||||
<action>Store detected_indicators (keywords, scope indicators, complexity signals)</action>
|
||||
|
||||
<output>Based on what you've described, I'm suggesting **Level {{project_level}}** because:
|
||||
|
||||
{{reasoning}} (detected: {{detected_indicators}})
|
||||
|
||||
Here's the complexity scale for reference:
|
||||
|
||||
**{{field_type}} Project Levels:**
|
||||
|
||||
- **Level 0** - Single atomic change (1 story) - bug fixes, typos, minor updates, single file changes
|
||||
- **Level 1** - Small feature (1-10 stories) - simple additions, isolated features, one module
|
||||
- **Level 2** - Medium feature set (5-15 stories) - dashboards, multiple related features, several modules
|
||||
- **Level 3** - Complex integration (12-40 stories) - platform features, major integrations, architectural changes
|
||||
- **Level 4** - Enterprise expansion (40+ stories) - multi-tenant, ecosystem changes, system-wide initiatives
|
||||
|
||||
**My suggestion:** Level {{project_level}} {{field_type}} {{project_type}} project
|
||||
</output>
|
||||
|
||||
<ask>Does this match what you're working on? (y/n or tell me what's different)</ask>
|
||||
|
||||
<check if="user confirms">
|
||||
<action>Use determined values</action>
|
||||
<action>Go to Step 4 (Load workflow path)</action>
|
||||
</check>
|
||||
|
||||
<check if="user corrects">
|
||||
<action>Update values based on corrections</action>
|
||||
<output>Updated to: Level {{project_level}} {{field_type}} {{project_type}}</output>
|
||||
<ask>Does that look right now? (y/n)</ask>
|
||||
<action>If yes, go to Step 4. If no, ask what needs adjustment and repeat.</action>
|
||||
</check>
|
||||
|
||||
<template-output>project_name</template-output>
|
||||
<template-output>project_type</template-output>
|
||||
<template-output>project_level</template-output>
|
||||
<template-output>field_type</template-output>
|
||||
|
||||
@ -4,7 +4,6 @@ Before calling this beta
|
||||
|
||||
- ensure sharing and indexed folders can be used in all flows
|
||||
- Brief and PRD update to be much more interactive similar to architecture and ux flows
|
||||
- Brownfield Guidance
|
||||
- level 0 and 1 further streamlined
|
||||
- leaner phase 4
|
||||
|
||||
@ -22,8 +21,3 @@ Aside from stability and bug fixes found during the alpha period - the main focu
|
||||
- MCP Injections based on installation selection
|
||||
- sub agent for opencode and claude code optimization
|
||||
- TDD Workflow Integration
|
||||
|
||||
# Post v0 Roadmap
|
||||
|
||||
- Centralized BMad Installer (instead of per project)
|
||||
-
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user