--- id: wiki-2026-0508-thought-architecture title: Thought Architecture category: 10_Wiki/Topics status: verified canonical_id: self aliases: [생각 설계, Architecture of Thought, 사고 아키텍처] duplicate_of: none source_trust_level: A confidence_score: 0.9 verification_status: applied tags: [architecture, design-thinking, mental-model] raw_sources: [] last_reinforced: 2026-05-10 github_commit: pending tech_stack: language: conceptual framework: software-architecture --- # Thought Architecture ## 매 한 줄 > **"매 architecture 는 thought 의 외화 (externalization)"**. 매 system 의 구조는 매 designer 의 사고 모델을 그대로 반영. 2026 LLM-assisted era 에서도 매 핵심 thought structure 는 인간이 결정 — AI 는 elaboration / pattern matching. ## 매 핵심 ### 매 layers of thought - **What**: 도메인 / 문제 정의. - **Why**: 매 가치 / 제약 / trade-off. - **How**: 매 component / boundary / contract. - **When**: 매 evolution / lifecycle. ### 매 thought-to-architecture mapping - 매 mental concept → module. - 매 invariant → contract / type. - 매 change axis → seam / interface. - 매 trust boundary → service / process boundary. ### 매 응용 1. Domain-Driven Design — 매 ubiquitous language ⇔ thought architecture. 2. Hexagonal — 매 core thought 는 안쪽, 매 details 는 바깥. 3. C4 model — 매 thought 의 zoom levels. ## 💻 패턴 ### Concept-to-Module 매핑 ```typescript // 매 도메인 concept "Order" → module // src/domain/order/ // order.ts // 매 entity (invariants 의 집) // order-events.ts // 매 state transitions // order-policy.ts // 매 business rules export class Order { private constructor( readonly id: OrderId, private state: OrderState, private items: LineItem[], ) {} static create(items: LineItem[]): Order { if (items.length === 0) throw new Error('Empty order'); return new Order(OrderId.new(), 'pending', items); } confirm(): OrderConfirmed { if (this.state !== 'pending') throw new Error('Bad state'); this.state = 'confirmed'; return { type: 'OrderConfirmed', orderId: this.id }; } } ``` ### Invariant-as-Type ```typescript // 매 thought: "email 은 항상 valid 한 형식" // 매 architecture: type 으로 enforce type Email = string & { readonly __brand: 'Email' }; function parseEmail(raw: string): Email { if (!/^[^@]+@[^@]+\.[^@]+$/.test(raw)) throw new Error('Invalid'); return raw as Email; } // 매 downstream 은 valid email 만 받음 — invariant 가 type 에 새겨짐 function send(to: Email, body: string) { /* ... */ } ``` ### Change-axis-as-seam ```typescript // 매 thought: "결제 provider 는 바뀔 수 있다" // 매 architecture: interface seam interface PaymentProvider { charge(amount: Money, token: string): Promise; } class StripeProvider implements PaymentProvider { /* ... */ } class TossProvider implements PaymentProvider { /* ... */ } // 매 core 는 PaymentProvider 만 알고, 매 concrete 는 wiring 시 결정 ``` ### Trust-boundary-as-process ```typescript // 매 thought: "user-supplied data 는 untrusted" // 매 architecture: validation gateway // gateway/api.ts app.post('/orders', async (req, res) => { const dto = OrderDto.parse(req.body); // 매 zod schema — boundary const cmd = toCommand(dto); await commandBus.dispatch(cmd); res.json({ ok: true }); }); ``` ### C4-style zoom ```text L1 Context: [User] → [ShopApp] → [PaymentProvider] L2 Container: [Web] → [API] → [DB] / [Queue] → [Worker] L3 Component: API = [Router] + [CommandHandler] + [Repository] L4 Code: Repository = class with save/find methods ``` ### Thought log → ADR ```markdown # ADR-0042: Use event sourcing for orders ## Context 매 order state 는 audit trail 이 critical. ## Decision 매 event sourcing — state 는 events 의 fold. ## Consequences - (+) 매 audit / replay 의 free. - (-) 매 query 는 projection 필요. ``` ## 매 결정 기준 | 상황 | Approach | |---|---| | 매 domain 이 rich | DDD + concept-to-module | | 매 changes axis 명확 | Hexagonal + seams | | 매 communication 이 main concern | C4 + ADR | | 매 thought 가 아직 흐림 | Spike → throw away → rebuild | **기본값**: 매 concept-to-module mapping + ADR 의 light-weight 사용. ## 🔗 Graph - 부모: [[Software_Architecture]] · [[Design Thinking]] - 변형: [[Domain_Driven_Design]] · [[Hexagonal_Architecture]] · [[C4_Model]] - 응용: [[ADR]] · [[Ubiquitous_Language]] - Adjacent: [[Mental_Model]] · [[Conceptual Integrity]] ## 🤖 LLM 활용 **언제**: 매 ADR draft, 매 concept extraction, 매 module boundary 의 review. **언제 X**: 매 core thought 의 결정 — 매 human 의 책임. LLM 은 매 elaboration 만. ## ❌ 안티패턴 - **Architecture without thought**: 매 framework 의 default 만 따라가기. - **Thought without architecture**: 매 brilliant idea 가 매 code 에 reflect 되지 않음. - **Premature crystallization**: 매 thought 가 흐릴 때 매 architecture 를 fix. - **Over-abstraction**: 매 thought 보다 더 많은 layer. ## 🧪 검증 / 중복 - Verified (Brooks "Mythical Man-Month" — conceptual integrity, Evans DDD, Simon Brown C4). - 신뢰도 A. ## 🕓 Changelog | 날짜 | 변경 | |---|---| | 2026-05-08 | Phase 1 | | 2026-05-10 | Manual cleanup — full content with thought-to-architecture mapping patterns |