docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거

Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
Antigravity Agent
2026-07-05 00:33:48 +09:00
parent 1cfd3bbb56
commit 9148c358d0
6455 changed files with 1 additions and 86875 deletions
@@ -0,0 +1,173 @@
---
id: wiki-2026-0508-sequence-diagram
title: Sequence Diagram
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [UML Sequence Diagram, Mermaid Sequence, PlantUML Sequence]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [uml, diagramming, documentation, architecture]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: text
framework: Mermaid / PlantUML
---
# Sequence Diagram
## 매 한 줄
> **"매 시간 축으로 actor 간 message 주고받음 시각화"**. 매 UML 의 dynamic behavior 다이어그램, 매 distributed system / API 흐름 / agent loop 설명에 매 standard. 매 2026: AI agent 가 code → diagram 자동 생성 (Claude, Mermaid Chart, Eraser AI), 매 text-as-code (Mermaid) 가 GUI tool 보다 dominant.
## 매 핵심
### 매 element
- **Lifeline**: 매 actor / object 의 vertical line.
- **Message**: 매 horizontal arrow (sync solid, async dashed, return dotted).
- **Activation bar**: 매 처리 중 vertical bar.
- **Combined fragment**: alt / opt / loop / par / critical.
- **Note**: 매 inline annotation.
### 매 vs 다른 다이어그램
- **Flowchart**: control flow, no actors. 매 single perspective.
- **Activity diagram**: state machine 비슷, branching 강조.
- **Component diagram**: static structure.
- **Sequence**: 매 dynamic interaction over time — "누가 누구에게 언제".
### 매 응용
1. API contract docs (REST/gRPC handshake).
2. Auth flow (OAuth, OIDC, SAML).
3. Distributed transaction (saga, 2PC).
4. AI agent loop (user → LLM → tool → LLM → user).
5. Bug reproduction trace.
6. Onboarding 신입 — 매 system overview.
## 💻 패턴
### Mermaid basic
```mermaid
sequenceDiagram
participant U as User
participant A as App
participant DB
U->>A: GET /profile
A->>DB: SELECT * FROM users
DB-->>A: row
A-->>U: 200 OK (json)
```
### Mermaid with alt/loop
```mermaid
sequenceDiagram
actor User
participant API
participant LLM
User->>API: question
loop until done
API->>LLM: prompt
LLM-->>API: tool_call
alt tool == search
API->>SearchAPI: query
SearchAPI-->>API: results
else tool == done
API-->>User: final answer
end
end
```
### PlantUML
```plantuml
@startuml
actor Client
participant "Auth Service" as Auth
participant "Resource API" as API
Client -> Auth: POST /token (creds)
activate Auth
Auth --> Client: JWT
deactivate Auth
Client -> API: GET /data (Bearer JWT)
API -> API: verify JWT
API --> Client: 200 data
@enduml
```
### Generate from code (Claude)
```python
import anthropic
c = anthropic.Anthropic()
diagram = c.messages.create(
model="claude-opus-4-7",
max_tokens=2048,
messages=[{
"role": "user",
"content": f"Generate a Mermaid sequenceDiagram from this code:\n```python\n{src}\n```",
}],
).content[0].text
```
### Embed in MkDocs / GitHub README
````markdown
```mermaid
sequenceDiagram
A->>B: ping
B-->>A: pong
```
````
### Mermaid CLI render
```bash
npx -p @mermaid-js/mermaid-cli mmdc -i flow.mmd -o flow.svg -t dark
```
### OAuth 2.0 PKCE 매 example
```mermaid
sequenceDiagram
participant App
participant Browser
participant Auth as AuthServer
App->>Browser: redirect /authorize?code_challenge
Browser->>Auth: login
Auth-->>Browser: redirect ?code=
Browser->>App: code
App->>Auth: POST /token (code, code_verifier)
Auth-->>App: access_token
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| README / GitHub / Notion | Mermaid (native render) |
| Detailed UML (combined fragments) | PlantUML |
| Whiteboard 빠르게 | Excalidraw |
| Auto-from-code | Claude / Eraser AI |
| Live trace | OpenTelemetry → Jaeger trace view |
**기본값**: Mermaid in markdown.
## 🔗 Graph
- 변형: [[Component-Diagram]]
- Adjacent: [[Mermaid]] · [[PlantUML]] · [[Distributed Tracing]]
## 🤖 LLM 활용
**언제**: code/log → diagram 자동화, refactor 후 docs 갱신, agent flow 설명.
**언제 X**: 매 매우 복잡한 system — 단일 sequence diagram 으로 부족, 매 break down.
## ❌ 안티패턴
- **너무 많은 lifeline (>7)**: 매 cognitive overload — split.
- **모든 detail 포함**: 매 high-level abstraction 우선.
- **Static structure 표현**: 매 잘못된 diagram type — component diagram 사용.
- **Out of date**: code 와 sync 안 됨 → CI 에서 lint.
## 🧪 검증 / 중복
- Verified (UML 2.5 spec, Mermaid docs, PlantUML docs).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Mermaid + AI gen 2026 |