diff --git a/bmad-core/agents/architect.md b/bmad-core/agents/architect.md index c4929437..36f3a070 100644 --- a/bmad-core/agents/architect.md +++ b/bmad-core/agents/architect.md @@ -102,7 +102,7 @@ dependencies: - front-end-architecture-tmpl.yaml - fullstack-architecture-tmpl.yaml - brownfield-architecture-tmpl.yaml - - adr-tmpl.md + - adr-tmpl.yaml checklists: - architect-checklist.md data: diff --git a/bmad-core/tasks/create-adr.md b/bmad-core/tasks/create-adr.md index 1c16c086..423abb3c 100644 --- a/bmad-core/tasks/create-adr.md +++ b/bmad-core/tasks/create-adr.md @@ -40,7 +40,7 @@ Before creating the ADR, collect: ### 4. Create ADR File -Use the adr-tmpl.md template to create: +Use the adr-tmpl.yaml template to create: `docs/adr/NNNN-descriptive-title.md` Example: `0001-use-react-for-frontend.md` diff --git a/bmad-core/tasks/initialize-memory-bank.md b/bmad-core/tasks/initialize-memory-bank.md index c04abf59..8f56bb81 100644 --- a/bmad-core/tasks/initialize-memory-bank.md +++ b/bmad-core/tasks/initialize-memory-bank.md @@ -130,12 +130,12 @@ After creating initial files: ## Templates Use the memory bank templates from `bmad-core/templates/memory-bank/`: -- `projectbrief-tmpl.md` -- `productContext-tmpl.md` -- `systemPatterns-tmpl.md` -- `techContext-tmpl.md` -- `activeContext-tmpl.md` -- `progress-tmpl.md` +- `projectbrief-tmpl.yaml` +- `productContext-tmpl.yaml` +- `systemPatterns-tmpl.yaml` +- `techContext-tmpl.yaml` +- `activeContext-tmpl.yaml` +- `progress-tmpl.yaml` ## Integration Points diff --git a/bmad-core/templates/adr-tmpl.md b/bmad-core/templates/adr-tmpl.md deleted file mode 100644 index aa5b7643..00000000 --- a/bmad-core/templates/adr-tmpl.md +++ /dev/null @@ -1,121 +0,0 @@ -# [ADR-NNNN] [Title of Decision] - -**Status:** [Proposed | Accepted | Deprecated | Superseded by ADR-XXXX] -**Date:** [YYYY-MM-DD] -**Decision Makers:** [List key stakeholders involved] - -## Context - -[Describe the issue motivating this decision, and any context that influences or constrains the decision. This should be value-neutral, explaining forces at play without judging them.] - -### Problem Statement -[Clearly articulate the specific problem we're trying to solve in 1-2 sentences] - -### Current Situation -[Describe how things work today, if applicable] - -### Technical Context -[Any technical constraints, existing systems, or technical factors] - -### Business Context -[Business requirements, constraints, or goals that influence this decision] - -## Decision - -[State the decision that was made, starting with "We will..." Use active voice and be explicit about what is being decided] - -## Considered Alternatives - -### Option 1: [Name of Alternative] -**Description:** [Brief description of this approach] - -**Pros:** -- [Positive aspect] -- [Another positive aspect] - -**Cons:** -- [Negative aspect] -- [Another negative aspect] - -**Estimated Effort:** [High/Medium/Low or specific estimate] - -### Option 2: [Name of Alternative] -**Description:** [Brief description of this approach] - -**Pros:** -- [Positive aspect] -- [Another positive aspect] - -**Cons:** -- [Negative aspect] -- [Another negative aspect] - -**Estimated Effort:** [High/Medium/Low or specific estimate] - -### Option 3: [Name of Alternative] -**Description:** [Brief description of this approach] - -**Pros:** -- [Positive aspect] -- [Another positive aspect] - -**Cons:** -- [Negative aspect] -- [Another negative aspect] - -**Estimated Effort:** [High/Medium/Low or specific estimate] - -## Consequences - -### Positive Consequences -- [Good thing that will happen as a result] -- [Another good thing] -- [Performance/scalability/maintainability improvements] - -### Negative Consequences -- [Drawback or trade-off we're accepting] -- [Additional complexity or cost] -- [Things that will become more difficult] - -### Risks and Mitigations -| Risk | Probability | Impact | Mitigation Strategy | -|------|-------------|---------|-------------------| -| [Description of risk] | [High/Medium/Low] | [High/Medium/Low] | [How we'll address it] | -| [Another risk] | [High/Medium/Low] | [High/Medium/Low] | [How we'll address it] | - -## Implementation - -### Action Items -- [ ] [Specific action needed to implement this decision] -- [ ] [Another action item] -- [ ] [Documentation to update] - -### Timeline -[When will this be implemented? Any phases or milestones?] - -### Success Metrics -- [How will we know if this decision was successful?] -- [What metrics will we track?] -- [When will we evaluate the outcome?] - -## References - -### Related ADRs -- [ADR-XXXX] - [Title and how it relates] -- [ADR-YYYY] - [Title and how it relates] - -### External References -- [Link to relevant documentation, articles, or resources] -- [Link to architectural diagrams or models] - -## Notes - -[Any additional context, dissenting opinions, or information that doesn't fit elsewhere] - ---- - -### Metadata -- **Review Date:** [When should this decision be reviewed?] -- **Tags:** [architecture, security, performance, etc.] -- **Supersedes:** [ADR-XXXX if applicable] -- **Superseded By:** [ADR-YYYY if applicable] \ No newline at end of file diff --git a/bmad-core/templates/adr-tmpl.yaml b/bmad-core/templates/adr-tmpl.yaml new file mode 100644 index 00000000..3701c0a7 --- /dev/null +++ b/bmad-core/templates/adr-tmpl.yaml @@ -0,0 +1,245 @@ +template: + id: adr-template-v1 + name: Architectural Decision Record (ADR) + version: 1.0 + output: + format: markdown + filename: docs/adr/{{adr_number}}-{{adr_slug}}.md + title: "{{adr_number}}. {{adr_title}}" + description: | + Template for creating Architectural Decision Records using Michael Nygard's format. + Documents significant architectural decisions with context, alternatives, and consequences. + +workflow: + mode: guided + instruction: | + Create an ADR for a significant architectural decision. Gather context about the problem, + alternatives considered, and the chosen solution before starting. + +sections: + - id: header + title: ADR Header + instruction: Basic ADR information + template: | + # {{adr_number}}. {{adr_title}} + + **Date**: {{decision_date}} + + **Status**: {{status}} + + **Deciders**: {{deciders}} + + **Technical Story**: {{technical_story}} + + - id: context + title: Context and Problem Statement + instruction: Describe the situation requiring a decision + template: | + ## Context and Problem Statement + + {{problem_context}} + + ### Current Situation + {{current_situation}} + + ### Driving Forces + {{#each driving_forces}} + - {{this}} + {{/each}} + + ### Requirements + {{#each requirements}} + - {{this}} + {{/each}} + + - id: alternatives + title: Considered Alternatives + instruction: List and analyze all alternatives considered + template: | + ## Considered Alternatives + + {{#each alternatives}} + ### {{this.name}} + + **Description**: {{this.description}} + + **Pros**: + {{#each this.pros}} + - {{this}} + {{/each}} + + **Cons**: + {{#each this.cons}} + - {{this}} + {{/each}} + + {{#if this.cost}} + **Cost**: {{this.cost}} + {{/if}} + + {{#if this.complexity}} + **Complexity**: {{this.complexity}} + {{/if}} + + {{/each}} + + - id: decision + title: Decision + instruction: State the chosen solution clearly + template: | + ## Decision + + We will {{decision_statement}}. + + ### Rationale + {{decision_rationale}} + + ### Key Factors + {{#each decision_factors}} + - {{this}} + {{/each}} + + - id: consequences + title: Consequences + instruction: Document both positive and negative consequences + template: | + ## Consequences + + ### Positive Consequences + {{#each positive_consequences}} + - {{this}} + {{/each}} + + ### Negative Consequences + {{#each negative_consequences}} + - {{this}} + {{/each}} + + ### Risks and Mitigations + {{#each risks}} + - **Risk**: {{this.risk}} + - **Mitigation**: {{this.mitigation}} + {{/each}} + + - id: implementation + title: Implementation + instruction: Define concrete next steps + template: | + ## Implementation + + ### Next Steps + {{#each implementation_steps}} + {{@index + 1}}. {{this}} + {{/each}} + + ### Timeline + {{implementation_timeline}} + + ### Success Criteria + {{#each success_criteria}} + - {{this}} + {{/each}} + + ### Verification + {{verification_approach}} + + - id: compliance + title: Compliance and Standards + instruction: Document compliance considerations + template: | + ## Compliance and Standards + + {{#if compliance_requirements}} + ### Compliance Requirements + {{#each compliance_requirements}} + - {{this}} + {{/each}} + {{/if}} + + {{#if standards_alignment}} + ### Standards Alignment + {{#each standards_alignment}} + - {{this}} + {{/each}} + {{/if}} + + {{#if architectural_principles}} + ### Architectural Principles + {{#each architectural_principles}} + - {{this}} + {{/each}} + {{/if}} + + - id: related + title: Related Information + instruction: Link to related decisions and documentation + template: | + ## Related Information + + {{#if related_adrs}} + ### Related ADRs + {{#each related_adrs}} + - {{this}} + {{/each}} + {{/if}} + + {{#if references}} + ### References + {{#each references}} + - {{this}} + {{/each}} + {{/if}} + + {{#if superseded_by}} + ### Superseded By + {{superseded_by}} + {{/if}} + + {{#if supersedes}} + ### Supersedes + {{supersedes}} + {{/if}} + +validation: + required_fields: + - adr_number + - adr_title + - decision_date + - status + - problem_context + - alternatives + - decision_statement + - positive_consequences + - negative_consequences + - implementation_steps + +prompts: + adr_number: "ADR number (format: 0001, 0002, etc.)" + adr_title: "Descriptive title for this ADR" + adr_slug: "URL-friendly slug (auto-generated from title if not provided)" + decision_date: "Date this decision was made" + status: "Status of this ADR (Proposed, Accepted, Superseded, Deprecated)" + deciders: "Who made this decision?" + technical_story: "Link to related story/issue if applicable" + problem_context: "Describe the problem or situation requiring a decision" + current_situation: "What is the current state?" + driving_forces: "List forces driving the need for this decision" + requirements: "List requirements that influence the decision" + alternatives: "List all alternatives considered with pros/cons" + decision_statement: "Complete this: 'We will...'" + decision_rationale: "Why was this alternative chosen?" + decision_factors: "Key factors that influenced the decision" + positive_consequences: "List positive outcomes expected" + negative_consequences: "List negative consequences or trade-offs" + risks: "List risks and their mitigations" + implementation_steps: "List concrete next steps for implementation" + implementation_timeline: "When will this be implemented?" + success_criteria: "How will we know this was successful?" + verification_approach: "How will we verify the decision is working?" + compliance_requirements: "Any compliance considerations" + standards_alignment: "How does this align with standards?" + architectural_principles: "Which architectural principles does this support?" + related_adrs: "Links to related ADRs" + references: "Links to supporting documentation" + superseded_by: "If superseded, link to newer ADR" + supersedes: "If this supersedes others, list them" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/activeContext-tmpl.md b/bmad-core/templates/memory-bank/activeContext-tmpl.md deleted file mode 100644 index 83ada18c..00000000 --- a/bmad-core/templates/memory-bank/activeContext-tmpl.md +++ /dev/null @@ -1,159 +0,0 @@ -# Active Context - -*Current work focus, recent changes, and immediate priorities* - -## Current Sprint/Iteration - -**Sprint**: [Name/Number] -**Duration**: [Start Date] - [End Date] -**Theme**: [Main focus of this sprint] -**Status**: [On Track/At Risk/Blocked] - -## Active Work Items - -### In Progress -| Item | Type | Assignee | Status | Notes | -|------|------|----------|--------|-------| -| [ID: Title] | Story/Bug/Task | [Who] | [% complete] | [Current state] | -| [ID: Title] | Story/Bug/Task | [Who] | [% complete] | [Blockers] | - -### Up Next (Priority Order) -1. **[ID: Title]** - [Brief description] - - Dependencies: [What needs to complete first] - - Estimate: [Size/effort] - -2. **[ID: Title]** - [Brief description] - - Ready to start: [Yes/No - why] - -### Recently Completed -| Item | Completed | Key Changes | -|------|-----------|-------------| -| [ID: Title] | [Date] | [What was done] | -| [ID: Title] | [Date] | [Impact/changes] | - -## Recent Decisions - -### Decision 1: [Title] -- **Date**: [When decided] -- **Context**: [Why needed] -- **Choice**: [What was decided] -- **Impact**: [What changes] -- **ADR**: [Link if documented] - -### Decision 2: [Title] -- **Date**: [When decided] -- **Choice**: [What was decided] -- **Rationale**: [Key reasoning] - -## Current Technical Focus - -### Active Development Areas -- **Module/Component**: [What's being worked on] - - Changes: [What's changing] - - Approach: [How we're doing it] - - Progress: [Current state] - -### Refactoring/Tech Debt -- **Area**: [What's being improved] - - Reason: [Why now] - - Scope: [What's included] - - Status: [Progress] - -## Important Patterns & Preferences - -### Coding Patterns -- **Pattern 1**: [Description] - - Example: [Where to see it] - - When to use: [Guidance] - -- **Pattern 2**: [Description] - - Rationale: [Why this way] - -### Team Preferences -- **Code Style**: [Key preferences beyond standards] -- **PR Process**: [How we handle reviews] -- **Communication**: [How we coordinate] -- **Documentation**: [What we document when] - -## Recent Learnings & Insights - -### Technical Discoveries -1. **Learning**: [What we learned] - - Context: [How we discovered it] - - Application: [How it affects our approach] - -2. **Insight**: [What we realized] - - Impact: [What changes as a result] - -### Process Improvements -- **What Changed**: [Process adjustment] -- **Why**: [Problem it solves] -- **Result**: [Impact so far] - -## Open Questions & Investigations - -### Technical Questions -1. **Question**: [What we need to figure out] - - Context: [Why it matters] - - Options: [Possible approaches] - - Timeline: [When we need answers] - -2. **Investigation**: [What we're researching] - - Purpose: [Why we're looking into it] - - Progress: [What we've found so far] - -### Product Questions -- **Clarification Needed**: [What's unclear] - - Impact: [What's blocked] - - Who to ask: [Stakeholder] - -## Blockers & Risks - -### Current Blockers -| Blocker | Impact | Owner | ETA | -|---------|--------|-------|-----| -| [Description] | [What can't proceed] | [Who's resolving] | [Expected resolution] | - -### Active Risks -| Risk | Probability | Impact | Mitigation | -|------|-------------|--------|------------| -| [Description] | High/Med/Low | High/Med/Low | [What we're doing] | - -## Environment & Tool Updates - -### Recent Changes -- **Tool/Version Update**: [What changed] - - Date: [When] - - Impact: [How it affects development] - - Action: [What developers need to do] - -### Pending Updates -- **Planned Change**: [What will change] - - Timeline: [When] - - Preparation: [What to do beforehand] - -## Next Session Priorities - -### Immediate Next Steps -1. [Specific task to tackle first] -2. [Second priority if first is blocked] -3. [Third priority or investigation] - -### Context for Next Session -- **Where we left off**: [Current state] -- **Key files**: [Important files to review] -- **Gotchas**: [Things to remember] -- **Dependencies**: [What to check first] - -## Communication Log - -### Recent Important Messages -- **Date**: [Message summary or decision] -- **Date**: [Key communication] - -### Pending Communications -- **Need to inform**: [Who about what] -- **Awaiting response**: [What we're waiting for] - ---- -*This document is the most frequently updated. It represents the current state and immediate context needed to continue work effectively.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/activeContext-tmpl.yaml b/bmad-core/templates/memory-bank/activeContext-tmpl.yaml new file mode 100644 index 00000000..a84d7685 --- /dev/null +++ b/bmad-core/templates/memory-bank/activeContext-tmpl.yaml @@ -0,0 +1,266 @@ +template: + id: memory-bank-activecontext-v1 + name: Memory Bank - Active Context + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/activeContext.md + title: "Active Context" + description: | + Current work focus, recent changes, and immediate priorities. + This document is the most frequently updated. It represents the current state and immediate context needed to continue work effectively. + +workflow: + mode: guided + instruction: | + Document the current state of work, active decisions, and immediate next steps. + This file should be updated frequently to maintain accurate context. + +sections: + - id: current-sprint + title: Current Sprint/Iteration + instruction: Capture current sprint information + template: | + **Sprint**: {{sprint_name}} + **Duration**: {{start_date}} - {{end_date}} + **Theme**: {{sprint_theme}} + **Status**: {{sprint_status}} + + - id: active-work + title: Active Work Items + instruction: Document what's currently being worked on + template: | + ### In Progress + | Item | Type | Assignee | Status | Notes | + |------|------|----------|--------|-------| + {{#each in_progress_items}} + | {{this.id}}: {{this.title}} | {{this.type}} | {{this.assignee}} | {{this.completion}}% complete | {{this.notes}} | + {{/each}} + + ### Up Next (Priority Order) + {{#each upcoming_items}} + {{@index + 1}}. **{{this.id}}: {{this.title}}** - {{this.description}} + - Dependencies: {{this.dependencies}} + - Estimate: {{this.estimate}} + {{/each}} + + ### Recently Completed + | Item | Completed | Key Changes | + |------|-----------|-------------| + {{#each recent_completions}} + | {{this.id}}: {{this.title}} | {{this.date}} | {{this.changes}} | + {{/each}} + + - id: recent-decisions + title: Recent Decisions + instruction: Document decisions made recently + template: | + {{#each recent_decisions}} + ### Decision {{@index + 1}}: {{this.title}} + - **Date**: {{this.date}} + - **Context**: {{this.context}} + - **Choice**: {{this.choice}} + - **Impact**: {{this.impact}} + {{#if this.adr_link}} + - **ADR**: {{this.adr_link}} + {{/if}} + + {{/each}} + + - id: technical-focus + title: Current Technical Focus + instruction: Document active development areas + template: | + ### Active Development Areas + {{#each active_areas}} + - **{{this.area}}**: {{this.description}} + - Changes: {{this.changes}} + - Approach: {{this.approach}} + - Progress: {{this.progress}} + + {{/each}} + + {{#if refactoring_work}} + ### Refactoring/Tech Debt + {{#each refactoring_work}} + - **Area**: {{this.area}} + - Reason: {{this.reason}} + - Scope: {{this.scope}} + - Status: {{this.status}} + + {{/each}} + {{/if}} + + - id: patterns-preferences + title: Important Patterns & Preferences + instruction: Document coding patterns and team preferences discovered + template: | + ### Coding Patterns + {{#each coding_patterns}} + - **{{this.pattern}}**: {{this.description}} + {{#if this.example}} + - Example: {{this.example}} + {{/if}} + - When to use: {{this.usage_guidance}} + + {{/each}} + + ### Team Preferences + - **Code Style**: {{code_style_preferences}} + - **PR Process**: {{pr_process}} + - **Communication**: {{communication_style}} + - **Documentation**: {{documentation_approach}} + + - id: learnings-insights + title: Recent Learnings & Insights + instruction: Capture technical discoveries and process improvements + template: | + ### Technical Discoveries + {{#each technical_discoveries}} + {{@index + 1}}. **Learning**: {{this.learning}} + - Context: {{this.context}} + - Application: {{this.application}} + + {{/each}} + + {{#if process_improvements}} + ### Process Improvements + {{#each process_improvements}} + - **What Changed**: {{this.change}} + - **Why**: {{this.reason}} + - **Result**: {{this.result}} + + {{/each}} + {{/if}} + + - id: open-questions + title: Open Questions & Investigations + instruction: Document unresolved questions and ongoing investigations + template: | + ### Technical Questions + {{#each technical_questions}} + {{@index + 1}}. **Question**: {{this.question}} + - Context: {{this.context}} + - Options: {{this.options}} + - Timeline: {{this.timeline}} + + {{/each}} + + {{#if product_questions}} + ### Product Questions + {{#each product_questions}} + - **Clarification Needed**: {{this.clarification}} + - Impact: {{this.impact}} + - Who to ask: {{this.contact}} + + {{/each}} + {{/if}} + + - id: blockers-risks + title: Blockers & Risks + instruction: Document current blockers and active risks + template: | + ### Current Blockers + | Blocker | Impact | Owner | ETA | + |---------|--------|-------|-----| + {{#each blockers}} + | {{this.description}} | {{this.impact}} | {{this.owner}} | {{this.eta}} | + {{/each}} + + ### Active Risks + | Risk | Probability | Impact | Mitigation | + |------|-------------|--------|------------| + {{#each risks}} + | {{this.description}} | {{this.probability}} | {{this.impact}} | {{this.mitigation}} | + {{/each}} + + - id: environment-updates + title: Environment & Tool Updates + instruction: Document recent and pending environment changes + template: | + {{#if recent_changes}} + ### Recent Changes + {{#each recent_changes}} + - **{{this.change}}**: {{this.description}} + - Date: {{this.date}} + - Impact: {{this.impact}} + - Action: {{this.required_action}} + + {{/each}} + {{/if}} + + {{#if pending_updates}} + ### Pending Updates + {{#each pending_updates}} + - **{{this.update}}**: {{this.description}} + - Timeline: {{this.timeline}} + - Preparation: {{this.preparation}} + + {{/each}} + {{/if}} + + - id: next-session + title: Next Session Priorities + instruction: Set up context for the next work session + template: | + ### Immediate Next Steps + {{#each next_steps}} + {{@index + 1}}. {{this}} + {{/each}} + + ### Context for Next Session + - **Where we left off**: {{current_state}} + - **Key files**: {{key_files}} + - **Gotchas**: {{gotchas}} + - **Dependencies**: {{dependencies_check}} + + - id: communication-log + title: Communication Log + instruction: Track important messages and pending communications + template: | + {{#if recent_messages}} + ### Recent Important Messages + {{#each recent_messages}} + - **{{this.date}}**: {{this.message}} + {{/each}} + {{/if}} + + {{#if pending_communications}} + ### Pending Communications + {{#each pending_communications}} + - **Need to inform**: {{this.recipient}} about {{this.topic}} + {{/each}} + {{/if}} + +prompts: + sprint_name: "Current sprint name/number" + start_date: "Sprint start date" + end_date: "Sprint end date" + sprint_theme: "Main focus of this sprint" + sprint_status: "Current sprint status (On Track/At Risk/Blocked)" + in_progress_items: "List items currently being worked on" + upcoming_items: "List prioritized upcoming items" + recent_completions: "List recently completed items" + recent_decisions: "List recent technical/product decisions" + active_areas: "What modules/components are being actively developed?" + refactoring_work: "Any refactoring or tech debt work in progress?" + coding_patterns: "Important coding patterns discovered/established" + code_style_preferences: "Key code style preferences beyond standards" + pr_process: "How the team handles pull requests" + communication_style: "How the team coordinates" + documentation_approach: "What gets documented and when" + technical_discoveries: "Recent technical learnings" + process_improvements: "Process changes made recently" + technical_questions: "Open technical questions" + product_questions: "Product clarifications needed" + blockers: "Current blocking issues" + risks: "Active risks to track" + recent_changes: "Recent environment/tool changes" + pending_updates: "Planned environment updates" + next_steps: "Immediate priorities for next session" + current_state: "Where work was left off" + key_files: "Important files to review" + gotchas: "Things to remember/watch out for" + dependencies_check: "What to verify first" + recent_messages: "Important recent communications" + pending_communications: "Who needs to be informed about what" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/productContext-tmpl.md b/bmad-core/templates/memory-bank/productContext-tmpl.md deleted file mode 100644 index 3d8f0a60..00000000 --- a/bmad-core/templates/memory-bank/productContext-tmpl.md +++ /dev/null @@ -1,121 +0,0 @@ -# Product Context - -*The "why" behind the project - problems, solutions, and user experience* - -## Problem Statement - -### Core Problem -[Clear description of the main problem this project solves] - -### Current State -- **How it's done today**: [Current approach/workarounds] -- **Pain points**: [Specific issues users face] -- **Impact**: [Cost/consequences of not solving] - -### Root Causes -1. [Underlying cause 1] -2. [Underlying cause 2] -3. [Underlying cause 3] - -## Solution Approach - -### Our Solution -[High-level description of how we're solving the problem] - -### Why This Approach -- [Reason 1 - why this solution fits] -- [Reason 2 - advantages over alternatives] -- [Reason 3 - alignment with constraints] - -### Key Innovations -- [What's new/different about our approach] -- [Unique value propositions] - -## User Experience Vision - -### User Journey -1. **Discovery**: [How users find/access the solution] -2. **Onboarding**: [Initial user experience] -3. **Core Usage**: [Primary interaction patterns] -4. **Value Realization**: [When/how users see benefits] - -### Design Principles -- **Principle 1**: [Description and rationale] -- **Principle 2**: [Description and rationale] -- **Principle 3**: [Description and rationale] - -### Success Metrics -- **User Satisfaction**: [How measured] -- **Adoption Rate**: [Target metrics] -- **Task Completion**: [Efficiency gains] - -## Expected Outcomes - -### Short-term (3 months) -- [Immediate benefit 1] -- [Immediate benefit 2] -- [Quick win] - -### Medium-term (6-12 months) -- [Broader impact 1] -- [Broader impact 2] -- [Growth indicator] - -### Long-term (1+ years) -- [Strategic outcome 1] -- [Strategic outcome 2] -- [Market position] - -## User Personas - -### Primary Persona: [Name] -- **Role**: [Job title/function] -- **Goals**: [What they want to achieve] -- **Frustrations**: [Current pain points] -- **Needs**: [What would help them succeed] -- **Technical Level**: [Expertise level] - -### Secondary Persona: [Name] -- **Role**: [Job title/function] -- **Goals**: [What they want to achieve] -- **Needs**: [What would help them succeed] - -## Competitive Landscape - -### Existing Solutions -| Solution | Strengths | Weaknesses | Our Differentiation | -|----------|-----------|------------|-------------------| -| [Name] | [What they do well] | [Gaps] | [How we're better] | -| [Name] | [What they do well] | [Gaps] | [How we're better] | - -### Market Opportunity -[Why now is the right time for this solution] - -## Assumptions and Risks - -### Key Assumptions -1. [Assumption about users/market] -2. [Assumption about technology] -3. [Assumption about adoption] - -### Validation Plans -- [How we'll test assumption 1] -- [How we'll test assumption 2] -- [How we'll test assumption 3] - -## Integration with Ecosystem - -### Upstream Dependencies -- [Systems/processes that feed into ours] -- [Data sources required] - -### Downstream Impact -- [Systems/processes affected by our solution] -- [Expected changes in workflows] - -### Partner Integrations -- [Third-party services/APIs] -- [Collaboration requirements] - ---- -*This document explains why the project exists and what success looks like from a user perspective.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/productContext-tmpl.yaml b/bmad-core/templates/memory-bank/productContext-tmpl.yaml new file mode 100644 index 00000000..31779989 --- /dev/null +++ b/bmad-core/templates/memory-bank/productContext-tmpl.yaml @@ -0,0 +1,192 @@ +template: + id: memory-bank-productcontext-v1 + name: Memory Bank - Product Context + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/productContext.md + title: "Product Context" + description: | + The "why" behind the project - problems, solutions, and user experience. + This document explains why the project exists and what success looks like from a user perspective. + +workflow: + mode: guided + instruction: | + Focus on understanding the problem space, solution approach, and expected outcomes. + Draw from user research, market analysis, and stakeholder interviews. + +sections: + - id: problem-statement + title: Problem Statement + instruction: Clearly articulate the problem being solved + template: | + ### Core Problem + {{core_problem_description}} + + ### Current State + - **How it's done today**: {{current_approach}} + - **Pain points**: {{pain_points}} + - **Impact**: {{problem_impact}} + + ### Root Causes + {{#each root_causes}} + {{@index + 1}}. {{this}} + {{/each}} + + - id: solution-approach + title: Solution Approach + instruction: Describe how we're solving the problem + template: | + ### Our Solution + {{solution_description}} + + ### Why This Approach + {{#each approach_reasons}} + - {{this}} + {{/each}} + + ### Key Innovations + {{#each innovations}} + - {{this}} + {{/each}} + + - id: user-experience + title: User Experience Vision + instruction: Define the user journey and design principles + template: | + ### User Journey + 1. **Discovery**: {{discovery_phase}} + 2. **Onboarding**: {{onboarding_phase}} + 3. **Core Usage**: {{core_usage_phase}} + 4. **Value Realization**: {{value_realization_phase}} + + ### Design Principles + {{#each design_principles}} + - **{{this.principle}}**: {{this.description}} + {{/each}} + + ### Success Metrics + - **User Satisfaction**: {{user_satisfaction_metric}} + - **Adoption Rate**: {{adoption_rate_metric}} + - **Task Completion**: {{task_completion_metric}} + + - id: expected-outcomes + title: Expected Outcomes + instruction: Define short, medium, and long-term outcomes + template: | + ### Short-term (3 months) + {{#each short_term_outcomes}} + - {{this}} + {{/each}} + + ### Medium-term (6-12 months) + {{#each medium_term_outcomes}} + - {{this}} + {{/each}} + + ### Long-term (1+ years) + {{#each long_term_outcomes}} + - {{this}} + {{/each}} + + - id: user-personas + title: User Personas + instruction: Define primary and secondary personas + template: | + ### Primary Persona: {{primary_persona_name}} + - **Role**: {{primary_persona_role}} + - **Goals**: {{primary_persona_goals}} + - **Frustrations**: {{primary_persona_frustrations}} + - **Needs**: {{primary_persona_needs}} + - **Technical Level**: {{primary_persona_tech_level}} + + ### Secondary Persona: {{secondary_persona_name}} + - **Role**: {{secondary_persona_role}} + - **Goals**: {{secondary_persona_goals}} + - **Needs**: {{secondary_persona_needs}} + + - id: competitive-landscape + title: Competitive Landscape + instruction: Analyze existing solutions and our differentiation + template: | + ### Existing Solutions + | Solution | Strengths | Weaknesses | Our Differentiation | + |----------|-----------|------------|-------------------| + {{#each competitors}} + | {{this.name}} | {{this.strengths}} | {{this.weaknesses}} | {{this.differentiation}} | + {{/each}} + + ### Market Opportunity + {{market_opportunity}} + + - id: assumptions-risks + title: Assumptions and Risks + instruction: Document key assumptions and validation plans + template: | + ### Key Assumptions + {{#each assumptions}} + {{@index + 1}}. {{this}} + {{/each}} + + ### Validation Plans + {{#each validation_plans}} + - {{this}} + {{/each}} + + - id: ecosystem-integration + title: Integration with Ecosystem + instruction: Define how this fits into the larger ecosystem + template: | + ### Upstream Dependencies + {{#each upstream_dependencies}} + - {{this}} + {{/each}} + + ### Downstream Impact + {{#each downstream_impacts}} + - {{this}} + {{/each}} + + ### Partner Integrations + {{#each partner_integrations}} + - {{this}} + {{/each}} + +prompts: + core_problem_description: "Clearly describe the main problem this project solves" + current_approach: "How is this problem currently addressed (workarounds, manual processes)?" + pain_points: "What specific pain points do users face?" + problem_impact: "What is the cost/consequence of not solving this problem?" + root_causes: "List 3-5 underlying causes of the problem" + solution_description: "Describe our solution approach in one paragraph" + approach_reasons: "Why is this the right approach? (list 3-4 reasons)" + innovations: "What's new or different about our approach?" + discovery_phase: "How will users find/access the solution?" + onboarding_phase: "Describe the initial user experience" + core_usage_phase: "Describe primary interaction patterns" + value_realization_phase: "When/how will users see benefits?" + design_principles: "List 3 design principles with descriptions" + user_satisfaction_metric: "How will user satisfaction be measured?" + adoption_rate_metric: "What are the target adoption metrics?" + task_completion_metric: "What efficiency gains are expected?" + short_term_outcomes: "List immediate benefits (3 months)" + medium_term_outcomes: "List broader impacts (6-12 months)" + long_term_outcomes: "List strategic outcomes (1+ years)" + primary_persona_name: "Name for primary user persona" + primary_persona_role: "Primary persona's job title/function" + primary_persona_goals: "What they want to achieve" + primary_persona_frustrations: "Current pain points" + primary_persona_needs: "What would help them succeed" + primary_persona_tech_level: "Technical expertise level" + secondary_persona_name: "Name for secondary persona" + secondary_persona_role: "Secondary persona's role" + secondary_persona_goals: "What they want to achieve" + secondary_persona_needs: "What would help them" + competitors: "List existing solutions with analysis" + market_opportunity: "Why is now the right time for this solution?" + assumptions: "List key assumptions about users/market/technology" + validation_plans: "How will each assumption be tested?" + upstream_dependencies: "What systems/processes feed into ours?" + downstream_impacts: "What systems/processes are affected by our solution?" + partner_integrations: "What third-party services/APIs are needed?" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/progress-tmpl.md b/bmad-core/templates/memory-bank/progress-tmpl.md deleted file mode 100644 index 3d68ef90..00000000 --- a/bmad-core/templates/memory-bank/progress-tmpl.md +++ /dev/null @@ -1,167 +0,0 @@ -# Progress - -*Project state tracking - what's done, what's in progress, known issues, and evolution* - -## Project Status Overview - -**Overall Completion**: [X%] -**Phase**: [Current phase name] -**Health**: [Green/Yellow/Red] -**Last Updated**: [Date] - -## Feature Completion Status - -### Completed Features -| Feature | Version | Completed | Key Capabilities | -|---------|---------|-----------|------------------| -| [Feature Name] | v1.0 | [Date] | [What it does] | -| [Feature Name] | v1.0 | [Date] | [Core functionality] | -| [Feature Name] | v2.0 | [Date] | [Enhanced capabilities] | - -### In Progress Features -| Feature | Progress | Target | Status | Notes | -|---------|----------|--------|--------|--------| -| [Feature Name] | 75% | [Date] | On Track | [Current focus] | -| [Feature Name] | 40% | [Date] | At Risk | [Blocker/issue] | -| [Feature Name] | 10% | [Date] | Planning | [Next steps] | - -### Upcoming Features -| Feature | Priority | Planned Start | Dependencies | -|---------|----------|---------------|--------------| -| [Feature Name] | High | [Date] | [What must complete first] | -| [Feature Name] | Medium | [Quarter] | [Prerequisites] | -| [Feature Name] | Low | [TBD] | [Considerations] | - -## Sprint/Iteration History - -### Recent Sprints -| Sprint | Duration | Completed | Velocity | Key Achievements | -|--------|----------|-----------|----------|------------------| -| [Sprint N] | [Dates] | 8/10 stories | 34 pts | [Major accomplishments] | -| [Sprint N-1] | [Dates] | 10/10 stories | 42 pts | [What was delivered] | -| [Sprint N-2] | [Dates] | 7/8 stories | 28 pts | [Highlights] | - -### Velocity Trend -- **Average Velocity**: [X points/sprint] -- **Trend**: [Increasing/Stable/Decreasing] -- **Factors**: [What's affecting velocity] - -## Quality Metrics - -### Test Coverage -| Type | Coverage | Target | Status | -|------|----------|--------|--------| -| Unit Tests | [X%] | 80% | [Met/Below] | -| Integration | [X%] | 70% | [Status] | -| E2E | [X%] | 60% | [Status] | - -### Code Quality -- **Technical Debt**: [High/Medium/Low] -- **Code Coverage**: [X%] -- **Complexity**: [Metrics] -- **Standards Compliance**: [Status] - -## Known Issues & Bugs - -### Critical Issues -| Issue | Impact | Workaround | Fix ETA | -|-------|--------|------------|---------| -| [Description] | [User impact] | [Temporary solution] | [Date/Sprint] | - -### Major Issues -| Issue | Component | Status | Assigned | -|-------|-----------|--------|----------| -| [Bug description] | [Module] | In Progress | [Developer] | -| [Bug description] | [Module] | Backlog | [Unassigned] | - -### Technical Debt Registry -| Debt Item | Impact | Effort | Priority | Plan | -|-----------|--------|--------|----------|------| -| [Legacy code area] | High | Large | P1 | [Refactor in Q2] | -| [Outdated library] | Medium | Medium | P2 | [Update next sprint] | -| [Code duplication] | Low | Small | P3 | [As time permits] | - -## Evolution of Key Decisions - -### Architecture Evolution -| Version | Change | Rationale | Impact | -|---------|--------|-----------|---------| -| v1.0 | Monolithic | Speed to market | Simple deployment | -| v2.0 | Modular monolith | Maintainability | Better separation | -| v3.0 | [Planned] Services | Scalability | Independent scaling | - -### Technology Changes -| Date | From | To | Reason | Status | -|------|------|-----|--------|--------| -| [Date] | [Old tech] | [New tech] | [Why changed] | Complete | -| [Date] | [Old version] | [New version] | [Security/features] | In Progress | - -### Process Evolution -| Change | When | Why | Result | -|--------|------|-----|--------| -| [Process change] | [Date] | [Problem solved] | [Improvement] | -| [New practice] | [Date] | [Need addressed] | [Impact] | - -## Release History - -### Recent Releases -| Version | Date | Major Changes | Breaking Changes | -|---------|------|---------------|------------------| -| v2.3.0 | [Date] | [Feature list] | None | -| v2.2.0 | [Date] | [Features/fixes] | [API change] | -| v2.1.0 | [Date] | [What shipped] | None | - -### Upcoming Releases -| Version | Target Date | Planned Features | Risks | -|---------|-------------|------------------|--------| -| v2.4.0 | [Date] | [What's planned] | [Dependencies] | -| v3.0.0 | [Quarter] | [Major changes] | [Migration needs] | - -## Performance Trends - -### System Performance -| Metric | Current | Target | Trend | Notes | -|--------|---------|--------|--------|-------| -| Response Time | [Xms] | <200ms | ↓ Improving | [Recent optimizations] | -| Throughput | [X rps] | >1000 rps | → Stable | [At capacity] | -| Error Rate | [X%] | <0.1% | ↓ Improving | [Recent fixes] | - -### User Metrics -| Metric | Current | Last Month | Trend | -|--------|---------|------------|--------| -| Active Users | [Number] | [Number] | ↑ [X%] | -| Feature Adoption | [X%] | [X%] | ↑ Growing | -| User Satisfaction | [Score] | [Score] | → Stable | - -## Lessons Learned - -### What's Working Well -1. **Practice/Decision**: [What we did] - - Result: [Positive outcome] - - Continue: [Why we'll keep doing it] - -2. **Technology Choice**: [What we chose] - - Benefit: [How it helps] - -### What Needs Improvement -1. **Challenge**: [What's not working] - - Impact: [Problems it causes] - - Plan: [How we'll address it] - -2. **Process Gap**: [What's missing] - - Next Step: [Improvement plan] - -## Risk Register - -### Mitigated Risks -| Risk | Mitigation | Result | -|------|------------|--------| -| [Past risk] | [What we did] | [Outcome] | - -### Active Risks -| Risk | Probability | Impact | Mitigation Plan | -|------|-------------|--------|-----------------| -| [Current risk] | High/Med/Low | High/Med/Low | [Plan to address] | - ---- -*This document tracks project progress and evolution. It provides historical context and current status for planning and decision-making.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/progress-tmpl.yaml b/bmad-core/templates/memory-bank/progress-tmpl.yaml new file mode 100644 index 00000000..b0439732 --- /dev/null +++ b/bmad-core/templates/memory-bank/progress-tmpl.yaml @@ -0,0 +1,241 @@ +template: + id: memory-bank-progress-v1 + name: Memory Bank - Progress + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/progress.md + title: "Progress" + description: | + Project state tracking - what's done, what's in progress, known issues, and evolution. + This document tracks project progress and evolution. It provides historical context and current status for planning and decision-making. + +workflow: + mode: guided + instruction: | + Document the complete project progress including completed features, ongoing work, + technical metrics, and the evolution of decisions over time. + +sections: + - id: project-status + title: Project Status Overview + instruction: High-level project status + template: | + **Overall Completion**: {{completion_percentage}}% + **Phase**: {{current_phase}} + **Health**: {{project_health}} + **Last Updated**: {{last_updated}} + + - id: feature-completion + title: Feature Completion Status + instruction: Track feature delivery status + template: | + ### Completed Features + | Feature | Version | Completed | Key Capabilities | + |---------|---------|-----------|------------------| + {{#each completed_features}} + | {{this.name}} | {{this.version}} | {{this.date}} | {{this.capabilities}} | + {{/each}} + + ### In Progress Features + | Feature | Progress | Target | Status | Notes | + |---------|----------|--------|--------|--------| + {{#each in_progress_features}} + | {{this.name}} | {{this.progress}}% | {{this.target}} | {{this.status}} | {{this.notes}} | + {{/each}} + + ### Upcoming Features + | Feature | Priority | Planned Start | Dependencies | + |---------|----------|---------------|--------------| + {{#each upcoming_features}} + | {{this.name}} | {{this.priority}} | {{this.planned_start}} | {{this.dependencies}} | + {{/each}} + + - id: sprint-history + title: Sprint/Iteration History + instruction: Track sprint performance and velocity + template: | + ### Recent Sprints + | Sprint | Duration | Completed | Velocity | Key Achievements | + |--------|----------|-----------|----------|------------------| + {{#each recent_sprints}} + | {{this.name}} | {{this.duration}} | {{this.completed}} | {{this.velocity}} | {{this.achievements}} | + {{/each}} + + ### Velocity Trend + - **Average Velocity**: {{average_velocity}} + - **Trend**: {{velocity_trend}} + - **Factors**: {{velocity_factors}} + + - id: quality-metrics + title: Quality Metrics + instruction: Track test coverage and code quality + template: | + ### Test Coverage + | Type | Coverage | Target | Status | + |------|----------|--------|--------| + {{#each test_coverage}} + | {{this.type}} | {{this.coverage}}% | {{this.target}}% | {{this.status}} | + {{/each}} + + ### Code Quality + - **Technical Debt**: {{technical_debt_level}} + - **Code Coverage**: {{code_coverage}}% + - **Complexity**: {{complexity_metrics}} + - **Standards Compliance**: {{standards_compliance}} + + - id: known-issues + title: Known Issues & Bugs + instruction: Track critical and major issues + template: | + ### Critical Issues + | Issue | Impact | Workaround | Fix ETA | + |-------|--------|------------|---------| + {{#each critical_issues}} + | {{this.description}} | {{this.impact}} | {{this.workaround}} | {{this.eta}} | + {{/each}} + + ### Major Issues + | Issue | Component | Status | Assigned | + |-------|-----------|--------|----------| + {{#each major_issues}} + | {{this.description}} | {{this.component}} | {{this.status}} | {{this.assigned}} | + {{/each}} + + ### Technical Debt Registry + | Debt Item | Impact | Effort | Priority | Plan | + |-----------|--------|--------|----------|------| + {{#each technical_debt}} + | {{this.item}} | {{this.impact}} | {{this.effort}} | {{this.priority}} | {{this.plan}} | + {{/each}} + + - id: decision-evolution + title: Evolution of Key Decisions + instruction: Track how major decisions have evolved over time + template: | + ### Architecture Evolution + | Version | Change | Rationale | Impact | + |---------|--------|-----------|---------| + {{#each architecture_evolution}} + | {{this.version}} | {{this.change}} | {{this.rationale}} | {{this.impact}} | + {{/each}} + + ### Technology Changes + | Date | From | To | Reason | Status | + |------|------|-----|--------|--------| + {{#each technology_changes}} + | {{this.date}} | {{this.from}} | {{this.to}} | {{this.reason}} | {{this.status}} | + {{/each}} + + ### Process Evolution + | Change | When | Why | Result | + |--------|------|-----|--------| + {{#each process_changes}} + | {{this.change}} | {{this.date}} | {{this.reason}} | {{this.result}} | + {{/each}} + + - id: release-history + title: Release History + instruction: Track releases and what was delivered + template: | + ### Recent Releases + | Version | Date | Major Changes | Breaking Changes | + |---------|------|---------------|------------------| + {{#each recent_releases}} + | {{this.version}} | {{this.date}} | {{this.changes}} | {{this.breaking}} | + {{/each}} + + ### Upcoming Releases + | Version | Target Date | Planned Features | Risks | + |---------|-------------|------------------|--------| + {{#each upcoming_releases}} + | {{this.version}} | {{this.date}} | {{this.features}} | {{this.risks}} | + {{/each}} + + - id: performance-trends + title: Performance Trends + instruction: Track system and user metrics over time + template: | + ### System Performance + | Metric | Current | Target | Trend | Notes | + |--------|---------|--------|--------|-------| + {{#each system_metrics}} + | {{this.metric}} | {{this.current}} | {{this.target}} | {{this.trend}} | {{this.notes}} | + {{/each}} + + ### User Metrics + | Metric | Current | Last Month | Trend | + |--------|---------|------------|--------| + {{#each user_metrics}} + | {{this.metric}} | {{this.current}} | {{this.previous}} | {{this.trend}} | + {{/each}} + + - id: lessons-learned + title: Lessons Learned + instruction: Capture what's working well and what needs improvement + template: | + ### What's Working Well + {{#each successes}} + {{@index + 1}}. **{{this.practice}}**: {{this.description}} + - Result: {{this.result}} + - Continue: {{this.why_continue}} + + {{/each}} + + ### What Needs Improvement + {{#each improvements_needed}} + {{@index + 1}}. **{{this.challenge}}**: {{this.description}} + - Impact: {{this.impact}} + - Plan: {{this.improvement_plan}} + + {{/each}} + + - id: risk-register + title: Risk Register + instruction: Track mitigated and active risks + template: | + ### Mitigated Risks + | Risk | Mitigation | Result | + |------|------------|--------| + {{#each mitigated_risks}} + | {{this.risk}} | {{this.mitigation}} | {{this.result}} | + {{/each}} + + ### Active Risks + | Risk | Probability | Impact | Mitigation Plan | + |------|-------------|--------|-----------------| + {{#each active_risks}} + | {{this.risk}} | {{this.probability}} | {{this.impact}} | {{this.mitigation}} | + {{/each}} + +prompts: + completion_percentage: "Overall project completion percentage" + current_phase: "Current project phase name" + project_health: "Project health status (Green/Yellow/Red)" + last_updated: "When was this last updated?" + completed_features: "List completed features with details" + in_progress_features: "List features currently in development" + upcoming_features: "List planned upcoming features" + recent_sprints: "List recent sprints with performance data" + average_velocity: "Average team velocity (points/stories per sprint)" + velocity_trend: "Is velocity increasing, stable, or decreasing?" + velocity_factors: "What factors are affecting velocity?" + test_coverage: "Test coverage by type (unit, integration, e2e)" + technical_debt_level: "Current technical debt level (High/Medium/Low)" + code_coverage: "Overall code coverage percentage" + complexity_metrics: "Code complexity metrics" + standards_compliance: "Compliance with coding standards" + critical_issues: "List critical issues that need immediate attention" + major_issues: "List major issues in backlog" + technical_debt: "Technical debt items with priority" + architecture_evolution: "How has the architecture evolved?" + technology_changes: "Technology stack changes over time" + process_changes: "Process improvements made" + recent_releases: "Recent versions released" + upcoming_releases: "Planned future releases" + system_metrics: "System performance metrics (response time, throughput, errors)" + user_metrics: "User metrics (active users, feature adoption, satisfaction)" + successes: "What practices/decisions are working well?" + improvements_needed: "What challenges need to be addressed?" + mitigated_risks: "Risks that have been successfully mitigated" + active_risks: "Current risks being tracked" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/projectbrief-tmpl.md b/bmad-core/templates/memory-bank/projectbrief-tmpl.md deleted file mode 100644 index 56af168b..00000000 --- a/bmad-core/templates/memory-bank/projectbrief-tmpl.md +++ /dev/null @@ -1,108 +0,0 @@ -# Project Brief - -*Foundation document - the source of truth for project scope* - -## Project Overview - -**Project Name**: [Project Name] -**Version**: 1.0 -**Last Updated**: [Date] -**Status**: [Active/Planning/On Hold] - -## Core Purpose - -[One paragraph describing what this project is and why it exists] - -## Goals and Objectives - -### Primary Goals -1. [Main goal 1] -2. [Main goal 2] -3. [Main goal 3] - -### Success Criteria -- [ ] [Measurable criterion 1] -- [ ] [Measurable criterion 2] -- [ ] [Measurable criterion 3] - -## Scope - -### In Scope -- [What this project will deliver] -- [Core features/capabilities] -- [Target platforms/environments] - -### Out of Scope -- [What this project will NOT deliver] -- [Features explicitly excluded] -- [Deferred items] - -## Constraints - -### Technical Constraints -- [Technology limitations] -- [Platform requirements] -- [Integration constraints] - -### Business Constraints -- [Timeline requirements] -- [Budget limitations] -- [Resource availability] - -### Regulatory/Compliance -- [Legal requirements] -- [Security standards] -- [Industry regulations] - -## Target Users - -### Primary Users -- **User Type**: [Description] -- **Needs**: [What they need from this system] -- **Volume**: [Expected number of users] - -### Secondary Users -- **User Type**: [Description] -- **Needs**: [What they need from this system] - -## Key Requirements - -### Functional Requirements -1. [Core functionality 1] -2. [Core functionality 2] -3. [Core functionality 3] - -### Non-Functional Requirements -- **Performance**: [Targets] -- **Security**: [Requirements] -- **Scalability**: [Expectations] -- **Reliability**: [Uptime/availability] - -## Timeline - -### Major Milestones -| Milestone | Target Date | Description | -|-----------|-------------|-------------| -| [Name] | [Date] | [What will be delivered] | -| [Name] | [Date] | [What will be delivered] | - -### Current Phase -[Description of current project phase] - -## Stakeholders - -### Primary Stakeholders -- **[Role]**: [Name/Team] - [Interest/Influence] -- **[Role]**: [Name/Team] - [Interest/Influence] - -### Key Decision Makers -- **[Role]**: [Name] - [Decisions they make] - -## References - -- [Link to detailed requirements] -- [Link to design documents] -- [Link to related projects] - ---- -*This document defines the project foundation. All other memory bank files build upon this brief.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/projectbrief-tmpl.yaml b/bmad-core/templates/memory-bank/projectbrief-tmpl.yaml new file mode 100644 index 00000000..74c6439f --- /dev/null +++ b/bmad-core/templates/memory-bank/projectbrief-tmpl.yaml @@ -0,0 +1,171 @@ +template: + id: memory-bank-projectbrief-v1 + name: Memory Bank - Project Brief + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/projectbrief.md + title: "Project Brief" + description: | + Foundation document - the source of truth for project scope. + This file defines the project foundation. All other memory bank files build upon this brief. + +workflow: + mode: guided + instruction: | + For new projects: Interview user about project goals, understand target users, define success criteria, identify constraints. + For existing projects: Analyze current state from documentation, README files, architecture docs, and existing code. + +sections: + - id: overview + title: Project Overview + instruction: Capture the essential project information + template: | + **Project Name**: {{project_name}} + **Version**: {{version | default: "1.0"}} + **Last Updated**: {{current_date}} + **Status**: {{status | options: "Active, Planning, On Hold"}} + + - id: core-purpose + title: Core Purpose + instruction: Write one paragraph describing what this project is and why it exists + template: | + {{core_purpose_description}} + + - id: goals-objectives + title: Goals and Objectives + instruction: Define primary goals and measurable success criteria + template: | + ### Primary Goals + {{#each primary_goals}} + {{@index + 1}}. {{this}} + {{/each}} + + ### Success Criteria + {{#each success_criteria}} + - [ ] {{this}} + {{/each}} + + - id: scope + title: Scope + instruction: Clearly define what's in and out of scope + template: | + ### In Scope + {{#each in_scope}} + - {{this}} + {{/each}} + + ### Out of Scope + {{#each out_scope}} + - {{this}} + {{/each}} + + - id: constraints + title: Constraints + instruction: Document all types of constraints affecting the project + template: | + ### Technical Constraints + {{#each technical_constraints}} + - {{this}} + {{/each}} + + ### Business Constraints + {{#each business_constraints}} + - {{this}} + {{/each}} + + ### Regulatory/Compliance + {{#each regulatory_constraints}} + - {{this}} + {{/each}} + + - id: target-users + title: Target Users + instruction: Define primary and secondary user groups + template: | + ### Primary Users + - **User Type**: {{primary_user_type}} + - **Needs**: {{primary_user_needs}} + - **Volume**: {{primary_user_volume}} + + ### Secondary Users + - **User Type**: {{secondary_user_type}} + - **Needs**: {{secondary_user_needs}} + + - id: key-requirements + title: Key Requirements + instruction: List functional and non-functional requirements + template: | + ### Functional Requirements + {{#each functional_requirements}} + {{@index + 1}}. {{this}} + {{/each}} + + ### Non-Functional Requirements + - **Performance**: {{performance_requirements}} + - **Security**: {{security_requirements}} + - **Scalability**: {{scalability_requirements}} + - **Reliability**: {{reliability_requirements}} + + - id: timeline + title: Timeline + instruction: Define major milestones and current phase + template: | + ### Major Milestones + | Milestone | Target Date | Description | + |-----------|-------------|-------------| + {{#each milestones}} + | {{this.name}} | {{this.date}} | {{this.description}} | + {{/each}} + + ### Current Phase + {{current_phase_description}} + + - id: stakeholders + title: Stakeholders + instruction: Identify primary stakeholders and decision makers + template: | + ### Primary Stakeholders + {{#each stakeholders}} + - **{{this.role}}**: {{this.name}} - {{this.interest}} + {{/each}} + + ### Key Decision Makers + {{#each decision_makers}} + - **{{this.role}}**: {{this.name}} - {{this.decisions}} + {{/each}} + + - id: references + title: References + instruction: Link to related documentation + template: | + {{#each references}} + - {{this}} + {{/each}} + +prompts: + project_name: "What is the project name?" + status: "What is the current project status? (Active/Planning/On Hold)" + core_purpose_description: "Describe in one paragraph what this project is and why it exists" + primary_goals: "List 3-5 primary goals for this project" + success_criteria: "Define 3-5 measurable success criteria" + in_scope: "What is IN scope for this project? (features, capabilities, platforms)" + out_scope: "What is explicitly OUT of scope?" + technical_constraints: "List any technical constraints (technology limitations, platform requirements, integration constraints)" + business_constraints: "List any business constraints (timeline, budget, resources)" + regulatory_constraints: "List any regulatory/compliance requirements" + primary_user_type: "Describe the primary user type" + primary_user_needs: "What do primary users need from this system?" + primary_user_volume: "Expected number of primary users" + secondary_user_type: "Describe secondary user types (if any)" + secondary_user_needs: "What do secondary users need?" + functional_requirements: "List 3-5 core functional requirements" + performance_requirements: "Define performance targets" + security_requirements: "Define security requirements" + scalability_requirements: "Define scalability expectations" + reliability_requirements: "Define reliability/uptime requirements" + milestones: "Define major milestones with dates and descriptions" + current_phase_description: "Describe the current project phase" + stakeholders: "List primary stakeholders with roles and interests" + decision_makers: "List key decision makers and what they decide" + references: "List links to related documentation" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/systemPatterns-tmpl.md b/bmad-core/templates/memory-bank/systemPatterns-tmpl.md deleted file mode 100644 index 3a4cd7b6..00000000 --- a/bmad-core/templates/memory-bank/systemPatterns-tmpl.md +++ /dev/null @@ -1,175 +0,0 @@ -# System Patterns - -*Technical architecture, design patterns, and critical implementation decisions* - -## System Architecture Overview - -### High-Level Architecture -``` -[ASCII or text diagram showing major components and relationships] -``` - -### Architectural Style -- **Pattern**: [e.g., Microservices, Monolith, Serverless] -- **Rationale**: [Why this architecture was chosen] -- **Trade-offs**: [What we gain vs. what we sacrifice] - -## Core Components - -### Component 1: [Name] -- **Purpose**: [What it does] -- **Responsibilities**: [Key functions] -- **Technology**: [Implementation details] -- **Interfaces**: [How others interact with it] -- **Location**: [Where to find the code] - -### Component 2: [Name] -- **Purpose**: [What it does] -- **Responsibilities**: [Key functions] -- **Technology**: [Implementation details] -- **Interfaces**: [How others interact with it] -- **Location**: [Where to find the code] - -## Design Patterns - -### Pattern 1: [Pattern Name] -- **Where Used**: [Components/modules using this pattern] -- **Implementation**: [How it's implemented] -- **Benefits**: [Why we use it] -- **Example**: [Code location or snippet] - -### Pattern 2: [Pattern Name] -- **Where Used**: [Components/modules using this pattern] -- **Implementation**: [How it's implemented] -- **Benefits**: [Why we use it] - -## Data Architecture - -### Data Flow -``` -[Diagram showing how data moves through the system] -``` - -### Storage Strategy -| Data Type | Storage | Rationale | Retention | -|-----------|---------|-----------|-----------| -| [Type] | [Where stored] | [Why] | [How long] | -| [Type] | [Where stored] | [Why] | [How long] | - -### Data Models -- **Core Entities**: [List main domain objects] -- **Relationships**: [How entities relate] -- **Schemas**: [Location of schema definitions] - -## Integration Architecture - -### Internal Integrations -``` -Service A <--> Service B - | | - v v -Service C <--> Service D -``` - -### External Integrations -| System | Integration Type | Purpose | Critical? | -|--------|-----------------|---------|-----------| -| [Name] | [REST/GraphQL/etc] | [Why we integrate] | [Yes/No] | -| [Name] | [Type] | [Purpose] | [Yes/No] | - -### API Design Principles -- [Principle 1: e.g., RESTful conventions] -- [Principle 2: e.g., Versioning strategy] -- [Principle 3: e.g., Error handling approach] - -## Security Architecture - -### Security Layers -1. **Edge Security**: [WAF, DDoS protection] -2. **Application Security**: [Authentication, authorization] -3. **Data Security**: [Encryption at rest/transit] -4. **Infrastructure Security**: [Network isolation, secrets] - -### Authentication & Authorization -- **Method**: [JWT, OAuth, SAML, etc.] -- **Implementation**: [How it works] -- **Authorization Model**: [RBAC, ABAC, etc.] - -## Critical Implementation Paths - -### Path 1: [User Authentication Flow] -1. User submits credentials -2. [Step 2 with component] -3. [Step 3 with component] -4. Token returned - -### Path 2: [Core Business Process] -1. [Starting point] -2. [Processing step] -3. [Decision point] -4. [Completion] - -## Performance Patterns - -### Caching Strategy -- **What's Cached**: [Data types] -- **Where**: [Cache locations] -- **TTL**: [Expiration strategies] -- **Invalidation**: [How cache is cleared] - -### Async Processing -- **Queue System**: [Technology used] -- **Use Cases**: [What goes async] -- **Retry Logic**: [Failure handling] - -## Scalability Patterns - -### Horizontal Scaling -- **Stateless Components**: [Which can scale out] -- **Load Balancing**: [Strategy] -- **Session Management**: [How handled] - -### Vertical Scaling -- **Bottlenecks**: [Known limitations] -- **Optimization Points**: [Where to focus] - -## Key Technical Decisions - -Reference: See `docs/adr/` for detailed Architectural Decision Records - -### Decision 1: [Title] -- **Choice**: [What was decided] -- **Rationale**: [Why] -- **Impact**: [Consequences] - -### Decision 2: [Title] -- **Choice**: [What was decided] -- **Rationale**: [Why] -- **Impact**: [Consequences] - -## Error Handling Patterns - -### Global Error Strategy -- **Logging**: [How errors are logged] -- **User Feedback**: [How errors shown to users] -- **Recovery**: [Automatic recovery mechanisms] - -### Circuit Breakers -- **Protected Services**: [Which integrations] -- **Thresholds**: [When circuits open] -- **Fallbacks**: [Degraded functionality] - -## Monitoring & Observability - -### Key Metrics -- **Business Metrics**: [What we track] -- **Technical Metrics**: [Performance indicators] -- **SLIs/SLOs**: [Service level indicators/objectives] - -### Logging Strategy -- **Log Levels**: [When to use each] -- **Structured Logging**: [Format/fields] -- **Retention**: [How long kept] - ---- -*This document captures the technical architecture and implementation patterns. It's updated when architectural decisions are made or patterns change.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/systemPatterns-tmpl.yaml b/bmad-core/templates/memory-bank/systemPatterns-tmpl.yaml new file mode 100644 index 00000000..21a114e4 --- /dev/null +++ b/bmad-core/templates/memory-bank/systemPatterns-tmpl.yaml @@ -0,0 +1,245 @@ +template: + id: memory-bank-systempatterns-v1 + name: Memory Bank - System Patterns + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/systemPatterns.md + title: "System Patterns" + description: | + Technical architecture, design patterns, and critical implementation decisions. + This document captures the technical architecture and implementation patterns. It's updated when architectural decisions are made or patterns change. + +workflow: + mode: guided + instruction: | + Document the system architecture, patterns, and technical decisions. + Reference ADRs for detailed decision records. Focus on the "what" and "how" of the system. + +sections: + - id: architecture-overview + title: System Architecture Overview + instruction: Provide high-level architecture view + template: | + ### High-Level Architecture + ``` + {{architecture_diagram}} + ``` + + ### Architectural Style + - **Pattern**: {{architectural_pattern}} + - **Rationale**: {{pattern_rationale}} + - **Trade-offs**: {{pattern_tradeoffs}} + + - id: core-components + title: Core Components + instruction: Document each major component + template: | + {{#each components}} + ### Component {{@index + 1}}: {{this.name}} + - **Purpose**: {{this.purpose}} + - **Responsibilities**: {{this.responsibilities}} + - **Technology**: {{this.technology}} + - **Interfaces**: {{this.interfaces}} + - **Location**: {{this.location}} + + {{/each}} + + - id: design-patterns + title: Design Patterns + instruction: Document patterns used throughout the system + template: | + {{#each patterns}} + ### Pattern {{@index + 1}}: {{this.name}} + - **Where Used**: {{this.where_used}} + - **Implementation**: {{this.implementation}} + - **Benefits**: {{this.benefits}} + {{#if this.example}} + - **Example**: {{this.example}} + {{/if}} + + {{/each}} + + - id: data-architecture + title: Data Architecture + instruction: Document data flow and storage strategy + template: | + ### Data Flow + ``` + {{data_flow_diagram}} + ``` + + ### Storage Strategy + | Data Type | Storage | Rationale | Retention | + |-----------|---------|-----------|-----------| + {{#each storage_strategy}} + | {{this.type}} | {{this.storage}} | {{this.rationale}} | {{this.retention}} | + {{/each}} + + ### Data Models + - **Core Entities**: {{core_entities}} + - **Relationships**: {{entity_relationships}} + - **Schemas**: {{schema_location}} + + - id: integration-architecture + title: Integration Architecture + instruction: Document internal and external integrations + template: | + ### Internal Integrations + ``` + {{internal_integration_diagram}} + ``` + + ### External Integrations + | System | Integration Type | Purpose | Critical? | + |--------|-----------------|---------|-----------| + {{#each external_integrations}} + | {{this.system}} | {{this.type}} | {{this.purpose}} | {{this.critical}} | + {{/each}} + + ### API Design Principles + {{#each api_principles}} + - {{this}} + {{/each}} + + - id: security-architecture + title: Security Architecture + instruction: Document security layers and approach + template: | + ### Security Layers + {{#each security_layers}} + {{@index + 1}}. **{{this.layer}}**: {{this.description}} + {{/each}} + + ### Authentication & Authorization + - **Method**: {{auth_method}} + - **Implementation**: {{auth_implementation}} + - **Authorization Model**: {{authorization_model}} + + - id: critical-paths + title: Critical Implementation Paths + instruction: Document key workflows through the system + template: | + {{#each critical_paths}} + ### Path {{@index + 1}}: {{this.name}} + {{#each this.steps}} + {{@index + 1}}. {{this}} + {{/each}} + + {{/each}} + + - id: performance-patterns + title: Performance Patterns + instruction: Document performance optimization strategies + template: | + ### Caching Strategy + - **What's Cached**: {{cached_data}} + - **Where**: {{cache_locations}} + - **TTL**: {{cache_ttl}} + - **Invalidation**: {{cache_invalidation}} + + ### Async Processing + - **Queue System**: {{queue_system}} + - **Use Cases**: {{async_use_cases}} + - **Retry Logic**: {{retry_logic}} + + - id: scalability-patterns + title: Scalability Patterns + instruction: Document scaling strategies + template: | + ### Horizontal Scaling + - **Stateless Components**: {{stateless_components}} + - **Load Balancing**: {{load_balancing_strategy}} + - **Session Management**: {{session_management}} + + ### Vertical Scaling + - **Bottlenecks**: {{known_bottlenecks}} + - **Optimization Points**: {{optimization_points}} + + - id: key-decisions + title: Key Technical Decisions + instruction: Summary of major technical decisions + template: | + Reference: See `docs/adr/` for detailed Architectural Decision Records + + {{#each key_decisions}} + ### Decision {{@index + 1}}: {{this.title}} + - **Choice**: {{this.choice}} + - **Rationale**: {{this.rationale}} + - **Impact**: {{this.impact}} + + {{/each}} + + - id: error-handling + title: Error Handling Patterns + instruction: Document error handling approach + template: | + ### Global Error Strategy + - **Logging**: {{error_logging}} + - **User Feedback**: {{error_feedback}} + - **Recovery**: {{error_recovery}} + + ### Circuit Breakers + - **Protected Services**: {{protected_services}} + - **Thresholds**: {{circuit_thresholds}} + - **Fallbacks**: {{fallback_behavior}} + + - id: monitoring-observability + title: Monitoring & Observability + instruction: Document monitoring strategy + template: | + ### Key Metrics + - **Business Metrics**: {{business_metrics}} + - **Technical Metrics**: {{technical_metrics}} + - **SLIs/SLOs**: {{sli_slo}} + + ### Logging Strategy + - **Log Levels**: {{log_levels}} + - **Structured Logging**: {{structured_logging_format}} + - **Retention**: {{log_retention}} + +prompts: + architecture_diagram: "Provide ASCII or text diagram showing major components and relationships" + architectural_pattern: "What architectural pattern is used? (Microservices, Monolith, Serverless, etc.)" + pattern_rationale: "Why was this architecture chosen?" + pattern_tradeoffs: "What are the trade-offs of this approach?" + components: "List major components with details" + patterns: "List design patterns used in the system" + data_flow_diagram: "Diagram showing how data moves through the system" + storage_strategy: "Define storage strategy for different data types" + core_entities: "List main domain objects" + entity_relationships: "How do entities relate to each other?" + schema_location: "Where are schema definitions located?" + internal_integration_diagram: "Diagram of internal service integrations" + external_integrations: "List external system integrations" + api_principles: "List API design principles (REST conventions, versioning, etc.)" + security_layers: "List security layers (edge, application, data, infrastructure)" + auth_method: "Authentication method (JWT, OAuth, SAML, etc.)" + auth_implementation: "How authentication works" + authorization_model: "Authorization model (RBAC, ABAC, etc.)" + critical_paths: "List critical user/system workflows" + cached_data: "What data types are cached?" + cache_locations: "Where are caches located?" + cache_ttl: "Cache expiration strategies" + cache_invalidation: "How is cache cleared?" + queue_system: "What queue technology is used?" + async_use_cases: "What processes run asynchronously?" + retry_logic: "How are failures handled?" + stateless_components: "Which components can scale horizontally?" + load_balancing_strategy: "Load balancing approach" + session_management: "How are sessions handled?" + known_bottlenecks: "Known scaling limitations" + optimization_points: "Where to focus optimization efforts" + key_decisions: "List major technical decisions with rationale" + error_logging: "How are errors logged?" + error_feedback: "How are errors shown to users?" + error_recovery: "Automatic recovery mechanisms" + protected_services: "Which integrations have circuit breakers?" + circuit_thresholds: "When do circuits open?" + fallback_behavior: "Degraded functionality approach" + business_metrics: "What business metrics are tracked?" + technical_metrics: "Performance indicators tracked" + sli_slo: "Service level indicators and objectives" + log_levels: "When to use each log level" + structured_logging_format: "Log format and fields" + log_retention: "How long are logs kept?" \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/techContext-tmpl.md b/bmad-core/templates/memory-bank/techContext-tmpl.md deleted file mode 100644 index ce3240ad..00000000 --- a/bmad-core/templates/memory-bank/techContext-tmpl.md +++ /dev/null @@ -1,187 +0,0 @@ -# Tech Context - -*Technology stack, development environment, and technical constraints* - -## Technology Stack - -### Core Technologies -| Layer | Technology | Version | Purpose | -|-------|------------|---------|---------| -| Runtime | [e.g., Node.js] | [Version] | [Why chosen] | -| Framework | [e.g., Express] | [Version] | [Main framework] | -| Database | [e.g., PostgreSQL] | [Version] | [Data persistence] | -| Cache | [e.g., Redis] | [Version] | [Performance] | -| Queue | [e.g., RabbitMQ] | [Version] | [Async processing] | - -### Frontend Stack (if applicable) -| Technology | Version | Purpose | -|------------|---------|---------| -| [Framework] | [Version] | [UI framework] | -| [State Mgmt] | [Version] | [State management] | -| [Build Tool] | [Version] | [Bundling] | -| [CSS Solution] | [Version] | [Styling] | - -### Infrastructure -| Component | Technology | Purpose | -|-----------|------------|---------| -| Hosting | [e.g., AWS EC2] | [Where it runs] | -| Container | [e.g., Docker] | [Containerization] | -| Orchestration | [e.g., K8s] | [Container management] | -| CI/CD | [e.g., GitHub Actions] | [Automation] | - -## Development Environment - -### Prerequisites -- **OS**: [Supported operating systems] -- **Runtime**: [Required versions] -- **Tools**: [Required development tools] -- **Access**: [Required permissions/accounts] - -### Local Setup -```bash -# Quick start commands -git clone [repository] -cd [project] -npm install # or equivalent -npm run setup -npm run dev -``` - -### Environment Variables -| Variable | Purpose | Example | Required | -|----------|---------|---------|----------| -| `DATABASE_URL` | [Database connection] | `postgres://...` | Yes | -| `REDIS_URL` | [Cache connection] | `redis://...` | Yes | -| `API_KEY` | [External service] | `sk_...` | No | - -### Development Tools -- **IDE**: [Recommended IDE and extensions] -- **Debugger**: [How to debug] -- **API Testing**: [Postman/Insomnia setup] -- **Database Tools**: [GUI clients] - -## Dependencies - -### Core Dependencies -| Package | Version | Purpose | Critical? | -|---------|---------|---------|-----------| -| [Name] | [Version] | [What it does] | [Yes/No] | -| [Name] | [Version] | [What it does] | [Yes/No] | - -### Development Dependencies -| Package | Version | Purpose | -|---------|---------|---------| -| [Name] | [Version] | [Testing/linting/etc] | -| [Name] | [Version] | [Purpose] | - -### Dependency Management -- **Update Strategy**: [How/when to update] -- **Security Scanning**: [Tools used] -- **License Compliance**: [Checks in place] - -## Build & Deployment - -### Build Process -```bash -# Development build -npm run build:dev - -# Production build -npm run build:prod - -# What happens during build -1. [Step 1] -2. [Step 2] -3. [Output] -``` - -### Deployment Pipeline -1. **Local Development**: [Process] -2. **Testing Environment**: [How to deploy] -3. **Staging**: [Process and checks] -4. **Production**: [Deployment method] - -### Configuration Management -- **Development**: [Config location/method] -- **Staging**: [Config management] -- **Production**: [Secrets handling] - -## Technical Constraints - -### Performance Requirements -- **Response Time**: [Target latency] -- **Throughput**: [Requests per second] -- **Concurrent Users**: [Expected load] -- **Data Volume**: [Storage expectations] - -### Browser/Platform Support -| Platform | Minimum Version | Notes | -|----------|----------------|-------| -| Chrome | [Version] | [Full support] | -| Firefox | [Version] | [Any limitations] | -| Safari | [Version] | [Any limitations] | -| Edge | [Version] | [Support level] | -| Mobile | [iOS/Android versions] | [Considerations] | - -### API Constraints -- **Rate Limits**: [Any throttling] -- **Payload Size**: [Maximum sizes] -- **Timeout**: [Request timeouts] -- **Versioning**: [API version strategy] - -### Security Constraints -- **Compliance**: [PCI, HIPAA, GDPR, etc.] -- **Encryption**: [Requirements] -- **Authentication**: [Requirements] -- **Audit**: [Logging requirements] - -## External Services - -### Third-Party APIs -| Service | Purpose | Limits | Fallback | -|---------|---------|--------|----------| -| [Name] | [What we use it for] | [Rate limits] | [If it fails] | -| [Name] | [Purpose] | [Quotas] | [Backup plan] | - -### Monitoring Services -- **APM**: [Application monitoring tool] -- **Logging**: [Log aggregation service] -- **Error Tracking**: [Error monitoring] -- **Analytics**: [Usage tracking] - -## Testing Infrastructure - -### Test Types -| Type | Tool | Location | Command | -|------|------|----------|---------| -| Unit | [Jest] | `/tests/unit` | `npm test` | -| Integration | [Tool] | `/tests/integration` | `npm run test:int` | -| E2E | [Tool] | `/tests/e2e` | `npm run test:e2e` | - -### Test Environment -- **Database**: [Test DB setup] -- **External Services**: [Mocking strategy] -- **Test Data**: [Fixtures/factories] - -## Maintenance Considerations - -### Regular Tasks -- **Dependency Updates**: [Schedule/process] -- **Security Patches**: [Response time] -- **Database Maintenance**: [Tasks] -- **Log Rotation**: [Policy] - -### Monitoring Alerts -| Alert | Threshold | Action | -|-------|-----------|--------| -| High Error Rate | >1% | [Response] | -| Slow Response | >2s | [Investigation] | -| Database Connection | Failed | [Escalation] | - -### Known Limitations -1. **Limitation 1**: [Description and workaround] -2. **Limitation 2**: [Description and impact] -3. **Technical Debt**: [Areas needing attention] - ---- -*This document defines the technical environment and constraints. Update when tools, versions, or constraints change.* \ No newline at end of file diff --git a/bmad-core/templates/memory-bank/techContext-tmpl.yaml b/bmad-core/templates/memory-bank/techContext-tmpl.yaml new file mode 100644 index 00000000..87ca703d --- /dev/null +++ b/bmad-core/templates/memory-bank/techContext-tmpl.yaml @@ -0,0 +1,264 @@ +template: + id: memory-bank-techcontext-v1 + name: Memory Bank - Tech Context + version: 1.0 + output: + format: markdown + filename: docs/memory-bank/techContext.md + title: "Tech Context" + description: | + Technology stack, development environment, and technical constraints. + This document defines the technical environment and constraints. Update when tools, versions, or constraints change. + +workflow: + mode: guided + instruction: | + Document the complete technical environment including stack, tools, dependencies, and constraints. + Be specific about versions and configuration requirements. + +sections: + - id: technology-stack + title: Technology Stack + instruction: Document all layers of the technology stack + template: | + ### Core Technologies + | Layer | Technology | Version | Purpose | + |-------|------------|---------|---------| + {{#each core_technologies}} + | {{this.layer}} | {{this.technology}} | {{this.version}} | {{this.purpose}} | + {{/each}} + + {{#if frontend_stack}} + ### Frontend Stack (if applicable) + | Technology | Version | Purpose | + |------------|---------|---------| + {{#each frontend_stack}} + | {{this.technology}} | {{this.version}} | {{this.purpose}} | + {{/each}} + {{/if}} + + ### Infrastructure + | Component | Technology | Purpose | + |-----------|------------|---------| + {{#each infrastructure}} + | {{this.component}} | {{this.technology}} | {{this.purpose}} | + {{/each}} + + - id: development-environment + title: Development Environment + instruction: Document development setup requirements + template: | + ### Prerequisites + - **OS**: {{supported_os}} + - **Runtime**: {{required_runtime}} + - **Tools**: {{required_tools}} + - **Access**: {{required_access}} + + ### Local Setup + ```bash + # Quick start commands + {{setup_commands}} + ``` + + ### Environment Variables + | Variable | Purpose | Example | Required | + |----------|---------|---------|----------| + {{#each environment_variables}} + | `{{this.name}}` | {{this.purpose}} | `{{this.example}}` | {{this.required}} | + {{/each}} + + ### Development Tools + - **IDE**: {{recommended_ide}} + - **Debugger**: {{debugger_setup}} + - **API Testing**: {{api_testing_tools}} + - **Database Tools**: {{database_tools}} + + - id: dependencies + title: Dependencies + instruction: Document core and development dependencies + template: | + ### Core Dependencies + | Package | Version | Purpose | Critical? | + |---------|---------|---------|-----------| + {{#each core_dependencies}} + | {{this.package}} | {{this.version}} | {{this.purpose}} | {{this.critical}} | + {{/each}} + + ### Development Dependencies + | Package | Version | Purpose | + |---------|---------|---------| + {{#each dev_dependencies}} + | {{this.package}} | {{this.version}} | {{this.purpose}} | + {{/each}} + + ### Dependency Management + - **Update Strategy**: {{update_strategy}} + - **Security Scanning**: {{security_scanning}} + - **License Compliance**: {{license_compliance}} + + - id: build-deployment + title: Build & Deployment + instruction: Document build process and deployment pipeline + template: | + ### Build Process + ```bash + # Development build + {{dev_build_command}} + + # Production build + {{prod_build_command}} + + # What happens during build + {{#each build_steps}} + {{@index + 1}}. {{this}} + {{/each}} + ``` + + ### Deployment Pipeline + {{#each deployment_stages}} + {{@index + 1}}. **{{this.stage}}**: {{this.process}} + {{/each}} + + ### Configuration Management + - **Development**: {{dev_config}} + - **Staging**: {{staging_config}} + - **Production**: {{prod_config}} + + - id: technical-constraints + title: Technical Constraints + instruction: Document performance, platform, and API constraints + template: | + ### Performance Requirements + - **Response Time**: {{response_time_target}} + - **Throughput**: {{throughput_target}} + - **Concurrent Users**: {{concurrent_users_target}} + - **Data Volume**: {{data_volume_expectations}} + + ### Browser/Platform Support + | Platform | Minimum Version | Notes | + |----------|----------------|-------| + {{#each platform_support}} + | {{this.platform}} | {{this.min_version}} | {{this.notes}} | + {{/each}} + + ### API Constraints + - **Rate Limits**: {{rate_limits}} + - **Payload Size**: {{payload_size}} + - **Timeout**: {{request_timeout}} + - **Versioning**: {{api_versioning}} + + ### Security Constraints + - **Compliance**: {{compliance_requirements}} + - **Encryption**: {{encryption_requirements}} + - **Authentication**: {{auth_requirements}} + - **Audit**: {{audit_requirements}} + + - id: external-services + title: External Services + instruction: Document third-party services and monitoring + template: | + ### Third-Party APIs + | Service | Purpose | Limits | Fallback | + |---------|---------|--------|----------| + {{#each third_party_apis}} + | {{this.service}} | {{this.purpose}} | {{this.limits}} | {{this.fallback}} | + {{/each}} + + ### Monitoring Services + - **APM**: {{apm_tool}} + - **Logging**: {{logging_service}} + - **Error Tracking**: {{error_tracking}} + - **Analytics**: {{analytics_service}} + + - id: testing-infrastructure + title: Testing Infrastructure + instruction: Document testing setup and strategies + template: | + ### Test Types + | Type | Tool | Location | Command | + |------|------|----------|---------| + {{#each test_types}} + | {{this.type}} | {{this.tool}} | {{this.location}} | `{{this.command}}` | + {{/each}} + + ### Test Environment + - **Database**: {{test_database}} + - **External Services**: {{test_mocking_strategy}} + - **Test Data**: {{test_data_approach}} + + - id: maintenance + title: Maintenance Considerations + instruction: Document maintenance tasks and limitations + template: | + ### Regular Tasks + - **Dependency Updates**: {{dependency_update_schedule}} + - **Security Patches**: {{security_patch_timeline}} + - **Database Maintenance**: {{db_maintenance_tasks}} + - **Log Rotation**: {{log_rotation_policy}} + + ### Monitoring Alerts + | Alert | Threshold | Action | + |-------|-----------|--------| + {{#each monitoring_alerts}} + | {{this.alert}} | {{this.threshold}} | {{this.action}} | + {{/each}} + + ### Known Limitations + {{#each limitations}} + {{@index + 1}}. **{{this.limitation}}**: {{this.description}} + {{/each}} + +prompts: + core_technologies: "List core technologies (runtime, framework, database, cache, queue)" + frontend_stack: "List frontend technologies if applicable" + infrastructure: "List infrastructure components (hosting, containers, CI/CD)" + supported_os: "Supported operating systems" + required_runtime: "Required runtime versions" + required_tools: "Required development tools" + required_access: "Required permissions/accounts" + setup_commands: "Quick start commands for local setup" + environment_variables: "List environment variables with details" + recommended_ide: "Recommended IDE and extensions" + debugger_setup: "How to set up debugging" + api_testing_tools: "API testing tools (Postman, Insomnia, etc.)" + database_tools: "Database GUI clients" + core_dependencies: "List critical dependencies" + dev_dependencies: "List development dependencies" + update_strategy: "How/when are dependencies updated?" + security_scanning: "What security scanning tools are used?" + license_compliance: "How is license compliance checked?" + dev_build_command: "Development build command" + prod_build_command: "Production build command" + build_steps: "What happens during the build process?" + deployment_stages: "List deployment stages with processes" + dev_config: "Development configuration approach" + staging_config: "Staging configuration management" + prod_config: "Production secrets handling" + response_time_target: "Target response time" + throughput_target: "Requests per second target" + concurrent_users_target: "Expected concurrent users" + data_volume_expectations: "Storage expectations" + platform_support: "Browser/platform support matrix" + rate_limits: "API rate limiting" + payload_size: "Maximum payload sizes" + request_timeout: "Request timeout settings" + api_versioning: "API version strategy" + compliance_requirements: "Compliance requirements (PCI, HIPAA, GDPR, etc.)" + encryption_requirements: "Encryption requirements" + auth_requirements: "Authentication requirements" + audit_requirements: "Audit logging requirements" + third_party_apis: "List third-party API integrations" + apm_tool: "Application performance monitoring tool" + logging_service: "Log aggregation service" + error_tracking: "Error monitoring service" + analytics_service: "Usage analytics service" + test_types: "List test types with tools and commands" + test_database: "Test database setup" + test_mocking_strategy: "How are external services mocked?" + test_data_approach: "Test data fixtures/factories" + dependency_update_schedule: "When are dependencies updated?" + security_patch_timeline: "Security patch response time" + db_maintenance_tasks: "Database maintenance tasks" + log_rotation_policy: "Log rotation policy" + monitoring_alerts: "List monitoring alerts with thresholds" + limitations: "List known limitations and workarounds" \ No newline at end of file