@wipal/agent-team 1.0.3 → 1.1.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.
- package/.claude/commands/skills/discover.md +127 -0
- package/.claude/commands/skills/install.md +225 -0
- package/.claude/commands/skills/review.md +234 -0
- package/.claude/commands/utils/learn.md +142 -0
- package/.claude/commands/utils/retrospect.md +62 -0
- package/.claude/commands/utils/switch.md +113 -0
- package/.claude/commands/utils/sync.md +183 -0
- package/.claude/rules/common/general-rules.md +6 -0
- package/.claude/rules/role-rules/dev-be-rules.md +241 -0
- package/.claude/rules/role-rules/dev-fe-rules.md +76 -0
- package/.claude/skills/SKILL-INDEX.md +24 -5
- package/.claude/skills/core/knowledge-graph/SKILL.md +214 -0
- package/.claude/skills/core/sequential-thinking/SKILL.md +112 -0
- package/.claude/skills/core/sequential-thinking/references/advanced.md +122 -0
- package/.claude/skills/core/sequential-thinking/references/examples.md +274 -0
- package/.claude/skills/domain/architecture/c4-architecture/SKILL.md +314 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/advanced-patterns.md +552 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/c4-syntax.md +492 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/common-mistakes.md +437 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/SKILL.md +238 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/advanced-features.md +556 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/flowcharts.md +450 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/.claude/skills/domain/backend/testing-be/SKILL.md +121 -17
- package/.claude/skills/domain/design/design-system/SKILL.md +169 -0
- package/.claude/skills/domain/design/html-css-output/SKILL.md +253 -0
- package/.claude/skills/domain/design/mockup-creation/SKILL.md +230 -0
- package/.claude/skills/domain/design/responsive-design/SKILL.md +207 -0
- package/.claude/skills/domain/design/ui-design/SKILL.md +124 -0
- package/.claude/skills/domain/frontend/testing-fe/SKILL.md +143 -38
- package/.claude/skills/domain/frontend/ui-ux-pro-max/README.md +45 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/SKILL.md +404 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/charts.csv +26 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/colors.csv +97 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/icons.csv +101 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/landing.csv +31 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/products.csv +97 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/styles.csv +68 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/typography.csv +58 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/core.py +253 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/search.py +114 -0
- package/.claude/skills/domain/product/requirements-clarity/SKILL.md +340 -0
- package/.claude/skills/skills-registry.yaml +103 -8
- package/README.md +107 -33
- package/README.npm.md +252 -0
- package/TUTORIAL.md +256 -0
- package/bin/agent-team.js +26 -7
- package/config/roles.yaml +107 -0
- package/docs/01-architecture.md +699 -0
- package/docs/02-setup-guide.md +634 -0
- package/docs/03-skills-guide.md +628 -0
- package/docs/04-workflows.md +792 -0
- package/docs/05-model-strategy.md +550 -0
- package/docs/06-extend-guide.md +1226 -0
- package/docs/07-quick-reference.md +578 -0
- package/docs/08-skills-discovery.md +342 -0
- package/docs/README.md +134 -0
- package/docs/rqm.md +560 -0
- package/package.json +10 -4
- package/scripts/postinstall.js +46 -0
- package/src/commands/add.js +131 -67
- package/src/commands/init.js +419 -9
- package/src/commands/list.js +20 -16
- package/src/commands/projects.js +127 -0
- package/src/commands/setup-hooks.js +261 -0
- package/src/index.js +0 -1
- package/src/utils/file-utils.js +147 -50
- package/src/utils/global-registry.js +224 -0
- package/templates/CLAUDE.md.tmpl +128 -20
- package/templates/MEMORY.md.tmpl +119 -0
- package/templates/agent.md.tmpl +205 -0
- package/templates/code/nestjs-controller.ts.tmpl +49 -0
- package/templates/code/nestjs-dto.ts.tmpl +63 -0
- package/templates/code/nestjs-service.ts.tmpl +45 -0
- package/templates/code/react-component.tsx.tmpl +24 -0
- package/templates/code/react-hook.ts.tmpl +54 -0
- package/templates/code/test.spec.ts.tmpl +50 -0
- package/templates/code/vue-component.vue.tmpl +49 -0
- package/templates/code/vue-composable.ts.tmpl +54 -0
- package/templates/knowledge.md.tmpl +152 -17
- package/templates/meeting-notes.md.tmpl +110 -0
- package/templates/memory/hooks.memory.json +50 -0
- package/templates/memory/settings.memory.json +16 -0
- package/templates/reports/bug-report.md.tmpl +164 -0
- package/templates/reports/code-review.md.tmpl +201 -0
- package/templates/reports/sprint-report.md.tmpl +218 -0
- package/templates/roles/ba.md +53 -0
- package/templates/roles/designer.md +82 -0
- package/templates/roles/dev-be.md +49 -0
- package/templates/roles/dev-fe.md +49 -0
- package/templates/roles/devops.md +53 -0
- package/templates/roles/pm.md +49 -0
- package/templates/roles/qa.md +53 -0
- package/templates/roles/sa.md +49 -0
- package/templates/roles/tech-lead.md +132 -0
- package/templates/skills/memory/memory-status.md +78 -0
- package/templates/skills/memory/recall.md +160 -0
- package/templates/skills/memory/reflect.md +168 -0
- package/templates/skills/memory/remember.md +105 -0
- package/templates/tasks/lessons.md.tmpl +77 -0
- package/templates/tasks/todo.md.tmpl +53 -0
- package/src/commands/switch.js +0 -53
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: c4-architecture
|
|
3
|
+
description: |
|
|
4
|
+
Generate architecture documentation using C4 model Mermaid diagrams. Use when
|
|
5
|
+
creating architecture diagrams, documenting system architecture, visualizing
|
|
6
|
+
software structure, or generating context/container/component/deployment diagrams.
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
category: architecture
|
|
9
|
+
tags:
|
|
10
|
+
- c4-model
|
|
11
|
+
- architecture
|
|
12
|
+
- documentation
|
|
13
|
+
- diagrams
|
|
14
|
+
- mermaid
|
|
15
|
+
depends_on: []
|
|
16
|
+
recommends:
|
|
17
|
+
- mermaid-diagrams
|
|
18
|
+
used_by:
|
|
19
|
+
- sa
|
|
20
|
+
- tech-lead
|
|
21
|
+
- ba
|
|
22
|
+
- pm
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# C4 Architecture Documentation
|
|
26
|
+
|
|
27
|
+
Generate software architecture documentation using C4 model diagrams in Mermaid syntax.
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
1. **Understand scope** - Determine which C4 level(s) are needed based on audience
|
|
32
|
+
2. **Analyze codebase** - Explore the system to identify components, containers, and relationships
|
|
33
|
+
3. **Generate diagrams** - Create Mermaid C4 diagrams at appropriate abstraction levels
|
|
34
|
+
4. **Document** - Write diagrams to markdown files with explanatory context
|
|
35
|
+
|
|
36
|
+
## C4 Diagram Levels
|
|
37
|
+
|
|
38
|
+
Select the appropriate level based on the documentation need:
|
|
39
|
+
|
|
40
|
+
| Level | Diagram Type | Audience | Shows | When to Create |
|
|
41
|
+
|-------|-------------|----------|-------|----------------|
|
|
42
|
+
| 1 | **C4Context** | Everyone | System + external actors | Always (required) |
|
|
43
|
+
| 2 | **C4Container** | Technical | Apps, databases, services | Always (required) |
|
|
44
|
+
| 3 | **C4Component** | Developers | Internal components | Only if adds value |
|
|
45
|
+
| 4 | **C4Deployment** | DevOps | Infrastructure nodes | For production systems |
|
|
46
|
+
| - | **C4Dynamic** | Technical | Request flows (numbered) | For complex workflows |
|
|
47
|
+
|
|
48
|
+
**Key Insight:** "Context + Container diagrams are sufficient for most software development teams." Only create Component/Code diagrams when they genuinely add value.
|
|
49
|
+
|
|
50
|
+
## Quick Start Examples
|
|
51
|
+
|
|
52
|
+
### System Context (Level 1)
|
|
53
|
+
```mermaid
|
|
54
|
+
C4Context
|
|
55
|
+
title System Context - Workout Tracker
|
|
56
|
+
|
|
57
|
+
Person(user, "User", "Tracks workouts and exercises")
|
|
58
|
+
System(app, "Workout Tracker", "Vue PWA for tracking strength and CrossFit workouts")
|
|
59
|
+
System_Ext(browser, "Web Browser", "Stores data in IndexedDB")
|
|
60
|
+
|
|
61
|
+
Rel(user, app, "Uses")
|
|
62
|
+
Rel(app, browser, "Persists data to", "IndexedDB")
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Container Diagram (Level 2)
|
|
66
|
+
```mermaid
|
|
67
|
+
C4Container
|
|
68
|
+
title Container Diagram - Workout Tracker
|
|
69
|
+
|
|
70
|
+
Person(user, "User", "Tracks workouts")
|
|
71
|
+
|
|
72
|
+
Container_Boundary(app, "Workout Tracker PWA") {
|
|
73
|
+
Container(spa, "SPA", "Vue 3, TypeScript", "Single-page application")
|
|
74
|
+
Container(pinia, "State Management", "Pinia", "Manages application state")
|
|
75
|
+
ContainerDb(indexeddb, "IndexedDB", "Dexie", "Local workout storage")
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Rel(user, spa, "Uses")
|
|
79
|
+
Rel(spa, pinia, "Reads/writes state")
|
|
80
|
+
Rel(pinia, indexeddb, "Persists", "Dexie ORM")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Component Diagram (Level 3)
|
|
84
|
+
```mermaid
|
|
85
|
+
C4Component
|
|
86
|
+
title Component Diagram - Workout Feature
|
|
87
|
+
|
|
88
|
+
Container(views, "Views", "Vue Router pages")
|
|
89
|
+
|
|
90
|
+
Container_Boundary(workout, "Workout Feature") {
|
|
91
|
+
Component(useWorkout, "useWorkout", "Composable", "Workout execution state")
|
|
92
|
+
Component(useTimer, "useTimer", "Composable", "Timer state machine")
|
|
93
|
+
Component(workoutRepo, "WorkoutRepository", "Dexie", "Workout persistence")
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
Rel(views, useWorkout, "Uses")
|
|
97
|
+
Rel(useWorkout, useTimer, "Controls")
|
|
98
|
+
Rel(useWorkout, workoutRepo, "Saves to")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Dynamic Diagram (Request Flow)
|
|
102
|
+
```mermaid
|
|
103
|
+
C4Dynamic
|
|
104
|
+
title Dynamic Diagram - User Sign In Flow
|
|
105
|
+
|
|
106
|
+
ContainerDb(db, "Database", "PostgreSQL", "User credentials")
|
|
107
|
+
Container(spa, "Single-Page App", "React", "Banking UI")
|
|
108
|
+
|
|
109
|
+
Container_Boundary(api, "API Application") {
|
|
110
|
+
Component(signIn, "Sign In Controller", "Express", "Auth endpoint")
|
|
111
|
+
Component(security, "Security Service", "JWT", "Validates credentials")
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
Rel(spa, signIn, "1. Submit credentials", "JSON/HTTPS")
|
|
115
|
+
Rel(signIn, security, "2. Validate")
|
|
116
|
+
Rel(security, db, "3. Query user", "SQL")
|
|
117
|
+
|
|
118
|
+
UpdateRelStyle(spa, signIn, $textColor="blue", $offsetY="-30")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Deployment Diagram
|
|
122
|
+
```mermaid
|
|
123
|
+
C4Deployment
|
|
124
|
+
title Deployment Diagram - Production
|
|
125
|
+
|
|
126
|
+
Deployment_Node(browser, "Customer Browser", "Chrome/Firefox") {
|
|
127
|
+
Container(spa, "SPA", "React", "Web application")
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Deployment_Node(aws, "AWS Cloud", "us-east-1") {
|
|
131
|
+
Deployment_Node(ecs, "ECS Cluster", "Fargate") {
|
|
132
|
+
Container(api, "API Service", "Node.js", "REST API")
|
|
133
|
+
}
|
|
134
|
+
Deployment_Node(rds, "RDS", "db.r5.large") {
|
|
135
|
+
ContainerDb(db, "Database", "PostgreSQL", "Application data")
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
Rel(spa, api, "API calls", "HTTPS")
|
|
140
|
+
Rel(api, db, "Reads/writes", "JDBC")
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Element Syntax
|
|
144
|
+
|
|
145
|
+
### People and Systems
|
|
146
|
+
```
|
|
147
|
+
Person(alias, "Label", "Description")
|
|
148
|
+
Person_Ext(alias, "Label", "Description") # External person
|
|
149
|
+
System(alias, "Label", "Description")
|
|
150
|
+
System_Ext(alias, "Label", "Description") # External system
|
|
151
|
+
SystemDb(alias, "Label", "Description") # Database system
|
|
152
|
+
SystemQueue(alias, "Label", "Description") # Queue system
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Containers
|
|
156
|
+
```
|
|
157
|
+
Container(alias, "Label", "Technology", "Description")
|
|
158
|
+
Container_Ext(alias, "Label", "Technology", "Description")
|
|
159
|
+
ContainerDb(alias, "Label", "Technology", "Description")
|
|
160
|
+
ContainerQueue(alias, "Label", "Technology", "Description")
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Components
|
|
164
|
+
```
|
|
165
|
+
Component(alias, "Label", "Technology", "Description")
|
|
166
|
+
Component_Ext(alias, "Label", "Technology", "Description")
|
|
167
|
+
ComponentDb(alias, "Label", "Technology", "Description")
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Boundaries
|
|
171
|
+
```
|
|
172
|
+
Enterprise_Boundary(alias, "Label") { ... }
|
|
173
|
+
System_Boundary(alias, "Label") { ... }
|
|
174
|
+
Container_Boundary(alias, "Label") { ... }
|
|
175
|
+
Boundary(alias, "Label", "type") { ... }
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Relationships
|
|
179
|
+
```
|
|
180
|
+
Rel(from, to, "Label")
|
|
181
|
+
Rel(from, to, "Label", "Technology")
|
|
182
|
+
BiRel(from, to, "Label") # Bidirectional
|
|
183
|
+
Rel_U(from, to, "Label") # Upward
|
|
184
|
+
Rel_D(from, to, "Label") # Downward
|
|
185
|
+
Rel_L(from, to, "Label") # Leftward
|
|
186
|
+
Rel_R(from, to, "Label") # Rightward
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Deployment Nodes
|
|
190
|
+
```
|
|
191
|
+
Deployment_Node(alias, "Label", "Type", "Description") { ... }
|
|
192
|
+
Node(alias, "Label", "Type", "Description") { ... } # Shorthand
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Styling and Layout
|
|
196
|
+
|
|
197
|
+
### Layout Configuration
|
|
198
|
+
```
|
|
199
|
+
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
|
|
200
|
+
```
|
|
201
|
+
- `$c4ShapeInRow` - Number of shapes per row (default: 4)
|
|
202
|
+
- `$c4BoundaryInRow` - Number of boundaries per row (default: 2)
|
|
203
|
+
|
|
204
|
+
### Element Styling
|
|
205
|
+
```
|
|
206
|
+
UpdateElementStyle(alias, $fontColor="red", $bgColor="grey", $borderColor="red")
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Relationship Styling
|
|
210
|
+
```
|
|
211
|
+
UpdateRelStyle(from, to, $textColor="blue", $lineColor="blue", $offsetX="5", $offsetY="-10")
|
|
212
|
+
```
|
|
213
|
+
Use `$offsetX` and `$offsetY` to fix overlapping relationship labels.
|
|
214
|
+
|
|
215
|
+
## Best Practices
|
|
216
|
+
|
|
217
|
+
### Essential Rules
|
|
218
|
+
|
|
219
|
+
1. **Every element must have**: Name, Type, Technology (where applicable), and Description
|
|
220
|
+
2. **Use unidirectional arrows only** - Bidirectional arrows create ambiguity
|
|
221
|
+
3. **Label arrows with action verbs** - "Sends email using", "Reads from", not just "uses"
|
|
222
|
+
4. **Include technology labels** - "JSON/HTTPS", "JDBC", "gRPC"
|
|
223
|
+
5. **Stay under 20 elements per diagram** - Split complex systems into multiple diagrams
|
|
224
|
+
|
|
225
|
+
### Clarity Guidelines
|
|
226
|
+
|
|
227
|
+
1. **Start at Level 1** - Context diagrams help frame the system scope
|
|
228
|
+
2. **One diagram per file** - Keep diagrams focused on a single abstraction level
|
|
229
|
+
3. **Meaningful aliases** - Use descriptive aliases (e.g., `orderService` not `s1`)
|
|
230
|
+
4. **Concise descriptions** - Keep descriptions under 50 characters when possible
|
|
231
|
+
5. **Always include a title** - "System Context diagram for [System Name]"
|
|
232
|
+
|
|
233
|
+
### What to Avoid
|
|
234
|
+
|
|
235
|
+
See [references/common-mistakes.md](references/common-mistakes.md) for detailed anti-patterns:
|
|
236
|
+
- Confusing containers (deployable) vs components (non-deployable)
|
|
237
|
+
- Modeling shared libraries as containers
|
|
238
|
+
- Showing message brokers as single containers instead of individual topics
|
|
239
|
+
- Adding undefined abstraction levels like "subcomponents"
|
|
240
|
+
- Removing type labels to "simplify" diagrams
|
|
241
|
+
|
|
242
|
+
## Microservices Guidelines
|
|
243
|
+
|
|
244
|
+
### Single Team Ownership
|
|
245
|
+
Model each microservice as a **container** (or container group):
|
|
246
|
+
```mermaid
|
|
247
|
+
C4Container
|
|
248
|
+
title Microservices - Single Team
|
|
249
|
+
|
|
250
|
+
System_Boundary(platform, "E-commerce Platform") {
|
|
251
|
+
Container(orderApi, "Order Service", "Spring Boot", "Order processing")
|
|
252
|
+
ContainerDb(orderDb, "Order DB", "PostgreSQL", "Order data")
|
|
253
|
+
Container(inventoryApi, "Inventory Service", "Node.js", "Stock management")
|
|
254
|
+
ContainerDb(inventoryDb, "Inventory DB", "MongoDB", "Stock data")
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Multi-Team Ownership
|
|
259
|
+
Promote microservices to **software systems** when owned by separate teams:
|
|
260
|
+
```mermaid
|
|
261
|
+
C4Context
|
|
262
|
+
title Microservices - Multi-Team
|
|
263
|
+
|
|
264
|
+
Person(customer, "Customer", "Places orders")
|
|
265
|
+
System(orderSystem, "Order System", "Team Alpha")
|
|
266
|
+
System(inventorySystem, "Inventory System", "Team Beta")
|
|
267
|
+
System(paymentSystem, "Payment System", "Team Gamma")
|
|
268
|
+
|
|
269
|
+
Rel(customer, orderSystem, "Places orders")
|
|
270
|
+
Rel(orderSystem, inventorySystem, "Checks stock")
|
|
271
|
+
Rel(orderSystem, paymentSystem, "Processes payment")
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Event-Driven Architecture
|
|
275
|
+
Show individual topics/queues as containers, NOT a single "Kafka" box:
|
|
276
|
+
```mermaid
|
|
277
|
+
C4Container
|
|
278
|
+
title Event-Driven Architecture
|
|
279
|
+
|
|
280
|
+
Container(orderService, "Order Service", "Java", "Creates orders")
|
|
281
|
+
Container(stockService, "Stock Service", "Java", "Manages inventory")
|
|
282
|
+
ContainerQueue(orderTopic, "order.created", "Kafka", "Order events")
|
|
283
|
+
ContainerQueue(stockTopic, "stock.reserved", "Kafka", "Stock events")
|
|
284
|
+
|
|
285
|
+
Rel(orderService, orderTopic, "Publishes to")
|
|
286
|
+
Rel(stockService, orderTopic, "Subscribes to")
|
|
287
|
+
Rel(stockService, stockTopic, "Publishes to")
|
|
288
|
+
Rel(orderService, stockTopic, "Subscribes to")
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Output Location
|
|
292
|
+
|
|
293
|
+
Write architecture documentation to `docs/architecture/` with naming convention:
|
|
294
|
+
- `c4-context.md` - System context diagram
|
|
295
|
+
- `c4-containers.md` - Container diagram
|
|
296
|
+
- `c4-components-{feature}.md` - Component diagrams per feature
|
|
297
|
+
- `c4-deployment.md` - Deployment diagram
|
|
298
|
+
- `c4-dynamic-{flow}.md` - Dynamic diagrams for specific flows
|
|
299
|
+
|
|
300
|
+
## Audience-Appropriate Detail
|
|
301
|
+
|
|
302
|
+
| Audience | Recommended Diagrams |
|
|
303
|
+
|----------|---------------------|
|
|
304
|
+
| Executives | System Context only |
|
|
305
|
+
| Product Managers | Context + Container |
|
|
306
|
+
| Architects | Context + Container + key Components |
|
|
307
|
+
| Developers | All levels as needed |
|
|
308
|
+
| DevOps | Container + Deployment |
|
|
309
|
+
|
|
310
|
+
## References
|
|
311
|
+
|
|
312
|
+
- [references/c4-syntax.md](references/c4-syntax.md) - Complete Mermaid C4 syntax
|
|
313
|
+
- [references/common-mistakes.md](references/common-mistakes.md) - Anti-patterns to avoid
|
|
314
|
+
- [references/advanced-patterns.md](references/advanced-patterns.md) - Microservices, event-driven, deployment
|