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,67 @@
|
||||
---
|
||||
id: pattern-command
|
||||
title: "Command Pattern"
|
||||
category: "Pattern_Desktop"
|
||||
status: "draft"
|
||||
verification_status: "applied"
|
||||
canonical_id: ""
|
||||
aliases: ["command pattern", "커맨드 패턴", "command registry", "undo redo", "action"]
|
||||
duplicate_of: ""
|
||||
source_trust_level: "A"
|
||||
confidence_score: 0.86
|
||||
created_at: 2026-06-13
|
||||
updated_at: 2026-06-13
|
||||
review_reason: ""
|
||||
merge_history: []
|
||||
tags: ["pattern", "desktop", "command", "behavioral", "platform-independent"]
|
||||
raw_sources: ["일반 소프트웨어 공학 지식", "ConnectAI/src/extension.ts(registerCommand), src/agent/actions/* (적용 예)"]
|
||||
applied_in: ["ConnectAI"]
|
||||
github_commit: ""
|
||||
---
|
||||
|
||||
# [[Command Pattern]]
|
||||
|
||||
## 🎯 한 줄 통찰 (One-line insight)
|
||||
Command 패턴은 "요청(동작)을 객체/등록 항목으로 캡슐화" 해 실행을 호출자와 분리하고, 등록·취소(undo)·큐잉·로깅·단축키 매핑을 일관되게 만든다.
|
||||
|
||||
## 🧠 핵심 개념 (Core concepts)
|
||||
1. **명령 캡슐화:** 동작을 id+핸들러로 등록.
|
||||
2. **레지스트리:** id→핸들러 매핑(중앙 디스패치).
|
||||
3. **undo/redo:** 명령에 역연산 정의(선택).
|
||||
4. **메타데이터:** 단축키·메뉴·가시성 조건.
|
||||
5. **분리:** UI(버튼/메뉴)는 명령 id 만 알면 됨.
|
||||
|
||||
## 📖 세부 내용 (Details · 패턴 명세)
|
||||
- **언제 쓰나:** 여러 진입점(메뉴/단축키/팔레트)이 같은 동작을 부를 때, undo/매크로/큐가 필요할 때.
|
||||
- **사용 조건:** 동작을 id 로 표현; 핸들러 등록 메커니즘.
|
||||
- **장점:** 호출자-실행자 분리, 재사용, undo/큐/로깅 일관, 확장 용이.
|
||||
- **단점:** 명령 폭증, 단순 동작엔 과설계, 상태 전달 설계 필요.
|
||||
- **대안:** 직접 함수 호출(소규모), 이벤트(반응형).
|
||||
- **실패 사례:** 명령에 무거운 상태 결합; undo 불완전(부분 복원); id 충돌; 등록 해제 누락.
|
||||
|
||||
## 💻 코드 패턴 (Code patterns)
|
||||
```text
|
||||
registry.register('app.save', () => save()) # 명령 = id + 핸들러
|
||||
ui.button(onClick = () => exec('app.save')) # UI 는 id 만
|
||||
shortcut('Ctrl+S' -> 'app.save') # 매핑 일관
|
||||
# undo 지원 시: command = { do(), undo() }; history.push(command)
|
||||
```
|
||||
적용 예: ConnectAI 의 `vscode.commands.registerCommand('g1nation.openChat', ...)` (명령 레지스트리)와 action tag 실행기(`<create_file>` 등을 명령처럼 라우팅) [S2]. → [[Tool Calling Pattern]].
|
||||
|
||||
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||
진입점이 하나면 함수 호출이 단순 — 다중 진입점/undo/큐가 필요할 때 Command 가 값을 한다.
|
||||
|
||||
## 🛠️ 적용 사례 (Applied in summary)
|
||||
ConnectAI VS Code 명령 등록 + action 실행기.
|
||||
|
||||
## 🔗 지식 그래프 (Knowledge Graph)
|
||||
- **상위/루트:** [[패턴 카탈로그 인덱스]]
|
||||
- **관련 개념:** [[Event Bus Pattern]], [[Tool Calling Pattern]], [[Plugin Architecture Pattern]], [[데스크탑 앱 개발 가이드]]
|
||||
- **참조 맥락:** 작은 모델이 다중 진입점/undo 동작을 설계할 때 참조.
|
||||
|
||||
## 📚 출처 (Sources)
|
||||
- [S1] 일반 Command 패턴(GoF) 지식
|
||||
- [S2] ConnectAI/src/extension.ts(registerCommand), agent/actions/* — 적용 예
|
||||
|
||||
## 📝 변경 이력 (Change history)
|
||||
- 2026-06-13: 프로젝트 독립 패턴 카드 작성.
|
||||
Reference in New Issue
Block a user