siesa-agents 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -83
- package/bin/install.js +154 -154
- package/bin/prepare-publish.js +1 -1
- package/index.js +9 -10
- package/package.json +1 -4
- package/bmad-core/agent-teams/team-all.yaml +0 -15
- package/bmad-core/agent-teams/team-fullstack.yaml +0 -19
- package/bmad-core/agent-teams/team-ide-minimal.yaml +0 -11
- package/bmad-core/agent-teams/team-no-ui.yaml +0 -14
- package/bmad-core/agents/analyst.md +0 -84
- package/bmad-core/agents/architect.md +0 -94
- package/bmad-core/agents/backend-agent.md +0 -190
- package/bmad-core/agents/bmad-master.md +0 -110
- package/bmad-core/agents/bmad-orchestrator.md +0 -147
- package/bmad-core/agents/dev.md +0 -81
- package/bmad-core/agents/frontend-agent.md +0 -169
- package/bmad-core/agents/pm.md +0 -84
- package/bmad-core/agents/po.md +0 -79
- package/bmad-core/agents/qa.md +0 -91
- package/bmad-core/agents/sm.md +0 -65
- package/bmad-core/agents/ux-expert.md +0 -69
- package/bmad-core/checklists/architect-checklist.md +0 -440
- package/bmad-core/checklists/backend-checklist.md +0 -143
- package/bmad-core/checklists/change-checklist.md +0 -184
- package/bmad-core/checklists/frontend-checklist.md +0 -106
- package/bmad-core/checklists/pm-checklist.md +0 -372
- package/bmad-core/checklists/po-master-checklist.md +0 -434
- package/bmad-core/checklists/story-dod-checklist.md +0 -96
- package/bmad-core/checklists/story-draft-checklist.md +0 -155
- package/bmad-core/core-config.yaml +0 -22
- package/bmad-core/data/backend-standards.md +0 -440
- package/bmad-core/data/bmad-kb.md +0 -809
- package/bmad-core/data/brainstorming-techniques.md +0 -38
- package/bmad-core/data/elicitation-methods.md +0 -156
- package/bmad-core/data/frontend-standards.md +0 -324
- package/bmad-core/data/technical-preferences.md +0 -5
- package/bmad-core/data/test-levels-framework.md +0 -148
- package/bmad-core/data/test-priorities-matrix.md +0 -174
- package/bmad-core/enhanced-ide-development-workflow.md +0 -248
- package/bmad-core/install-manifest.yaml +0 -230
- package/bmad-core/tasks/advanced-elicitation.md +0 -119
- package/bmad-core/tasks/apply-qa-fixes.md +0 -150
- package/bmad-core/tasks/brownfield-create-epic.md +0 -162
- package/bmad-core/tasks/brownfield-create-story.md +0 -149
- package/bmad-core/tasks/correct-course.md +0 -72
- package/bmad-core/tasks/create-brownfield-story.md +0 -314
- package/bmad-core/tasks/create-component.md +0 -103
- package/bmad-core/tasks/create-deep-research-prompt.md +0 -280
- package/bmad-core/tasks/create-doc.md +0 -103
- package/bmad-core/tasks/create-entity.md +0 -133
- package/bmad-core/tasks/create-feature.md +0 -91
- package/bmad-core/tasks/create-next-story.md +0 -114
- package/bmad-core/tasks/create-service.md +0 -118
- package/bmad-core/tasks/create-use-case.md +0 -141
- package/bmad-core/tasks/document-project.md +0 -345
- package/bmad-core/tasks/execute-checklist.md +0 -88
- package/bmad-core/tasks/facilitate-brainstorming-session.md +0 -138
- package/bmad-core/tasks/generate-ai-frontend-prompt.md +0 -53
- package/bmad-core/tasks/index-docs.md +0 -175
- package/bmad-core/tasks/kb-mode-interaction.md +0 -77
- package/bmad-core/tasks/nfr-assess.md +0 -345
- package/bmad-core/tasks/qa-gate.md +0 -163
- package/bmad-core/tasks/review-story.md +0 -316
- package/bmad-core/tasks/risk-profile.md +0 -355
- package/bmad-core/tasks/scaffold-backend.md +0 -111
- package/bmad-core/tasks/scaffold-frontend.md +0 -79
- package/bmad-core/tasks/shard-doc.md +0 -187
- package/bmad-core/tasks/test-design.md +0 -176
- package/bmad-core/tasks/trace-requirements.md +0 -266
- package/bmad-core/tasks/validate-next-story.md +0 -136
- package/bmad-core/templates/architecture-tmpl.yaml +0 -662
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -477
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +0 -281
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +0 -307
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +0 -258
- package/bmad-core/templates/front-end-spec-tmpl.yaml +0 -350
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -824
- package/bmad-core/templates/market-research-tmpl.yaml +0 -253
- package/bmad-core/templates/prd-tmpl.yaml +0 -203
- package/bmad-core/templates/project-brief-tmpl.yaml +0 -222
- package/bmad-core/templates/qa-gate-tmpl.yaml +0 -103
- package/bmad-core/templates/story-tmpl.yaml +0 -138
- package/bmad-core/user-guide.md +0 -530
- package/bmad-core/utils/bmad-doc-template.md +0 -327
- package/bmad-core/utils/workflow-management.md +0 -71
- package/bmad-core/workflows/brownfield-fullstack.yaml +0 -298
- package/bmad-core/workflows/brownfield-service.yaml +0 -188
- package/bmad-core/workflows/brownfield-ui.yaml +0 -198
- package/bmad-core/workflows/greenfield-fullstack.yaml +0 -241
- package/bmad-core/workflows/greenfield-service.yaml +0 -207
- package/bmad-core/workflows/greenfield-ui.yaml +0 -236
- package/bmad-core/working-in-the-brownfield.md +0 -606
- package/github/b-mad-expert.md +0 -742
- package/github/chatmodes/analyst.chatmode.md +0 -89
- package/github/chatmodes/architect.chatmode.md +0 -97
- package/github/chatmodes/backend.chatmode.md +0 -195
- package/github/chatmodes/bmad-master.chatmode.md +0 -115
- package/github/chatmodes/bmad-orchestrator.chatmode.md +0 -152
- package/github/chatmodes/dev.chatmode.md +0 -86
- package/github/chatmodes/frontend.chatmode.md +0 -158
- package/github/chatmodes/pm.chatmode.md +0 -89
- package/github/chatmodes/po.chatmode.md +0 -84
- package/github/chatmodes/qa.chatmode.md +0 -96
- package/github/chatmodes/sm.chatmode.md +0 -70
- package/github/chatmodes/ux-expert.chatmode.md +0 -74
- package/vscode/mcp.json +0 -11
- package/vscode/settings.json +0 -13
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<!-- Powered by BMAD™ Core -->
|
|
2
|
-
|
|
3
|
-
# Brainstorming Techniques Data
|
|
4
|
-
|
|
5
|
-
## Creative Expansion
|
|
6
|
-
|
|
7
|
-
1. **What If Scenarios**: Ask one provocative question, get their response, then ask another
|
|
8
|
-
2. **Analogical Thinking**: Give one example analogy, ask them to find 2-3 more
|
|
9
|
-
3. **Reversal/Inversion**: Pose the reverse question, let them work through it
|
|
10
|
-
4. **First Principles Thinking**: Ask "What are the fundamentals?" and guide them to break it down
|
|
11
|
-
|
|
12
|
-
## Structured Frameworks
|
|
13
|
-
|
|
14
|
-
5. **SCAMPER Method**: Go through one letter at a time, wait for their ideas before moving to next
|
|
15
|
-
6. **Six Thinking Hats**: Present one hat, ask for their thoughts, then move to next hat
|
|
16
|
-
7. **Mind Mapping**: Start with central concept, ask them to suggest branches
|
|
17
|
-
|
|
18
|
-
## Collaborative Techniques
|
|
19
|
-
|
|
20
|
-
8. **"Yes, And..." Building**: They give idea, you "yes and" it, they "yes and" back - alternate
|
|
21
|
-
9. **Brainwriting/Round Robin**: They suggest idea, you build on it, ask them to build on yours
|
|
22
|
-
10. **Random Stimulation**: Give one random prompt/word, ask them to make connections
|
|
23
|
-
|
|
24
|
-
## Deep Exploration
|
|
25
|
-
|
|
26
|
-
11. **Five Whys**: Ask "why" and wait for their answer before asking next "why"
|
|
27
|
-
12. **Morphological Analysis**: Ask them to list parameters first, then explore combinations together
|
|
28
|
-
13. **Provocation Technique (PO)**: Give one provocative statement, ask them to extract useful ideas
|
|
29
|
-
|
|
30
|
-
## Advanced Techniques
|
|
31
|
-
|
|
32
|
-
14. **Forced Relationships**: Connect two unrelated concepts and ask them to find the bridge
|
|
33
|
-
15. **Assumption Reversal**: Challenge their core assumptions and ask them to build from there
|
|
34
|
-
16. **Role Playing**: Ask them to brainstorm from different stakeholder perspectives
|
|
35
|
-
17. **Time Shifting**: "How would you solve this in 1995? 2030?"
|
|
36
|
-
18. **Resource Constraints**: "What if you had only $10 and 1 hour?"
|
|
37
|
-
19. **Metaphor Mapping**: Use extended metaphors to explore solutions
|
|
38
|
-
20. **Question Storming**: Generate questions instead of answers first
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<!-- Powered by BMAD™ Core -->
|
|
2
|
-
|
|
3
|
-
# Elicitation Methods Data
|
|
4
|
-
|
|
5
|
-
## Core Reflective Methods
|
|
6
|
-
|
|
7
|
-
**Expand or Contract for Audience**
|
|
8
|
-
|
|
9
|
-
- Ask whether to 'expand' (add detail, elaborate) or 'contract' (simplify, clarify)
|
|
10
|
-
- Identify specific target audience if relevant
|
|
11
|
-
- Tailor content complexity and depth accordingly
|
|
12
|
-
|
|
13
|
-
**Explain Reasoning (CoT Step-by-Step)**
|
|
14
|
-
|
|
15
|
-
- Walk through the step-by-step thinking process
|
|
16
|
-
- Reveal underlying assumptions and decision points
|
|
17
|
-
- Show how conclusions were reached from current role's perspective
|
|
18
|
-
|
|
19
|
-
**Critique and Refine**
|
|
20
|
-
|
|
21
|
-
- Review output for flaws, inconsistencies, or improvement areas
|
|
22
|
-
- Identify specific weaknesses from role's expertise
|
|
23
|
-
- Suggest refined version reflecting domain knowledge
|
|
24
|
-
|
|
25
|
-
## Structural Analysis Methods
|
|
26
|
-
|
|
27
|
-
**Analyze Logical Flow and Dependencies**
|
|
28
|
-
|
|
29
|
-
- Examine content structure for logical progression
|
|
30
|
-
- Check internal consistency and coherence
|
|
31
|
-
- Identify and validate dependencies between elements
|
|
32
|
-
- Confirm effective ordering and sequencing
|
|
33
|
-
|
|
34
|
-
**Assess Alignment with Overall Goals**
|
|
35
|
-
|
|
36
|
-
- Evaluate content contribution to stated objectives
|
|
37
|
-
- Identify any misalignments or gaps
|
|
38
|
-
- Interpret alignment from specific role's perspective
|
|
39
|
-
- Suggest adjustments to better serve goals
|
|
40
|
-
|
|
41
|
-
## Risk and Challenge Methods
|
|
42
|
-
|
|
43
|
-
**Identify Potential Risks and Unforeseen Issues**
|
|
44
|
-
|
|
45
|
-
- Brainstorm potential risks from role's expertise
|
|
46
|
-
- Identify overlooked edge cases or scenarios
|
|
47
|
-
- Anticipate unintended consequences
|
|
48
|
-
- Highlight implementation challenges
|
|
49
|
-
|
|
50
|
-
**Challenge from Critical Perspective**
|
|
51
|
-
|
|
52
|
-
- Adopt critical stance on current content
|
|
53
|
-
- Play devil's advocate from specified viewpoint
|
|
54
|
-
- Argue against proposal highlighting weaknesses
|
|
55
|
-
- Apply YAGNI principles when appropriate (scope trimming)
|
|
56
|
-
|
|
57
|
-
## Creative Exploration Methods
|
|
58
|
-
|
|
59
|
-
**Tree of Thoughts Deep Dive**
|
|
60
|
-
|
|
61
|
-
- Break problem into discrete "thoughts" or intermediate steps
|
|
62
|
-
- Explore multiple reasoning paths simultaneously
|
|
63
|
-
- Use self-evaluation to classify each path as "sure", "likely", or "impossible"
|
|
64
|
-
- Apply search algorithms (BFS/DFS) to find optimal solution paths
|
|
65
|
-
|
|
66
|
-
**Hindsight is 20/20: The 'If Only...' Reflection**
|
|
67
|
-
|
|
68
|
-
- Imagine retrospective scenario based on current content
|
|
69
|
-
- Identify the one "if only we had known/done X..." insight
|
|
70
|
-
- Describe imagined consequences humorously or dramatically
|
|
71
|
-
- Extract actionable learnings for current context
|
|
72
|
-
|
|
73
|
-
## Multi-Persona Collaboration Methods
|
|
74
|
-
|
|
75
|
-
**Agile Team Perspective Shift**
|
|
76
|
-
|
|
77
|
-
- Rotate through different Scrum team member viewpoints
|
|
78
|
-
- Product Owner: Focus on user value and business impact
|
|
79
|
-
- Scrum Master: Examine process flow and team dynamics
|
|
80
|
-
- Developer: Assess technical implementation and complexity
|
|
81
|
-
- QA: Identify testing scenarios and quality concerns
|
|
82
|
-
|
|
83
|
-
**Stakeholder Round Table**
|
|
84
|
-
|
|
85
|
-
- Convene virtual meeting with multiple personas
|
|
86
|
-
- Each persona contributes unique perspective on content
|
|
87
|
-
- Identify conflicts and synergies between viewpoints
|
|
88
|
-
- Synthesize insights into actionable recommendations
|
|
89
|
-
|
|
90
|
-
**Meta-Prompting Analysis**
|
|
91
|
-
|
|
92
|
-
- Step back to analyze the structure and logic of current approach
|
|
93
|
-
- Question the format and methodology being used
|
|
94
|
-
- Suggest alternative frameworks or mental models
|
|
95
|
-
- Optimize the elicitation process itself
|
|
96
|
-
|
|
97
|
-
## Advanced 2025 Techniques
|
|
98
|
-
|
|
99
|
-
**Self-Consistency Validation**
|
|
100
|
-
|
|
101
|
-
- Generate multiple reasoning paths for same problem
|
|
102
|
-
- Compare consistency across different approaches
|
|
103
|
-
- Identify most reliable and robust solution
|
|
104
|
-
- Highlight areas where approaches diverge and why
|
|
105
|
-
|
|
106
|
-
**ReWOO (Reasoning Without Observation)**
|
|
107
|
-
|
|
108
|
-
- Separate parametric reasoning from tool-based actions
|
|
109
|
-
- Create reasoning plan without external dependencies
|
|
110
|
-
- Identify what can be solved through pure reasoning
|
|
111
|
-
- Optimize for efficiency and reduced token usage
|
|
112
|
-
|
|
113
|
-
**Persona-Pattern Hybrid**
|
|
114
|
-
|
|
115
|
-
- Combine specific role expertise with elicitation pattern
|
|
116
|
-
- Architect + Risk Analysis: Deep technical risk assessment
|
|
117
|
-
- UX Expert + User Journey: End-to-end experience critique
|
|
118
|
-
- PM + Stakeholder Analysis: Multi-perspective impact review
|
|
119
|
-
|
|
120
|
-
**Emergent Collaboration Discovery**
|
|
121
|
-
|
|
122
|
-
- Allow multiple perspectives to naturally emerge
|
|
123
|
-
- Identify unexpected insights from persona interactions
|
|
124
|
-
- Explore novel combinations of viewpoints
|
|
125
|
-
- Capture serendipitous discoveries from multi-agent thinking
|
|
126
|
-
|
|
127
|
-
## Game-Based Elicitation Methods
|
|
128
|
-
|
|
129
|
-
**Red Team vs Blue Team**
|
|
130
|
-
|
|
131
|
-
- Red Team: Attack the proposal, find vulnerabilities
|
|
132
|
-
- Blue Team: Defend and strengthen the approach
|
|
133
|
-
- Competitive analysis reveals blind spots
|
|
134
|
-
- Results in more robust, battle-tested solutions
|
|
135
|
-
|
|
136
|
-
**Innovation Tournament**
|
|
137
|
-
|
|
138
|
-
- Pit multiple alternative approaches against each other
|
|
139
|
-
- Score each approach across different criteria
|
|
140
|
-
- Crowd-source evaluation from different personas
|
|
141
|
-
- Identify winning combination of features
|
|
142
|
-
|
|
143
|
-
**Escape Room Challenge**
|
|
144
|
-
|
|
145
|
-
- Present content as constraints to work within
|
|
146
|
-
- Find creative solutions within tight limitations
|
|
147
|
-
- Identify minimum viable approach
|
|
148
|
-
- Discover innovative workarounds and optimizations
|
|
149
|
-
|
|
150
|
-
## Process Control
|
|
151
|
-
|
|
152
|
-
**Proceed / No Further Actions**
|
|
153
|
-
|
|
154
|
-
- Acknowledge choice to finalize current work
|
|
155
|
-
- Accept output as-is or move to next step
|
|
156
|
-
- Prepare to continue without additional elicitation
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
# Frontend Development Standards
|
|
2
|
-
|
|
3
|
-
## Architecture Principles
|
|
4
|
-
|
|
5
|
-
### Clean Architecture Implementation
|
|
6
|
-
- **Domain Layer**: Business entities, value objects, and business rules only
|
|
7
|
-
- **Application Layer**: Use cases, custom hooks, and state management
|
|
8
|
-
- **Infrastructure Layer**: API clients, repositories implementations, external service adapters
|
|
9
|
-
- **Presentation Layer**: React components, pages, and UI logic only
|
|
10
|
-
|
|
11
|
-
### Dependency Rules
|
|
12
|
-
- Inner layers must not know about outer layers
|
|
13
|
-
- Dependencies point inward (from outer to inner layers)
|
|
14
|
-
- Use dependency inversion for external concerns
|
|
15
|
-
|
|
16
|
-
## Technology Stack Standards
|
|
17
|
-
|
|
18
|
-
### Core Technologies
|
|
19
|
-
- **Next.js**: 14+ with App Router and TypeScript
|
|
20
|
-
- **React**: 18+ with functional components and hooks (via Next.js)
|
|
21
|
-
- **TypeScript**: Strict mode enabled, no `any` types
|
|
22
|
-
- **TailwindCSS**: Utility-first CSS framework
|
|
23
|
-
- **Shadcn/ui + Radix UI**: Component library foundation
|
|
24
|
-
|
|
25
|
-
### Framework Selection Rules
|
|
26
|
-
- **Default**: Always use Next.js 14+ with App Router
|
|
27
|
-
- **Exception**: Only use pure React + Vite when user specifically requests offline-first functionality
|
|
28
|
-
- **Reasoning**: Next.js provides better DX, built-in optimization, and easier deployment while maintaining PWA capabilities
|
|
29
|
-
|
|
30
|
-
### State Management
|
|
31
|
-
- **Zustand**: Primary state management solution
|
|
32
|
-
- Feature-based stores following DDD patterns
|
|
33
|
-
- Global state only for truly global concerns
|
|
34
|
-
- Local state for component-specific needs
|
|
35
|
-
|
|
36
|
-
### Development Tools
|
|
37
|
-
- **Next.js**: Built-in build system and development server
|
|
38
|
-
- **Vitest**: Unit and integration testing (configured with Next.js)
|
|
39
|
-
- **React Testing Library**: Component testing
|
|
40
|
-
- **MSW**: API mocking for tests
|
|
41
|
-
- **ESLint + Prettier**: Code quality and formatting (Next.js config)
|
|
42
|
-
|
|
43
|
-
## MCP Component Strategy
|
|
44
|
-
- **Always First**: Check MCP Shadcn registry before creating any component
|
|
45
|
-
- **Execute MCP**: Actively run MCP commands to search and install components
|
|
46
|
-
- **Workflow**: For buttons, forms, inputs, cards, dialogs, tables → Execute "Show me [type] components from shadcn registry" → Then execute "Add the [name] component to my project"
|
|
47
|
-
- **Error Reduction**: 90% fewer bugs using MCP vs manual creation
|
|
48
|
-
|
|
49
|
-
## Component Standards
|
|
50
|
-
|
|
51
|
-
### Component Structure
|
|
52
|
-
```typescript
|
|
53
|
-
interface ComponentProps {
|
|
54
|
-
// Required props
|
|
55
|
-
children: React.ReactNode;
|
|
56
|
-
// Optional props with defaults
|
|
57
|
-
className?: string;
|
|
58
|
-
variant?: 'default' | 'secondary';
|
|
59
|
-
'data-testid'?: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const Component = memo<ComponentProps>(({
|
|
63
|
-
children,
|
|
64
|
-
className,
|
|
65
|
-
variant = 'default',
|
|
66
|
-
'data-testid': testId = 'component'
|
|
67
|
-
}) => {
|
|
68
|
-
// Component implementation
|
|
69
|
-
return (
|
|
70
|
-
<div className={cn(baseStyles, variantStyles[variant], className)} data-testid={testId}>
|
|
71
|
-
{children}
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
Component.displayName = 'Component';
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Component Naming
|
|
80
|
-
- **PascalCase** for component names
|
|
81
|
-
- **kebab-case** for file names and data-testid attributes
|
|
82
|
-
- **camelCase** for props and functions
|
|
83
|
-
- Descriptive names that indicate purpose
|
|
84
|
-
|
|
85
|
-
### Props Guidelines
|
|
86
|
-
- Always define TypeScript interfaces for props
|
|
87
|
-
- Use optional props with sensible defaults
|
|
88
|
-
- Include className for style overrides
|
|
89
|
-
- Add data-testid for testing
|
|
90
|
-
- Document complex props with JSDoc
|
|
91
|
-
|
|
92
|
-
## State Management Patterns
|
|
93
|
-
|
|
94
|
-
### Zustand Store Structure
|
|
95
|
-
```typescript
|
|
96
|
-
interface FeatureState {
|
|
97
|
-
// Domain entities
|
|
98
|
-
entities: Entity[];
|
|
99
|
-
selectedEntity: Entity | null;
|
|
100
|
-
|
|
101
|
-
// UI state
|
|
102
|
-
loading: boolean;
|
|
103
|
-
error: string | null;
|
|
104
|
-
|
|
105
|
-
// Actions (use case calls)
|
|
106
|
-
loadEntities: () => Promise<void>;
|
|
107
|
-
selectEntity: (id: string) => void;
|
|
108
|
-
updateEntity: (entity: Entity) => Promise<void>;
|
|
109
|
-
clearError: () => void;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export const useFeatureStore = create<FeatureState>()(
|
|
113
|
-
devtools(
|
|
114
|
-
(set, get) => ({
|
|
115
|
-
// Initial state
|
|
116
|
-
entities: [],
|
|
117
|
-
selectedEntity: null,
|
|
118
|
-
loading: false,
|
|
119
|
-
error: null,
|
|
120
|
-
|
|
121
|
-
// Actions implementation
|
|
122
|
-
loadEntities: async () => {
|
|
123
|
-
set({ loading: true, error: null });
|
|
124
|
-
try {
|
|
125
|
-
const entities = await loadEntitiesUseCase.execute();
|
|
126
|
-
set({ entities, loading: false });
|
|
127
|
-
} catch (error) {
|
|
128
|
-
set({ error: error.message, loading: false });
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
// Other actions...
|
|
133
|
-
}),
|
|
134
|
-
{ name: 'featureStore' }
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Testing Standards
|
|
140
|
-
|
|
141
|
-
### Testing Strategy
|
|
142
|
-
- **Unit Tests**: Domain entities, use cases, utilities
|
|
143
|
-
- **Integration Tests**: Feature workflows, API integration
|
|
144
|
-
- **Component Tests**: User interactions, accessibility
|
|
145
|
-
- **E2E Tests**: Critical user journeys (minimal)
|
|
146
|
-
|
|
147
|
-
### Test Structure
|
|
148
|
-
```typescript
|
|
149
|
-
describe('ComponentName', () => {
|
|
150
|
-
it('should render correctly with default props', () => {
|
|
151
|
-
render(<ComponentName>Test content</ComponentName>);
|
|
152
|
-
expect(screen.getByTestId('component-name')).toBeInTheDocument();
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('should handle user interactions', async () => {
|
|
156
|
-
const handleClick = jest.fn();
|
|
157
|
-
render(<ComponentName onClick={handleClick} />);
|
|
158
|
-
|
|
159
|
-
await user.click(screen.getByRole('button'));
|
|
160
|
-
expect(handleClick).toHaveBeenCalled();
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
it('should be accessible', async () => {
|
|
164
|
-
const { container } = render(<ComponentName />);
|
|
165
|
-
const results = await axe(container);
|
|
166
|
-
expect(results).toHaveNoViolations();
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Accessibility Standards
|
|
172
|
-
|
|
173
|
-
### WCAG 2.1 AA Compliance
|
|
174
|
-
- Semantic HTML elements
|
|
175
|
-
- Proper heading hierarchy
|
|
176
|
-
- Keyboard navigation support
|
|
177
|
-
- Screen reader compatibility
|
|
178
|
-
- Color contrast minimum 4.5:1
|
|
179
|
-
|
|
180
|
-
### ARIA Implementation
|
|
181
|
-
- Use semantic HTML first, ARIA second
|
|
182
|
-
- Proper labeling with aria-label or aria-labelledby
|
|
183
|
-
- Role attributes for custom components
|
|
184
|
-
- State communication with aria-expanded, aria-selected
|
|
185
|
-
- Live regions for dynamic content updates
|
|
186
|
-
|
|
187
|
-
## Performance Standards
|
|
188
|
-
|
|
189
|
-
### Bundle Optimization
|
|
190
|
-
- Code splitting by route and feature
|
|
191
|
-
- Lazy loading for non-critical components
|
|
192
|
-
- Tree shaking for unused code
|
|
193
|
-
- Bundle size budget: 500KB total
|
|
194
|
-
|
|
195
|
-
### Runtime Performance
|
|
196
|
-
- React.memo for expensive components
|
|
197
|
-
- useMemo for expensive calculations
|
|
198
|
-
- useCallback for event handlers passed to children
|
|
199
|
-
- Virtual scrolling for large lists
|
|
200
|
-
|
|
201
|
-
### Loading Performance
|
|
202
|
-
- Image optimization and lazy loading
|
|
203
|
-
- Progressive loading strategies
|
|
204
|
-
- Skeleton screens for loading states
|
|
205
|
-
- Prefetch critical resources
|
|
206
|
-
|
|
207
|
-
## Security Guidelines
|
|
208
|
-
|
|
209
|
-
### Client-Side Security
|
|
210
|
-
- No API keys or secrets in frontend code
|
|
211
|
-
- Input validation and sanitization
|
|
212
|
-
- XSS prevention measures
|
|
213
|
-
- Secure handling of user data
|
|
214
|
-
|
|
215
|
-
### Authentication
|
|
216
|
-
- Token-based authentication (JWT)
|
|
217
|
-
- Secure token storage
|
|
218
|
-
- Automatic token refresh
|
|
219
|
-
- Proper logout handling
|
|
220
|
-
|
|
221
|
-
## File Organization
|
|
222
|
-
|
|
223
|
-
### Feature Structure
|
|
224
|
-
```
|
|
225
|
-
src/
|
|
226
|
-
├── modules/
|
|
227
|
-
│ ├── sales/ # MODULE
|
|
228
|
-
│ │ ├── quotes/ # DOMAIN
|
|
229
|
-
│ │ │ ├── cart/ # FEATURE
|
|
230
|
-
│ │ │ │ ├── domain/
|
|
231
|
-
│ │ │ │ │ ├── entities/
|
|
232
|
-
│ │ │ │ │ ├── repositories/ # Interfaces
|
|
233
|
-
│ │ │ │ │ ├── services/ # Domain services
|
|
234
|
-
│ │ │ │ │ └── types/
|
|
235
|
-
│ │ │ │ ├── application/
|
|
236
|
-
│ │ │ │ │ ├── use-cases/
|
|
237
|
-
│ │ │ │ │ ├── hooks/ # Custom hooks
|
|
238
|
-
│ │ │ │ │ └── store/ # Zustand store
|
|
239
|
-
│ │ │ │ ├── infrastructure/
|
|
240
|
-
│ │ │ │ │ ├── repositories/ # Implementations
|
|
241
|
-
│ │ │ │ │ ├── api/
|
|
242
|
-
│ │ │ │ │ └── adapters/
|
|
243
|
-
│ │ │ │ └── presentation/
|
|
244
|
-
│ │ │ │ ├── components/
|
|
245
|
-
│ │ │ │ ├── pages/
|
|
246
|
-
│ │ │ │ └── styles/
|
|
247
|
-
│ │ │ └── products/ # FEATURE
|
|
248
|
-
│ │ │ ├── domain/
|
|
249
|
-
│ │ │ ├── application/
|
|
250
|
-
│ │ │ ├── infrastructure/
|
|
251
|
-
│ │ │ └── presentation/
|
|
252
|
-
│ │ └── billing/ # DOMAIN
|
|
253
|
-
│ │ ├── invoices/ # FEATURE
|
|
254
|
-
│ │ └── reports/ # FEATURE
|
|
255
|
-
│ ├── inventory/ # MODULE
|
|
256
|
-
│ │ ├── products/ # DOMAIN
|
|
257
|
-
│ │ │ ├── catalog/ # FEATURE
|
|
258
|
-
│ │ │ └── stock/ # FEATURE
|
|
259
|
-
│ │ └── warehouses/ # DOMAIN
|
|
260
|
-
│ └── users/ # MODULE
|
|
261
|
-
│ └── authentication/ # DOMAIN
|
|
262
|
-
│ ├── login/ # FEATURE
|
|
263
|
-
│ └── registration/ # FEATURE
|
|
264
|
-
├── shared/
|
|
265
|
-
│ ├── components/ # Shadcn/ui components
|
|
266
|
-
│ ├── hooks/
|
|
267
|
-
│ ├── utils/
|
|
268
|
-
│ ├── types/
|
|
269
|
-
│ └── constants/
|
|
270
|
-
├── app/
|
|
271
|
-
│ ├── store/ # Global store
|
|
272
|
-
│ ├── providers/ # Context providers
|
|
273
|
-
│ ├── router/ # Routing config
|
|
274
|
-
│ └── app.tsx
|
|
275
|
-
├── infrastructure/
|
|
276
|
-
│ ├── api/ # API configuration
|
|
277
|
-
│ ├── storage/ # IndexedDB, localStorage
|
|
278
|
-
│ └── pwa/ # PWA configuration
|
|
279
|
-
└── assets/
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
### Import Organization
|
|
283
|
-
```typescript
|
|
284
|
-
// External libraries
|
|
285
|
-
import React from 'react';
|
|
286
|
-
import { create } from 'zustand';
|
|
287
|
-
|
|
288
|
-
// Internal utilities
|
|
289
|
-
import { cn } from '@/lib/utils';
|
|
290
|
-
|
|
291
|
-
// Types
|
|
292
|
-
import type { User } from '../domain/types/User';
|
|
293
|
-
|
|
294
|
-
// Components
|
|
295
|
-
import { Button } from '@/components/ui/button';
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## Error Handling
|
|
299
|
-
|
|
300
|
-
### Error Boundaries
|
|
301
|
-
- Feature-level error boundaries
|
|
302
|
-
- Graceful fallback UI
|
|
303
|
-
- Error reporting and logging
|
|
304
|
-
- User-friendly error messages
|
|
305
|
-
|
|
306
|
-
### API Error Handling
|
|
307
|
-
- Centralized error handling in HTTP client
|
|
308
|
-
- Proper error typing
|
|
309
|
-
- User-friendly error messages
|
|
310
|
-
- Retry mechanisms for transient errors
|
|
311
|
-
|
|
312
|
-
## Progressive Web App Standards
|
|
313
|
-
|
|
314
|
-
### PWA Features
|
|
315
|
-
- Service worker for caching and offline support
|
|
316
|
-
- Web app manifest for installability
|
|
317
|
-
- Push notifications (when needed)
|
|
318
|
-
- Background sync capabilities
|
|
319
|
-
|
|
320
|
-
### Offline Strategy
|
|
321
|
-
- Cache-first for static assets
|
|
322
|
-
- Network-first for dynamic data
|
|
323
|
-
- Fallback pages for offline scenarios
|
|
324
|
-
- Sync when connection restored
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<!-- Powered by BMAD™ Core -->
|
|
2
|
-
|
|
3
|
-
# Test Levels Framework
|
|
4
|
-
|
|
5
|
-
Comprehensive guide for determining appropriate test levels (unit, integration, E2E) for different scenarios.
|
|
6
|
-
|
|
7
|
-
## Test Level Decision Matrix
|
|
8
|
-
|
|
9
|
-
### Unit Tests
|
|
10
|
-
|
|
11
|
-
**When to use:**
|
|
12
|
-
|
|
13
|
-
- Testing pure functions and business logic
|
|
14
|
-
- Algorithm correctness
|
|
15
|
-
- Input validation and data transformation
|
|
16
|
-
- Error handling in isolated components
|
|
17
|
-
- Complex calculations or state machines
|
|
18
|
-
|
|
19
|
-
**Characteristics:**
|
|
20
|
-
|
|
21
|
-
- Fast execution (immediate feedback)
|
|
22
|
-
- No external dependencies (DB, API, file system)
|
|
23
|
-
- Highly maintainable and stable
|
|
24
|
-
- Easy to debug failures
|
|
25
|
-
|
|
26
|
-
**Example scenarios:**
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
unit_test:
|
|
30
|
-
component: 'PriceCalculator'
|
|
31
|
-
scenario: 'Calculate discount with multiple rules'
|
|
32
|
-
justification: 'Complex business logic with multiple branches'
|
|
33
|
-
mock_requirements: 'None - pure function'
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Integration Tests
|
|
37
|
-
|
|
38
|
-
**When to use:**
|
|
39
|
-
|
|
40
|
-
- Component interaction verification
|
|
41
|
-
- Database operations and transactions
|
|
42
|
-
- API endpoint contracts
|
|
43
|
-
- Service-to-service communication
|
|
44
|
-
- Middleware and interceptor behavior
|
|
45
|
-
|
|
46
|
-
**Characteristics:**
|
|
47
|
-
|
|
48
|
-
- Moderate execution time
|
|
49
|
-
- Tests component boundaries
|
|
50
|
-
- May use test databases or containers
|
|
51
|
-
- Validates system integration points
|
|
52
|
-
|
|
53
|
-
**Example scenarios:**
|
|
54
|
-
|
|
55
|
-
```yaml
|
|
56
|
-
integration_test:
|
|
57
|
-
components: ['UserService', 'AuthRepository']
|
|
58
|
-
scenario: 'Create user with role assignment'
|
|
59
|
-
justification: 'Critical data flow between service and persistence'
|
|
60
|
-
test_environment: 'In-memory database'
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### End-to-End Tests
|
|
64
|
-
|
|
65
|
-
**When to use:**
|
|
66
|
-
|
|
67
|
-
- Critical user journeys
|
|
68
|
-
- Cross-system workflows
|
|
69
|
-
- Visual regression testing
|
|
70
|
-
- Compliance and regulatory requirements
|
|
71
|
-
- Final validation before release
|
|
72
|
-
|
|
73
|
-
**Characteristics:**
|
|
74
|
-
|
|
75
|
-
- Slower execution
|
|
76
|
-
- Tests complete workflows
|
|
77
|
-
- Requires full environment setup
|
|
78
|
-
- Most realistic but most brittle
|
|
79
|
-
|
|
80
|
-
**Example scenarios:**
|
|
81
|
-
|
|
82
|
-
```yaml
|
|
83
|
-
e2e_test:
|
|
84
|
-
journey: 'Complete checkout process'
|
|
85
|
-
scenario: 'User purchases with saved payment method'
|
|
86
|
-
justification: 'Revenue-critical path requiring full validation'
|
|
87
|
-
environment: 'Staging with test payment gateway'
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Test Level Selection Rules
|
|
91
|
-
|
|
92
|
-
### Favor Unit Tests When:
|
|
93
|
-
|
|
94
|
-
- Logic can be isolated
|
|
95
|
-
- No side effects involved
|
|
96
|
-
- Fast feedback needed
|
|
97
|
-
- High cyclomatic complexity
|
|
98
|
-
|
|
99
|
-
### Favor Integration Tests When:
|
|
100
|
-
|
|
101
|
-
- Testing persistence layer
|
|
102
|
-
- Validating service contracts
|
|
103
|
-
- Testing middleware/interceptors
|
|
104
|
-
- Component boundaries critical
|
|
105
|
-
|
|
106
|
-
### Favor E2E Tests When:
|
|
107
|
-
|
|
108
|
-
- User-facing critical paths
|
|
109
|
-
- Multi-system interactions
|
|
110
|
-
- Regulatory compliance scenarios
|
|
111
|
-
- Visual regression important
|
|
112
|
-
|
|
113
|
-
## Anti-patterns to Avoid
|
|
114
|
-
|
|
115
|
-
- E2E testing for business logic validation
|
|
116
|
-
- Unit testing framework behavior
|
|
117
|
-
- Integration testing third-party libraries
|
|
118
|
-
- Duplicate coverage across levels
|
|
119
|
-
|
|
120
|
-
## Duplicate Coverage Guard
|
|
121
|
-
|
|
122
|
-
**Before adding any test, check:**
|
|
123
|
-
|
|
124
|
-
1. Is this already tested at a lower level?
|
|
125
|
-
2. Can a unit test cover this instead of integration?
|
|
126
|
-
3. Can an integration test cover this instead of E2E?
|
|
127
|
-
|
|
128
|
-
**Coverage overlap is only acceptable when:**
|
|
129
|
-
|
|
130
|
-
- Testing different aspects (unit: logic, integration: interaction, e2e: user experience)
|
|
131
|
-
- Critical paths requiring defense in depth
|
|
132
|
-
- Regression prevention for previously broken functionality
|
|
133
|
-
|
|
134
|
-
## Test Naming Conventions
|
|
135
|
-
|
|
136
|
-
- Unit: `test_{component}_{scenario}`
|
|
137
|
-
- Integration: `test_{flow}_{interaction}`
|
|
138
|
-
- E2E: `test_{journey}_{outcome}`
|
|
139
|
-
|
|
140
|
-
## Test ID Format
|
|
141
|
-
|
|
142
|
-
`{EPIC}.{STORY}-{LEVEL}-{SEQ}`
|
|
143
|
-
|
|
144
|
-
Examples:
|
|
145
|
-
|
|
146
|
-
- `1.3-UNIT-001`
|
|
147
|
-
- `1.3-INT-002`
|
|
148
|
-
- `1.3-E2E-001`
|