@zenuml/core 3.32.6 → 3.32.7

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 (35) hide show
  1. package/.claude/commands/README.md +162 -0
  2. package/.claude/commands/code-review.md +322 -0
  3. package/.claude/commands/create-docs.md +309 -0
  4. package/.claude/commands/full-context.md +121 -0
  5. package/.claude/commands/gemini-consult.md +164 -0
  6. package/.claude/commands/handoff.md +146 -0
  7. package/.claude/commands/refactor.md +188 -0
  8. package/.claude/commands/update-docs.md +314 -0
  9. package/.claude/hooks/README.md +270 -0
  10. package/.claude/hooks/config/sensitive-patterns.json +86 -0
  11. package/.claude/hooks/gemini-context-injector.sh +129 -0
  12. package/.claude/hooks/mcp-security-scan.sh +147 -0
  13. package/.claude/hooks/notify.sh +103 -0
  14. package/.claude/hooks/setup/hook-setup.md +96 -0
  15. package/.claude/hooks/setup/settings.json.template +63 -0
  16. package/.claude/hooks/sounds/complete.wav +0 -0
  17. package/.claude/hooks/sounds/input-needed.wav +0 -0
  18. package/.claude/hooks/subagent-context-injector.sh +65 -0
  19. package/.storybook/main.ts +25 -0
  20. package/.storybook/preview.ts +29 -0
  21. package/MCP-ASSISTANT-RULES.md +85 -0
  22. package/dist/zenuml.esm.mjs +3037 -2994
  23. package/dist/zenuml.js +40 -40
  24. package/docs/CONTEXT-tier2-component.md +96 -0
  25. package/docs/CONTEXT-tier3-feature.md +162 -0
  26. package/docs/README.md +207 -0
  27. package/docs/ai-context/deployment-infrastructure.md +21 -0
  28. package/docs/ai-context/docs-overview.md +89 -0
  29. package/docs/ai-context/handoff.md +174 -0
  30. package/docs/ai-context/project-structure.md +160 -0
  31. package/docs/ai-context/system-integration.md +21 -0
  32. package/docs/open-issues/example-api-performance-issue.md +79 -0
  33. package/eslint.config.mjs +26 -26
  34. package/package.json +9 -2
  35. package/tailwind.config.js +0 -4
@@ -0,0 +1,96 @@
1
+ # [COMPONENT NAME] - Component Context (Tier 2)
2
+
3
+ > **Note**: This is component-specific context. See root **CLAUDE.md** for master project context and coding standards.
4
+
5
+ ## Purpose
6
+ [Brief description of this component's role in the system. What problem does it solve and how does it fit into the overall architecture?]
7
+
8
+ ## Current Status: [Status Description] ✅/🚧/📋
9
+ [Current implementation state, what's working, what's in progress, and key milestones achieved]
10
+
11
+ ## Component-Specific Development Guidelines
12
+ - **[Technology/Framework]**: [Specific technology requirements for this component]
13
+ - **[Architecture Pattern]**: [Component-specific architectural approach]
14
+ - **[Code Organization]**: [How code should be structured within this component]
15
+ - **[Integration Patterns]**: [How this component integrates with others]
16
+ - **[Quality Standards]**: [Component-specific quality requirements]
17
+
18
+ ## Key Component Structure
19
+
20
+ ### Core Modules (`[path]/`)
21
+ - **[module1]/** - [Purpose and key functionality]
22
+ - **[file1].[ext]** - [Specific file purpose and key features]
23
+ - **[file2].[ext]** - [Specific file purpose and key features]
24
+ - **[module2]/** - [Purpose and key functionality]
25
+ - **[module3]/** - [Purpose and key functionality]
26
+
27
+ ### [Secondary Structure] (`[path]/`)
28
+ - **[component].[ext]** - [Component purpose and architecture pattern]
29
+ - **[utilities].[ext]** - [Utility functions and helpers]
30
+ - **[config].[ext]** - [Configuration and settings management]
31
+
32
+ ### [Integration Layer] (`[path]/`)
33
+ - **[integration1].[ext]** - [External service integration patterns]
34
+ - **[integration2].[ext]** - [Inter-component communication]
35
+
36
+ ## Implementation Highlights
37
+
38
+ ### [Key Feature 1]
39
+ - **[Technical Implementation]**: [How this feature is implemented]
40
+ - **[Architecture Decision]**: [Why this approach was chosen]
41
+ - **[Performance Considerations]**: [Optimization details]
42
+ - **[Integration Points]**: [How it connects to other components]
43
+
44
+ ### [Key Feature 2]
45
+ - **[Implementation Pattern]**: [Technical implementation approach]
46
+ - **[Quality Measures]**: [Testing, monitoring, error handling]
47
+ - **[Scalability Considerations]**: [How it handles growth/load]
48
+
49
+ ### [Key Feature 3]
50
+ - **[Technical Details]**: [Implementation specifics]
51
+ - **[Dependencies]**: [External dependencies and integration points]
52
+ - **[Configuration]**: [How it's configured and customized]
53
+
54
+ ## Critical Implementation Details
55
+
56
+ ### [Technical Pattern 1]
57
+ **[Pattern Description]**: [What problem this pattern solves]
58
+
59
+ ```[language]
60
+ // Example implementation showing the pattern
61
+ [code example demonstrating the critical implementation]
62
+ ```
63
+
64
+ ### [Technical Pattern 2]
65
+ **[Architecture Decision]**: [Why this approach was chosen]
66
+
67
+ ```[language]
68
+ // Code example showing architecture implementation
69
+ [code example demonstrating the architecture]
70
+ ```
71
+
72
+ ### [Integration Pattern]
73
+ **[Integration Description]**: [How this component integrates with others]
74
+
75
+ ```[language]
76
+ // Integration implementation example
77
+ [code example showing integration patterns]
78
+ ```
79
+
80
+ ## Development Notes
81
+
82
+ ### [Current Challenges]
83
+ - **[Challenge 1]**: [Description and current approach]
84
+ - **[Challenge 2]**: [Description and mitigation strategy]
85
+
86
+ ### [Future Considerations]
87
+ - **[Enhancement 1]**: [Planned improvement and rationale]
88
+ - **[Enhancement 2]**: [Future architectural evolution]
89
+
90
+ ### [Performance Metrics]
91
+ - **[Key Metric 1]**: [Current performance and targets]
92
+ - **[Key Metric 2]**: [Monitoring and optimization approach]
93
+
94
+ ---
95
+
96
+ *This component documentation provides context for AI-assisted development within [COMPONENT NAME]. For system-wide patterns and standards, reference the master CLAUDE.md file.*
@@ -0,0 +1,162 @@
1
+ # [FEATURE NAME] Documentation (Tier 3)
2
+
3
+ *This file documents [feature/module] patterns, architectural decisions, and implementations within [component name].*
4
+
5
+ ## [Feature] Architecture Overview
6
+
7
+ ### [Architecture Decision Title]
8
+
9
+ **Context**: [Situation that led to this architectural decision]
10
+
11
+ **Decision**: [What was decided and implemented]
12
+
13
+ **Reasoning**:
14
+ - **[Benefit 1]**: [Why this approach provides this benefit]
15
+ - **[Benefit 2]**: [Technical or business advantage]
16
+ - **[Benefit 3]**: [Performance or maintainability benefit]
17
+ - **[Benefit 4]**: [Developer experience or operational benefit]
18
+
19
+ **Consequences**:
20
+ - [Positive outcome from this decision]
21
+ - [Technical improvement achieved]
22
+ - [Operational or maintenance benefit]
23
+ - [User experience enhancement]
24
+
25
+ ## [Feature] Implementation Patterns
26
+
27
+ ### [Implementation Pattern 1]
28
+
29
+ **File Organization**:
30
+ ```
31
+ [feature-directory]/
32
+ ├── [file1].[ext] # [Purpose and responsibility]
33
+ ├── [file2].[ext] # [Purpose and responsibility]
34
+ ├── [file3].[ext] # [Purpose and responsibility]
35
+ └── [file4].[ext] # [Purpose and responsibility]
36
+ ```
37
+
38
+ **Architecture Benefits**:
39
+ - **[Benefit 1]**: [How this organization provides this benefit]
40
+ - **[Benefit 2]**: [Technical advantage of this structure]
41
+ - **[Benefit 3]**: [Maintainability or scalability benefit]
42
+ - **[Benefit 4]**: [Developer experience improvement]
43
+
44
+ ### [Implementation Pattern 2]
45
+
46
+ **Architecture Decision**: [Technical approach taken]
47
+
48
+ **Context**: [Background and requirements that led to this approach]
49
+
50
+ **Decision**: [Specific implementation choice made]
51
+
52
+ **Reasoning**:
53
+ - **[Technical Reason]**: [Why this was the best technical choice]
54
+ - **[Performance Reason]**: [Performance benefits]
55
+ - **[Maintainability Reason]**: [Long-term maintenance benefits]
56
+ - **[Integration Reason]**: [How it integrates with other components]
57
+
58
+ **Implementation Details**:
59
+ ```[language]
60
+ // [Description of what this code demonstrates]
61
+ [detailed code example showing the implementation pattern]
62
+ ```
63
+
64
+ ### [Implementation Pattern 3]
65
+
66
+ **[Pattern Name]**: [Description of the pattern]
67
+
68
+ ```[language]
69
+ // [Code example title]
70
+ [comprehensive code example showing the pattern in action]
71
+ ```
72
+
73
+ **Implementation Benefits**:
74
+ - **[Benefit 1]**: [Specific advantage this implementation provides]
75
+ - **[Benefit 2]**: [Performance or reliability improvement]
76
+ - **[Benefit 3]**: [Developer experience enhancement]
77
+
78
+ ## [Technical Domain] Implementation
79
+
80
+ ### [Technical Feature 1]
81
+
82
+ **[Feature Description]**: [What this feature does and why it's important]
83
+
84
+ **Architecture Pattern**:
85
+ ```[language]
86
+ // [Description of the architectural approach]
87
+ [code example demonstrating the architecture]
88
+ ```
89
+
90
+ **Key Implementation Details**:
91
+ - **[Detail 1]**: [Important implementation consideration]
92
+ - **[Detail 2]**: [Technical constraint or optimization]
93
+ - **[Detail 3]**: [Integration or performance consideration]
94
+
95
+ ### [Technical Feature 2]
96
+
97
+ **Implementation Approach**: [How this feature is implemented]
98
+
99
+ ```[language]
100
+ // [Code example description]
101
+ [detailed implementation example]
102
+ ```
103
+
104
+ **Technical Considerations**:
105
+ - **[Consideration 1]**: [Important technical factor]
106
+ - **[Consideration 2]**: [Performance or scalability factor]
107
+ - **[Consideration 3]**: [Maintenance or testing consideration]
108
+
109
+ ## [Integration/Communication] Patterns
110
+
111
+ ### [Integration Pattern 1]
112
+
113
+ **Context**: [When and why this integration pattern is used]
114
+
115
+ **Implementation**:
116
+ ```[language]
117
+ // [Integration example description]
118
+ [code showing integration implementation]
119
+ ```
120
+
121
+ **Benefits**:
122
+ - **[Integration Benefit 1]**: [How this improves system integration]
123
+ - **[Integration Benefit 2]**: [Performance or reliability improvement]
124
+
125
+ ### [Integration Pattern 2]
126
+
127
+ **Pattern Description**: [What problem this integration pattern solves]
128
+
129
+ ```[language]
130
+ // [Integration code example]
131
+ [implementation showing integration pattern]
132
+ ```
133
+
134
+ ## Performance & Optimization Details
135
+
136
+ ### [Performance Optimization 1]
137
+ **Optimization**: [What was optimized and how]
138
+ - **Before**: [Previous performance characteristics]
139
+ - **After**: [Improved performance metrics]
140
+ - **Implementation**: [How the optimization was achieved]
141
+
142
+ ### [Performance Optimization 2]
143
+ **Technical Improvement**: [Specific performance enhancement]
144
+ - **Impact**: [Measurable improvement achieved]
145
+ - **Method**: [Technical approach used]
146
+ - **Trade-offs**: [Any compromises made for the optimization]
147
+
148
+ ## Error Handling & Edge Cases
149
+
150
+ ### [Error Scenario 1]
151
+ **Scenario**: [What error condition this handles]
152
+ **Handling**: [How the error is detected and managed]
153
+ **Recovery**: [How the system recovers from this error]
154
+
155
+ ### [Error Scenario 2]
156
+ **Edge Case**: [Unusual condition that needs handling]
157
+ **Solution**: [How the implementation handles this case]
158
+ **Validation**: [How this handling is tested or verified]
159
+
160
+ ---
161
+
162
+ *This feature documentation provides detailed implementation context for AI-assisted development. For broader component context, see the component-level CONTEXT.md file.*
package/docs/README.md ADDED
@@ -0,0 +1,207 @@
1
+ # Documentation System Guide
2
+
3
+ This guide explains how the 3-tier documentation architecture powers the Claude Code Development Kit and why it provides superior results compared to traditional documentation approaches.
4
+
5
+ ## Critical Foundation Files
6
+
7
+ Two files form the cornerstone of the entire documentation system:
8
+
9
+ 1. **docs-overview.md** - The central routing guide that directs AI agents to appropriate documentation based on task complexity. This file maps your entire documentation structure and enables intelligent context loading.
10
+
11
+ 2. **project-structure.md** - The comprehensive overview of your project's complete file structure and technology stack. This file is required reading for all AI agents and must be attached to Gemini consultations.
12
+
13
+ These foundation files ensure AI agents always have the essential context needed to understand your project and navigate to relevant documentation.
14
+
15
+ ## Why the 3-Tier System
16
+
17
+ ### Traditional Documentation Problems
18
+
19
+ Standard documentation approaches create friction for AI-assisted development:
20
+
21
+ - **Context Overload** - AI agents must process entire documentation sets for simple tasks
22
+ - **Maintenance Burden** - Every code change cascades to multiple documentation locations
23
+ - **Stale Content** - Documentation diverges from implementation reality
24
+ - **No AI Optimization** - Human-readable formats lack structure for machine processing
25
+
26
+ ### The 3-Tier Solution
27
+
28
+ The kit solves these problems through hierarchical organization:
29
+
30
+ **Tier 1: Foundation (Rarely Changes)**
31
+ - Project-wide standards, architecture decisions, technology stack
32
+ - Auto-loads for every AI session
33
+ - Provides consistent baseline without redundancy
34
+ - Uses CLAUDE.md as the master context file
35
+
36
+ **Tier 2: Component (Occasionally Changes)**
37
+ - Component boundaries, architectural patterns, integration points
38
+ - Loads only when working within specific components
39
+ - Isolates architectural decisions from implementation details
40
+ - Uses CONTEXT.md files at component roots
41
+
42
+ **Tier 3: Feature (Frequently Changes)**
43
+ - Implementation specifics, technical details, local patterns
44
+ - Co-located with code for immediate updates
45
+ - Minimizes documentation cascade when code changes
46
+ - Uses CONTEXT.md files within feature directories
47
+
48
+ ## Benefits vs Traditional Systems
49
+
50
+ ### 1. Intelligent Context Loading
51
+
52
+ **Traditional**: AI loads entire documentation corpus regardless of task
53
+ **3-Tier**: Commands load only relevant tiers based on complexity
54
+
55
+ Example:
56
+ - Simple query → Tier 1 only (minimal tokens)
57
+ - Component work → Tier 1 + relevant Tier 2
58
+ - Deep implementation → All relevant tiers
59
+
60
+ ### 2. Maintenance Efficiency
61
+
62
+ **Traditional**: Update multiple documents for each change
63
+ **3-Tier**: Updates isolated to appropriate tier
64
+
65
+ Example:
66
+ - API endpoint change → Update only Tier 3 API documentation
67
+ - New component → Add Tier 2 documentation, Tier 1 unchanged
68
+ - Coding standard → Update only Tier 1, applies everywhere
69
+
70
+ ### 3. AI Performance Optimization
71
+
72
+ **Traditional**: AI struggles to find relevant information
73
+ **3-Tier**: Structured hierarchy guides AI to precise context
74
+
75
+ The system provides:
76
+ - Clear routing logic for agent navigation
77
+ - Predictable documentation locations
78
+ - Efficient token usage through targeted loading
79
+
80
+ ## Integration with Kit Components
81
+
82
+ ### Command Integration
83
+
84
+ Commands leverage the 3-tier structure for intelligent operation:
85
+
86
+ ```
87
+ Command Execution → Analyze Task Complexity → Load Appropriate Tiers
88
+
89
+ Simple: Tier 1 only
90
+ Component: Tiers 1-2
91
+ Complex: All relevant tiers
92
+ ```
93
+
94
+ ### MCP Server Integration
95
+
96
+ External AI services receive proper context through the tier system:
97
+
98
+ - **Gemini Consultations** - Auto-attach `project-structure.md` (Tier 1)
99
+ - **Context7 Lookups** - Happen within established project context
100
+ - **Recommendations** - Align with documented architecture
101
+
102
+ ### Multi-Agent Routing
103
+
104
+ The documentation structure determines agent behavior:
105
+
106
+ - Number of agents spawned based on tiers involved
107
+ - Each agent receives targeted documentation subset
108
+ - Parallel analysis without context overlap
109
+
110
+ ## Key Files and Their Roles
111
+
112
+ ### Foundation Files (ai-context/)
113
+
114
+ **docs-overview.md**
115
+ - Template for implementing 3-tier documentation
116
+ - Maps documentation structure for AI navigation
117
+ - [View Template](ai-context/docs-overview.md)
118
+
119
+ **project-structure.md**
120
+ - Complete technology stack and file organization
121
+ - Required reading for all AI agents
122
+ - Auto-attaches to Gemini consultations
123
+ - [View Template](ai-context/project-structure.md)
124
+
125
+ **system-integration.md**
126
+ - Cross-component communication patterns
127
+ - Integration architectures for multi-agent analysis
128
+ - [View Template](ai-context/system-integration.md)
129
+
130
+ **deployment-infrastructure.md**
131
+ - Infrastructure patterns and constraints
132
+ - Deployment context for AI recommendations
133
+ - [View Template](ai-context/deployment-infrastructure.md)
134
+
135
+ **handoff.md**
136
+ - Session continuity between AI interactions
137
+ - Task state preservation
138
+ - [View Template](ai-context/handoff.md)
139
+
140
+ ### Context Templates
141
+
142
+ **CLAUDE.md** (Tier 1)
143
+ - Master AI context with coding standards
144
+ - Project-wide instructions and patterns
145
+ - [View Template](CLAUDE.md)
146
+
147
+ **CONTEXT-tier2-component.md**
148
+ - Component-level architectural context
149
+ - [View Template](CONTEXT-tier2-component.md)
150
+
151
+ **CONTEXT-tier3-feature.md**
152
+ - Feature-specific implementation details
153
+ - [View Template](CONTEXT-tier3-feature.md)
154
+
155
+ ## Implementation Strategy
156
+
157
+ ### 1. Start with Templates
158
+
159
+ Use provided templates as foundation:
160
+ - Copy and customize for your project
161
+ - Maintain consistent structure
162
+ - Focus on AI-consumable formatting
163
+
164
+ ### 2. Follow Natural Boundaries
165
+
166
+ Let your architecture guide tier placement:
167
+ - Stable decisions → Tier 1
168
+ - Component design → Tier 2
169
+ - Implementation details → Tier 3
170
+
171
+ ### 3. Co-locate Documentation
172
+
173
+ Place CONTEXT.md files with related code:
174
+ ```
175
+ backend/
176
+ ├── CONTEXT.md # Backend architecture (Tier 2)
177
+ └── src/
178
+ └── api/
179
+ └── CONTEXT.md # API implementation (Tier 3)
180
+ ```
181
+
182
+ ### 4. Maintain Hierarchy
183
+
184
+ Ensure clear relationships:
185
+ - Tier 3 references Tier 2 patterns
186
+ - Tier 2 follows Tier 1 standards
187
+ - No circular dependencies
188
+
189
+ ### 5. Use Documentation Commands
190
+
191
+ The kit provides commands to manage documentation:
192
+ - **`/create-docs`** - Generate initial documentation structure for projects without existing docs
193
+ - **`/update-docs`** - Regenerate and update documentation after code changes to keep everything current
194
+
195
+ ## Measuring Success
196
+
197
+ The 3-tier system succeeds when:
198
+
199
+ 1. **AI agents find context quickly** - No searching through irrelevant documentation
200
+ 2. **Updates stay localized** - Changes don't cascade unnecessarily
201
+ 3. **Documentation stays current** - Co-location ensures updates happen
202
+ 4. **Commands work efficiently** - Appropriate context loads automatically
203
+ 5. **MCP servers provide relevant advice** - External AI understands your project
204
+
205
+ ---
206
+
207
+ *Part of the Claude Code Development Kit - see [main documentation](../README.md) for complete system overview.*
@@ -0,0 +1,21 @@
1
+ # Deployment & Infrastructure Documentation
2
+
3
+ This document contains deployment and infrastructure-related documentation for the project.
4
+
5
+ ## Purpose
6
+
7
+ This template serves as a placeholder for documenting:
8
+ - Deployment strategies and procedures
9
+ - Infrastructure architecture and configuration
10
+ - CI/CD pipelines and automation
11
+ - Environment management
12
+ - Monitoring and observability setup
13
+ - Scaling strategies and considerations
14
+
15
+ ## Implementation Note
16
+
17
+ Replace this template with your actual deployment and infrastructure documentation as your project develops. Focus on patterns and decisions that AI agents need to understand when working with infrastructure-related code or making architectural recommendations.
18
+
19
+ ---
20
+
21
+ *Customize this template based on your specific deployment and infrastructure requirements.*
@@ -0,0 +1,89 @@
1
+ # Documentation Architecture
2
+
3
+ This project uses a **3-tier documentation system** that organizes knowledge by stability and scope, enabling efficient AI context loading and scalable development.
4
+
5
+ ## How the 3-Tier System Works
6
+
7
+ **Tier 1 (Foundation)**: Stable, system-wide documentation that rarely changes - architectural principles, technology decisions, cross-component patterns, and core development protocols.
8
+
9
+ **Tier 2 (Component)**: Architectural charters for major components - high-level design principles, integration patterns, and component-wide conventions without feature-specific details.
10
+
11
+ **Tier 3 (Feature-Specific)**: Granular documentation co-located with code - specific implementation patterns, technical details, and local architectural decisions that evolve with features.
12
+
13
+ This hierarchy allows AI agents to load targeted context efficiently while maintaining a stable foundation of core knowledge.
14
+
15
+ ## Documentation Principles
16
+ - **Co-location**: Documentation lives near relevant code
17
+ - **Smart Extension**: New documentation files created automatically when warranted
18
+ - **AI-First**: Optimized for efficient AI context loading and machine-readable patterns
19
+
20
+ ## Tier 1: Foundational Documentation (System-Wide)
21
+
22
+ - **[Master Context](/CLAUDE.md)** - *Essential for every session.* Coding standards, security requirements, MCP server integration patterns, and development protocols
23
+ - **[Project Structure](/docs/ai-context/project-structure.md)** - *REQUIRED reading.* Complete technology stack, file tree, and system architecture. Must be attached to Gemini consultations
24
+ - **[System Integration](/docs/ai-context/system-integration.md)** - *For cross-component work.* Communication patterns, data flow, testing strategies, and performance optimization
25
+ - **[Deployment Infrastructure](/docs/ai-context/deployment-infrastructure.md)** - *Infrastructure patterns.* Containerization, monitoring, CI/CD workflows, and scaling strategies
26
+ - **[Task Management](/docs/ai-context/handoff.md)** - *Session continuity.* Current tasks, documentation system progress, and next session goals
27
+
28
+ ## Tier 2: Component-Level Documentation
29
+
30
+ ### Backend Components
31
+ - **[Backend Context](/backend/CONTEXT.md)** - *Server implementation.* API patterns, database integration, service architecture, and performance considerations
32
+ - **[Worker Services](/workers/CONTEXT.md)** - *Background processing.* Job queue patterns, scheduling, and async task management
33
+ - **[Shared Libraries](/shared/CONTEXT.md)** - *Reusable code.* Common utilities, shared types, and cross-component functionality
34
+
35
+ ### Frontend Components
36
+ - **[Web Application](/frontend/CONTEXT.md)** - *Client implementation.* UI patterns, state management, routing, and user interaction patterns
37
+ - **[Mobile Application](/mobile/CONTEXT.md)** - *Mobile implementation.* Platform-specific patterns, native integrations, and mobile optimizations
38
+ - **[Admin Dashboard](/admin/CONTEXT.md)** - *Administrative interface.* Permission patterns, admin workflows, and management tools
39
+
40
+ ### Infrastructure Components
41
+ - **[Infrastructure Code](/infrastructure/CONTEXT.md)** - *IaC patterns.* Terraform/CloudFormation templates, resource definitions, and deployment automation
42
+ - **[Monitoring Setup](/monitoring/CONTEXT.md)** - *Observability patterns.* Metrics collection, alerting rules, and dashboard configurations
43
+
44
+ ## Tier 3: Feature-Specific Documentation
45
+
46
+ Granular CONTEXT.md files co-located with code for minimal cascade effects:
47
+
48
+ ### Backend Feature Documentation
49
+ - **[Core Services](/backend/src/core/services/CONTEXT.md)** - *Business logic patterns.* Service architecture, data processing, integration patterns, and error handling
50
+ - **[API Layer](/backend/src/api/CONTEXT.md)** - *API patterns.* Endpoint design, validation, middleware, and request/response handling
51
+ - **[Data Layer](/backend/src/data/CONTEXT.md)** - *Data patterns.* Database models, queries, migrations, and data access patterns
52
+ - **[Authentication](/backend/src/auth/CONTEXT.md)** - *Auth patterns.* Authentication flows, authorization rules, session management, and security
53
+ - **[Integrations](/backend/src/integrations/CONTEXT.md)** - *External services.* Third-party API clients, webhook handlers, and service adapters
54
+
55
+ ### Frontend Feature Documentation
56
+ - **[UI Components](/frontend/src/components/CONTEXT.md)** - *Component patterns.* Reusable components, styling patterns, accessibility, and composition strategies
57
+ - **[State Management](/frontend/src/store/CONTEXT.md)** - *State patterns.* Global state, local state, data flow, and persistence strategies
58
+ - **[API Client](/frontend/src/api/CONTEXT.md)** - *Client patterns.* HTTP clients, error handling, caching, and data synchronization
59
+ - **[Routing](/frontend/src/routes/CONTEXT.md)** - *Navigation patterns.* Route definitions, guards, lazy loading, and deep linking
60
+ - **[Utilities](/frontend/src/utils/CONTEXT.md)** - *Helper functions.* Formatters, validators, transformers, and common utilities
61
+
62
+ ### Shared Feature Documentation
63
+ - **[Common Types](/shared/src/types/CONTEXT.md)** - *Type definitions.* Shared interfaces, enums, and type utilities
64
+ - **[Validation Rules](/shared/src/validation/CONTEXT.md)** - *Validation patterns.* Schema definitions, custom validators, and error messages
65
+ - **[Constants](/shared/src/constants/CONTEXT.md)** - *Shared constants.* Configuration values, enums, and magic numbers
66
+ - **[Utilities](/shared/src/utils/CONTEXT.md)** - *Shared utilities.* Cross-platform helpers, formatters, and common functions
67
+
68
+
69
+
70
+ ## Adding New Documentation
71
+
72
+ ### New Component
73
+ 1. Create `/new-component/CONTEXT.md` (Tier 2)
74
+ 2. Add entry to this file under appropriate section
75
+ 3. Create feature-specific Tier 3 docs as features develop
76
+
77
+ ### New Feature
78
+ 1. Create `/component/src/feature/CONTEXT.md` (Tier 3)
79
+ 2. Reference parent component patterns
80
+ 3. Add entry to this file under component's features
81
+
82
+ ### Deprecating Documentation
83
+ 1. Remove obsolete CONTEXT.md files
84
+ 2. Update this mapping document
85
+ 3. Check for broken references in other docs
86
+
87
+ ---
88
+
89
+ *This documentation architecture template should be customized to match your project's actual structure and components. Add or remove sections based on your architecture.*