siesa-agents 1.0.0

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.
Files changed (109) hide show
  1. package/README.md +84 -0
  2. package/bin/install.js +155 -0
  3. package/bin/prepare-publish.js +27 -0
  4. package/bin/restore-folders.js +27 -0
  5. package/bmad-core/agent-teams/team-all.yaml +15 -0
  6. package/bmad-core/agent-teams/team-fullstack.yaml +19 -0
  7. package/bmad-core/agent-teams/team-ide-minimal.yaml +11 -0
  8. package/bmad-core/agent-teams/team-no-ui.yaml +14 -0
  9. package/bmad-core/agents/analyst.md +84 -0
  10. package/bmad-core/agents/architect.md +94 -0
  11. package/bmad-core/agents/backend-agent.md +190 -0
  12. package/bmad-core/agents/bmad-master.md +110 -0
  13. package/bmad-core/agents/bmad-orchestrator.md +147 -0
  14. package/bmad-core/agents/dev.md +81 -0
  15. package/bmad-core/agents/frontend-agent.md +169 -0
  16. package/bmad-core/agents/pm.md +84 -0
  17. package/bmad-core/agents/po.md +79 -0
  18. package/bmad-core/agents/qa.md +91 -0
  19. package/bmad-core/agents/sm.md +65 -0
  20. package/bmad-core/agents/ux-expert.md +69 -0
  21. package/bmad-core/checklists/architect-checklist.md +440 -0
  22. package/bmad-core/checklists/backend-checklist.md +143 -0
  23. package/bmad-core/checklists/change-checklist.md +184 -0
  24. package/bmad-core/checklists/frontend-checklist.md +106 -0
  25. package/bmad-core/checklists/pm-checklist.md +372 -0
  26. package/bmad-core/checklists/po-master-checklist.md +434 -0
  27. package/bmad-core/checklists/story-dod-checklist.md +96 -0
  28. package/bmad-core/checklists/story-draft-checklist.md +155 -0
  29. package/bmad-core/core-config.yaml +22 -0
  30. package/bmad-core/data/backend-standards.md +440 -0
  31. package/bmad-core/data/bmad-kb.md +809 -0
  32. package/bmad-core/data/brainstorming-techniques.md +38 -0
  33. package/bmad-core/data/elicitation-methods.md +156 -0
  34. package/bmad-core/data/frontend-standards.md +324 -0
  35. package/bmad-core/data/technical-preferences.md +5 -0
  36. package/bmad-core/data/test-levels-framework.md +148 -0
  37. package/bmad-core/data/test-priorities-matrix.md +174 -0
  38. package/bmad-core/enhanced-ide-development-workflow.md +248 -0
  39. package/bmad-core/install-manifest.yaml +230 -0
  40. package/bmad-core/tasks/advanced-elicitation.md +119 -0
  41. package/bmad-core/tasks/apply-qa-fixes.md +150 -0
  42. package/bmad-core/tasks/brownfield-create-epic.md +162 -0
  43. package/bmad-core/tasks/brownfield-create-story.md +149 -0
  44. package/bmad-core/tasks/correct-course.md +72 -0
  45. package/bmad-core/tasks/create-brownfield-story.md +314 -0
  46. package/bmad-core/tasks/create-component.md +103 -0
  47. package/bmad-core/tasks/create-deep-research-prompt.md +280 -0
  48. package/bmad-core/tasks/create-doc.md +103 -0
  49. package/bmad-core/tasks/create-entity.md +133 -0
  50. package/bmad-core/tasks/create-feature.md +91 -0
  51. package/bmad-core/tasks/create-next-story.md +114 -0
  52. package/bmad-core/tasks/create-service.md +118 -0
  53. package/bmad-core/tasks/create-use-case.md +141 -0
  54. package/bmad-core/tasks/document-project.md +345 -0
  55. package/bmad-core/tasks/execute-checklist.md +88 -0
  56. package/bmad-core/tasks/facilitate-brainstorming-session.md +138 -0
  57. package/bmad-core/tasks/generate-ai-frontend-prompt.md +53 -0
  58. package/bmad-core/tasks/index-docs.md +175 -0
  59. package/bmad-core/tasks/kb-mode-interaction.md +77 -0
  60. package/bmad-core/tasks/nfr-assess.md +345 -0
  61. package/bmad-core/tasks/qa-gate.md +163 -0
  62. package/bmad-core/tasks/review-story.md +316 -0
  63. package/bmad-core/tasks/risk-profile.md +355 -0
  64. package/bmad-core/tasks/scaffold-backend.md +111 -0
  65. package/bmad-core/tasks/scaffold-frontend.md +79 -0
  66. package/bmad-core/tasks/shard-doc.md +187 -0
  67. package/bmad-core/tasks/test-design.md +176 -0
  68. package/bmad-core/tasks/trace-requirements.md +266 -0
  69. package/bmad-core/tasks/validate-next-story.md +136 -0
  70. package/bmad-core/templates/architecture-tmpl.yaml +662 -0
  71. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  72. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +477 -0
  73. package/bmad-core/templates/brownfield-prd-tmpl.yaml +281 -0
  74. package/bmad-core/templates/competitor-analysis-tmpl.yaml +307 -0
  75. package/bmad-core/templates/front-end-architecture-tmpl.yaml +258 -0
  76. package/bmad-core/templates/front-end-spec-tmpl.yaml +350 -0
  77. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +824 -0
  78. package/bmad-core/templates/market-research-tmpl.yaml +253 -0
  79. package/bmad-core/templates/prd-tmpl.yaml +203 -0
  80. package/bmad-core/templates/project-brief-tmpl.yaml +222 -0
  81. package/bmad-core/templates/qa-gate-tmpl.yaml +103 -0
  82. package/bmad-core/templates/story-tmpl.yaml +138 -0
  83. package/bmad-core/user-guide.md +530 -0
  84. package/bmad-core/utils/bmad-doc-template.md +327 -0
  85. package/bmad-core/utils/workflow-management.md +71 -0
  86. package/bmad-core/workflows/brownfield-fullstack.yaml +298 -0
  87. package/bmad-core/workflows/brownfield-service.yaml +188 -0
  88. package/bmad-core/workflows/brownfield-ui.yaml +198 -0
  89. package/bmad-core/workflows/greenfield-fullstack.yaml +241 -0
  90. package/bmad-core/workflows/greenfield-service.yaml +207 -0
  91. package/bmad-core/workflows/greenfield-ui.yaml +236 -0
  92. package/bmad-core/working-in-the-brownfield.md +606 -0
  93. package/github/b-mad-expert.md +742 -0
  94. package/github/chatmodes/analyst.chatmode.md +89 -0
  95. package/github/chatmodes/architect.chatmode.md +97 -0
  96. package/github/chatmodes/backend.chatmode.md +195 -0
  97. package/github/chatmodes/bmad-master.chatmode.md +115 -0
  98. package/github/chatmodes/bmad-orchestrator.chatmode.md +152 -0
  99. package/github/chatmodes/dev.chatmode.md +86 -0
  100. package/github/chatmodes/frontend.chatmode.md +158 -0
  101. package/github/chatmodes/pm.chatmode.md +89 -0
  102. package/github/chatmodes/po.chatmode.md +84 -0
  103. package/github/chatmodes/qa.chatmode.md +96 -0
  104. package/github/chatmodes/sm.chatmode.md +70 -0
  105. package/github/chatmodes/ux-expert.chatmode.md +74 -0
  106. package/index.js +11 -0
  107. package/package.json +41 -0
  108. package/vscode/mcp.json +11 -0
  109. package/vscode/settings.json +13 -0
@@ -0,0 +1,38 @@
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
@@ -0,0 +1,156 @@
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
@@ -0,0 +1,324 @@
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
@@ -0,0 +1,5 @@
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # User-Defined Preferred Patterns and Preferences
4
+
5
+ None Listed
@@ -0,0 +1,148 @@
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`