siesa-agents 2.1.1 → 2.1.3

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