Claude Analysis
Anthropic์ ๊ณต์ AI ์ฝ๋ฉ ์ด์์คํดํธ Claude Code ์์ค์ฝ๋ ์ฌ์ธต ๋ถ์
Ask AI about Claude Analysis
Powered by Claude ยท Grounded in docs
I know everything about Claude Analysis. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Claude Code CLI โ Source Code Analysis
Anthropic์ ๊ณต์ AI ์ฝ๋ฉ ์ด์์คํดํธ Claude Code ์์ค์ฝ๋ ์ฌ์ธต ๋ถ์
์ด ํ๋ก์ ํธ๊ฐ ๋์์ด ๋์ จ๋ค๋ฉด Star๋ฅผ ๋๋ฌ์ฃผ์ธ์!
Index (MOC) ยท Directory Structure ยท Stats Report ยท Source Code ยท Tutorial
Quick Navigation โ README๊ฐ ๋งค์ฐ ๊ธธ์ด์! ๊ด์ฌ ๋ถ์ผ๋ก ๋ฐ๋ก ์ด๋ํ์ธ์:
์ ์ถ ๋ฐฐ๊ฒฝ ์ํคํ ์ฒ ํ๋กฌํํธ ๋ถ์ ์์ค์ฝ๋ ํ์ 12์ฅ ํํ ๋ฆฌ์ผ
Table of Contents
- Overview
- Background โ ์์ค์ฝ๋ ์ ์ถ ๊ฒฝ์
- Project Scale
- Architecture
- Design Principles
- Design Patterns
- Tech Stack
- Module Deep Dive
- Module Distribution
- Prompt & Agent Architecture
- Document Map
- Source Code Browse
- Usage with Obsidian
- Tutorial
- License & Disclaimer
- Contributing
Overview
์ด ์ ์ฅ์๋ Anthropic์ ๊ณต์ CLI ๋๊ตฌ์ธ Claude Code ์ ์์ค์ฝ๋(src/ ๋๋ ํฐ๋ฆฌ)๋ฅผ ์ ์ ๋ถ์ํ ๊ฒฐ๊ณผ๋ฌผ์
๋๋ค. ์ด 1,902๊ฐ ํ์ผ, ~160๊ฐ ๋๋ ํฐ๋ฆฌ๋ฅผ ๋ถ์ํ์ฌ 39๊ฐ์ ์ํธ ์ฐ๊ฒฐ๋ Obsidian ๋งํฌ๋ค์ด ๋ฌธ์๋ก ๊ตฌ์ฑํ์ต๋๋ค.
์ค์ ์์ค์ฝ๋ ํฌํจ: ์ด ์ ์ฅ์์
./src/๋๋ ํฐ๋ฆฌ์๋ Claude Code์ ์ค์ TypeScript/TSX ์์ค์ฝ๋ 1,902๊ฐ ํ์ผ์ด ํฌํจ๋์ด ์์ต๋๋ค. ๋ถ์ ๋ฌธ์๋ฅผ ์ฝ์ผ๋ฉด์ ์๋ณธ ์ฝ๋๋ฅผ ์ง์ ์ด์ด๋ณผ ์ ์์ผ๋ฉฐ, GitHub์์๋ ๋ชจ๋ ํ์ผ์ ๋ฐ๋ก ํ์ํ ์ ์์ต๋๋ค. ์ ์ฒด ํ์ผ ๋ชฉ๋ก์ Source Code Browse ์น์ ์ ์ฐธ๊ณ ํ์ธ์.
๋ชจ๋ ๋ฌธ์๋ [[์ํค๋งํฌ]]๋ก ์ํธ ์ฐ๊ฒฐ๋์ด ์์ด, Obsidian์ Graph View์์ ๋ชจ๋ ๊ฐ ๊ด๊ณ๋ฅผ ์๊ฐ์ ์ผ๋ก ํ์ํ ์ ์์ต๋๋ค.
Background โ ์์ค์ฝ๋ ์ ์ถ ๊ฒฝ์
์ถ์ฒ: CyberSecurityNews โ Anthropic's Claude Code Source Code Reportedly Leaked Via Their npm Registry
Anthropic์ ๊ณต์ CLI ๋๊ตฌ์ธ Claude Code์ ์ ์ฒด TypeScript ์์ค์ฝ๋๊ฐ npm ํจํค์ง ์ค์ ๋ฏธ์ค์ปจํผ๊ท๋ ์ด์ ์ ํตํด ์๋์น ์๊ฒ ์ธ๋ถ์ ๋ ธ์ถ๋์์ต๋๋ค.
์ฌ๊ฑด์ ์ ๋ง
- Anthropic์ด npm์ ๋ฐฐํฌํ
@anthropic-ai/claude-codeํจํค์ง์ **์์ค๋งต ํ์ผ(.map)**์ด ํฌํจ๋์ด ์์์ต๋๋ค. - ํด๋น
.mapํ์ผ์๋ ๋๋ ํ๋์ง ์์(unobfuscated) ์๋ณธ TypeScript ์์ค์ฝ๋์ ์ฐธ์กฐ ๊ฒฝ๋ก๊ฐ ๊ธฐ๋ก๋์ด ์์์ต๋๋ค. - ์ด ๊ฒฝ๋ก๋ Anthropic์ ์์ฒด R2 ํด๋ผ์ฐ๋ ์คํ ๋ฆฌ์ง ๋ฒํท์ ๊ฐ๋ฆฌํค๊ณ ์์์ผ๋ฉฐ, ์์ ํ ์์ค์ฝ๋๊ฐ ZIP ์์นด์ด๋ธ ํํ๋ก ์ง์ ๋ค์ด๋ก๋ ๊ฐ๋ฅํ ์ํ์์ต๋๋ค.
- ๋ณด์ ์ฐ๊ตฌ์๊ฐ ์ด๋ฅผ ๋ฐ๊ฒฌํ ํ, ์๋ณธ ์์ค์ฝ๋๊ฐ ๊ณต๊ฐ GitHub ์ ์ฅ์(nirholas/claude-code์ backup ๋ธ๋์น)์ ๋ฏธ๋ฌ๋ง๋์์ต๋๋ค.
flowchart LR
NPM["npm Registry<br/>@anthropic-ai/claude-code"] -->|"ํจํค์ง์ .map ํ์ผ ํฌํจ"| Map[".map ์์ค๋งต ํ์ผ"]
Map -->|"์๋ณธ ๊ฒฝ๋ก ์ฐธ์กฐ"| R2["Anthropic R2<br/>Cloud Storage"]
R2 -->|"ZIP ๋ค์ด๋ก๋ ๊ฐ๋ฅ"| Source["์ ์ฒด TypeScript<br/>์์ค์ฝ๋"]
Source -->|"๋ณด์ ์ฐ๊ตฌ์ ๋ฐ๊ฒฌ"| Mirror["GitHub ๋ฏธ๋ฌ<br/>nirholas/claude-code"]
Mirror -->|"๋ถ์ ๋ฐ ๋ฌธ์ํ"| This["์ด ์ ์ฅ์<br/>leaf-kit/claude-analysis"]
style NPM fill:#cb3837,stroke:#cb3837,color:#fff
style R2 fill:#f38020,stroke:#f38020,color:#fff
style Source fill:#3178c6,stroke:#3178c6,color:#fff
style This fill:#e8f5e9,stroke:#2e7d32
ํต์ฌ ํฌ์ธํธ
- ์ ์ถ ์์ธ: npm ํจํค์ง ๋น๋ ์ ์์ค๋งต ํ์ผ(
.map)์ด ์ ๊ฑฐ๋์ง ์์๊ณ , ํด๋น ํ์ผ์ด Anthropic์ ํด๋ผ์ฐ๋ ์คํ ๋ฆฌ์ง์ ์๋ ์๋ณธ ์์ค๋ฅผ ์ง์ ์ฐธ์กฐ - ์ ์ถ ๋ฒ์:
src/๋๋ ํฐ๋ฆฌ ์ ์ฒด โ 1,902๊ฐ TypeScript/TSX ํ์ผ, ์ฝ 51๋ง ์ค์ ์ฝ๋ - ์ํฅ: Claude Code์ ๋ด๋ถ ์ํคํ ์ฒ, ๋๊ตฌ ์์คํ , ๊ถํ ๋ชจ๋ธ, API ํต์ ๊ตฌ์กฐ ๋ฑ์ด ๋ชจ๋ ๊ณต๊ฐ
์ด ์ ์ฅ์๋ ์ ์ถ๋ ์์ค์ฝ๋๋ฅผ ๊ต์ก ๋ฐ ์ํคํ ์ฒ ๋ถ์ ๋ชฉ์ ์ผ๋ก ์ ๋ฆฌํ ๊ฒ์ ๋๋ค.
๊ธฐ์ ์ ์ธ์ฌ์ดํธ โ ์์ค๋งต์์ ์ ์ฒด ์์ค์ฝ๋๊ฐ ์ถ์ถ๋ ๊ณผ์
์ด๊ฒ์ ํดํน์ด ์๋๋๋ค. Anthropic ์์ฒด๊ฐ ์์ค ๋งต(
cli.js.map)์ npm ๋ฆด๋ฆฌ์ค์ ํฌํจ์ํจ ๊ฒ์ด ์์ธ์ ๋๋ค.
57MB cli.js.map ํ์ผ์ ๊ตฌ์กฐ:
| ํญ๋ชฉ | ๊ฐ |
|---|---|
| ์ ์ฒด ์์ค ํ์ผ ์ | 4,756๊ฐ |
| Claude Code ์์ฒด | 1,906๊ฐ (TypeScript/TSX) |
| node_modules ์ข ์์ฑ | 2,850๊ฐ |
์ถ์ถ ๋ฐฉ๋ฒ: cli.js.map์ ๋จ์ํ JSON ๊ฐ์ฒด๋ก, ๋ ๊ฐ์ ํค ๋ฐฐ์ด๋ง ์ฝ์ผ๋ฉด ๋ฉ๋๋ค:
sources[]โ ํ์ผ ๊ฒฝ๋ก ๋ฐฐ์ดsourcesContent[]โ ํด๋น ํ์ผ์ ์ ํํ ์๋ณธ ์ฝ๋ ๋ฐฐ์ด
๋ ๋ฐฐ์ด์ ์ธ๋ฑ์ค๊ฐ 1:1 ๋์ํ๋ฏ๋ก, ์ญ์ปดํ์ผ์ด๋ ๋๋ ํ ํด์ ์์ด ์๋ณธ ์์ค๋ฅผ ๊ทธ๋๋ก ๋ณต์ํ ์ ์์ต๋๋ค.
flowchart LR
NPM["npm install<br/>@anthropic-ai/claude-code"] --> Map["cli.js.map (57MB)<br/>JSON ํ์ผ"]
Map --> Sources["sources[]: 4,756๊ฐ ํ์ผ ๊ฒฝ๋ก"]
Map --> Content["sourcesContent[]: ์๋ณธ ์ฝ๋"]
Sources --> Extract["์ธ๋ฑ์ค 1:1 ๋์<br/>โ ํ์ผ ๋ณต์"]
Content --> Extract
Extract --> Full["์ ์ฒด ์์ค์ฝ๋<br/>(์ํคํ
์ฒ, ์์คํ
ํ๋กฌํํธ,<br/>๋๊ตฌ ํธ์ถ ๋ก์ง ํฌํจ)"]
style Map fill:#ffebee,stroke:#c62828
style Full fill:#e8f5e9,stroke:#2e7d32
๋ณต์๋ ์์ค์์ ํ์ธ๋ ๊ฒ๋ค:
- React + Ink ๊ธฐ๋ฐ CLI ์ธํฐํ์ด์ค ๊ตฌ์ถ
- ์์ฐ์ด ์ ๋ ฅ๊ณผ ์ฌ๋์ ๋ช ๋ น์ด๋ฅผ ์ง์ํ๋ REPL ๋ฃจํ
- ๋๊ตฌ ์์คํ ์ ํตํ LLM API ์ํธ์์ฉ
- ์ํคํ ์ฒ ์ค๊ณ, ์์คํ ํ๋กฌํํธ, ๋๊ตฌ ํธ์ถ ๋ก์ง ์ ์ฒด
์ฌ๊ฑด์ ๊ตํ:
์์ค ๋งต(Source Map)์ ํ๋ก๋์ ์ ๋ฐฐํฌํด์๋ ์ ๋ฉ๋๋ค. ์์ค ๋งต์ ๊ฐ๋ฐ/๋๋ฒ๊น ์ฉ๋๋ก ๋ณ์ ์ด๋ฆ๋ถํฐ ์ฃผ์๊น์ง ๋ชจ๋ ์ ๋ณด๋ฅผ ํฌํจํฉ๋๋ค.
sourcesContent์ ํ ์ค๋ง ํฌํจ๋์ด๋ ์ ์ฒด ์ฝ๋๊ฐ ๊ณต๊ฐ๋ฉ๋๋ค.
- Anthropic์ ์ดํ ์์ค ๋งต์ ์ญ์ ํ๊ณ , ์ถ์ถ๋ GitHub ์ ์ฅ์๋ฅผ DMCA๋ก ์ฐจ๋จํ์ต๋๋ค
- ๊ทธ๋ฌ๋ npm ํจํค์ง์ ์ด์ ๋ฒ์ ๋ค์ ์ด๋ฏธ ์์นด์ด๋น๋์ด ์์ค ์ฝ๋๊ฐ ์ปค๋ฎค๋ํฐ์ ์ ํฌ๋ ์ํ์์ต๋๋ค
npm ํจํค์ง๋ฅผ ๊ฒ์ํ๋ ๋ชจ๋ ๊ฐ๋ฐ์์๊ฒ: ๊ฒ์ ์ ์
.mapํ์ผ์ ๋ฐ๋์ ํ์ธํ์ธ์.
์ปค๋ฎค๋ํฐ ์ธ์ฌ์ดํธ โ ๊ฐ์ ์ค์์ ๋ฐ๋ณต, ๊ทธ๋ฆฌ๊ณ AI ๊ฒฝ์
1๋ ์ ์๋ ๋๊ฐ์ ์ค์๊ฐ ์์์ต๋๋ค.
Anthropic์ ์ฝ 1๋ ์ ์๋ ๋์ผํ ๋ฐฉ์(source map ๋ฏธ์ ๊ฑฐ)์ผ๋ก ์์ค์ฝ๋๊ฐ ์ ์ถ๋ ์ ๋ก๊ฐ ์์์ต๋๋ค. JS/TS ๋น๋ ์
.mapํ์ผ์ ์ ๊ฑฐํ๋ ๊ฒ์ ๊ธฐ๋ณธ์ ์ธ ํ๋ก๋์ ๋ฐฐํฌ ์ฒดํฌ๋ฆฌ์คํธ์์๋ ๋ถ๊ตฌํ๊ณ , ๊ฐ์ ์ค์๊ฐ 1๋ ๋ง์ ๊ทธ๋๋ก ๋ฐ๋ณต๋ ๊ฒ์ ๋๋ค.์ด๋ฒ์ ์ ์ถ๋ ์ฝ๋์๋ Claude Code์๋ง ์๋ ๊ณ ์ ๊ธฐ์ ๋ค์ด ํฌํจ๋์ด ์์ต๋๋ค:
- ํ๋กฌํํธ ์บ์ฑ ์ ๋ต (์ ์ /๋์ ๊ฒฝ๊ณ ๋ถ๋ฆฌ)
- ๋ฉํฐ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์ (Coordinator, Swarm, Fork ํจํด)
- ๋ฉ๋ชจ๋ฆฌ ์์คํ (์ธ์ /์๋/ํ ๋ฉ๋ชจ๋ฆฌ, AI ๊ธฐ๋ฐ ๊ด๋ จ์ฑ ์ ํ)
- ์ปจํ ์คํธ ์์ถ ์๊ณ ๋ฆฌ์ฆ (9ํญ๋ชฉ ๋ณด์กด ์ ๋ต)
- tree-sitter ๊ธฐ๋ฐ Bash ๋ณด์ ํ์ดํ๋ผ์ธ
- React + Ink ์ปค์คํ ํฐ๋ฏธ๋ ๋ ๋๋ง ์์ง
์ด๋ฌํ ๊ตฌํ ๋ํ ์ผ์ด ๊ณต๊ฐ๋จ์ผ๋ก์จ, ๊ฒฝ์์ฌ๋ค์ด ์ ์ฌํ ๊ธฐ๋ฅ์ ๋ ๋น ๋ฅด๊ฒ ๊ตฌํํ ์ ์๋ ์ฐธ๊ณ ์๋ฃ๊ฐ ๋ ์ ์ด๋ฉฐ, AI ์ฝ๋ฉ ๋๊ตฌ ๊ฐ์ ๊ฒฝ์์ด ๋์ฑ ๊ฐ์ํ๋ ๊ฒ์ผ๋ก ์์๋ฉ๋๋ค.
Project Scale
| ์งํ | ๊ฐ | ์์ธ |
|---|---|---|
| ์ด ํ์ผ ์ | 1,902 | TypeScript (.ts, .tsx) |
| ์ด ๋๋ ํฐ๋ฆฌ ์ | ~160 | 34๊ฐ ์์ ๋ชจ๋ |
| UI ํ๋ ์์ํฌ | React + Ink | ํฐ๋ฏธ๋ ์ ์ธ์ UI |
| ๋ ์ด์์ ์์ง | Yoga | Flexbox ๊ธฐ๋ฐ ํฐ๋ฏธ๋ ๋ ์ด์์ |
| ๋น๋/๋ฐํ์ | Bun / Node.js | ๊ณ ์ TypeScript ์คํ |
| ์คํค๋ง ๊ฒ์ฆ | Zod v4 | ๋ชจ๋ ๋๊ตฌ ์ ์ถ๋ ฅ ๊ฒ์ฆ |
| ๋๊ตฌ (Tools) | 40+ | ์์ธ ๋ณด๊ธฐ |
| ๋ช ๋ น์ด (Commands) | 100+ | ์์ธ ๋ณด๊ธฐ |
| ์๋น์ค (Services) | 19 | ์์ธ ๋ณด๊ธฐ |
| React ํ (Hooks) | 104 files | ์์ธ ๋ณด๊ธฐ |
Architecture
Layered Architecture
Claude Code๋ 5-Layer Architecture๋ฅผ ์ฑํํ์ฌ ๊ฐ ๊ณ์ธต์ด ๋จ๋ฐฉํฅ ์์กด์ฑ์ ์ ์งํฉ๋๋ค.
graph TB
subgraph USER["USER INPUT LAYER"]
Terminal["Terminal"]
IDE["IDE Extension"]
Web["Web App"]
Voice["Voice Input"]
end
subgraph ENTRY["ENTRYPOINT LAYER"]
cli["cli.tsx"]
init["init.ts"]
main["main.tsx"]
setup["setup.ts"]
cli --> init --> main --> setup
end
subgraph ENGINE["ENGINE LAYER"]
QE["QueryEngine.ts"]
query["query.ts"]
context["context.ts"]
QE <--> query
QE --> context
end
subgraph EXECUTION["EXECUTION LAYER"]
subgraph TOOLS["TOOL LAYER (40 Tools)"]
File["File R/W/Edit"]
Bash["Bash/Shell"]
Agent["Agent/Swarm"]
WebT["Web Fetch/Search"]
MCP_T["MCP Tools"]
Task["Task CRUD"]
end
subgraph COMMANDS["COMMAND LAYER (100+)"]
help["/help"]
model["/model"]
config["/config"]
compact["/compact"]
mcp_cmd["/mcp"]
more["..."]
end
end
subgraph SERVICE["SERVICE LAYER"]
API["API Client<br/>(4 SDK)"]
MCP_S["MCP Server<br/>Manager"]
Compact["Compact<br/>Service"]
ToolExec["Tool<br/>Executor"]
LSP["LSP Server"]
OAuth["OAuth 2.0"]
Analytics["Analytics"]
Plugins["Plugins"]
SessionMem["Session<br/>Memory"]
ExtractMem["Extract<br/>Memories"]
end
subgraph INFRA["INFRASTRUCTURE LAYER"]
Perm["Permissions (26)"]
Settings["Settings (19)"]
Model["Model (18)"]
BashUtil["Bash Utils (15)"]
Telemetry["Telemetry (14)"]
Shell["Shell (12)"]
Git["Git (5)"]
Sandbox["Sandbox"]
end
USER --> ENTRY
ENTRY --> ENGINE
ENGINE --> TOOLS
ENGINE --> COMMANDS
TOOLS --> SERVICE
SERVICE --> INFRA
style USER fill:#e1f5fe,stroke:#0288d1
style ENTRY fill:#f3e5f5,stroke:#7b1fa2
style ENGINE fill:#fff3e0,stroke:#ef6c00
style TOOLS fill:#e8f5e9,stroke:#2e7d32
style COMMANDS fill:#e8f5e9,stroke:#2e7d32
style SERVICE fill:#fce4ec,stroke:#c62828
style INFRA fill:#f5f5f5,stroke:#616161
์์ธ ์ํคํ ์ฒ: Index.md (MOC) | ๋๋ ํฐ๋ฆฌ ๊ตฌ์กฐ: Directory_Structure.md
Initialization Flow
์ฑ ์์๋ถํฐ REPL ์ง์ ๊น์ง์ 4-Phase Bootstrap ์ํ์ค:
flowchart TD
Start([์ฑ ์์]) --> P1
subgraph P1["Phase 1: CLI Bootstrap โ cli.tsx"]
direction LR
fast{"Fast-path?"}
fast -->|--version| ver["๋ฒ์ ์ถ๋ ฅ โ ์ข
๋ฃ"]
fast -->|MCP ์๋ฒ| mcp_s["MCP ์๋ฒ ์์"]
fast -->|๋ฐ๋ชฌ ์์ปค| daemon["๋ฐ๋ชฌ ์คํฌ๋"]
fast -->|์ผ๋ฐ ์์| dynimport["๋์ ์ํฌํธ๋ก ์ง์ฐ ๋ก๋ฉ"]
end
P1 --> P2
subgraph P2["Phase 2: Environment Init โ init.ts"]
direction LR
cfg["Config ๊ฒ์ฆ"] --> ca["CA ์ธ์ฆ์"]
ca --> oauth_init["OAuth ์ด๊ธฐํ"]
oauth_init --> policy["์ ์ฑ
์ ํ"]
policy --> mtls["mTLS ์ค์ "]
mtls --> preconnect["API ํ๋ฆฌ์ปค๋ฅ์
"]
end
P2 --> P3
subgraph P3["Phase 3: Service Bootstrap โ main.tsx"]
direction LR
otel["OpenTelemetry ์ง์ฐ ๋ก๋ฉ"]
otel --> metrics["๋ฉํธ๋ฆญ ์์ง ์ค์ "]
metrics --> svc_init["์๋น์ค ์ด๊ธฐํ"]
end
P3 --> P4
subgraph P4["Phase 4: Session Setup โ setup.ts"]
direction LR
node_ver["Node ๋ฒ์ ๊ฒ์ฆ"]
node_ver --> worktree["Git ์ํฌํธ๋ฆฌ"]
worktree --> session_mem["์ธ์
๋ฉ๋ชจ๋ฆฌ"]
session_mem --> perm_check["๊ถํ ๊ฒ์ฆ"]
end
P4 --> REPL([REPL ๋ํํ ๋ฃจํ ์์])
style P1 fill:#f3e5f5,stroke:#7b1fa2
style P2 fill:#e8eaf6,stroke:#283593
style P3 fill:#fff3e0,stroke:#ef6c00
style P4 fill:#e8f5e9,stroke:#2e7d32
style REPL fill:#c8e6c9,stroke:#1b5e20,stroke-width:3px
์์ธ: Entrypoints_Overview.md
Query Execution Flow
์ฌ์ฉ์ ์ ๋ ฅ์ด ์ฒ๋ฆฌ๋์ด ์๋ต์ผ๋ก ๋์์ค๊ธฐ๊น์ง์ ํต์ฌ ์คํ ๋ฃจํ:
sequenceDiagram
participant U as User
participant QE as QueryEngine.ts
participant CTX as context.ts
participant Q as query.ts
participant API as API Service
participant STE as StreamingToolExecutor
participant PERM as Permissions System
participant T as Tool.call()
participant C as Compact Service
U->>QE: ์ฌ์ฉ์ ์
๋ ฅ
activate QE
QE->>CTX: ์ปจํ
์คํธ ์กฐ๋ฆฝ ์์ฒญ
CTX-->>QE: ์์คํ
+ ์ฌ์ฉ์ ์ปจํ
์คํธ
QE->>Q: ์ฟผ๋ฆฌ ์คํ
activate Q
loop ๋๊ตฌ ์คํ ๋ฃจํ (tool_use ๋ธ๋ก์ด ์์ ๋๊น์ง)
Q->>API: Claude API ์คํธ๋ฆฌ๋ฐ ํธ์ถ
API-->>Q: ์๋ต ์คํธ๋ฆผ (ํ
์คํธ + tool_use)
opt tool_use ๋ธ๋ก ์กด์ฌ
Q->>STE: ๋๊ตฌ ์คํ ์์ฒญ
activate STE
STE->>PERM: ๊ถํ ์ฒดํฌ
alt ํ์ฉ (ALLOW)
PERM-->>STE: โ
ํ์ฉ
STE->>T: ๋๊ตฌ ์คํ
T-->>STE: ์คํ ๊ฒฐ๊ณผ
else ๊ฑฐ๋ถ (DENY)
PERM-->>STE: โ ๊ฑฐ๋ถ ๋ฉ์์ง
else ๋ฌธ์ (ASK)
PERM->>U: ๊ถํ ์์ฒญ ๋ค์ด์ผ๋ก๊ทธ
U-->>PERM: ์ฌ์ฉ์ ์๋ต
end
STE-->>Q: ๋๊ตฌ ๊ฒฐ๊ณผ
deactivate STE
end
Q->>C: ์ปจํ
์คํธ ์์ถ ํ์?
alt ์์ถ ํ์
C-->>Q: ๋ํ ์์ฝ/์์ถ
else ๋ถํ์
C-->>Q: ํจ์ค
end
end
Q-->>QE: ์ต์ข
์๋ต
deactivate Q
QE-->>U: ์๋ต ๋ ๋๋ง
deactivate QE
์์ธ: Query_Engine.md
Tool Execution Flow
๋ชจ๋ ๋๊ตฌ ์คํ์ ๊ถํ ์์คํ ์ ๊ฑฐ์นฉ๋๋ค:
flowchart TD
A["๋ชจ๋ธ ์๋ต์์<br/>tool_use ๋ธ๋ก ์ถ์ถ"] --> B["tools.ts<br/>findToolByName()"]
B --> C{"Tool.<br/>checkPermissions()"}
C -->|ALLOW| D["Tool.call() ์คํ"]
C -->|DENY| E["๊ฑฐ๋ถ ๋ฉ์์ง ๋ฐํ"]
C -->|ASK| F["์ฌ์ฉ์ ๊ถํ<br/>์์ฒญ ๋ค์ด์ผ๋ก๊ทธ"]
F -->|์น์ธ| D
F -->|๊ฑฐ๋ถ| E
D --> G{"isConcurrencySafe?"}
G -->|Yes| H["๋ณ๋ ฌ ์คํ<br/>(Promise.all)"]
G -->|No| I["์ง๋ ฌ ์คํ<br/>(์์ฐจ await)"]
H --> J["๊ฒฐ๊ณผ๋ฅผ ๋ฉ์์ง์ ์ถ๊ฐ"]
I --> J
E --> J
J --> K["๋ค์ ํด"]
style C fill:#fff3e0,stroke:#ef6c00
style D fill:#e8f5e9,stroke:#2e7d32
style E fill:#ffebee,stroke:#c62828
style F fill:#e3f2fd,stroke:#1565c0
์์ธ: Tools_Overview.md
MCP Connection Flow
Model Context Protocol ์๋ฒ ์ฐ๊ฒฐ๋ถํฐ ๋๊ตฌ ์ฌ์ฉ๊น์ง:
flowchart LR
Config["settings.json<br/>MCP ์๋ฒ ์ ์"] --> MCPService["MCP Service"]
MCPService --> Transport{"์ ์ก ํ๋กํ ์ฝ<br/>์ ํ"}
Transport -->|stdio| STDIO["stdio ํ๋ก์ธ์ค"]
Transport -->|SSE| SSE["Server-Sent Events"]
Transport -->|WebSocket| WS["WebSocket"]
Transport -->|HTTP| HTTP["HTTP Streamable"]
STDIO --> Conn["MCPConnectionManager<br/>์๋ฒ ์ฐ๊ฒฐ"]
SSE --> Conn
WS --> Conn
HTTP --> Conn
Conn --> Auth{"์ธ์ฆ ํ์?"}
Auth -->|Yes| OAuth["OAuth ์ธ์ฆ"]
Auth -->|No| Discover["๋๊ตฌ/๋ฆฌ์์ค ๋ฐ๊ฒฌ"]
OAuth --> Discover
Discover --> Pool["tools.ts<br/>assembleToolPool()"]
BuiltIn["๋ด์ฅ 40 ๋๊ตฌ"] --> Pool
Pool --> Merged["ํตํฉ ๋๊ตฌ ํ<br/>(์ค๋ณต ์ ๊ฑฐ)"]
style MCPService fill:#e8eaf6,stroke:#283593
style Merged fill:#e8f5e9,stroke:#2e7d32
์์ธ: services/MCP_Service.md
Design Principles
Claude Code ์์ค์ฝ๋์์ ๊ด์ฐฐ๋๋ 6๊ฐ์ง ํต์ฌ ์ค๊ณ ์์น:
| ์์น | ์ค๋ช | ๊ตฌํ ์์น |
|---|---|---|
| Layered Architecture | ์ง์ ์ โ ์์ง โ ๋๊ตฌ โ ์๋น์ค โ ์ ํธ๋ฆฌํฐ์ ๋จ๋ฐฉํฅ ์์กด์ฑ | Index.md |
| Permission-First | ๋ชจ๋ ๋๊ตฌ ์คํ ์ checkPermissions() ํต๊ณผ ํ์ | Tools_Overview.md |
| Extensibility | MCP, ํ๋ฌ๊ทธ์ธ, ์คํฌ์ ํตํ ๊ธฐ๋ฅ ํ์ฅ | Services_Overview.md |
| Declarative Terminal UI | React + Ink๋ฅผ ํตํ ์ ์ธ์ ํฐ๋ฏธ๋ ๋ ๋๋ง | Ink_Framework.md |
| Multi-Agent | AgentTool, Coordinator, Swarm ํจํด ์ง์ | tools/AgentTool.md |
| Multi-Provider API | Anthropic Direct, Bedrock, Vertex AI, Azure Foundry | services/API_Service.md |
Design Patterns
์์ค์ฝ๋ ์ ๋ฐ์์ ์ฌ์ฉ๋๋ ์ค๊ณ ํจํด ๋ถ์:
| ํจํด | ๋น๋ | ์ฃผ์ ์์น | ์ค๋ช |
|---|---|---|---|
| Factory | ๋์ | Tool.ts (buildTool()), LSP | ๋๊ตฌ/์๋ฒ ์ธ์คํด์ค ์์ฑ |
| Async Generator | ๋์ | StreamingToolExecutor | ์คํธ๋ฆฌ๋ฐ ๊ฒฐ๊ณผ ๋ฐํ (async function*) |
| React Hooks | ๋์ | Hooks_Overview.md | 104๊ฐ ์ปค์คํ ํ |
| Singleton Store | ์ค๊ฐ | bootstrap/state.ts | 209๊ฐ getter/setter ๊ธ๋ก๋ฒ ์ํ |
| Observer/Event | ์ค๊ฐ | Ink_Framework.md | ํฐ๋ฏธ๋ ์ด๋ฒคํธ, ํ์ผ ๊ฐ์ |
| Strategy | ์ค๊ฐ | ๊ถํ ํธ๋ค๋ฌ, ์ ธ ํ๋ก๋ฐ์ด๋ | ๋ฐํ์ ์ ๋ต ๊ต์ฒด |
| Memoization | ๋์ | context.ts, commands.ts | ์ค๋ณต ๊ณ์ฐ ๋ฐฉ์ง |
| Forked Agent | ๋ฎ์ | SessionMemory, ExtractMemories | ๋ฐฑ๊ทธ๋ผ์ด๋ ์๋ธ์์ด์ ํธ |
์์ธ: Stats_Report.md
Tech Stack
Core Dependencies
| ํจํค์ง | ์ฉ๋ | ๋ถ์ ๋ฌธ์ |
|---|---|---|
@anthropic-ai/sdk | Claude API Direct | API_Service.md |
@anthropic-ai/bedrock-sdk | AWS Bedrock | API_Service.md |
@anthropic-ai/vertex-sdk | Google Vertex AI | API_Service.md |
@anthropic-ai/foundry-sdk | Azure Foundry | API_Service.md |
@modelcontextprotocol/sdk | MCP ํ๋กํ ์ฝ | MCP_Service.md |
react | UI ํ๋ ์์ํฌ | Components_Overview.md |
ink | ํฐ๋ฏธ๋ React ๋ ๋๋ฌ | Ink_Framework.md |
zod (v4) | ์คํค๋ง ๊ฒ์ฆ | Tools_Overview.md |
yoga-layout | Flexbox ๋ ์ด์์ | Ink_Framework.md |
tree-sitter | AST ํ์ฑ | Utils_Overview.md |
vscode-languageserver-protocol | LSP | Services_Overview.md |
Module Deep Dive
1. Entrypoints
์ฑ ์์๋ถํฐ REPL ์ง์ ๊น์ง์ ๋ถํธ์คํธ๋ฉ ํ๋ฆ
| ํ์ผ | ์ญํ | ํต์ฌ ๊ธฐ๋ฅ |
|---|---|---|
cli.tsx | CLI ์ง์ ์ | Fast-path ๋ถ๊ธฐ, ๋์ ์ํฌํธ |
init.ts | ํ๊ฒฝ ์ด๊ธฐํ | OAuth, TLS, ์ ์ฑ , API ํ๋ฆฌ์ปค๋ฅ์ |
main.tsx | ์๋น์ค ๋ถํธ์คํธ๋ฉ | OpenTelemetry, ๋ฉํธ๋ฆญ |
setup.ts | ์ธ์ ์ ์ | ์ํฌํธ๋ฆฌ, ์ธ์ ๋ฉ๋ชจ๋ฆฌ, ๊ถํ ๊ฒ์ฆ |
์์ธ: Entrypoints_Overview.md
2. Query Engine
ํต์ฌ ์คํ ๋ฃจํ โ ์ฌ์ฉ์ ์ ๋ ฅ๋ถํฐ ์๋ต ๋ ๋๋ง๊น์ง
- QueryEngine.ts: ์ฟผ๋ฆฌ ๋ผ์ดํ์ฌ์ดํด ๊ด๋ฆฌ (์์ โ ์คํ โ ์์ถ โ ์ข ๋ฃ)
- query.ts: Claude API ํธ์ถ + ๋๊ตฌ ์คํ ๋ฃจํ
- context.ts: ์์คํ /์ฌ์ฉ์ ์ปจํ ์คํธ ์กฐ๋ฆฝ (๋ฉ๋ชจ์ด์ ์ด์ )
์์ธ: Query_Engine.md
3. Tool System (40 Tools)
ํ์ผ ์์คํ , ์ ธ, ์์ด์ ํธ, ์น, MCP ๋ฑ 40๊ฐ ๋๊ตฌ
| ์นดํ ๊ณ ๋ฆฌ | ๋๊ตฌ ์ | ์ฃผ์ ๋๊ตฌ | ๋ฌธ์ |
|---|---|---|---|
| ํ์ผ ์์คํ | 5 | Read, Edit, Write, Glob, Grep | FileReadTool.md, FileEditTool.md |
| ์ ธ ์คํ | 2 | Bash, PowerShell | BashTool.md |
| ์์ด์ ํธ | 3 | Agent, SendMessage, Skill | AgentTool.md |
| ์น | 2 | WebFetch, WebSearch | Tools_Overview.md |
| ํ์คํฌ ๊ด๋ฆฌ | 6 | Create, Update, List, Get, Stop, Output | TaskTools.md |
| MCP | 4 | MCPTool, ListResources, ReadResource, Auth | MCPTool.md |
| ์ฝ๋ ์ธํ ๋ฆฌ์ ์ค | 1 | LSP | Tools_Overview.md |
| ์ํฌํธ๋ฆฌ/ํ๋ | 4 | EnterWorktree, ExitWorktree, EnterPlan, ExitPlan | Tools_Overview.md |
| ์ค์ผ์ค๋ง | 3 | ScheduleCron, CronDelete, CronList | Tools_Overview.md |
| ๊ธฐํ | 10 | Config, Notebook, RemoteTrigger, ... | Tools_Overview.md |
ํต์ฌ ์ธํฐํ์ด์ค:
interface Tool<Input, Output, Progress> {
name: string;
call(input: Input, context: ToolUseContext): Promise<Output>;
checkPermissions(input: Input, context: ToolPermissionContext): PermissionResult;
isReadOnly(): boolean;
isConcurrencySafe(): boolean;
}
๋๊ตฌ ์นดํ ๊ณ ๋ฆฌ ๋ถํฌ:
pie title Tool Categories (40 Tools)
"File System" : 5
"Shell Execution" : 2
"Agent / Multi-Agent" : 3
"Web" : 2
"Task Management" : 6
"MCP" : 4
"Code Intelligence" : 1
"Worktree / Plan" : 4
"Scheduling" : 3
"Others" : 10
๋๊ตฌ ํด๋์ค ๊ตฌ์กฐ:
classDiagram
class Tool {
<<interface>>
+name: string
+description(): string
+call(input, context): Promise~Output~
+checkPermissions(input, context): PermissionResult
+isReadOnly(): boolean
+isConcurrencySafe(): boolean
+isDestructive(): boolean
}
class buildTool {
<<factory>>
+buildTool(def: ToolDef): Tool
}
class ToolRegistry {
+getAllBaseTools(): Tool[]
+getTools(context): Tool[]
+assembleToolPool(): Tool[]
+filterToolsByDenyRules(): Tool[]
}
Tool <|.. BashTool
Tool <|.. FileReadTool
Tool <|.. FileEditTool
Tool <|.. FileWriteTool
Tool <|.. GlobTool
Tool <|.. GrepTool
Tool <|.. AgentTool
Tool <|.. MCPTool
Tool <|.. WebFetchTool
Tool <|.. TaskCreateTool
buildTool --> Tool : creates
ToolRegistry --> Tool : manages
class BashTool {
+isReadOnly(): false
+isConcurrencySafe(): false
}
class FileReadTool {
+isReadOnly(): true
+isConcurrencySafe(): true
}
class AgentTool {
+isReadOnly(): false
+isConcurrencySafe(): true
}
์์ธ: Tools_Overview.md
4. Service Layer (19 Services)
API ํต์ , MCP, ์ปจํ ์คํธ ๊ด๋ฆฌ, ์ธ์ฆ, ๋ถ์ ๋ฑ ํต์ฌ ๋น์ฆ๋์ค ๋ก์ง
| ์๋น์ค | ํ์ผ ์ | ๋ณต์ก๋ | ๋ฌธ์ |
|---|---|---|---|
| API Client | 16 | ๋์ | API_Service.md |
| MCP Server Manager | 23 | ๋์ | MCP_Service.md |
| Compact (Context Compression) | 11 | ์ค๊ฐ | Compact_Service.md |
| Tool Executor | 4 | ์ค๊ฐ | Services_Overview.md |
| LSP Server | 7 | ์ค๊ฐ | Services_Overview.md |
| OAuth 2.0 | 5 | ์ค๊ฐ | Services_Overview.md |
| Analytics (DD + 1P) | 9 | ์ค๊ฐ | Services_Overview.md |
| Session Memory | 3 | ๋ฎ์ | Services_Overview.md |
| Extract Memories | 2 | ๋ฎ์ | Services_Overview.md |
| Plugins | 3 | ์ค๊ฐ | Services_Overview.md |
์๋น์ค ๋ ์ด์ด ์์กด์ฑ ๊ด๊ณ:
graph TD
subgraph Services["Service Layer"]
API["API Client<br/>(client.ts)"]
MCP["MCP Service<br/>(23 files)"]
Compact["Compact Service<br/>(11 files)"]
ToolSvc["Tool Executor<br/>(4 files)"]
LSP_S["LSP Server<br/>(7 files)"]
OAuth_S["OAuth 2.0<br/>(5 files)"]
Analytics_S["Analytics<br/>(9 files)"]
Plugins_S["Plugins<br/>(3 files)"]
SessionMem_S["Session Memory"]
ExtractMem_S["Extract Memories"]
end
subgraph Providers["API Multi-Provider"]
Direct["Anthropic Direct<br/>api.anthropic.com"]
Bedrock["AWS Bedrock<br/>@anthropic-ai/bedrock-sdk"]
Vertex["Google Vertex AI<br/>@anthropic-ai/vertex-sdk"]
Foundry["Azure Foundry<br/>@anthropic-ai/foundry-sdk"]
end
API --> Direct
API --> Bedrock
API --> Vertex
API --> Foundry
ToolSvc --> API
ToolSvc --> MCP
Compact --> API
MCP --> OAuth_S
SessionMem_S --> API
ExtractMem_S --> API
LSP_S --> ToolSvc
style API fill:#e3f2fd,stroke:#1565c0
style Providers fill:#f3e5f5,stroke:#7b1fa2
์์ธ: Services_Overview.md
5. UI Components
React ๊ธฐ๋ฐ ํฐ๋ฏธ๋ UI โ 389๊ฐ ํ์ผ
| ์นดํ ๊ณ ๋ฆฌ | ํ์ผ ์ | ์ค๋ช |
|---|---|---|
| ๋ฉ์์ง ๋ ๋๋ง | 36 | ์คํธ๋ฆฌ๋ฐ ์๋ต, ๋งํฌ๋ค์ด, ์ฝ๋ ํ์ด๋ผ์ดํธ |
| ๊ถํ ๋ค์ด์ผ๋ก๊ทธ | 32 | ๋๊ตฌ ์คํ ๊ถํ ์์ฒญ/์น์ธ/๊ฑฐ๋ถ |
| ๋์์ธ ์์คํ | 18 | ํ ๋ง, ์ปฌ๋ฌ, ํ์ดํฌ๊ทธ๋ํผ |
| ์์ด์ ํธ UI | 16 | ์๋ธ์์ด์ ํธ ์ํ ํ์ |
| MCP UI | 15 | MCP ์๋ฒ ์ฐ๊ฒฐ ์ํ |
| ํ๋กฌํํธ ์ ๋ ฅ | 8 | ๋ฉํฐ๋ผ์ธ ์ ๋ ฅ, ์๋์์ฑ |
์์ธ: Components_Overview.md
6. Ink Framework
์ปค์คํ ํฐ๋ฏธ๋ ๋ ๋๋ง ํ๋ ์์ํฌ โ 96๊ฐ ํ์ผ
React์ ์ ์ธ์ UI ๋ชจ๋ธ์ ํฐ๋ฏธ๋์ ์ ์ฉํ ์ปค์คํ Ink ํ๋ ์์ํฌ:
flowchart LR
subgraph React["React Layer"]
JSX["JSX Components<br/>(Box, Text, ScrollBox)"]
Reconciler["React Reconciler<br/>(์ปค์คํ
๋ ๋๋ฌ)"]
end
subgraph Layout["Layout Engine"]
Yoga["Yoga Layout<br/>(Flexbox ๊ณ์ฐ)"]
Measure["๋
ธ๋ ์ธก์ <br/>(width, height, padding)"]
end
subgraph Output["Terminal Output"]
ANSI["ANSI ์ด์ค์ผ์ดํ<br/>์ํ์ค ์์ฑ"]
Stdout["stdout.write()<br/>ํฐ๋ฏธ๋ ๋ ๋๋ง"]
end
subgraph Events["Event System"]
Keyboard["ํค๋ณด๋ ์
๋ ฅ"]
Mouse["๋ง์ฐ์ค ์ด๋ฒคํธ"]
Resize["ํฐ๋ฏธ๋ ๋ฆฌ์ฌ์ด์ฆ"]
end
JSX --> Reconciler
Reconciler --> Yoga
Yoga --> Measure
Measure --> ANSI
ANSI --> Stdout
Events --> Reconciler
style React fill:#e3f2fd,stroke:#1565c0
style Layout fill:#fff3e0,stroke:#ef6c00
style Output fill:#e8f5e9,stroke:#2e7d32
style Events fill:#fce4ec,stroke:#c62828
์ปดํฌ๋ํธ ๋ ๋๋ง ํธ๋ฆฌ:
graph TD
REPL["REPL.tsx<br/>(๋ฉ์ธ ํ๋ฉด)"]
REPL --> FL["FullscreenLayout"]
FL --> SB["ScrollBox<br/>(์คํฌ๋กค ๊ฐ๋ฅ ์์ญ)"]
FL --> PI["PromptInput<br/>(ํ๋จ ๊ณ ์ )"]
FL --> SL["StatusLine<br/>(์ํ๋ฐ)"]
FL --> Modal["๋ชจ๋ฌ ๋ค์ด์ผ๋ก๊ทธ"]
SB --> UPM["UserPromptMessage"]
SB --> ATM["AssistantTextMessage"]
SB --> ATUM["AssistantToolUseMessage"]
SB --> UTRM["UserToolResultMessage"]
SB --> APL["AgentProgressLine"]
PI --> BTI["BaseTextInput"]
PI --> PIF["PromptInputFooter"]
PI --> Notif["Notifications"]
Modal --> PermReq["PermissionRequest"]
Modal --> QOD["QuickOpenDialog"]
Modal --> DD["DiffDialog"]
style REPL fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
style FL fill:#f3e5f5,stroke:#7b1fa2
style SB fill:#fff3e0,stroke:#ef6c00
style PI fill:#e8f5e9,stroke:#2e7d32
style Modal fill:#fce4ec,stroke:#c62828
์์ธ: Ink_Framework.md | Components_Overview.md
7. Hooks System
104๊ฐ React ํ โ ์ํ ๊ด๋ฆฌ, ๋๊ตฌ ๊ถํ, ํ์คํฌ ๊ด๋ฆฌ
- ๋๊ตฌ ๊ถํ ํ (ToolPermission)
- ํ์คํฌ ๊ด๋ฆฌ ํ (TaskManagement)
- UI ์ํ ํ (useInput, useKeyboard, useFocus)
flowchart TD
subgraph Permission["๊ถํ ํ
(toolPermission/)"]
PC["PermissionContext.ts<br/>์ค์ผ์คํธ๋ ์ด์
"]
PC --> IH["interactiveHandler<br/>(๋ฉ์ธ ์์ด์ ํธ)"]
PC --> CH["coordinatorHandler<br/>(์ฝ๋๋ค์ดํฐ)"]
PC --> SWH["swarmWorkerHandler<br/>(๋ถ์ฐ ์์ปค)"]
IH --> Race{"ํ
/๋ถ๋ฅ๊ธฐ vs<br/>์ฌ์ฉ์ ๊ฒฝํฉ"}
Race -->|ํ
์น๋ฆฌ| AutoDecide["์๋ ๊ฒฐ์ "]
Race -->|์ฌ์ฉ์ ์น๋ฆฌ| UserResp["๋ค์ด์ผ๋ก๊ทธ ์๋ต"]
end
subgraph Queue["ํ & ํ์คํฌ ํ
"]
QP["useQueueProcessor<br/>์ฐ์ ์์: now > next > later"]
TV["useTasksV2<br/>์ฑ๊ธํค + fs.watch"]
end
subgraph UI["UI ํ
"]
TI["useTextInput"]
VI["useVimInput"]
HS["useHistorySearch"]
TS["useTerminalSize"]
end
style Permission fill:#fff3e0,stroke:#ef6c00
style Queue fill:#e8eaf6,stroke:#283593
style UI fill:#e8f5e9,stroke:#2e7d32
์์ธ: Hooks_Overview.md
8. Commands System
100+ CLI ์ฌ๋์ ๋ช ๋ น์ด
/help, /model, /config, /compact, /mcp, /vim, /cost, /doctor ๋ฑ 100๊ฐ ์ด์์ ์ฌ๋์ ๋ช
๋ น์ด์ ์คํฌ ์์คํ
.
์์ธ: Commands_Overview.md
9. Utilities
564๊ฐ ํ์ผ โ ํ๋ก์ ํธ์ 29.7%๋ฅผ ์ฐจ์งํ๋ ์ธํ๋ผ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
| ๋ชจ๋ | ํ์ผ ์ | ์ค๋ช | ๋ฌธ์ |
|---|---|---|---|
| Permissions | 26 | ๊ท์น ๊ธฐ๋ฐ + AI ๋ถ๋ฅ ๊ถํ ์์คํ | Utils_Overview.md |
| Settings | 19 | ๊ณ์ธต์ ์ค์ ๊ด๋ฆฌ | Utils_Overview.md |
| Model | 18 | ๋ชจ๋ธ ์ ํ/๊ด๋ฆฌ/๊ฐ๊ฒฉ | Utils_Overview.md |
| Bash | 15+ | AST ํ์ฑ, ์ธ์ ์ ๋ฐฉ์ง | Utils_Overview.md |
| Telemetry | 14 | OpenTelemetry ๊ธฐ๋ฐ | Utils_Overview.md |
| Shell | 12 | ์ ธ ์ถ์ํ ๊ณ์ธต | Utils_Overview.md |
| Swarm | 16+ | ๋ถ์ฐ ์์ด์ ํธ | Utils_Overview.md |
| Git | 5 | Git ์ํ ์ฝ๊ธฐ | Utils_Overview.md |
์์ธ: Utils_Overview.md
10. Security Architecture
Claude Code์ ๋ค์ธต ๋ณด์ ๊ตฌ์กฐ:
| ๋ณด์ ๊ณ์ธต | ํ์ผ ์ | ๊ธฐ๋ฒ |
|---|---|---|
| ๊ถํ ์์คํ | 26 | ๊ท์น ๊ธฐ๋ฐ + AI ๋ถ๋ฅ (ํ์ฉ/๊ฑฐ๋ถ/๋ฌธ์) |
| Bash ๋ณด์ | 15+ | tree-sitter AST ํ์ฑ, ๋ช ๋ น ์ธ์ ์ ๋ฐฉ์ง |
| ์ ธ ๊ฒ์ฆ | 12 | ์ฝ๊ธฐ์ ์ฉ ๋ช ๋ น ๋ ์ง์คํธ๋ฆฌ |
| ๊ฒฝ๋ก ๊ฒ์ฆ | 5+ | ์์ ๊ฒฝ๋ก ์ฒดํฌ (๋๋ ํฐ๋ฆฌ ํ์ถ ๋ฐฉ์ง) |
| ์๋๋ฐ์ฑ | 2 | @anthropic-ai/sandbox-runtime |
flowchart TD
ToolReq["๋๊ตฌ ์คํ ์์ฒญ"] --> L1
subgraph L1["Layer 1: Permission System (26 files)"]
Rules["๊ท์น ๊ธฐ๋ฐ ๊ฒ์ฌ<br/>(allowlist / denylist)"]
AI["AI ๋ถ๋ฅ๊ธฐ<br/>(์๋ ํ๋จ)"]
Rules --> Decision{"ํ๋จ"}
AI --> Decision
end
Decision -->|ALLOW| L2
Decision -->|ASK| UserDialog["์ฌ์ฉ์ ํ์ธ ๋ค์ด์ผ๋ก๊ทธ"]
Decision -->|DENY| Blocked["โ ์คํ ์ฐจ๋จ"]
UserDialog -->|์น์ธ| L2
UserDialog -->|๊ฑฐ๋ถ| Blocked
subgraph L2["Layer 2: Input Validation"]
BashAST["Bash AST ํ์ฑ<br/>(tree-sitter)"]
PathCheck["๊ฒฝ๋ก ๊ฒ์ฆ<br/>(๋๋ ํฐ๋ฆฌ ํ์ถ ๋ฐฉ์ง)"]
CmdRegistry["์ฝ๊ธฐ์ ์ฉ ๋ช
๋ น<br/>๋ ์ง์คํธ๋ฆฌ"]
end
L2 --> L3
subgraph L3["Layer 3: Sandbox Runtime"]
Sandbox["@anthropic-ai/<br/>sandbox-runtime"]
Isolation["ํ๋ก์ธ์ค ๊ฒฉ๋ฆฌ"]
end
L3 --> Exec["โ
์์ ํ ๋๊ตฌ ์คํ"]
style L1 fill:#fff3e0,stroke:#ef6c00
style L2 fill:#e8eaf6,stroke:#283593
style L3 fill:#e8f5e9,stroke:#2e7d32
style Blocked fill:#ffebee,stroke:#c62828
style Exec fill:#c8e6c9,stroke:#1b5e20
11. Multi-Agent System
Claude Code์ ๋ฉํฐ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์ :
- AgentTool: ์๋ธ์์ด์ ํธ ์์ฑ (์ํฌํธ๋ฆฌ ๊ฒฉ๋ฆฌ ์ง์)
- Coordinator Mode: ๋ฉํฐ ์์ปค ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์
- Swarm: ๋ถ์ฐ ์์ด์ ํธ ํจํด (
utils/swarm/) - SendMessage: ์์ด์ ํธ ๊ฐ ๋ฉ์์ง ์ ๋ฌ
graph TD
Main["Main Agent<br/>(๋ฉ์ธ ๋ํ)"]
Main -->|"AgentTool<br/>(spawn)"| Sub1["Sub-Agent 1<br/>general-purpose"]
Main -->|"AgentTool<br/>(spawn)"| Sub2["Sub-Agent 2<br/>Explore"]
Main -->|"AgentTool<br/>(spawn)"| Sub3["Sub-Agent 3<br/>worktree isolation"]
Main -->|"Coordinator<br/>Mode"| Coord["Coordinator"]
Coord -->|"์์ปค ํ ๋น"| W1["Worker 1"]
Coord -->|"์์ปค ํ ๋น"| W2["Worker 2"]
Coord -->|"์์ปค ํ ๋น"| W3["Worker 3"]
Sub1 ---|"SendMessage"| Main
Sub2 ---|"SendMessage"| Main
W1 ---|"๋ฉ์ผ๋ฐ์ค"| Coord
W2 ---|"๋ฉ์ผ๋ฐ์ค"| Coord
Main -->|"Swarm<br/>Mode"| Swarm["Swarm Leader"]
Swarm --> SW1["Swarm Worker 1"]
Swarm --> SW2["Swarm Worker 2"]
style Main fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
style Coord fill:#f3e5f5,stroke:#7b1fa2
style Swarm fill:#fff3e0,stroke:#ef6c00
style Sub3 fill:#e8f5e9,stroke:#2e7d32
12. Memory System
ํ์ผ ๊ธฐ๋ฐ ์์ ๋ฉ๋ชจ๋ฆฌ ์์คํ :
- Memdir: AI ์ ํ ๊ธฐ๋ฐ ํ์ผ ๋ฉ๋ชจ๋ฆฌ, ํ ๋ฉ๋ชจ๋ฆฌ
- Session Memory: ๋ํ ์ค ์๋ ๋ฉ๋ชจ ์ ์ง (ํฌํฌ๋ ์๋ธ์์ด์ ํธ)
- Extract Memories: ์ฟผ๋ฆฌ ๋ฃจํ ์ข ๋ฃ ์ ์ง์ ๋ฉ๋ชจ๋ฆฌ ์ถ์ถ
stateDiagram-v2
[*] --> SessionStart: ์ธ์
์์
SessionStart --> ActiveConversation: REPL ๋ฃจํ ์ง์
state ActiveConversation {
[*] --> QueryLoop
QueryLoop --> SessionMemoryUpdate: ๋ฐฑ๊ทธ๋ผ์ด๋
SessionMemoryUpdate --> QueryLoop: ๋ฉ๋ชจ๋ฆฌ ํ์ผ ์
๋ฐ์ดํธ
QueryLoop --> CompactTrigger: ์ปจํ
์คํธ ํ๊ณ ๋๋ฌ
CompactTrigger --> MemoryExtract: ์์ถ ์ ๋ฉ๋ชจ๋ฆฌ ์ถ์ถ
MemoryExtract --> QueryLoop
}
ActiveConversation --> SessionEnd: ์ธ์
์ข
๋ฃ
state SessionEnd {
[*] --> ExtractMemories: ํฌํฌ๋ ์์ด์ ํธ
ExtractMemories --> PersistToFile: ๋ฉ๋ชจ๋ฆฌ ํ์ผ ์ ์ฅ
PersistToFile --> TeamSync: ํ ๋ฉ๋ชจ๋ฆฌ ๋๊ธฐํ
TeamSync --> [*]
}
SessionEnd --> [*]
note right of ActiveConversation
Session Memory:
ํฌํฌ๋ ์๋ธ์์ด์ ํธ๊ฐ
๋ฐฑ๊ทธ๋ผ์ด๋์์ ์๋ ์
๋ฐ์ดํธ
end note
note right of SessionEnd
Extract Memories:
ํ๋กฌํํธ ์บ์ ๊ณต์ ๋ก
ํจ์จ์ ์ถ์ถ
end note
13. Additional Modules
| ๋ชจ๋ | ์ค๋ช | ๋ฌธ์ |
|---|---|---|
| Bootstrap / State | ๊ธ๋ก๋ฒ ์ธ์ ์ํ ์ฑ๊ธํค (209 getter/setter) | bootstrap/state.md |
| Screens | REPL, ์ธ์ ์ฌ๊ฐ, ์ง๋จ ํ๋ฉด | screens/Screens_Overview.md |
| Server | WebSocket ์ง์ ์ฐ๊ฒฐ ์ธ์ ๊ด๋ฆฌ | server/Server_Overview.md |
| Upstream Proxy | CCR์ฉ CONNECT-over-WebSocket ๋ฆด๋ ์ด | upstreamproxy/UpstreamProxy_Overview.md |
| Keybindings | ์ปค์คํ ํค๋ณด๋ ๋จ์ถํค + ์ฝ๋ ์ํ์ค | keybindings/Keybindings_Overview.md |
| Migrations | ์ค์ /๋ชจ๋ธ ๋ง์ด๊ทธ๋ ์ด์ 11๊ฐ | migrations/Migrations_Overview.md |
| Native TS | color-diff, file-index, yoga-layout TS ํฌํธ | native-ts/NativeTS_Overview.md |
| Buddy | ์ปดํจ๋์ธ ์บ๋ฆญํฐ ์ ์ฐจ์ ์์ฑ ์์คํ | buddy/Buddy_Overview.md |
| Plugins | ๋ด์ฅ ํ๋ฌ๊ทธ์ธ ๋ ์ง์คํธ๋ฆฌ + ๋ง์ผํ๋ ์ด์ค | plugins/Plugins_Module.md |
| Voice | ์์ฑ ๋ชจ๋ ํผ์ฒ ๊ฒ์ดํธ | voice/voiceModeEnabled.md |
| Root Files | src/ ๋ฃจํธ 18๊ฐ ํต์ฌ ํ์ผ | Root_Files_Overview.md |
Module Distribution
pie title Module File Distribution (1,902 files)
"utils (564)" : 564
"components (389)" : 389
"commands (207)" : 207
"tools (184)" : 184
"services (130)" : 130
"hooks (104)" : 104
"ink (96)" : 96
"bridge (31)" : 31
"constants (21)" : 21
"skills (20)" : 20
"others (156)" : 156
utils โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 564 (29.7%)
components โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 389 (20.5%)
commands โโโโโโโโโโโโโโโโ 207 (10.9%)
tools โโโโโโโโโโโโโ 184 (9.7%)
services โโโโโโโโโ 130 (6.8%)
hooks โโโโโโโ 104 (5.5%)
ink โโโโโโ 96 (5.0%)
bridge โโ 31 (1.6%)
constants โ 21 (1.1%)
skills โ 20 (1.1%)
others โโโโ 156 (8.2%)
์์ธ: Stats_Report.md
Prompt & Agent Architecture
์์ค์ฝ๋ ๊ธฐ๋ฐ์ผ๋ก ๋ถ์ํ Claude Code์ ํ๋กฌํํธ ์กฐ๋ฆฝ ์์, ์์ด์ ํธ ๊ตฌ์ฑ, API ํธ์ถ ๊ตฌ์กฐ. ์ฌ์ฉ์ ์ ๋ ฅ์ด ์ด๋ค ํ๋กฌํํธ์ ๊ฒฐํฉ๋์ด Claude API์ ์ ๋ฌ๋๋์ง, ๊ทธ ์ ์ฒด ํ๋ฆ์ ์ถ์ ํฉ๋๋ค.
1. System Prompt Assembly Order
Claude Code์ ์์คํ
ํ๋กฌํํธ๋ src/constants/prompts.ts์ getSystemPrompt() ํจ์์์ ์กฐ๋ฆฝ๋ฉ๋๋ค.
์บ์ ๊ฐ๋ฅํ ์ ์ ๊ตฌ๊ฐ๊ณผ ์ธ์
๋ณ ๋์ ๊ตฌ๊ฐ์ด SYSTEM_PROMPT_DYNAMIC_BOUNDARY ๋ง์ปค๋ก ๋ถ๋ฆฌ๋ฉ๋๋ค.
flowchart TD
subgraph STATIC["์ ์ ๊ตฌ๊ฐ (Cacheable โ ๊ธ๋ก๋ฒ ์บ์ ๊ฐ๋ฅ)"]
direction TB
S1["1. getSimpleIntroSection()<br/><i>'You are Claude Code,<br/>Anthropic's official CLI...'</i>"]
S2["2. getSimpleSystemSection()<br/><i>๋๊ตฌ ๊ถํ, ํ๊ทธ, ํ
, ์์ถ ๊ท์น</i>"]
S3["3. getSimpleDoingTasksSection()<br/><i>์ฝ๋ ์์ฑ ๊ฐ์ด๋๋ผ์ธ, ๋ณด์ ๊ท์น</i>"]
S4["4. getActionsSection()<br/><i>๊ฐ์ญ์ฑ, ์ํฅ ๋ฒ์, ํ์ธ ์์ฒญ ๊ท์น</i>"]
S5["5. getUsingYourToolsSection()<br/><i>๋๊ตฌ ์ฌ์ฉ ๊ฐ์ด๋ (Bash๋ณด๋ค ์ ์ฉ ๋๊ตฌ)</i>"]
S6["6. getSimpleToneAndStyleSection()<br/><i>ํค & ์คํ์ผ (์ด๋ชจ์ง ๊ธ์ง ๋ฑ)</i>"]
S7["7. getOutputEfficiencySection()<br/><i>์ถ๋ ฅ ๊ฐ๊ฒฐ์ฑ ์ง์นจ</i>"]
S1 --> S2 --> S3 --> S4 --> S5 --> S6 --> S7
end
BOUNDARY["โโโ SYSTEM_PROMPT_DYNAMIC_BOUNDARY โโโ"]
subgraph DYNAMIC["๋์ ๊ตฌ๊ฐ (์ธ์
๋ณ โ systemPromptSection() ๋ ์ง์คํธ๋ฆฌ)"]
direction TB
D1["8. session_guidance<br/><i>์์ด์ ํธ ๋๊ตฌ, ์คํฌ, ๊ฒ์ฆ ์์ด์ ํธ</i>"]
D2["9. memory<br/><i>loadMemoryPrompt() โ ๋ฉ๋ชจ๋ฆฌ ์ง์นจ</i>"]
D3["10. env_info_simple<br/><i>cwd, git ์ํ, ๋ชจ๋ธ, OS, ์
ธ</i>"]
D4["11. language<br/><i>์ธ์ด ์ ํธ ์ค์ </i>"]
D5["12. mcp_instructions<br/><i>MCP ์๋ฒ ์ง์นจ (volatile)</i>"]
D6["13. scratchpad<br/><i>์คํฌ๋์นํจ๋ ๋๋ ํฐ๋ฆฌ</i>"]
D7["14. frc / summarize_tool_results<br/><i>ํจ์ ๊ฒฐ๊ณผ ์ ๋ฆฌ / ๋๊ตฌ ๊ฒฐ๊ณผ ์์ฝ</i>"]
D8["15. token_budget / brief<br/><i>ํ ํฐ ์์ฐ, KAIROS ๋ธ๋ฆฌํ</i>"]
D1 --> D2 --> D3 --> D4 --> D5 --> D6 --> D7 --> D8
end
STATIC --> BOUNDARY --> DYNAMIC
style STATIC fill:#e8f5e9,stroke:#2e7d32
style BOUNDARY fill:#fff9c4,stroke:#f9a825,stroke-width:3px
style DYNAMIC fill:#e3f2fd,stroke:#1565c0
์์คํ
ํ๋กฌํํธ ์ฐ์ ์์ ์ฒด์ธ โ src/utils/systemPrompt.ts์ buildEffectiveSystemPrompt():
flowchart LR
Override["1. Override<br/>(loop ๋ชจ๋)"]
Coord["2. Coordinator<br/>์์คํ
ํ๋กฌํํธ"]
Agent["3. Agent ์ ์<br/>์์คํ
ํ๋กฌํํธ"]
Custom["4. --system-prompt<br/>ํ๋๊ทธ"]
Default["5. Default<br/>์์คํ
ํ๋กฌํํธ"]
Override -->|"์์ผ๋ฉด"| Coord
Coord -->|"์์ผ๋ฉด"| Agent
Agent -->|"์์ผ๋ฉด"| Custom
Custom -->|"์์ผ๋ฉด"| Default
Append["+ appendSystemPrompt<br/>(ํญ์ ์ถ๊ฐ)"]
Override -.-> Append
Coord -.-> Append
Agent -.-> Append
Custom -.-> Append
Default -.-> Append
style Override fill:#ffebee,stroke:#c62828
style Default fill:#e8f5e9,stroke:#2e7d32
style Append fill:#fff3e0,stroke:#ef6c00
์์ค:
src/constants/prompts.tsยทsrc/utils/systemPrompt.ts
2. Context Injection Flow
์์คํ ํ๋กฌํํธ ์ธ์ User Context์ System Context๊ฐ ๋ณ๋๋ก ์กฐ๋ฆฝ๋์ด API ํธ์ถ์ ์ฃผ์ ๋ฉ๋๋ค.
sequenceDiagram
participant QE as QueryEngine.ts<br/>submitMessage()
participant CTX as context.ts
participant CMD as claudemd.ts
participant GIT as git utils
participant API as API ํธ์ถ
QE->>CTX: getUserContext()
activate CTX
CTX->>CMD: getClaudeMds()
CMD-->>CTX: CLAUDE.md ๊ณ์ธต ์ฝํ
์ธ
CTX-->>QE: { claudeMd, currentDate }
deactivate CTX
QE->>CTX: getSystemContext()
activate CTX
CTX->>GIT: getGitStatus()
GIT-->>CTX: branch, commits, status
CTX-->>QE: { gitStatus, cacheBreaker }
deactivate CTX
QE->>API: prependUserContext()<br/>โ messages[0]์ system-reminder ์ฝ์
QE->>API: appendSystemContext()<br/>โ system ๋ฐฐ์ด ๋์ ์ถ๊ฐ
์ฃผ์ ์์น:
| ์ปจํ ์คํธ | API ํ๋ผ๋ฏธํฐ | ํ์ | ์์ค |
|---|---|---|---|
| claudeMd | messages[0] (user role) | <system-reminder># claudeMd\n{๋ด์ฉ}</system-reminder> | src/utils/claudemd.ts |
| currentDate | messages[0] (user role) | # currentDate\nToday's date is 2026-04-01 | src/context.ts |
| gitStatus | system ๋ฐฐ์ด ๋ | gitStatus: branch main, 3 commits... | src/context.ts |
3. API Request Assembly
src/services/api/claude.ts์ paramsFromContext()์์ ์ต์ข
API ํ๋ผ๋ฏธํฐ๊ฐ ์กฐ๋ฆฝ๋ฉ๋๋ค.
flowchart TD
subgraph Params["์ต์ข
API ํ๋ผ๋ฏธํฐ (paramsFromContext)"]
direction TB
system["<b>system:</b><br/>TextBlockParam[]<br/>์์คํ
ํ๋กฌํํธ ๋ธ๋ก + ์บ์ ๋ง์ปค"]
messages["<b>messages:</b><br/>์ ๊ทํ๋ ๋ฉ์์ง ๋ฐฐ์ด<br/>+ UserContext system-reminder<br/>+ ์บ์ ๋ธ๋ ์ดํฌํฌ์ธํธ"]
tools["<b>tools:</b><br/>๋๊ตฌ ์คํค๋ง ๋ฐฐ์ด (40+)<br/>name, description, input_schema<br/>+ cache_control"]
model["<b>model:</b><br/>claude-sonnet-4-20250514"]
thinking["<b>thinking:</b><br/>{ type: 'adaptive' }<br/>or budget_tokens"]
betas["<b>betas:</b><br/>interleaved-thinking<br/>advanced-tool-use<br/>prompt-caching-scope"]
metadata["<b>metadata:</b><br/>device_id, session_id, user_id"]
max_tokens["<b>max_tokens:</b> 16384"]
end
System_Prompt["getSystemPrompt()"] --> system
Context["getUserContext()<br/>getSystemContext()"] --> messages
ToolReg["๋๊ตฌ ๋ ์ง์คํธ๋ฆฌ<br/>toolToAPISchema()"] --> tools
Config["๋ชจ๋ธ/์ค์ "] --> model
Config --> thinking
Config --> betas
style Params fill:#f5f5f5,stroke:#616161
style system fill:#e3f2fd,stroke:#1565c0
style messages fill:#fff3e0,stroke:#ef6c00
style tools fill:#e8f5e9,stroke:#2e7d32
๋๊ตฌ ์คํค๋ง ๊ตฌ์กฐ (๊ฐ ๋๊ตฌ๋ณ):
{
type: "function",
name: "Bash", // ๋๊ตฌ ์ด๋ฆ
description: "Executes a...", // prompt.ts์์ ๋ก๋
input_schema: { ... }, // Zod โ JSON Schema
strict: true, // ์๊ฒฉ ๋ชจ๋
cache_control: { type: "ephemeral" } // ์บ์ ์ ์ด
}
์์ค:
src/services/api/claude.tsยทsrc/utils/api.ts
4. Built-In Agent Types
Claude Code์๋ 6๊ฐ์ ๋ด์ฅ ์์ด์ ํธ๊ฐ src/tools/AgentTool/built-in/์ ์ ์๋์ด ์์ต๋๋ค.
| Agent Type | ๋ชจ๋ธ | ๋๊ตฌ ์ ๊ทผ | ์์คํ ํ๋กฌํํธ ํต์ฌ | ์์ค |
|---|---|---|---|---|
general-purpose | inherit | ๋ชจ๋ ๋๊ตฌ (['*']) | "Complete the task fully โ don't gold-plate, but don't leave it half-done." | generalPurposeAgent.ts |
Explore | haiku (์ธ๋ถ) / inherit | Glob, Grep, Read, Bash(์ฝ๊ธฐ์ ์ฉ) | "You are a file search specialist... READ-ONLY MODE" | exploreAgent.ts |
Plan | sonnet | Glob, Grep, Read, Bash(์ฝ๊ธฐ์ ์ฉ) | "You are a software architect... READ-ONLY PLANNING TASK" | planAgent.ts |
verification | inherit | ๋ชจ๋ ๋๊ตฌ (ํธ์ง ์ ์ธ) | "Adversarial testing โ try to break implementation. PASS/FAIL/PARTIAL" | verificationAgent.ts |
claude-code-guide | haiku | WebFetch, WebSearch, Glob, Grep, Read | "Answer questions about Claude Code CLI, Agent SDK, Claude API" | claudeCodeGuideAgent.ts |
statusline-setup | inherit | Read, Edit | "Configure the user's Claude Code status line setting" | statuslineSetup.ts |
graph TD
subgraph BuiltIn["Built-In Agents (6 types)"]
GP["general-purpose<br/>๋ชจ๋ ๋๊ตฌ, ๋ฒ์ฉ ์ฐ๊ตฌ/์คํ"]
EX["Explore<br/>READ-ONLY, Haiku, ๋น ๋ฅธ ํ์"]
PL["Plan<br/>READ-ONLY, ์ํคํ
์ฒ ์ค๊ณ"]
VF["verification<br/>์ ๋์ ํ
์คํธ, PASS/FAIL"]
GD["claude-code-guide<br/>๊ณต์ ๋ฌธ์ ๊ธฐ๋ฐ ๊ฐ์ด๋"]
SL["statusline-setup<br/>์ํ๋ฐ ์ค์ "]
end
subgraph Custom["Custom Agents"]
UA[".claude/agents/*.md<br/>์ฌ์ฉ์ ์ ์ ์์ด์ ํธ"]
JA[".claude/agents.json<br/>JSON ์์ด์ ํธ"]
end
subgraph Spawn["AgentTool ํธ์ถ"]
Call["Agent(description, subagent_type, prompt)"]
end
Call -->|"subagent_type"| GP
Call -->|"subagent_type"| EX
Call -->|"subagent_type"| PL
Call -->|"subagent_type"| VF
Call -->|"subagent_type"| GD
Call -->|"subagent_type"| SL
Call -->|"subagent_type"| UA
style GP fill:#e3f2fd,stroke:#1565c0
style EX fill:#e8f5e9,stroke:#2e7d32
style PL fill:#f3e5f5,stroke:#7b1fa2
style VF fill:#ffebee,stroke:#c62828
style Custom fill:#fff3e0,stroke:#ef6c00
Agent ์ ์ ๊ตฌ์กฐ (src/tools/AgentTool/loadAgentsDir.ts):
type BaseAgentDefinition = {
agentType: string; // ๊ณ ์ ์๋ณ์
whenToUse: string; // ์ฌ์ฉ ์์ ์ค๋ช
tools?: string[]; // ํ์ฉ ๋๊ตฌ ๋ชฉ๋ก
disallowedTools?: string[]; // ๊ธ์ง ๋๊ตฌ ๋ชฉ๋ก
model?: string; // ๋ชจ๋ธ ์ค๋ฒ๋ผ์ด๋
permissionMode?: PermissionMode; // 'ask' | 'allow' | 'dontAsk'
maxTurns?: number; // ์ต๋ ํด ์
omitClaudeMd?: boolean; // CLAUDE.md ์๋ต (ํ ํฐ ์ ์ฝ)
isolation?: 'worktree' | 'remote'; // ๊ฒฉ๋ฆฌ ๋ชจ๋
memory?: 'user' | 'project' | 'local';
getSystemPrompt: () => string; // ์์คํ
ํ๋กฌํํธ ์์ฑ
}
5. Agent Spawning & Prompt Flow
์์ด์ ํธ๊ฐ ์์ฑ๋ ๋ ์ด๋ค ํ๋กฌํํธ๊ฐ ์ด๋ค ์์๋ก ์กฐ๋ฆฝ๋๋์ง:
sequenceDiagram
participant Main as Main Agent
participant AT as AgentTool
participant Load as loadAgentsDir
participant Sub as Sub-Agent
Main->>AT: Agent({ subagent_type, prompt, description })
AT->>Load: ์์ด์ ํธ ์ ์ ์กฐํ
Load-->>AT: AgentDefinition (์์คํ
ํ๋กฌํํธ, ๋๊ตฌ, ๋ชจ๋ธ)
AT->>Sub: ์๋ธ์์ด์ ํธ ์์ฑ
Note over Sub: ์์คํ
ํ๋กฌํํธ ์กฐ๋ฆฝ ์์:
Note over Sub: 1. Agent.getSystemPrompt()
Note over Sub: 2. enhanceWithEnvDetails()
Note over Sub: 3. CLAUDE.md (omitClaudeMd๊ฐ ์๋ ๊ฒฝ์ฐ)
Note over Sub: 4. ์ฌ์ฉ์ prompt (์ฒซ ๋ฉ์์ง)
Sub->>Sub: ๋๊ตฌ ์คํ ๋ฃจํ
Sub-->>AT: ์ต์ข
์๋ต (text)
AT-->>Main: ๊ฒฐ๊ณผ ๋ฐํ (caller์๊ฒ ์ ๋ฌ)
Fork vs Fresh Agent:
flowchart LR
subgraph Fork["Fork (subagent_type ์๋ต)"]
F1["๋ถ๋ชจ ์ปจํ
์คํธ ์์"]
F2["ํ๋กฌํํธ ์บ์ ๊ณต์ "]
F3["์ ๋น์ฉ"]
F4["์ค๊ฐ ์ถ๋ ฅ ๋ถํ์ ์"]
end
subgraph Fresh["Fresh Agent (subagent_type ์ง์ )"]
R1["๋
๋ฆฝ ์ปจํ
์คํธ"]
R2["์ ์ฒด ๋ธ๋ฆฌํ ํ์"]
R3["์์ด์ ํธ๋ณ ์์คํ
ํ๋กฌํํธ"]
R4["ํนํ๋ ๋๊ตฌ ์ธํธ"]
end
Decision{"์์
์ ํ?"}
Decision -->|"์ปจํ
์คํธ ์ฌํ์ฉ"| Fork
Decision -->|"ํนํ ์์ด์ ํธ ํ์"| Fresh
style Fork fill:#e8f5e9,stroke:#2e7d32
style Fresh fill:#e3f2fd,stroke:#1565c0
6. Coordinator Mode
Coordinator ๋ชจ๋๊ฐ ํ์ฑํ๋๋ฉด (src/coordinator/coordinatorMode.ts), ๋ฉ์ธ ์์ด์ ํธ๊ฐ ๋ค์์ Worker๋ฅผ ๋ณ๋ ฌ๋ก ์ค์ผ์คํธ๋ ์ด์
ํฉ๋๋ค.
sequenceDiagram
participant User as ์ฌ์ฉ์
participant Coord as Coordinator
participant W1 as Worker 1<br/>(์กฐ์ฌ)
participant W2 as Worker 2<br/>(์กฐ์ฌ)
participant W3 as Worker 3<br/>(๊ตฌํ)
participant W4 as Worker 4<br/>(๊ฒ์ฆ)
User->>Coord: ์์
์์ฒญ
rect rgb(232, 245, 233)
Note over Coord,W2: Phase 1: Research (๋ณ๋ ฌ)
Coord->>W1: Agent(prompt: "ํ์ผ A ์กฐ์ฌ")
Coord->>W2: Agent(prompt: "ํ์ผ B ์กฐ์ฌ")
W1-->>Coord: task-notification (๊ฒฐ๊ณผ)
W2-->>Coord: task-notification (๊ฒฐ๊ณผ)
end
Note over Coord: Synthesis: ๊ฒฐ๊ณผ ์ข
ํฉ โ ๊ตฌ์ฒด์ ๊ตฌํ ๋ช
์ธ ์์ฑ
rect rgb(227, 242, 253)
Note over Coord,W3: Phase 2: Implementation
Coord->>W3: Agent(prompt: "ํ์ผ X:42 ์์ ,<br/>๊ตฌ์ฒด์ ์ฝ๋ ์ค๋ํซ ํฌํจ")
W3-->>Coord: task-notification (์๋ฃ)
end
rect rgb(255, 235, 238)
Note over Coord,W4: Phase 3: Verification
Coord->>W4: Agent(subagent_type: verification,<br/>prompt: "๋ณ๊ฒฝ์ฌํญ ํ
์คํธ")
W4-->>Coord: PASS / FAIL / PARTIAL
end
Coord-->>User: ์ต์ข
๊ฒฐ๊ณผ ๋ณด๊ณ
Coordinator ํ๋กฌํํธ ํต์ฌ ๊ท์น:
- "์ ๋ ์ดํด๋ฅผ ์์ํ์ง ๋ง๋ผ" โ "๋ค ์กฐ์ฌ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ์ผ๋ก ๋ฒ๊ทธ๋ฅผ ๊ณ ์ณ" โ
- "ํญ์ ์ข ํฉํ๋ผ" โ ๊ตฌ์ฒด์ ํ์ผ ๊ฒฝ๋ก, ๋ผ์ธ ๋ฒํธ, ์ฝ๋ ์ค๋ํซ ํฌํจ โ
- Worker์๊ฒ ๋ณด๋ด๋ ํ๋กฌํํธ์ ์ฌ์ฉ์ ์๋ฌธ์ ํฌํจํ์ง ๋ง๋ผ โ ์ข ํฉํ ๋ช ์ธ๋ง ์ ๋ฌ
Worker โ Coordinator ์๋ฆผ ํ์:
<task-notification>
<task-id>{agentId}</task-id>
<status>completed|failed|killed</status>
<summary>Human-readable status</summary>
<result>Agent's final text response</result>
<usage>
<total_tokens>N</total_tokens>
<tool_uses>N</tool_uses>
<duration_ms>N</duration_ms>
</usage>
</task-notification>
7. Context Compaction Prompt
์ปจํ
์คํธ ์๋์ฐ๊ฐ ํ๊ณ์ ๋๋ฌํ๋ฉด src/services/compact/prompt.ts์์ ์์ถ ํ๋กฌํํธ๊ฐ ์คํ๋ฉ๋๋ค.
stateDiagram-v2
[*] --> Normal: ๋ํ ์งํ
Normal --> ThresholdCheck: ๋งค ํด๋ง๋ค ํ์ธ
ThresholdCheck --> Normal: ์ฌ์ ์์
ThresholdCheck --> Compaction: ์ปจํ
์คํธ ํ๊ณ ๊ทผ์
state Compaction {
[*] --> AnalyzeConversation
AnalyzeConversation --> GenerateSummary
Note right of GenerateSummary: ๋๊ตฌ ์ฌ์ฉ ๊ธ์ง (NO_TOOLS_PREAMBLE)
Note right of GenerateSummary: ํ
์คํธ ์ ์ฉ ์๋ต
state GenerateSummary {
[*] --> PrimaryRequest: 1. ์ฃผ์ ์์ฒญ๊ณผ ์๋
PrimaryRequest --> TechnicalConcepts: 2. ํต์ฌ ๊ธฐ์ ๊ฐ๋
TechnicalConcepts --> FilesAndCode: 3. ํ์ผ๊ณผ ์ฝ๋ ์ค๋ํซ
FilesAndCode --> ErrorsAndFixes: 4. ์๋ฌ์ ์์ ๋ด์ญ
ErrorsAndFixes --> ProblemSolving: 5. ๋ฌธ์ ํด๊ฒฐ ๊ณผ์
ProblemSolving --> UserMessages: 6. ๋ชจ๋ ์ฌ์ฉ์ ๋ฉ์์ง
UserMessages --> PendingTasks: 7. ๋๊ธฐ ์ค ์์
PendingTasks --> CurrentWork: 8. ํ์ฌ ์์
์ํ
CurrentWork --> NextStep: 9. ๋ค์ ๋จ๊ณ (์ธ์ฉ ํฌํจ)
end
GenerateSummary --> ExtractMemory: ๋ฉ๋ชจ๋ฆฌ ์ถ์ถ ํตํฉ
ExtractMemory --> ReplaceMessages: ๊ธฐ์กด ๋ฉ์์ง๋ฅผ ์์ฝ์ผ๋ก ๊ต์ฒด
end
Compaction --> Normal: ์์ถ ์๋ฃ, ๋ํ ๊ณ์
Note right of Compaction: analysis ๋ธ๋ก์ ์์ฝ ์ ์ ์ ๊ฑฐ๋จ
์์ถ ํ๋กฌํํธ ์ถ๋ ฅ ํ์:
<analysis>
[์ฌ๊ณ ๊ณผ์ โ ๋ชจ๋ ํฌ์ธํธ๊ฐ ์ปค๋ฒ๋์๋์ง ํ์ธ]
</analysis>
<summary>
1. Primary Request and Intent: ...
2. Key Technical Concepts: ...
3. Files and Code Sections: [์ค๋ํซ + ์ค์๋]
4. Errors and fixes: ...
5. Problem Solving: ...
6. All user messages: [๋น๋๊ตฌ ์ฌ์ฉ์ ๋ฉ์์ง ์ ์ฒด]
7. Pending Tasks: ...
8. Current Work: [์ ํํ ์์
์ํ]
9. Optional Next Step: [๋ํ์์ ์ธ์ฉ]
</summary>
8. Memory Extraction Prompt
์ธ์
์ข
๋ฃ ์ src/services/extractMemories/prompts.ts์์ ๋ฉ๋ชจ๋ฆฌ ์ถ์ถ ์์ด์ ํธ๊ฐ ์คํ๋ฉ๋๋ค.
flowchart TD
SessionEnd["์ธ์
์ข
๋ฃ / ์์ถ ํธ๋ฆฌ๊ฑฐ"] --> Fork["ํฌํฌ๋ ์๋ธ์์ด์ ํธ ์์ฑ<br/>(ํ๋กฌํํธ ์บ์ ๊ณต์ )"]
Fork --> Analyze["์ต๊ทผ ~N๊ฐ ๋ฉ์์ง ๋ถ์"]
Analyze --> Classify{"4-Type ๋ถ๋ฅ"}
Classify --> T1["User Feedback<br/><i>์ฌ์ฉ์ ์ ํธ, ์์ ์ง์นจ</i>"]
Classify --> T2["Project Patterns<br/><i>ํ๋ก์ ํธ ํจํด/๊ด์ต</i>"]
Classify --> T3["Workflow Learnings<br/><i>์ํฌํ๋ก์ฐ/ํ๋ก์ธ์ค</i>"]
Classify --> T4["Technical Discoveries<br/><i>๊ธฐ์ ์ ๋ฐ๊ฒฌ</i>"]
T1 --> Save
T2 --> Save
T3 --> Save
T4 --> Save
subgraph Save["์ ์ฅ ํ๋ก์ธ์ค (2๋จ๊ณ)"]
Step1["Step 1: ๊ฐ๋ณ ๋ฉ๋ชจ๋ฆฌ ํ์ผ ์์ฑ<br/>(frontmatter + ๋ด์ฉ)"]
Step2["Step 2: MEMORY.md ์ธ๋ฑ์ค ์
๋ฐ์ดํธ<br/>(1์ค ํฌ์ธํฐ ์ถ๊ฐ)"]
Step1 --> Step2
end
Save --> Team{"ํ ๋ฉ๋ชจ๋ฆฌ?"}
Team -->|Yes| TeamSync["team/MEMORY.md์๋ ๋๊ธฐํ"]
Team -->|No| Done["์๋ฃ"]
TeamSync --> Done
style Fork fill:#f3e5f5,stroke:#7b1fa2
style Classify fill:#fff3e0,stroke:#ef6c00
style Save fill:#e8f5e9,stroke:#2e7d32
Session Memory ํ
ํ๋ฆฟ (src/services/SessionMemory/prompts.ts):
# Session Title
# Current State โ ์์ถ ํ ์ฐ์์ฑ์ ๊ฐ์ฅ ์ค์
# Task specification
# Files and Functions
# Workflow โ bash ๋ช
๋ น์ด, ์์, ํด์
# Errors & Corrections
# Codebase and System Documentation
# Learnings
# Key results
# Worklog
๊ท์น: ์น์ ๋น ~2,000 ํ ํฐ, ์ ์ฒด ์ต๋ 12,000 ํ ํฐ. ํฌํฌ๋ ์๋ธ์์ด์ ํธ๊ฐ ๋ฐฑ๊ทธ๋ผ์ด๋์์ ์๋ ์ ๋ฐ์ดํธ.
9. CLAUDE.md Loading Chain
src/utils/claudemd.ts์์ CLAUDE.md ํ์ผ์ด ๊ณ์ธต์ ์ผ๋ก ๋ก๋๋ฉ๋๋ค.
flowchart TD
subgraph Loading["CLAUDE.md ๋ก๋ฉ ์์ (์ฐ์ ์์: ์๋ > ์)"]
L1["1. /etc/claude-code/CLAUDE.md<br/><i>Managed โ ์ ์ฒด ์ฌ์ฉ์ ๊ณตํต</i>"]
L2["2. ~/.claude/CLAUDE.md<br/><i>User โ ๊ฐ์ธ ์ ์ญ ์ค์ </i>"]
L3["3. ํ๋ก์ ํธ ๋ฃจํธ/CLAUDE.md<br/> .claude/CLAUDE.md<br/> .claude/rules/*.md<br/><i>Project โ ์ฝ๋๋ฒ ์ด์ค ์ฒดํฌ์ธ</i>"]
L4["4. cwd๊น์ง ํ์ํ๋ฉฐ<br/> CLAUDE.local.md<br/><i>Local โ ๊ฐ์ธ ํ๋ก์ ํธ ์ค์ </i>"]
L1 --> L2 --> L3 --> L4
end
L4 --> Include{"@include ์ง์์ด?"}
Include -->|"@path"| Resolve["์ฐธ์กฐ ํ์ผ ์ฌ๊ท ๋ก๋<br/>(์ํ ์ฐธ์กฐ ๋ฐฉ์ง)"]
Include -->|"์์"| Concat["์ฝํ
์ธ ์ฐ๊ฒฐ"]
Resolve --> Concat
Concat --> Inject["getUserContext()์<br/>claudeMd๋ก ์ฃผ์
"]
Inject --> Msg["messages[0]์<br/>system-reminder๋ก ์ฝ์
"]
style Loading fill:#f5f5f5,stroke:#616161
style L1 fill:#ffebee,stroke:#c62828
style L2 fill:#fff3e0,stroke:#ef6c00
style L3 fill:#e3f2fd,stroke:#1565c0
style L4 fill:#e8f5e9,stroke:#2e7d32
MEMORY.md ์ ํ: ์ต๋ 200์ค / 25,000 ๋ฐ์ดํธ. ์ด๊ณผ ์ ๋ผ์ธ ๊ฒฝ๊ณ์์ ์๋ฆผ.
10. End-to-End Prompt Flow Summary
์ฌ์ฉ์ ์ ๋ ฅ๋ถํฐ Claude API ํธ์ถ๊น์ง์ ์ ์ฒด ํ๋กฌํํธ ์กฐ๋ฆฝ ํ๋ฆ:
flowchart TD
User["์ฌ์ฉ์ ์
๋ ฅ"] --> QE["QueryEngine.submitMessage()"]
QE --> FetchParts["fetchSystemPromptParts()"]
subgraph Build["ํ๋กฌํํธ ์กฐ๋ฆฝ"]
direction TB
SP["getSystemPrompt()<br/><i>์ ์ 7๊ฐ + ๋์ 8๊ฐ ์น์
</i>"]
UC["getUserContext()<br/><i>claudeMd + currentDate</i>"]
SC["getSystemContext()<br/><i>gitStatus + cacheBreaker</i>"]
ESP["buildEffectiveSystemPrompt()<br/><i>์ฐ์ ์์ ์ฒด์ธ ์ ์ฉ</i>"]
SP --> ESP
end
FetchParts --> Build
Build --> QueryFn["query() ์ ๋๋ ์ดํฐ<br/><i>src/query.ts</i>"]
QueryFn --> QM["queryModel()<br/><i>src/services/api/claude.ts</i>"]
subgraph Assembly["์ต์ข
์กฐ๋ฆฝ (paramsFromContext)"]
TS["toolToAPISchema()<br/>40๊ฐ ๋๊ตฌ ์คํค๋ง"]
NM["normalizeMessagesForAPI()<br/>๋ฉ์์ง ์ ๊ทํ"]
SB["buildSystemPromptBlocks()<br/>์บ์ ๋ง์ปค ๋ถ์ฐฉ"]
PU["prependUserContext()<br/>system-reminder ์ฝ์
"]
AS["appendSystemContext()<br/>git ์ํ ์ถ๊ฐ"]
end
QM --> Assembly
Assembly --> APICall["anthropic.beta.messages.create()<br/>์คํธ๋ฆฌ๋ฐ ํธ์ถ"]
APICall --> Stream["์๋ต ์คํธ๋ฆผ ์ฒ๋ฆฌ"]
Stream --> ToolExec{"tool_use ๋ธ๋ก?"}
ToolExec -->|Yes| RunTool["๋๊ตฌ ์คํ โ ๊ฒฐ๊ณผ ์ถ๊ฐ"]
RunTool --> QueryFn
ToolExec -->|No| Response["์ต์ข
์๋ต ๋ ๋๋ง"]
style User fill:#e3f2fd,stroke:#1565c0
style Build fill:#f5f5f5,stroke:#616161
style Assembly fill:#fff3e0,stroke:#ef6c00
style APICall fill:#e8f5e9,stroke:#2e7d32,stroke-width:3px
style Response fill:#c8e6c9,stroke:#1b5e20,stroke-width:3px
API ํธ์ถ ์ ์ ๋ฌ๋๋ ์ต์ข ๊ตฌ์กฐ:
anthropic.beta.messages.create({
model: "claude-sonnet-4-20250514",
system: [ โ ์์คํ
ํ๋กฌํํธ
{ text: "You are Claude Code...", cache_control: { scope: "global" } },
{ text: "[๋์ ์น์
๋ค]" },
{ text: "gitStatus: branch main..." }
],
messages: [ โ ๋ํ ๋ฉ์์ง
{ role: "user", content: [
{ text: "<system-reminder># claudeMd\n..." }, โ CLAUDE.md
{ text: "์ฌ์ฉ์ ์ค์ ์
๋ ฅ" }
]},
{ role: "assistant", content: [...] },
...
],
tools: [ โ ๋๊ตฌ ์ ์
{ name: "Bash", description: "...", input_schema: {...} },
{ name: "Read", description: "...", input_schema: {...} },
...40+ tools
],
thinking: { type: "adaptive" }, โ ์ฌ๊ณ ๋ชจ๋
betas: ["interleaved-thinking-...", "prompt-caching-scope-..."],
max_tokens: 16384
})
๊ด๋ จ ์์ค ํ์ผ:
| ํ์ผ | ์ญํ |
|---|---|
src/constants/prompts.ts | ์์คํ ํ๋กฌํํธ ์น์ ์์ฑ |
src/utils/systemPrompt.ts | ํ๋กฌํํธ ์ฐ์ ์์ ์ฒด์ธ |
src/context.ts | User/System ์ปจํ ์คํธ ์กฐ๋ฆฝ |
src/utils/claudemd.ts | CLAUDE.md ๊ณ์ธต ๋ก๋ฉ |
src/QueryEngine.ts | ์ฟผ๋ฆฌ ์ ์ถ ์ง์ ์ |
src/query.ts | ์ฟผ๋ฆฌ ์คํ ๋ฃจํ |
src/services/api/claude.ts | API ํ๋ผ๋ฏธํฐ ์ต์ข ์กฐ๋ฆฝ |
src/utils/api.ts | ๋๊ตฌ ์คํค๋ง ๋ณํ, ์ปจํ ์คํธ ์ฃผ์ |
src/tools/AgentTool/prompt.ts | ์์ด์ ํธ ๋๊ตฌ ํ๋กฌํํธ |
src/tools/AgentTool/built-in/ | 6๊ฐ ๋ด์ฅ ์์ด์ ํธ ์ ์ |
src/coordinator/coordinatorMode.ts | Coordinator ์์คํ ํ๋กฌํํธ |
src/services/compact/prompt.ts | ์ปจํ ์คํธ ์์ถ ํ๋กฌํํธ |
src/services/SessionMemory/prompts.ts | ์ธ์ ๋ฉ๋ชจ๋ฆฌ ํ ํ๋ฆฟ |
src/services/extractMemories/prompts.ts | ๋ฉ๋ชจ๋ฆฌ ์ถ์ถ ํ๋กฌํํธ |
src/buddy/prompt.ts | Buddy ์ปดํจ๋์ธ ํ๋กฌํํธ |
Document Map
Core Documents
| ๋ฌธ์ | ์ ํ | ์ค๋ช |
|---|---|---|
| Index.md | MOC | ์ ์ฒด ํ๋ก์ ํธ ์ง๋ (Map of Content) |
| Directory_Structure.md | Structure | ํด๋ ํธ๋ฆฌ + ๋ชจ๋๋ณ ํ์ผ ์ |
| Stats_Report.md | Report | ์์กด์ฑ ํต๊ณ, ๋ชจ๋ ๋ถํฌ, ํ์ง ์งํ |
Layer Documents
| ๋ฌธ์ | ์ ํ | ์ค๋ช |
|---|---|---|
| Entrypoints_Overview.md | Module | ์ฑ ์์ ํ๋ฆ (cli โ init โ main โ setup) |
| Query_Engine.md | Module | ํต์ฌ ์คํ ๋ฃจํ |
| Tools_Overview.md | Module | 40๊ฐ ๋๊ตฌ ์ ์ฒด ์นดํ๋ก๊ทธ |
| Services_Overview.md | Module | 19๊ฐ ์๋น์ค ๋ ์ด์ด |
| Components_Overview.md | Module | 389๊ฐ UI ์ปดํฌ๋ํธ |
| Ink_Framework.md | Module | ์ปค์คํ ํฐ๋ฏธ๋ ๋ ๋๋ง |
| Hooks_Overview.md | Module | 104๊ฐ React ํ |
| Commands_Overview.md | Module | 100+ ์ฌ๋์ ๋ช ๋ น์ด |
| Utils_Overview.md | Module | 564๊ฐ ์ ํธ๋ฆฌํฐ ํ์ผ |
| Root_Files_Overview.md | Module | src/ ๋ฃจํธ 18๊ฐ ํ์ผ |
Deep Dive Documents
| ๋ฌธ์ | ๋ถ์ ๋์ |
|---|---|
| tools/AgentTool.md | ์๋ธ์์ด์ ํธ ์์ฑ + ์ํฌํธ๋ฆฌ ๊ฒฉ๋ฆฌ |
| tools/BashTool.md | ์ ธ ์คํ + AST ๋ณด์ ๊ฒ์ฆ |
| tools/FileReadTool.md | ํ์ผ ์ฝ๊ธฐ (PDF, ์ด๋ฏธ์ง, ๋ ธํธ๋ถ) |
| tools/FileEditTool.md | ๋ฌธ์์ด ์นํ ๊ธฐ๋ฐ ํ์ผ ํธ์ง |
| tools/MCPTool.md | MCP ์๋ฒ ๋๊ตฌ ์คํ |
| tools/TaskTools.md | ํ์คํฌ CRUD ๋๊ตฌ |
| services/API_Service.md | 4-SDK ๋ฉํฐํ๋ก๋ฐ์ด๋ API |
| services/MCP_Service.md | MCP ์๋ฒ ์ฐ๊ฒฐ/์ธ์ฆ/๋ฐ๊ฒฌ |
| services/Compact_Service.md | ์ปจํ ์คํธ ์๋์ฐ ์์ถ ์ ๋ต |
| bootstrap/state.md | ๊ธ๋ก๋ฒ ์ํ ์ฑ๊ธํค |
| coordinator/coordinatorMode.md | ๋ฉํฐ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์ |
| memdir/Memdir_Overview.md | ํ์ผ ๊ธฐ๋ฐ ์์ ๋ฉ๋ชจ๋ฆฌ |
| screens/Screens_Overview.md | REPL, ์ธ์ ์ฌ๊ฐ, ์ง๋จ |
| server/Server_Overview.md | WebSocket ์ง์ ์ฐ๊ฒฐ |
| keybindings/Keybindings_Overview.md | ํค๋ฐ์ธ๋ฉ + ์ฝ๋ ์ํ์ค |
| migrations/Migrations_Overview.md | ์ค์ ๋ง์ด๊ทธ๋ ์ด์ 11๊ฐ |
| native-ts/NativeTS_Overview.md | ๋ค์ดํฐ๋ธ ๋ชจ๋ TS ํฌํธ |
| buddy/Buddy_Overview.md | ์ปดํจ๋์ธ ์บ๋ฆญํฐ ์์คํ |
| upstreamproxy/UpstreamProxy_Overview.md | CONNECT-over-WS ๋ฆด๋ ์ด |
Source Code Browse
์ด ์ ์ฅ์์๋ Claude Code์ ์ค์ ์์ค์ฝ๋๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
./src/๋๋ ํฐ๋ฆฌ์์ ๋ชจ๋ TypeScript/TSX ํ์ผ์ ์ง์ ์ด์ด๋ณผ ์ ์์ต๋๋ค. ๋ถ์ ๋ฌธ์์ ์๋ณธ ์ฝ๋๋ฅผ ๋๋ํ ๋น๊ตํ๋ฉฐ ์ํคํ ์ฒ๋ฅผ ์ดํดํด ๋ณด์ธ์.
Module Summary (36 modules, 1,902 files)
| Module | Files | Description | Browse |
|---|---|---|---|
| src/ Root | 18 | ํต์ฌ ์ํธ๋ฆฌ ํ์ผ | src/ Root |
| assistant/ | 1 | ์ธ์ ํ์คํ ๋ฆฌ | assistant/ |
| bootstrap/ | 1 | ๊ธ๋ก๋ฒ ์ํ ์ฑ๊ธํค | bootstrap/ |
| bridge/ | 31 | IDE ๋ธ๋ฆฟ์ง ํต์ | bridge/ |
| buddy/ | 6 | ์ปดํจ๋์ธ ์บ๋ฆญํฐ | buddy/ |
| cli/ | 19 | CLI ์ ์ก/ํธ๋ค๋ฌ | cli/ |
| commands/ | 207 | 100+ ์ฌ๋์ ๋ช ๋ น์ด | commands/ |
| components/ | 389 | React ํฐ๋ฏธ๋ UI | components/ |
| constants/ | 21 | ์์ ์ ์ | constants/ |
| context/ | 9 | ์์คํ /์ฌ์ฉ์ ์ปจํ ์คํธ | context/ |
| coordinator/ | 1 | ๋ฉํฐ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์ | coordinator/ |
| entrypoints/ | 8 | ์ฑ ์ง์ ์ (CLI, SDK, MCP) | entrypoints/ |
| hooks/ | 104 | React ์ปค์คํ ํ | hooks/ |
| ink/ | 96 | ํฐ๋ฏธ๋ ๋ ๋๋ง ํ๋ ์์ํฌ | ink/ |
| keybindings/ | 14 | ํค๋ฐ์ธ๋ฉ ์์คํ | keybindings/ |
| memdir/ | 8 | ํ์ผ ๊ธฐ๋ฐ ๋ฉ๋ชจ๋ฆฌ | memdir/ |
| migrations/ | 11 | ์ค์ ๋ง์ด๊ทธ๋ ์ด์ | migrations/ |
| moreright/ | 1 | REPL ํจ๋ ์คํ | moreright/ |
| native-ts/ | 4 | ๋ค์ดํฐ๋ธ ๋ชจ๋ TS ํฌํธ | native-ts/ |
| outputStyles/ | 1 | ์ถ๋ ฅ ์คํ์ผ ๋ก๋ | outputStyles/ |
| plugins/ | 2 | ํ๋ฌ๊ทธ์ธ ๋ ์ง์คํธ๋ฆฌ | plugins/ |
| query/ | 4 | ์ฟผ๋ฆฌ ์ค์ | query/ |
| remote/ | 4 | ์๊ฒฉ ์ธ์ | remote/ |
| schemas/ | 1 | Zod ์คํค๋ง ์ ์ | schemas/ |
| screens/ | 3 | REPL/์ง๋จ ํ๋ฉด | screens/ |
| server/ | 3 | WebSocket ์๋ฒ | server/ |
| services/ | 130 | ํต์ฌ ์๋น์ค ๋ ์ด์ด | services/ |
| skills/ | 20 | ์คํฌ ์์คํ | skills/ |
| state/ | 6 | ์ฑ ์ํ ๊ด๋ฆฌ | state/ |
| tasks/ | 12 | ๋ฐฑ๊ทธ๋ผ์ด๋ ํ์คํฌ | tasks/ |
| tools/ | 184 | 40๊ฐ ๋๊ตฌ ๊ตฌํ | tools/ |
| types/ | 11 | TypeScript ํ์ ์ ์ | types/ |
| upstreamproxy/ | 2 | CONNECT-over-WS ๋ฆด๋ ์ด | upstreamproxy/ |
| utils/ | 564 | ์ธํ๋ผ ์ ํธ๋ฆฌํฐ | utils/ |
| vim/ | 5 | Vim ๋ชจ๋ | vim/ |
| voice/ | 1 | ์์ฑ ๋ชจ๋ | voice/ |
| Total | 1,902 | ./src/ |
Complete File Listing
์๋ ํ ์ด๋ธ์ ๋ชจ๋ ํ์ผ๋ช ์ ํด๋ฆญํ๋ฉด ํด๋น ์์ค์ฝ๋๋ก ์ง์ ์ด๋ํฉ๋๋ค.
์ ์ฒด 1,902๊ฐ ํ์ผ ๋ชฉ๋ก ํผ์น๊ธฐ (click to expand)
src/ Root Files
| # | File | Type |
|---|---|---|
| 1 | QueryEngine.ts | .ts |
| 2 | Task.ts | .ts |
| 3 | Tool.ts | .ts |
| 4 | commands.ts | .ts |
| 5 | context.ts | .ts |
| 6 | cost-tracker.ts | .ts |
| 7 | costHook.ts | .ts |
| 8 | dialogLaunchers.tsx | .tsx |
| 9 | history.ts | .ts |
| 10 | ink.ts | .ts |
| 11 | interactiveHelpers.tsx | .tsx |
| 12 | main.tsx | .tsx |
| 13 | projectOnboardingState.ts | .ts |
| 14 | query.ts | .ts |
| 15 | replLauncher.tsx | .tsx |
| 16 | setup.ts | .ts |
| 17 | tasks.ts | .ts |
| 18 | tools.ts | .ts |
assistant/
| # | File | Type |
|---|---|---|
| 1 | sessionHistory.ts | .ts |
bootstrap/
| # | File | Type |
|---|---|---|
| 1 | state.ts | .ts |
bridge/
| # | File | Type |
|---|---|---|
| 1 | bridgeApi.ts | .ts |
| 2 | bridgeConfig.ts | .ts |
| 3 | bridgeDebug.ts | .ts |
| 4 | bridgeEnabled.ts | .ts |
| 5 | bridgeMain.ts | .ts |
| 6 | bridgeMessaging.ts | .ts |
| 7 | bridgePermissionCallbacks.ts | .ts |
| 8 | bridgePointer.ts | .ts |
| 9 | bridgeStatusUtil.ts | .ts |
| 10 | bridgeUI.ts | .ts |
| 11 | capacityWake.ts | .ts |
| 12 | codeSessionApi.ts | .ts |
| 13 | createSession.ts | .ts |
| 14 | debugUtils.ts | .ts |
| 15 | envLessBridgeConfig.ts | .ts |
| 16 | flushGate.ts | .ts |
| 17 | inboundAttachments.ts | .ts |
| 18 | inboundMessages.ts | .ts |
| 19 | initReplBridge.ts | .ts |
| 20 | jwtUtils.ts | .ts |
| 21 | pollConfig.ts | .ts |
| 22 | pollConfigDefaults.ts | .ts |
| 23 | remoteBridgeCore.ts | .ts |
| 24 | replBridge.ts | .ts |
| 25 | replBridgeHandle.ts | .ts |
| 26 | replBridgeTransport.ts | .ts |
| 27 | sessionIdCompat.ts | .ts |
| 28 | sessionRunner.ts | .ts |
| 29 | trustedDevice.ts | .ts |
| 30 | types.ts | .ts |
| 31 | workSecret.ts | .ts |
buddy/
| # | File | Type |
|---|---|---|
| 1 | CompanionSprite.tsx | .tsx |
| 2 | companion.ts | .ts |
| 3 | prompt.ts | .ts |
| 4 | sprites.ts | .ts |
| 5 | types.ts | .ts |
| 6 | useBuddyNotification.tsx | .tsx |
cli/
| # | File | Type |
|---|---|---|
| 1 | exit.ts | .ts |
| 2 | handlers/agents.ts | .ts |
| 3 | handlers/auth.ts | .ts |
| 4 | handlers/autoMode.ts | .ts |
| 5 | handlers/mcp.tsx | .tsx |
| 6 | handlers/plugins.ts | .ts |
| 7 | handlers/util.tsx | .tsx |
| 8 | ndjsonSafeStringify.ts | .ts |
| 9 | print.ts | .ts |
| 10 | remoteIO.ts | .ts |
| 11 | structuredIO.ts | .ts |
| 12 | transports/HybridTransport.ts | .ts |
| 13 | transports/SSETransport.ts | .ts |
| 14 | transports/SerialBatchEventUploader.ts | .ts |
| 15 | transports/WebSocketTransport.ts | .ts |
| 16 | transports/WorkerStateUploader.ts | .ts |
| 17 | transports/ccrClient.ts | .ts |
| 18 | transports/transportUtils.ts | .ts |
| 19 | update.ts | .ts |
commands/
components/
constants/
| # | File | Type |
|---|---|---|
| 1 | apiLimits.ts | .ts |
| 2 | betas.ts | .ts |
| 3 | common.ts | .ts |
| 4 | cyberRiskInstruction.ts | .ts |
| 5 | errorIds.ts | .ts |
| 6 | figures.ts | .ts |
| 7 | files.ts | .ts |
| 8 | github-app.ts | .ts |
| 9 | keys.ts | .ts |
| 10 | messages.ts | .ts |
| 11 | oauth.ts | .ts |
| 12 | outputStyles.ts | .ts |
| 13 | product.ts | .ts |
| 14 | prompts.ts | .ts |
| 15 | spinnerVerbs.ts | .ts |
| 16 | system.ts | .ts |
| 17 | systemPromptSections.ts | .ts |
| 18 | toolLimits.ts | .ts |
| 19 | tools.ts | .ts |
| 20 | turnCompletionVerbs.ts | .ts |
| 21 | xml.ts | .ts |
context/
| # | File | Type |
|---|---|---|
| 1 | QueuedMessageContext.tsx | .tsx |
| 2 | fpsMetrics.tsx | .tsx |
| 3 | mailbox.tsx | .tsx |
| 4 | modalContext.tsx | .tsx |
| 5 | notifications.tsx | .tsx |
| 6 | overlayContext.tsx | .tsx |
| 7 | promptOverlayContext.tsx | .tsx |
| 8 | stats.tsx | .tsx |
| 9 | voice.tsx | .tsx |
coordinator/
| # | File | Type |
|---|---|---|
| 1 | coordinatorMode.ts | .ts |
entrypoints/
| # | File | Type |
|---|---|---|
| 1 | agentSdkTypes.ts | .ts |
| 2 | cli.tsx | .tsx |
| 3 | init.ts | .ts |
| 4 | mcp.ts | .ts |
| 5 | sandboxTypes.ts | .ts |
| 6 | sdk/controlSchemas.ts | .ts |
| 7 | sdk/coreSchemas.ts | .ts |
| 8 | sdk/coreTypes.ts | .ts |
hooks/
ink/
keybindings/
| # | File | Type |
|---|---|---|
| 1 | KeybindingContext.tsx | .tsx |
| 2 | KeybindingProviderSetup.tsx | .tsx |
| 3 | defaultBindings.ts | .ts |
| 4 | loadUserBindings.ts | .ts |
| 5 | match.ts | .ts |
| 6 | parser.ts | .ts |
| 7 | reservedShortcuts.ts | .ts |
| 8 | resolver.ts | .ts |
| 9 | schema.ts | .ts |
| 10 | shortcutFormat.ts | .ts |
| 11 | template.ts | .ts |
| 12 | useKeybinding.ts | .ts |
| 13 | useShortcutDisplay.ts | .ts |
| 14 | validate.ts | .ts |
memdir/
| # | File | Type |
|---|---|---|
| 1 | findRelevantMemories.ts | .ts |
| 2 | memdir.ts | .ts |
| 3 | memoryAge.ts | .ts |
| 4 | memoryScan.ts | .ts |
| 5 | memoryTypes.ts | .ts |
| 6 | paths.ts | .ts |
| 7 | teamMemPaths.ts | .ts |
| 8 | teamMemPrompts.ts | .ts |
migrations/
moreright/
| # | File | Type |
|---|---|---|
| 1 | useMoreRight.tsx | .tsx |
native-ts/
| # | File | Type |
|---|---|---|
| 1 | color-diff/index.ts | .ts |
| 2 | file-index/index.ts | .ts |
| 3 | yoga-layout/enums.ts | .ts |
| 4 | yoga-layout/index.ts | .ts |
outputStyles/
| # | File | Type |
|---|---|---|
| 1 | loadOutputStylesDir.ts | .ts |
plugins/
| # | File | Type |
|---|---|---|
| 1 | builtinPlugins.ts | .ts |
| 2 | bundled/index.ts | .ts |
query/
| # | File | Type |
|---|---|---|
| 1 | config.ts | .ts |
| 2 | deps.ts | .ts |
| 3 | stopHooks.ts | .ts |
| 4 | tokenBudget.ts | .ts |
remote/
| # | File | Type |
|---|---|---|
| 1 | RemoteSessionManager.ts | .ts |
| 2 | SessionsWebSocket.ts | .ts |
| 3 | remotePermissionBridge.ts | .ts |
| 4 | sdkMessageAdapter.ts | .ts |
schemas/
| # | File | Type |
|---|---|---|
| 1 | hooks.ts | .ts |
screens/
| # | File | Type |
|---|---|---|
| 1 | Doctor.tsx | .tsx |
| 2 | REPL.tsx | .tsx |
| 3 | ResumeConversation.tsx | .tsx |
server/
| # | File | Type |
|---|---|---|
| 1 | createDirectConnectSession.ts | .ts |
| 2 | directConnectManager.ts | .ts |
| 3 | types.ts | .ts |
services/
skills/
| # | File | Type |
|---|---|---|
| 1 | bundled/batch.ts | .ts |
| 2 | bundled/claudeApi.ts | .ts |
| 3 | bundled/claudeApiContent.ts | .ts |
| 4 | bundled/claudeInChrome.ts | .ts |
| 5 | bundled/debug.ts | .ts |
| 6 | bundled/index.ts | .ts |
| 7 | bundled/keybindings.ts | .ts |
| 8 | bundled/loop.ts | .ts |
| 9 | bundled/loremIpsum.ts | .ts |
| 10 | bundled/remember.ts | .ts |
| 11 | bundled/scheduleRemoteAgents.ts | .ts |
| 12 | bundled/simplify.ts | .ts |
| 13 | bundled/skillify.ts | .ts |
| 14 | bundled/stuck.ts | .ts |
| 15 | bundled/updateConfig.ts | .ts |
| 16 | bundled/verify.ts | .ts |
| 17 | bundled/verifyContent.ts | .ts |
| 18 | bundledSkills.ts | .ts |
| 19 | loadSkillsDir.ts | .ts |
| 20 | mcpSkillBuilders.ts | .ts |
state/
| # | File | Type |
|---|---|---|
| 1 | AppState.tsx | .tsx |
| 2 | AppStateStore.ts | .ts |
| 3 | onChangeAppState.ts | .ts |
| 4 | selectors.ts | .ts |
| 5 | store.ts | .ts |
| 6 | teammateViewHelpers.ts | .ts |
tasks/
tools/
types/
upstreamproxy/
| # | File | Type |
|---|---|---|
| 1 | relay.ts | .ts |
| 2 | upstreamproxy.ts | .ts |
utils/
vim/
| # | File | Type |
|---|---|---|
| 1 | motions.ts | .ts |
| 2 | operators.ts | .ts |
| 3 | textObjects.ts | .ts |
| 4 | transitions.ts | .ts |
| 5 | types.ts | .ts |
voice/
| # | File | Type |
|---|---|---|
| 1 | voiceModeEnabled.ts | .ts |
Usage with Obsidian
Quick Start
# 1. ์ ์ฅ์ ํด๋ก
git clone https://github.com/leaf-kit/claude-analysis.git
# 2. Obsidian์์ ํด๋ก ๋ ํด๋๋ฅผ Vault๋ก ์ด๊ธฐ
# Obsidian โ Open folder as vault โ claude-analysis/
Features
- Graph View: ๋ชจ๋ ๋ฌธ์๊ฐ
[[์ํค๋งํฌ]]๋ก ์ฐ๊ฒฐ๋์ด ๋ชจ๋ ๊ฐ ๊ด๊ณ๋ฅผ ์๊ฐ์ ์ผ๋ก ํ์ - YAML Frontmatter:
tags,type,status๊ธฐ๋ฐ ํํฐ๋ง ๋ฐ Dataview ์ฟผ๋ฆฌ ์ง์ - Tag Navigation:
#tools,#services,#architecture๋ฑ ํ๊ทธ๋ก ๋น ๋ฅธ ํ์ - Search: ์ ์ฒด ๋ฌธ์์ ๊ฑธ์น ์ฝ๋ ํจํด, ํจ์๋ช , ๋ชจ๋๋ช ๊ฒ์
Recommended Plugins
| ํ๋ฌ๊ทธ์ธ | ์ฉ๋ |
|---|---|
| Dataview | YAML frontmatter ๊ธฐ๋ฐ ๋์ ํ ์ด๋ธ/๋ฆฌ์คํธ |
| Graph Analysis | ๊ทธ๋ํ ์ค์ฌ์ฑ, ํด๋ฌ์คํฐ ๋ถ์ |
| Admonition | ์ ๋ณด/๊ฒฝ๊ณ /ํ ๋ฐ์ค ๋ ๋๋ง |
Tutorial
๐ข ์ด๊ธ๋ถํฐ ๐ด ๊ณ ๊ธ๊น์ง, 12์ฅ ์์ ๊ฐ์ด๋๋ก Claude Code์ ๋ด๋ถ๋ฅผ ์ฝ๊ณ ๊น๊ฒ ์ดํดํ ์ ์์ต๋๋ค. ์ด๋ชจ์ง, Mermaid ๋ค์ด์ด๊ทธ๋จ, ์ค์ ์์ค์ฝ๋ ๋งํฌ, ์์ง๋์ด ํ์ด ๋ชจ๋ ํฌํจ๋์ด ์์ต๋๋ค.
| ๐ข ์ด๊ธ | ||
|---|---|---|
| 1๏ธโฃ | ์ฐ๋ฆฌ์ ๋๋ํ ์น๊ตฌ, Claude | ๐ค Claude ์๊ฐ, 4๊ฐ์ง API |
| 2๏ธโฃ | ์ค์ค๋ก ์๊ฐํ๋ ์์ด์ ํธ | ๐ต๏ธ ReAct ํจํด, 6๊ฐ ์์ด์ ํธ, ์ฝ๋๋ค์ดํฐ |
| 3๏ธโฃ | AI๋ฅผ ์์ง์ด๋ ํ๋กฌํํธ ๋ง๋ฒ | ๐ช 15๊ฐ ํ๋กฌํํธ ๋ธ๋ก, CLAUDE.md |
| 4๏ธโฃ | ์ค์ ์ฝ๋๋ก ๋ณด๋ ๊ตฌ์กฐ | ๐ ๏ธ 5-Stop ์์ค์ฝ๋ ํฌ์ด |
| ๐ก ์ค๊ธ | ||
| 5๏ธโฃ | AI์ ๊ธฐ์ต ์์คํ | ๐ง ์ธ์ /์๋/ํ ๋ฉ๋ชจ๋ฆฌ, ์ถ์ถ ์์ด์ ํธ |
| 6๏ธโฃ | ๋ณด์๊ณผ ๊ถํ ์์คํ | ๐ก๏ธ 3์ธต ๋ฐฉ์ด, 12๋จ๊ณ ๊ถํ, AST Bash ๋ณด์ |
| 7๏ธโฃ | MCP์ ํ์ฅ์ฑ | ๐ MCP ํ๋กํ ์ฝ, ์คํฌ, ํ๋ฌ๊ทธ์ธ |
| 8๏ธโฃ | ํฐ๋ฏธ๋ ๋ ๋๋ง ์์ง | ๐ฅ๏ธ ReactโYogaโANSI, ๋๋ธ ๋ฒํผ๋ง |
| ๐ด ๊ณ ๊ธ | ||
| 9๏ธโฃ | ์ํ ๊ด๋ฆฌ์ ๊ธ๋ก๋ฒ ์คํ ์ด | โ๏ธ 209๊ฐ ์ํ, ๋น์ฉ ์ถ์ |
| ๐ | ์ปจํ ์คํธ ์์ถ๊ณผ ํ ํฐ ๊ด๋ฆฌ | ๐งน 9ํญ๋ชฉ ๋ณด์กด, ์บ์ฑ ์ ๋ต |
| 1๏ธโฃ1๏ธโฃ | ํ๋ฉด ์์คํ ๊ณผ ์ธ์ ๊ด๋ฆฌ | ๐บ REPL, Vim, ์์ฑ, Buddy |
| 1๏ธโฃ2๏ธโฃ | ๊ณ ๊ธ ํจํด๊ณผ ๋ด๋ถ ์ต์ ํ | ๐๏ธ 8๋ ํจํด, ๋์์ฑ, TS ํฌํธ |
| ๐ฎ ํน๋ณํธ | ||
| 1๏ธโฃ3๏ธโฃ | ์์ค์ฝ๋์ ์จ๊ฒจ์ง ๋น๋ฐ๋ค | ๐ฎ autoDream, Speculation, YOLO, Buddy, Tengu ๋ฑ |
| 1๏ธโฃ4๏ธโฃ | ์คํ ํ๋ฆ ์์ ํด๋ถ | ๐ Enterโ์๋ต 15๋จ๊ณ, ์ค์ ์์, ๋ฃจํ, ํ๋กฌํํธ |
| 1๏ธโฃ5๏ธโฃ | ๋ฆฌ๋ฒ์ค ์์ง๋์ด๋ง | ๐ฌ ์ฝ๋ ์ค๋ํซ 10๊ฐ๋ก 5๋ ์ค๊ณ ์์น ์ญ๊ณตํ |
| 1๏ธโฃ6๏ธโฃ | ๋ค๋ฅธ ์์ด์ ํธ์ ๋น๊ต | โ๏ธ Codex, Cursor, Copilot, Aider, Devin ๋น๊ต |
๐ ๐ ํํ ๋ฆฌ์ผ ์์ํ๊ธฐ
License & Disclaimer
์ด ๋ถ์ ๋ฌธ์๋ ๊ต์ก ๋ฐ ์ฐธ๊ณ ๋ชฉ์ ์ผ๋ก ์์ฑ๋์์ต๋๋ค.
- ๋ถ์ ๋์์ธ Claude Code๋ Anthropic์ ์ ํ์ ๋๋ค.
- ์ด ์ ์ฅ์์ ๋งํฌ๋ค์ด ๋ถ์ ๋ฌธ์ ๋ฐ ํํ ๋ฆฌ์ผ์ ์์ ๋กญ๊ฒ ์ฐธ๊ณ ํ ์ ์์ต๋๋ค.
src/๋๋ ํฐ๋ฆฌ์ ์๋ณธ ์์ค์ฝ๋ ์ ์๊ถ์ Anthropic์ ์์ต๋๋ค.- ์ด ์ ์ฅ์๋ npm ์์ค๋งต ์ ์ถ๋ก ๊ณต๊ฐ๋ ์ฝ๋๋ฅผ ํ์ต ๋ชฉ์ ์ผ๋ก ๋ถ์ํ ๊ฒ์ด๋ฉฐ, ์์ ์ ์ด์ฉ์ด๋ ์ฌ๋ฐฐํฌ๋ฅผ ๊ถ์ฅํ์ง ์์ต๋๋ค.
- Anthropic์ ์ ์ถ๋ ์์ค์ฝ๋๊ฐ ํฌํจ๋ ์ผ๋ถ GitHub ์ ์ฅ์์ ๋ํด DMCA ์ฐจ๋จ ์กฐ์น๋ฅผ ์ทจํ ๋ฐ ์์ต๋๋ค.
Contributing
์ด ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๊ณ ์ถ์ผ์๋ค๋ฉด:
- ๋ถ์ ๋ฌธ์์ ์ค๋ฅ ์์ , ๋๋ฝ๋ ๋ชจ๋ ๋ถ์ ์ถ๊ฐ
- ํํ ๋ฆฌ์ผ ๊ฐ์ (์ค๋ช ๋ณด๊ฐ, ๋ค์ด์ด๊ทธ๋จ ์ถ๊ฐ)
- ์๋ก์ด ์ธ์ฌ์ดํธ๋ ์ํคํ ์ฒ ๋ฐ๊ฒฌ ๊ณต์
Issue๋ Pull Request๋ฅผ ํ์ํฉ๋๋ค!
์ด ํ๋ก์ ํธ๊ฐ ์ ์ฉํ๋ค๋ฉด Star๋ฅผ ๋๋ฌ์ฃผ์ธ์!
