refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
---
|
||||
id: wiki-2026-0508-structurizr
|
||||
title: Structurizr
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Structurizr DSL, C4 Tooling]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [architecture, c4-model, diagrams-as-code, documentation]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: dsl
|
||||
framework: structurizr
|
||||
---
|
||||
|
||||
# Structurizr
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 architecture-as-code 의 reference impl"**. Simon Brown 의 C4 model 을 textual DSL 로 표현 → 다양한 view (Context, Container, Component, Code) 의 자동 generation. 2026 의 AI-aided (Claude, Cursor) 의 architectural diagram 생성 의 default tooling 중 하나.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 C4 model recap
|
||||
- **Level 1 — Context**: System 의 user, external system 과 의 관계.
|
||||
- **Level 2 — Container**: Application, datastore, microservice 의 deployment unit.
|
||||
- **Level 3 — Component**: Container 내부 의 logical group.
|
||||
- **Level 4 — Code**: 매 class diagram (rarely needed).
|
||||
|
||||
### 매 Structurizr 형태
|
||||
- **Structurizr DSL**: text-based, 매 single source of truth.
|
||||
- **Structurizr CLI**: DSL → JSON workspace, export to PlantUML, Mermaid, D2.
|
||||
- **Structurizr Lite**: 매 self-hosted preview (Docker).
|
||||
- **Structurizr Cloud**: 매 hosted SaaS.
|
||||
|
||||
### 매 응용
|
||||
1. Onboarding documentation (engineer hire 의 first-day reading).
|
||||
2. ADR companion (decision record 의 visual context).
|
||||
3. AI-aided refactoring planning (Claude 가 DSL 생성).
|
||||
4. Compliance / audit (SOC2, ISO27001 의 system diagram).
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Basic workspace (DSL)
|
||||
```dsl
|
||||
workspace "PaymentSystem" {
|
||||
model {
|
||||
user = person "Customer"
|
||||
paymentSystem = softwareSystem "Payment System" {
|
||||
webApp = container "Web App" "Next.js" "TypeScript"
|
||||
api = container "API" "Hono on Bun" "TypeScript"
|
||||
db = container "Database" "PostgreSQL" "Database"
|
||||
}
|
||||
stripe = softwareSystem "Stripe" "External payment provider" "External"
|
||||
|
||||
user -> webApp "Uses"
|
||||
webApp -> api "Calls" "HTTPS/JSON"
|
||||
api -> db "Reads/Writes" "SQL"
|
||||
api -> stripe "Charges" "HTTPS"
|
||||
}
|
||||
views {
|
||||
systemContext paymentSystem { include * autolayout lr }
|
||||
container paymentSystem { include * autolayout lr }
|
||||
theme default
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Component view (Level 3)
|
||||
```dsl
|
||||
component api {
|
||||
authController = component "AuthController" "JWT validation"
|
||||
paymentService = component "PaymentService" "Charge orchestration"
|
||||
stripeClient = component "StripeClient" "Stripe SDK wrapper"
|
||||
|
||||
authController -> paymentService "Delegates"
|
||||
paymentService -> stripeClient "Uses"
|
||||
}
|
||||
```
|
||||
|
||||
### Export to other formats
|
||||
```bash
|
||||
docker run --rm -v $PWD:/usr/local/structurizr structurizr/cli \
|
||||
export -workspace workspace.dsl -format plantuml
|
||||
docker run --rm -v $PWD:/usr/local/structurizr structurizr/cli \
|
||||
export -workspace workspace.dsl -format mermaid
|
||||
```
|
||||
|
||||
### Structurizr Lite (local preview)
|
||||
```bash
|
||||
docker run -it --rm -p 8080:8080 \
|
||||
-v $PWD:/usr/local/structurizr \
|
||||
structurizr/lite
|
||||
# open http://localhost:8080
|
||||
```
|
||||
|
||||
### AI-aided generation (Claude prompt)
|
||||
```
|
||||
Given this codebase tree and key file imports, generate a Structurizr DSL
|
||||
workspace covering Context + Container views. Use:
|
||||
- person for end users
|
||||
- softwareSystem for our system
|
||||
- container for each deployable unit (web, api, worker, db, queue)
|
||||
- explicit relationships with technology labels
|
||||
Return only the DSL block.
|
||||
```
|
||||
|
||||
### Deployment view
|
||||
```dsl
|
||||
deploymentEnvironment "Production" {
|
||||
deploymentNode "AWS us-east-1" {
|
||||
deploymentNode "ECS Cluster" {
|
||||
containerInstance api
|
||||
}
|
||||
deploymentNode "RDS" {
|
||||
containerInstance db
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 매 single-source-of-truth diagram | Structurizr DSL |
|
||||
| 매 quick sketch | Mermaid / D2 직접 |
|
||||
| 매 enterprise architecture | Structurizr Cloud + ADR |
|
||||
| 매 OSS / public | Structurizr Lite + GitHub |
|
||||
| 매 ad-hoc one-off | Excalidraw |
|
||||
|
||||
**기본값**: 매 production system documentation → Structurizr DSL + Lite.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Software-Architecture]]
|
||||
- 변형: [[Mermaid]] · [[PlantUML]] · [[D2]]
|
||||
- 응용: [[C4 Model (Architecture Documentation)]] · [[ADR]] · [[Onboarding]]
|
||||
- Adjacent: [[Diagrams as Code]] · [[Architecture-Decision-Record]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 codebase walk-through 후 architecture diagram 생성 (Claude 가 DSL 작성), 매 refactor plan 의 before/after view, 매 ADR 의 visual context.
|
||||
**언제 X**: 매 throwaway sketch (overkill), 매 UI component design (use Figma), 매 sequence diagram primary (use Mermaid sequenceDiagram).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Level 4 (Code) 의 maintain**: IDE 가 더 잘함. C4 의 Code level 은 rarely worthwhile.
|
||||
- **DSL 의 stale**: 매 code 와 sync 안 됨 → AI 가 quarterly regenerate.
|
||||
- **Container 의 too granular**: 매 microservice 50+ 의 single view → split per bounded context.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Simon Brown C4 model, structurizr.com docs, GitHub structurizr/dsl).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — DSL + CLI + Lite + AI-aided coverage |
|
||||
Reference in New Issue
Block a user