claude-nexus 0.8.0 โ†’ 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "name": "claude-nexus",
9
9
  "description": "Agent orchestration plugin for Claude Code. Injects optimized context per agent role with minimal overhead.",
10
- "version": "0.7.0",
10
+ "version": "0.10.0",
11
11
  "author": {
12
12
  "name": "kih"
13
13
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-nexus",
3
- "version": "0.7.0",
3
+ "version": "0.10.0",
4
4
  "description": "Agent orchestration plugin for Claude Code โ€” optimized context injection per role",
5
5
  "author": {
6
6
  "name": "kih"
package/README.en.md ADDED
@@ -0,0 +1,149 @@
1
+ # claude-nexus
2
+
3
+ [![npm version](https://img.shields.io/npm/v/claude-nexus)](https://www.npmjs.com/package/claude-nexus)
4
+ [![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/moreih29/claude-nexus/blob/main/LICENSE)
5
+
6
+ > ๐ŸŒ [ํ•œ๊ตญ์–ด](README.md)
7
+
8
+ Agent orchestration plugin for Claude Code.
9
+
10
+ ## Why
11
+
12
+ Specialized agent teams handle development and research systematically โ€” director, architect, engineer, QA for development; principal, postdoc, researcher for research. One tag triggers automatic orchestration of complex tasks across the right agents without manual coordination.
13
+
14
+ ## Quick Start
15
+
16
+ **1. Install**
17
+
18
+ ```bash
19
+ claude plugin marketplace add https://github.com/moreih29/claude-nexus.git
20
+ claude plugin install claude-nexus@nexus
21
+ ```
22
+
23
+ **2. Onboard your project**
24
+
25
+ Run `/claude-nexus:nx-sync` โ€” on first run it scans your project and auto-generates structured knowledge under `.claude/nexus/knowledge/`.
26
+
27
+ **3. Start using**
28
+
29
+ - **Consult**: `[consult] How should we design the auth system?` โ€” clarify intent and align before executing
30
+ - **Develop**: `[dev] Implement login API` โ€” agent team handles analysis through implementation
31
+ - **Research**: `[research] React vs Svelte performance comparison` โ€” independent investigation with synthesis report
32
+
33
+ ## Usage
34
+
35
+ Tag your message to route it to the right workflow:
36
+
37
+ | Tag | Action | Example |
38
+ |-----|--------|---------|
39
+ | `[consult]` | Pre-execution consultation | `[consult] Discuss DB migration strategy` |
40
+ | `[dev]` | Development (auto Sub/Team) | `[dev] Refactor payment module` |
41
+ | `[dev!]` | Force team mode | `[dev!] Overhaul auth system` |
42
+ | `[research]` | Research execution | `[research] Compare caching strategies` |
43
+ | `[research!]` | Force research team | `[research!] Investigate competitor tech stacks` |
44
+
45
+ Typical flow: use `[consult]` to discuss and align โ†’ decide โ†’ use `[dev]` or `[research]` to execute.
46
+
47
+ ## Agents
48
+
49
+ ### Dev Team (4 agents)
50
+
51
+ | Agent | Invocation | Role | Model |
52
+ |-------|-----------|------|-------|
53
+ | **Director** | `claude-nexus:director` | Project direction, scope, and priority decisions | opus |
54
+ | **Architect** | `claude-nexus:architect` | Technical design and architecture review (read-only) | opus |
55
+ | **Engineer** | `claude-nexus:engineer` | Code implementation and debugging | sonnet |
56
+ | **QA** | `claude-nexus:qa` | Verification, testing, and security review | sonnet |
57
+
58
+ ### Research Team (3 agents)
59
+
60
+ | Agent | Invocation | Role | Model |
61
+ |-------|-----------|------|-------|
62
+ | **Principal** | `claude-nexus:principal` | Research direction, agenda, and confirmation bias prevention | opus |
63
+ | **Postdoc** | `claude-nexus:postdoc` | Methodology design, evidence evaluation, synthesis documents | opus |
64
+ | **Researcher** | `claude-nexus:researcher` | Web search, independent investigation, source reporting | sonnet |
65
+
66
+ ## Skills
67
+
68
+ | Skill | Trigger | Description |
69
+ |-------|---------|-------------|
70
+ | **nx-consult** | `[consult]` | Structured consultation. Clarify requirements โ†’ record decisions (`[d]`) โ†’ recommend execution tag |
71
+ | **nx-dev** | `[dev]` / `[dev!]` | Development execution. Auto-selects solo or team (Directorโ†’Architectโ†’Engineerโ†’QA) based on complexity |
72
+ | **nx-research** | `[research]` / `[research!]` | Research execution. Auto-selects solo or team (Principalโ†’Postdocโ†’Researcher) based on complexity |
73
+ | **nx-setup** | `/claude-nexus:nx-setup` | Interactive setup. Injects agent/skill/tag configuration into CLAUDE.md |
74
+ | **nx-sync** | `/claude-nexus:nx-sync` | Auto-generates knowledge on first run, then detects and fixes drift with source changes. --reset for re-initialization |
75
+
76
+ ## Advanced
77
+
78
+ <details>
79
+ <summary>MCP Tools</summary>
80
+
81
+ Claude-callable tools exposed by the Nexus MCP server.
82
+
83
+ ### Core (5 tools)
84
+
85
+ | Tool | Purpose |
86
+ |------|---------|
87
+ | `nx_knowledge_read/write` | Project knowledge management (git-tracked) |
88
+ | `nx_context` | Current session state lookup |
89
+ | `nx_task_list/add/update/clear` | Task management backed by tasks.json |
90
+ | `nx_decision_add` | Record architecture decisions |
91
+
92
+ ### Code Intelligence (10 tools)
93
+
94
+ | Tool | Purpose |
95
+ |------|---------|
96
+ | `nx_lsp_hover` | Symbol type information |
97
+ | `nx_lsp_goto_definition` | Jump to definition |
98
+ | `nx_lsp_find_references` | List all references |
99
+ | `nx_lsp_diagnostics` | Compiler and linter errors |
100
+ | `nx_lsp_rename` | Project-wide symbol rename |
101
+ | `nx_lsp_code_actions` | Auto-fix and refactoring suggestions |
102
+ | `nx_lsp_document_symbols` | Symbols in a file |
103
+ | `nx_lsp_workspace_symbols` | Project-wide symbol search |
104
+ | `nx_ast_search` | AST pattern search (tree-sitter) |
105
+ | `nx_ast_replace` | AST pattern replacement (dryRun supported) |
106
+
107
+ LSP auto-detects the project language (e.g., `tsconfig.json` โ†’ TypeScript).
108
+ AST tools require `@ast-grep/napi`: `bun install @ast-grep/napi`
109
+
110
+ </details>
111
+
112
+ <details>
113
+ <summary>Hook</summary>
114
+
115
+ Nexus registers a single Gate module as a Claude Code hook.
116
+
117
+ | Event | Role |
118
+ |-------|------|
119
+ | `UserPromptSubmit` | Prompt preprocessing and context injection |
120
+ | `Stop` | Post-session cleanup |
121
+
122
+ </details>
123
+
124
+ <details>
125
+ <summary>Project Knowledge</summary>
126
+
127
+ Project knowledge is stored under `.claude/nexus/knowledge/` and tracked by git.
128
+
129
+ - `nx-sync` auto-generates knowledge files tailored to your project on first run (structure is not fixed)
130
+ - Nexus configuration is stored in `config.json`
131
+
132
+ </details>
133
+
134
+ <details>
135
+ <summary>Runtime State</summary>
136
+
137
+ Runtime state is stored under `.nexus/` and is excluded from git.
138
+
139
+ ```
140
+ .nexus/
141
+ โ”œโ”€โ”€ branches/ โ† Per-branch isolation
142
+ โ”‚ โ””โ”€โ”€ {branch}/
143
+ โ”‚ โ”œโ”€โ”€ tasks.json โ† Task list
144
+ โ”‚ โ”œโ”€โ”€ decisions.json โ† Architecture decision list
145
+ โ”‚ โ””โ”€โ”€ reports/ โ† Research outputs
146
+ โ””โ”€โ”€ sync-state.json โ† Last sync commit
147
+ ```
148
+
149
+ </details>
package/README.md CHANGED
@@ -3,18 +3,46 @@
3
3
  [![npm version](https://img.shields.io/npm/v/claude-nexus)](https://www.npmjs.com/package/claude-nexus)
4
4
  [![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/moreih29/claude-nexus/blob/main/LICENSE)
5
5
 
6
- Claude Code๋ฅผ ์œ„ํ•œ ์—์ด์ „ํŠธ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ ํ”Œ๋Ÿฌ๊ทธ์ธ. ์ „๋ฌธํ™”๋œ ์—์ด์ „ํŠธ์™€ ์Šคํ‚ฌ์„ ํ†ตํ•ด ์ฝ”๋“œ, ๋ถ„์„, ์„ค๊ณ„, ํ…Œ์ŠคํŠธ, ๋ฌธ์„œํ™”๋ฅผ ์ฒด๊ณ„์ ์œผ๋กœ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
6
+ > ๐ŸŒ [English](README.en.md)
7
7
 
8
- ## ์„ค์น˜
8
+ Claude Code๋ฅผ ์œ„ํ•œ ์—์ด์ „ํŠธ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ ํ”Œ๋Ÿฌ๊ทธ์ธ.
9
+
10
+ ## Why
11
+
12
+ ๋ณต์žกํ•œ ๊ฐœ๋ฐœ/๋ฆฌ์„œ์น˜ ์ž‘์—…์„ ํ˜ผ์ž ์ฒ˜๋ฆฌํ•˜๋Š” ๋Œ€์‹ , ์ „๋ฌธํ™”๋œ ์—์ด์ „ํŠธ ํŒ€์ด ์—ญํ• ์„ ๋‚˜๋ˆ  ์ฒด๊ณ„์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ํƒœ๊ทธ ํ•˜๋‚˜๋กœ ์ƒ๋‹ด, ๊ฐœ๋ฐœ, ๋ฆฌ์„œ์น˜ ์›Œํฌํ”Œ๋กœ์šฐ๊ฐ€ ์ž๋™ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜๋ฉ๋‹ˆ๋‹ค.
13
+
14
+ ## Quick Start
15
+
16
+ **์„ค์น˜**
9
17
 
10
18
  ```bash
11
19
  claude plugin marketplace add https://github.com/moreih29/claude-nexus.git
12
20
  claude plugin install claude-nexus@nexus
13
21
  ```
14
22
 
15
- ## ์—์ด์ „ํŠธ
23
+ **์˜จ๋ณด๋”ฉ**
24
+
25
+ `/claude-nexus:nx-sync`๋ฅผ ์ฒ˜์Œ ์‹คํ–‰ํ•˜๋ฉด ํ”„๋กœ์ ํŠธ๋ฅผ ์Šค์บ”ํ•ด `.claude/nexus/knowledge/`์— ์ง€์‹์„ ์ž๋™ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
26
+
27
+ **์ฒซ ์‚ฌ์šฉ**
28
+
29
+ - **์ƒ๋‹ด**: `[consult] ์ธ์ฆ ์‹œ์Šคํ…œ ์–ด๋–ป๊ฒŒ ์„ค๊ณ„ํ•˜๋ฉด ์ข‹์„๊นŒ?` โ€” ์‹คํ–‰ ์ „ ์˜๋„ ํŒŒ์•…, ์„ค๊ณ„ ์ƒ๋‹ด
30
+ - **๊ฐœ๋ฐœ**: `[dev] ๋กœ๊ทธ์ธ API ๊ตฌํ˜„ํ•ด์ค˜` โ€” ์—์ด์ „ํŠธ ํŒ€์ด ๋ถ„์„๋ถ€ํ„ฐ ๊ตฌํ˜„๊นŒ์ง€ ์‹คํ–‰
31
+ - **๋ฆฌ์„œ์น˜**: `[research] React vs Svelte ์„ฑ๋Šฅ ๋น„๊ต` โ€” ๋…๋ฆฝ ์กฐ์‚ฌ ํ›„ synthesis ๋ฌธ์„œ ์ž‘์„ฑ
32
+
33
+ ## ์‚ฌ์šฉ๋ฒ•
34
+
35
+ | ํƒœ๊ทธ | ๋™์ž‘ | ์˜ˆ์‹œ |
36
+ |------|------|------|
37
+ | `[consult]` | ์‹คํ–‰ ์ „ ์ƒ๋‹ด, ์˜๋„ ํŒŒ์•… | `[consult] DB ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์ „๋žต ๋…ผ์˜` |
38
+ | `[dev]` | ๊ฐœ๋ฐœ ์‹คํ–‰ (Sub/Team ์ž๋™ ํŒ๋‹จ) | `[dev] ๊ฒฐ์ œ ๋ชจ๋“ˆ ๋ฆฌํŒฉํ† ๋ง` |
39
+ | `[dev!]` | ํŒ€ ๋ชจ๋“œ ๊ฐ•์ œ | `[dev!] ์ธ์ฆ ์‹œ์Šคํ…œ ์ „๋ฉด ๊ฐœํŽธ` |
40
+ | `[research]` | ๋ฆฌ์„œ์น˜ ์‹คํ–‰ (Sub/Team ์ž๋™ ํŒ๋‹จ) | `[research] ์บ์‹ฑ ์ „๋žต ๋น„๊ต ๋ถ„์„` |
41
+ | `[research!]` | ๋ฆฌ์„œ์น˜ ํŒ€ ๊ฐ•์ œ | `[research!] ๊ฒฝ์Ÿ์‚ฌ ๊ธฐ์ˆ  ์Šคํƒ ์กฐ์‚ฌ` |
16
42
 
17
- ํŠนํ™”๋œ ์—์ด์ „ํŠธ๊ฐ€ ๊ฐ๊ฐ์˜ ์—ญํ• ์„ ๋‹ด๋‹นํ•ฉ๋‹ˆ๋‹ค.
43
+ ํ๋ฆ„: `[consult]`๋กœ ๋ฐฉํ–ฅ์„ ์žก์€ ๋’ค `[dev]` ๋˜๋Š” `[research]`๋กœ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
44
+
45
+ ## ์—์ด์ „ํŠธ
18
46
 
19
47
  ### ๊ฐœ๋ฐœ ํŒ€ (4๊ฐœ)
20
48
 
@@ -35,30 +63,29 @@ claude plugin install claude-nexus@nexus
35
63
 
36
64
  ## ์Šคํ‚ฌ
37
65
 
38
- ๋Œ€ํ™”ํ˜• ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ํ†ตํ•ด ๋ณต์žกํ•œ ์ž‘์—…์„ ๋‹จ๊ณ„๋ณ„๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
39
-
40
66
  | ์Šคํ‚ฌ | ํŠธ๋ฆฌ๊ฑฐ | ์„ค๋ช… |
41
67
  |------|--------|------|
42
- | **nx-consult** | `[consult]` ๋˜๋Š” "์–ด๋–ป๊ฒŒ ํ•˜๋ฉด ์ข‹์„๊นŒ" | 4๋‹จ๊ณ„ ์ƒ๋‹ด(Exploreโ†’Clarifyโ†’Proposeโ†’Converge) โ€” ์‹คํ–‰ ์ „ ์˜๋„ ํŒŒ์•… |
43
- | **nx-dev** | `[dev]` ๋˜๋Š” "๊ณ„ํš ์„ธ์›Œ" | Team-driven, tasks.json ์ค‘์‹ฌ์œผ๋กœ ๊ณ„ํš ์ƒ์„ฑ ๋ฐ nonstop ์‹คํ–‰ |
44
- | **nx-research** | `[research]` / `[research!]` | ๋ฆฌ์„œ์น˜ ํŒ€(principal+postdoc+researcher) ๊ตฌ์„ฑ ๋ฐ ์กฐ์‚ฌ ์‹คํ–‰ |
45
- | **nx-init** | `[init]` ๋˜๋Š” "์˜จ๋ณด๋”ฉ" | ํ”„๋กœ์ ํŠธ๋ฅผ Nexus์— ์˜จ๋ณด๋“œ - ๊ธฐ์กด ๋ฌธ์„œ ์Šค์บ”ํ•˜์—ฌ ์ง€์‹ ์ƒ์„ฑ |
46
- | **nx-setup** | `[setup]` ๋˜๋Š” "nexus ์„ค์ •" | Nexus ๋Œ€ํ™”ํ˜• ์„ค์ • ๋งˆ๋ฒ•์‚ฌ |
47
- | **nx-sync** | `[sync]` ๋˜๋Š” "์ง€์‹ ๋™๊ธฐํ™”" | ์†Œ์Šค ์ฝ”๋“œ์™€ ์ง€์‹ ๋ฌธ์„œ ๊ฐ„ ๋ถˆ์ผ์น˜ ๊ฐ์ง€ ๋ฐ ์ˆ˜์ • |
68
+ | **nx-consult** | `[consult]` | ๊ตฌ์กฐํ™”๋œ ์ƒ๋‹ด. ์š”๊ตฌ์‚ฌํ•ญ ์ •๋ฆฌ โ†’ ๊ฒฐ์ • ๊ธฐ๋ก(`[d]`) โ†’ ์‹คํ–‰ ํƒœ๊ทธ ์ถ”์ฒœ |
69
+ | **nx-dev** | `[dev]` / `[dev!]` | ๊ฐœ๋ฐœ ์‹คํ–‰. ๋ณต์žก๋„์— ๋”ฐ๋ผ ๋‹จ๋… ๋˜๋Š” ํŒ€(Directorโ†’Architectโ†’Engineerโ†’QA) ์ž๋™ ํŽธ์„ฑ |
70
+ | **nx-research** | `[research]` / `[research!]` | ๋ฆฌ์„œ์น˜ ์‹คํ–‰. ๋ณต์žก๋„์— ๋”ฐ๋ผ ๋‹จ๋… ๋˜๋Š” ํŒ€(Principalโ†’Postdocโ†’Researcher) ์ž๋™ ํŽธ์„ฑ |
71
+ | **nx-setup** | `/claude-nexus:nx-setup` | ๋Œ€ํ™”ํ˜• ์„ค์ •. CLAUDE.md์— ์—์ด์ „ํŠธ/์Šคํ‚ฌ/ํƒœ๊ทธ ์„ค์ • ์ฃผ์ž… |
72
+ | **nx-sync** | `/claude-nexus:nx-sync` | ์ฒซ ์‹คํ–‰ ์‹œ knowledge ์ž๋™ ์ƒ์„ฑ, ์ดํ›„ ์†Œ์Šค ๋ณ€๊ฒฝ๊ณผ์˜ ๋ถˆ์ผ์น˜ ๊ฐ์ง€ ๋ฐ ์ˆ˜์ •. --reset์œผ๋กœ ์ดˆ๊ธฐํ™” ๊ฐ€๋Šฅ |
48
73
 
49
- ## MCP ๋„๊ตฌ
74
+ ## ๊ณ ๊ธ‰ ๊ธฐ๋Šฅ
75
+
76
+ <details>
77
+ <summary>MCP ๋„๊ตฌ</summary>
50
78
 
51
79
  Claude๊ฐ€ ์ง์ ‘ ํ˜ธ์ถœํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.
52
80
 
53
- ### Core (6๊ฐœ)
81
+ ### Core (5๊ฐœ)
54
82
 
55
83
  | ๋„๊ตฌ | ์šฉ๋„ |
56
84
  |------|------|
57
85
  | `nx_knowledge_read/write` | ํ”„๋กœ์ ํŠธ ์ง€์‹ ๊ด€๋ฆฌ (git ์ถ”์ ) |
58
86
  | `nx_context` | ํ˜„์žฌ ์„ธ์…˜ ์ƒํƒœ ์กฐํšŒ |
59
- | `nx_task_list/add/update` | tasks.json ๊ธฐ๋ฐ˜ ํƒœ์Šคํฌ ๊ด€๋ฆฌ |
87
+ | `nx_task_list/add/update/clear` | tasks.json ๊ธฐ๋ฐ˜ ํƒœ์Šคํฌ ๊ด€๋ฆฌ |
60
88
  | `nx_decision_add` | ์•„ํ‚คํ…์ฒ˜ ๊ฒฐ์ • ๊ธฐ๋ก |
61
- | `nx_plan_archive` | ์™„๋ฃŒ๋œ ๊ณ„ํš ์•„์นด์ด๋ธŒ |
62
89
 
63
90
  ### Code Intelligence (10๊ฐœ)
64
91
 
@@ -78,43 +105,43 @@ Claude๊ฐ€ ์ง์ ‘ ํ˜ธ์ถœํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.
78
105
  LSP๋Š” ํ”„๋กœ์ ํŠธ ์–ธ์–ด๋ฅผ ์ž๋™ ๊ฐ์ง€ํ•ฉ๋‹ˆ๋‹ค (tsconfig.json โ†’ TypeScript ๋“ฑ).
79
106
  AST๋Š” `@ast-grep/napi` ํ•„์š”: `bun install @ast-grep/napi`
80
107
 
81
- ## Hook
108
+ </details>
109
+
110
+ <details>
111
+ <summary>Hook</summary>
82
112
 
83
- Gate ๋‹จ์ผ ๋ชจ๋“ˆ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค (v2์—์„œ 3๊ฐœ โ†’ 1๊ฐœ๋กœ ํ†ตํ•ฉ).
113
+ Gate ๋‹จ์ผ ๋ชจ๋“ˆ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
84
114
 
85
115
  | ์ด๋ฒคํŠธ | ์—ญํ•  |
86
116
  |--------|------|
87
117
  | `UserPromptSubmit` | ํ”„๋กฌํ”„ํŠธ ์ „์ฒ˜๋ฆฌ ๋ฐ ์ปจํ…์ŠคํŠธ ์ฃผ์ž… |
88
118
  | `Stop` | ์„ธ์…˜ ์ข…๋ฃŒ ํ›„์ฒ˜๋ฆฌ |
89
119
 
90
- ## ํ”„๋กœ์ ํŠธ ์ง€์‹
120
+ </details>
91
121
 
92
- `.claude/nexus/knowledge/` ๋””๋ ‰ํ† ๋ฆฌ์— ํŒ€์ด ๊ณต์œ ํ•˜๋Š” ์žฅ๊ธฐ ํ”„๋กœ์ ํŠธ ์ง€์‹์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. git์œผ๋กœ ์ถ”์ ๋ฉ๋‹ˆ๋‹ค.
122
+ <details>
123
+ <summary>ํ”„๋กœ์ ํŠธ ์ง€์‹</summary>
93
124
 
94
- ```
95
- .claude/nexus/
96
- โ”œโ”€โ”€ knowledge/ โ† ๊ณต์œ  ์ง€์‹ (git ์ถ”์ )
97
- โ”‚ โ”œโ”€โ”€ architecture.md
98
- โ”‚ โ”œโ”€โ”€ agents-catalog.md
99
- โ”‚ โ”œโ”€โ”€ conventions.md
100
- โ”‚ โ”œโ”€โ”€ workflows.md
101
- โ”‚ โ”œโ”€โ”€ hook-modules.md
102
- โ”‚ โ”œโ”€โ”€ mcp-tools.md
103
- โ”‚ โ”œโ”€โ”€ dev-workflow.md
104
- โ”‚ โ””โ”€โ”€ decisions/ โ† ์•„ํ‚คํ…์ฒ˜ ๊ฒฐ์ • ๊ธฐ๋ก
105
- โ”œโ”€โ”€ config.json โ† Nexus ์„ค์ •
106
- โ””โ”€โ”€ plans/ โ† ๋ธŒ๋žœ์น˜๋ณ„ ๊ตฌํ˜„ ๊ณ„ํš
107
- โ””โ”€โ”€ feature--*/
108
- โ””โ”€โ”€ plan.md
109
- ```
125
+ `.claude/nexus/knowledge/`์— ํ”„๋กœ์ ํŠธ ์ง€์‹์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. git์œผ๋กœ ์ถ”์ ๋ฉ๋‹ˆ๋‹ค.
126
+
127
+ - `nx-sync` ์ฒซ ์‹คํ–‰ ์‹œ ํ”„๋กœ์ ํŠธ์— ๋งž๋Š” knowledge ํŒŒ์ผ์„ ์ž๋™ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค (๊ตฌ์กฐ ๊ณ ์ • ์•„๋‹˜)
128
+ - `config.json`์— Nexus ์„ค์ •์ด ์ €์žฅ๋ฉ๋‹ˆ๋‹ค
110
129
 
111
- ## ๋Ÿฐํƒ€์ž„ ์ƒํƒœ
130
+ </details>
131
+
132
+ <details>
133
+ <summary>๋Ÿฐํƒ€์ž„ ์ƒํƒœ</summary>
112
134
 
113
135
  `.nexus/` ๋””๋ ‰ํ† ๋ฆฌ์— ๋Ÿฐํƒ€์ž„ ์ƒํƒœ๊ฐ€ ์ €์žฅ๋ฉ๋‹ˆ๋‹ค. gitignore ๋Œ€์ƒ์ž…๋‹ˆ๋‹ค.
114
136
 
115
137
  ```
116
138
  .nexus/
117
- โ”œโ”€โ”€ tasks.json โ† ํƒœ์Šคํฌ ๋ชฉ๋ก
118
- โ”œโ”€โ”€ decisions.json โ† ์•„ํ‚คํ…์ฒ˜ ๊ฒฐ์ • ๋ชฉ๋ก
119
- โ””โ”€โ”€ archives/ โ† ์•„์นด์ด๋ธŒ๋œ ๊ณ„ํš (NN-title.md)
139
+ โ”œโ”€โ”€ branches/ โ† ๋ธŒ๋žœ์น˜๋ณ„ ๊ฒฉ๋ฆฌ
140
+ โ”‚ โ””โ”€โ”€ {branch}/
141
+ โ”‚ โ”œโ”€โ”€ tasks.json โ† ํƒœ์Šคํฌ ๋ชฉ๋ก
142
+ โ”‚ โ”œโ”€โ”€ decisions.json โ† ์•„ํ‚คํ…์ฒ˜ ๊ฒฐ์ • ๋ชฉ๋ก
143
+ โ”‚ โ””โ”€โ”€ reports/ โ† ๋ฆฌ์„œ์น˜ ์‚ฐ์ถœ๋ฌผ
144
+ โ””โ”€โ”€ sync-state.json โ† ๋งˆ์ง€๋ง‰ sync ์ปค๋ฐ‹
120
145
  ```
146
+
147
+ </details>
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.10.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-nexus",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "Agent orchestration plugin for Claude Code โ€” optimized context injection per role",
6
6
  "author": "kih",
@@ -88,55 +88,21 @@ chmod +x ~/.claude/hooks/nexus-statusline.sh
88
88
 
89
89
  ### Step 3: CLAUDE.md Nexus Section
90
90
 
91
- Generate the Nexus section in CLAUDE.md using `<!-- NEXUS:START -->` / `<!-- NEXUS:END -->` markers.
91
+ Write the Nexus section in CLAUDE.md using `<!-- NEXUS:START -->` / `<!-- NEXUS:END -->` markers.
92
92
 
93
93
  If a Nexus section already exists, replace the content between markers. Content outside the markers is preserved unchanged.
94
94
 
95
95
  Write location depends on scope selected in Step 1.
96
96
 
97
- Section content:
97
+ **Section content is NOT hardcoded here.** Read it dynamically at runtime:
98
98
 
99
- ```markdown
100
- <!-- NEXUS:START -->
101
- ## Nexus Agent Orchestration
99
+ 1. **Read `~/.claude/CLAUDE.md`** โ€” extract content between `<!-- NEXUS:START -->` and `<!-- NEXUS:END -->` markers
100
+ 2. **If not found (first install):** Read the plugin's own CLAUDE.md from the cache directory:
101
+ - Glob `~/.claude/plugins/cache/nexus/claude-nexus/*/CLAUDE.md` โ†’ pick the latest version
102
+ - Extract the `<!-- NEXUS:START -->` to `<!-- NEXUS:END -->` section
103
+ 3. **If neither found:** Error โ€” "Nexus ์„น์…˜ ํ…œํ”Œ๋ฆฟ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”."
102
104
 
103
- **Default: DELEGATE** โ€” route code work, analysis, and multi-file changes to agents.
104
-
105
- ### Agent Routing
106
-
107
- ๋ณ‘๋ ฌ ์ž‘์—…์ด๋‚˜ ๋‹ค๋ฅธ ๊ด€์ ์ด ํ•„์š”ํ•  ๋•Œ ์—์ด์ „ํŠธ๋ฅผ ํ™œ์šฉํ•˜๋ผ.
108
-
109
- | Task | Agent |
110
- |------|-------|
111
- | Code implementation, edits | builder |
112
- | Architecture, design decisions, code review | architect |
113
- | Debugging, tracing issues | debugger |
114
- | Deep analysis, research | analyst |
115
- | Validation, testing, security review | guard |
116
-
117
- ๋‹จ์ˆœ ์ž‘์—…(ํŒŒ์ผ 1-2๊ฐœ ์ฝ๊ธฐ/์ˆ˜์ •)์€ ์ง์ ‘ ์ฒ˜๋ฆฌํ•˜๋ผ.
118
-
119
- ### Skills
120
-
121
- | Skill | Trigger | Purpose |
122
- |-------|---------|---------|
123
- | nx-consult | [consult] | Interactive discovery โ€” understand intent before executing |
124
- | nx-team | [team] | Team-driven planning with tasks.json, nonstop execution |
125
- | nx-sub | [sub] | Lightweight execution โ€” Lead analyzes directly, spawns Builder subagents |
126
- | nx-init | /claude-nexus:nx-init | Onboard project โ€” generate knowledge from existing docs |
127
- | nx-setup | /claude-nexus:nx-setup | Configure Nexus interactively |
128
- | nx-sync | /claude-nexus:nx-sync | Sync knowledge docs with source files |
129
-
130
- ### Tags
131
-
132
- | Tag | Purpose |
133
- |-----|---------|
134
- | [consult] | ์ƒ๋‹ด โ€” ์‹คํ–‰ ์ „ ์˜๋„ ํŒŒ์•… |
135
- | [team] | team mode โ€” ๊ณ„ํš ์ƒ์„ฑ ๋ฐ nonstop ์‹คํ–‰ |
136
- | [sub] | ๊ฒฝ๋Ÿ‰ ์‹คํ–‰ โ€” Lead ์ง์ ‘ ๋ถ„์„ + Builder direct spawn |
137
- | [d] | ๊ฒฐ์ • ๊ธฐ๋ก (nx_decision_add ํ˜ธ์ถœ) |
138
- <!-- NEXUS:END -->
139
- ```
105
+ Write the extracted section to the target CLAUDE.md (respecting scope from Step 1).
140
106
 
141
107
  ### Step 4: OMC Conflict Detection
142
108
 
@@ -245,7 +211,7 @@ AskUserQuestion({
245
211
  multiSelect: false,
246
212
  options: [
247
213
  { label: "Yes (Recommended)", description: "๊ธฐ์กด ๋ฌธ์„œ(README, CLAUDE.md ๋“ฑ)๋ฅผ ๋ถ„์„ํ•ด .claude/nexus/knowledge/ ์ƒ์„ฑ" },
248
- { label: "Skip", description: "๋‚˜์ค‘์— /claude-nexus:nx-init์œผ๋กœ ์ง์ ‘ ์‹คํ–‰" }
214
+ { label: "Skip", description: "๋‚˜์ค‘์— /claude-nexus:nx-sync์œผ๋กœ ์ง์ ‘ ์‹คํ–‰" }
249
215
  ]
250
216
  }]
251
217
  })
@@ -259,7 +225,7 @@ Skip ์‹œ: ๋‹ค์Œ ๋‹จ๊ณ„๋กœ.
259
225
  ์„ค์ • ์™„๋ฃŒ ๋ฉ”์‹œ์ง€ ์ถœ๋ ฅ:
260
226
  - ์ ์šฉ๋œ ์„ค์ • ์š”์•ฝ
261
227
  - ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์Šคํ‚ฌ/์—์ด์ „ํŠธ ๊ฐ„๋žต ์†Œ๊ฐœ
262
- - "์‹œ์ž‘ํ•˜๋ ค๋ฉด ์ž‘์—…์„ ๋งํ•˜๊ฑฐ๋‚˜ [consult]๋กœ ์ƒ๋‹ด, [team]์œผ๋กœ ํŒ€ ์‹คํ–‰, [sub]๋กœ ๊ฒฝ๋Ÿ‰ ์‹คํ–‰ํ•˜์„ธ์š”"
228
+ - "์‹œ์ž‘ํ•˜๋ ค๋ฉด ์ž‘์—…์„ ๋งํ•˜๊ฑฐ๋‚˜ [consult]๋กœ ์ƒ๋‹ด, [dev]๋กœ ๊ฐœ๋ฐœ, [research]๋กœ ๋ฆฌ์„œ์น˜ํ•˜์„ธ์š”"
263
229
 
264
230
  ## Key Principles
265
231
 
@@ -1,127 +1,109 @@
1
1
  ---
2
2
  name: nx-sync
3
- description: Detect and fix drift between source code changes and knowledge documents.
3
+ description: Sync knowledge documents with the current state of the codebase. On first run, scans and generates knowledge from scratch.
4
4
  triggers: ["sync", "sync knowledge", "์ง€์‹ ๋™๊ธฐํ™”", "๋ฌธ์„œ ๋™๊ธฐํ™”"]
5
5
  ---
6
6
 
7
7
  # Sync
8
8
 
9
- ์†Œ์Šค ์ฝ”๋“œ ๋ณ€๊ฒฝ์ ์„ ๊ฐ์ง€ํ•˜๊ณ  knowledge ๋ฌธ์„œ์™€์˜ ๋ถˆ์ผ์น˜๋ฅผ ์ฐพ์•„ ์ˆ˜์ •ํ•œ๋‹ค.
9
+ knowledge ๋ฌธ์„œ๋ฅผ ์ฝ”๋“œ๋ฒ ์ด์Šค ํ˜„ํ™ฉ๊ณผ ๋™๊ธฐํ™”ํ•œ๋‹ค. ์ฒ˜์Œ ์‹คํ–‰ ์‹œ ํ”„๋กœ์ ํŠธ๋ฅผ ์Šค์บ”ํ•˜์—ฌ knowledge๋ฅผ ์ž๋™ ์ƒ์„ฑํ•œ๋‹ค.
10
10
 
11
- ## Why This Exists
11
+ ## Trigger
12
12
 
13
- `.claude/nexus/knowledge/` ๋ฌธ์„œ๋“ค์€ ์—์ด์ „ํŠธ์˜ ๊ณต์œ  ๊ธฐ์–ต์ด๋‹ค. ์ฝ”๋“œ๊ฐ€ ๋ฐ”๋€Œ๋ฉด โ€” ๋ชจ๋“ˆ ์ถ”๊ฐ€, ์˜์กด์„ฑ ๋ณ€๊ฒฝ, ๊ตฌ์กฐ ๋ฆฌํŒฉํ† ๋ง โ€” ์ด ๋ฌธ์„œ๋“ค์ด ์‹ค์ œ ์ฝ”๋“œ์™€ ์–ด๊ธ‹๋‚  ์ˆ˜ ์žˆ๋‹ค. ์ด ์Šคํ‚ฌ์€ ๊ทธ drift๋ฅผ ์žก์•„๋‚ธ๋‹ค.
13
+ - `/claude-nexus:nx-sync` โ€” knowledge ๋™๊ธฐํ™”
14
+ - `/claude-nexus:nx-sync --reset` โ€” knowledge ์ดˆ๊ธฐํ™” ํ›„ ์žฌ์ƒ์„ฑ
14
15
 
15
- ## Prerequisites
16
+ ## Modes
16
17
 
17
- - **git repository** ํ•„์ˆ˜. git์ด ์—†์œผ๋ฉด ๋ณ€๊ฒฝ์  ์ถ”์ ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฏ€๋กœ sync๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†๋‹ค.
18
- - `.claude/nexus/knowledge/`์— knowledge ํŒŒ์ผ์ด 2๊ฐœ ์ด์ƒ ์กด์žฌํ•ด์•ผ ํ•œ๋‹ค.
18
+ ### First Run (knowledge 0๊ฐœ)
19
19
 
20
- ## Process
21
-
22
- ### Phase 0: Context Detection
20
+ ํ”„๋กœ์ ํŠธ ์ „์ฒด ์Šค์บ” โ†’ knowledge ์ž๋™ ์ƒ์„ฑ + CLAUDE.md ์Šฌ๋ฆผํ™”. ์‚ฌ์šฉ์ž ์Šน์ธ ์—†์ด ์ž๋™ ์ง„ํ–‰ํ•œ๋‹ค.
23
21
 
24
- knowledge ํŒŒ์ผ ์กด์žฌ ์—ฌ๋ถ€๋กœ ์‹คํ–‰ ๋ชจ๋“œ๋ฅผ ๊ฒฐ์ •ํ•œ๋‹ค.
22
+ ### Sync (knowledge ์กด์žฌ)
25
23
 
26
- ```
27
- knowledge_files = Glob(".claude/nexus/knowledge/*.md")
28
- # decisions/ ํ•˜์œ„๋Š” ADR์ด๋ฏ€๋กœ sync ๋Œ€์ƒ์—์„œ ์ œ์™ธ
29
-
30
- IF knowledge_files ๊ฐœ์ˆ˜ < 2:
31
- โ†’ ์‚ฌ์šฉ์ž์—๊ฒŒ ์•ˆ๋‚ด:
32
- "knowledge ํŒŒ์ผ์ด ๋ถ€์กฑํ•ฉ๋‹ˆ๋‹ค. `/claude-nexus:nx-init`์„ ์‹คํ–‰ํ•˜๋ฉด
33
- ํ”„๋กœ์ ํŠธ ๋ถ„์„์„ ๊ธฐ๋ฐ˜์œผ๋กœ knowledge๊ฐ€ ์ž๋™ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค."
34
- โ†’ ์ข…๋ฃŒ
35
- ELSE:
36
- โ†’ DIFF SCAN ๋ชจ๋“œ๋กœ Phase 1 ์ง„ํ–‰
37
- ```
24
+ git diff ๊ธฐ๋ฐ˜์œผ๋กœ drift๋ฅผ ๊ฐ์ง€ โ†’ ๋ฆฌํฌํŠธ ์ถœ๋ ฅ โ†’ ์‚ฌ์šฉ์ž ์Šน์ธ ํ›„ ์ˆ˜์ •.
38
25
 
39
- ### Phase 1: Detect Changes (์†Œ์Šค ๋ณ€๊ฒฝ์  ๊ฐ์ง€)
26
+ ### Reset (`--reset` ํ”Œ๋ž˜๊ทธ)
40
27
 
41
- #### Step 1-1: base ์ปค๋ฐ‹ ๊ฒฐ์ •
28
+ ๊ธฐ์กด knowledge๋ฅผ ์‚ญ์ œ โ†’ First Run์œผ๋กœ ์žฌ์ง„์ž…. ์‚ฌ์šฉ์ž ํ™•์ธ ํ›„ ์ง„ํ–‰.
42
29
 
43
- ```
44
- IF .nexus/sync-state.json ์กด์žฌ:
45
- base = sync-state.json์˜ lastSyncCommit
46
- git rev-parse --verify {base} ๋กœ ์œ ํšจ์„ฑ ํ™•์ธ
47
- ์œ ํšจํ•˜์ง€ ์•Š์œผ๋ฉด โ†’ Step 1-1 fallback
30
+ ---
48
31
 
49
- ELSE (fallback):
50
- base = HEAD~20 # sync-state ์—†์„ ๋•Œ์˜ ์•ˆ์ „ํ•œ ๊ธฐ๋ณธ๊ฐ’
51
- ```
32
+ ## Process
52
33
 
53
- #### Step 1-2: ๋ณ€๊ฒฝ ํŒŒ์ผ ๋ชฉ๋ก ์ˆ˜์ง‘
34
+ ### Phase 0: Mode Detection
54
35
 
55
- ```bash
56
- git diff --name-status {base}..HEAD
57
36
  ```
37
+ IF --reset ํ”Œ๋ž˜๊ทธ:
38
+ AskUserQuestion({
39
+ questions: [{
40
+ question: "๊ธฐ์กด knowledge ํŒŒ์ผ์ด ๋ชจ๋‘ ์‚ญ์ œ๋ฉ๋‹ˆ๋‹ค. ์ง„ํ–‰ํ• ๊นŒ์š”?",
41
+ options: [
42
+ { label: "Yes", description: "๊ธฐ์กด knowledge ์‚ญ์ œ ํ›„ ์ฒ˜์Œ๋ถ€ํ„ฐ ์žฌ์ƒ์„ฑ" },
43
+ { label: "No", description: "์ทจ์†Œ" }
44
+ ]
45
+ }]
46
+ })
47
+ No ์„ ํƒ ์‹œ โ†’ ์ข…๋ฃŒ
48
+ Yes ์„ ํƒ ์‹œ โ†’ ๊ธฐ์กด knowledge ํŒŒ์ผ ์ „๋ถ€ ์‚ญ์ œ โ†’ First Run ์ง„์ž…
49
+
50
+ ELSE IF .claude/nexus/knowledge/ ์— .md ํŒŒ์ผ 0๊ฐœ:
51
+ โ†’ First Run ์ง„์ž…
58
52
 
59
- ๊ฒฐ๊ณผ๋ฅผ ํŒŒ์‹ฑํ•˜์—ฌ ๋ณ€๊ฒฝ ๋ชฉ๋ก์„ ๋งŒ๋“ ๋‹ค:
60
- - `A` (Added) โ†’ ์ƒˆ ํŒŒ์ผ
61
- - `M` (Modified) โ†’ ์ˆ˜์ •๋œ ํŒŒ์ผ
62
- - `D` (Deleted) โ†’ ์‚ญ์ œ๋œ ํŒŒ์ผ
63
- - `R` (Renamed) โ†’ ์ด๋ฆ„ ๋ณ€๊ฒฝ
64
-
65
- #### Step 1-3: ์˜ํ–ฅ๋„ ๋ถ„๋ฅ˜
53
+ ELSE:
54
+ โ†’ Sync ์ง„์ž…
55
+ ```
66
56
 
67
- ๋ณ€๊ฒฝ ํŒŒ์ผ ๋ชฉ๋ก์„ ์•„๋ž˜ ๊ธฐ์ค€์œผ๋กœ ๋ถ„๋ฅ˜ํ•œ๋‹ค. **High/Medium๋งŒ ํ›„์† Phase์—์„œ ์ฒ˜๋ฆฌํ•œ๋‹ค.**
57
+ ### Phase 1: Scan
68
58
 
69
- | ์˜ํ–ฅ๋„ | ๊ธฐ์ค€ | ์˜ˆ์‹œ |
70
- |--------|------|------|
71
- | **High** | ์ƒˆ ๋””๋ ‰ํ† ๋ฆฌ/๋ชจ๋“ˆ ์ƒ์„ฑ, ์„ค์ • ํŒŒ์ผ ๋ณ€๊ฒฝ, ์˜์กด์„ฑ ๋ณ€๊ฒฝ, ์ง„์ž…์  ๋ณ€๊ฒฝ | ์ƒˆ `src/auth/` ๋””๋ ‰ํ† ๋ฆฌ, `package.json` ๋ณ€๊ฒฝ, `main.ts` ๋ณ€๊ฒฝ |
72
- | **Medium** | ์ฃผ์š” ์†Œ์Šค ํŒŒ์ผ์˜ export/์ธํ„ฐํŽ˜์ด์Šค/ํƒ€์ž… ๋ณ€๊ฒฝ, ํŒŒ์ผ ์‚ญ์ œ/์ด๋ฆ„ ๋ณ€๊ฒฝ | ํ•จ์ˆ˜ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๋ณ€๊ฒฝ, ํŒŒ์ผ๋ช… ๋ณ€๊ฒฝ |
73
- | **Low** | ๋‚ด๋ถ€ ๊ตฌํ˜„๋งŒ ๋ณ€๊ฒฝ, ํ…Œ์ŠคํŠธ ํŒŒ์ผ๋งŒ ๋ณ€๊ฒฝ, ์Šคํƒ€์ผ/ํฌ๋งท ๋ณ€๊ฒฝ | ํ•จ์ˆ˜ ๋‚ด๋ถ€ ๋กœ์ง, `*.test.ts` |
59
+ #### First Run ๋ชจ๋“œ
74
60
 
75
- **ํŒ๋‹จ ๋ฐฉ๋ฒ•:**
76
- 1. ํŒŒ์ผ ๊ฒฝ๋กœ๋กœ 1์ฐจ ๋ถ„๋ฅ˜ (์„ค์ • ํŒŒ์ผ, ์†Œ์Šค ๋””๋ ‰ํ† ๋ฆฌ, ํ…Œ์ŠคํŠธ ๋“ฑ)
77
- 2. ๊ฒฝ๋กœ๋งŒ์œผ๋กœ ํŒ๋‹จ์ด ์–ด๋ ค์šฐ๋ฉด `git diff {base}..HEAD -- {file}` ๋กœ ๋ณ€๊ฒฝ ๋‚ด์šฉ์„ ์ฝ์–ด์„œ ํŒ๋‹จ
78
- 3. **์˜์‹ฌ์Šค๋Ÿฌ์šฐ๋ฉด Medium ์ด์ƒ์œผ๋กœ ๋ถ„๋ฅ˜** (๋†“์น˜๋Š” ๊ฒƒ๋ณด๋‹ค ๊ณผํƒ์ด ๋‚ซ๋‹ค)
61
+ ๋‹ค์Œ ํ•ญ๋ชฉ์„ ์ˆ˜์ง‘ํ•œ๋‹ค:
79
62
 
80
- ๋ณ€๊ฒฝ ํŒŒ์ผ์ด ์—†์œผ๋ฉด:
81
- ```
82
- "๋งˆ์ง€๋ง‰ sync ์ดํ›„ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์—†์Šต๋‹ˆ๋‹ค. (base: {base})"
83
- โ†’ ์ข…๋ฃŒ
84
- ```
63
+ - **ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ**: ์ตœ์ƒ์œ„ ๋””๋ ‰ํ† ๋ฆฌ, ์–ธ์–ด/ํ”„๋ ˆ์ž„์›Œํฌ(package.json, Cargo.toml, pyproject.toml, go.mod ๋“ฑ), ๋นŒ๋“œ/ํ…Œ์ŠคํŠธ ์‹œ์Šคํ…œ
64
+ - **๊ธฐ์กด ๋ฌธ์„œ**: CLAUDE.md, README.md, docs/, .cursorrules, .github/copilot-instructions.md ๋“ฑ ์กด์žฌํ•˜๋Š” ๋ชจ๋“  ๋ฌธ์„œ
65
+ - **git ์ปจํ…์ŠคํŠธ**: ์ตœ๊ทผ ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€, ๋ธŒ๋žœ์น˜ ๊ตฌ์กฐ
85
66
 
86
- ### Phase 2: Scan Knowledge (knowledge ํ˜„ํ™ฉ ํŒŒ์•…)
67
+ **์ค‘์š”: ๊ธฐ์กด ๋ฌธ์„œ์˜ ๊ตฌ์กฐ๋‚˜ ํŒŒ์ผ๋ช…์„ ๋”ฐ๋ฅด์ง€ ์•Š๋Š”๋‹ค. ์ˆ˜์ง‘ํ•œ ์ •๋ณด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์–ด๋–ค knowledge ํŒŒ์ผ์ด ํ•„์š”ํ•œ์ง€, ์–ด๋–ค ๊ตฌ์กฐ์™€ ๊ณ„์ธต์ด ์ ํ•ฉํ•œ์ง€ LLM์ด ๋…์ž์ ์œผ๋กœ ํŒ๋‹จํ•œ๋‹ค. ๊ธฐ์กด ๋ฌธ์„œ๋Š” ์ •๋ณด ์†Œ์Šค์ผ ๋ฟ์ด๋‹ค.**
87
68
 
88
- `.claude/nexus/knowledge/*.md` ํŒŒ์ผ์„ ๋ชจ๋‘ ์ฝ๋Š”๋‹ค. `decisions/` ํ•˜์œ„ ADR ํŒŒ์ผ์€ ์ œ์™ธํ•œ๋‹ค.
69
+ #### Sync ๋ชจ๋“œ
89
70
 
90
- ๊ฐ ํŒŒ์ผ์—์„œ ๋‹ค์Œ์„ ์ถ”์ถœํ•œ๋‹ค:
91
- 1. **ํƒœ๊ทธ** โ€” `<!-- tags: ... -->` HTML ์ฝ”๋ฉ˜ํŠธ๊ฐ€ ์žˆ์œผ๋ฉด ํŒŒ์‹ฑ
92
- 2. **ํ—ค๋” ๊ตฌ์กฐ** โ€” `#`/`##` ํ—ค๋”๋ฅผ ๋ชฉ๋ก์œผ๋กœ ์ˆ˜์ง‘
93
- 3. **์†Œ์Šค ์ฐธ์กฐ** โ€” ํŒŒ์ผ ๋‚ด์— ์–ธ๊ธ‰๋œ ์†Œ์Šค ํŒŒ์ผ ๊ฒฝ๋กœ (์ฝ”๋“œ ๋ธ”๋ก, ์ธ๋ผ์ธ ์ฝ”๋“œ ๋“ฑ)
71
+ - `.nexus/sync-state.json`์ด ์žˆ์œผ๋ฉด `lastSyncCommit`์„ base๋กœ ์‚ฌ์šฉ. ์—†์œผ๋ฉด `HEAD~20` ์‚ฌ์šฉ.
72
+ - `git diff --name-status {base}..HEAD` ๋กœ ๋ณ€๊ฒฝ ํŒŒ์ผ ๋ชฉ๋ก ์ˆ˜์ง‘
73
+ - ๋ณ€๊ฒฝ ํŒŒ์ผ์„ ์˜ํ–ฅ๋„๋กœ ๋ถ„๋ฅ˜ (High/Medium๋งŒ ํ›„์† ์ฒ˜๋ฆฌ, Low ์Šคํ‚ต):
94
74
 
95
- ์ด ์ •๋ณด๋กœ ๊ฐ knowledge ํŒŒ์ผ์˜ **์ปค๋ฒ„๋ฆฌ์ง€ ์˜์—ญ**์„ ํŒŒ์•…ํ•œ๋‹ค.
75
+ | ์˜ํ–ฅ๋„ | ๊ธฐ์ค€ |
76
+ |--------|------|
77
+ | **High** | ์ƒˆ ๋””๋ ‰ํ† ๋ฆฌ/๋ชจ๋“ˆ, ์„ค์ • ํŒŒ์ผ, ์˜์กด์„ฑ, ์ง„์ž…์  ๋ณ€๊ฒฝ |
78
+ | **Medium** | export/์ธํ„ฐํŽ˜์ด์Šค/ํƒ€์ž… ๋ณ€๊ฒฝ, ํŒŒ์ผ ์‚ญ์ œ/์ด๋ฆ„ ๋ณ€๊ฒฝ |
79
+ | **Low** | ๋‚ด๋ถ€ ๊ตฌํ˜„๋งŒ, ํ…Œ์ŠคํŠธ ํŒŒ์ผ๋งŒ, ์Šคํƒ€์ผ/ํฌ๋งท ๋ณ€๊ฒฝ |
96
80
 
97
- ์˜ˆ:
98
- ```
99
- architecture.md โ†’ tags: [architecture, modules], ์ฐธ์กฐ ๊ฒฝ๋กœ: [src/hooks/, bridge/, agents/]
100
- conventions.md โ†’ tags: [conventions, style], ์ฐธ์กฐ ๊ฒฝ๋กœ: ์—†์Œ (๊ทœ์น™ ๊ธฐ์ˆ )
101
- ```
81
+ ํŒ๋‹จ์ด ์• ๋งคํ•˜๋ฉด Medium ์ด์ƒ์œผ๋กœ ๋ถ„๋ฅ˜ํ•œ๋‹ค. ๋ณ€๊ฒฝ ํŒŒ์ผ์ด ์—†์œผ๋ฉด ์•ˆ๋‚ด ํ›„ ์ข…๋ฃŒ.
102
82
 
103
- ### Phase 3: Compare and Report
83
+ ### Phase 2: Analyze & Generate
104
84
 
105
- Phase 1์˜ High/Medium ๋ณ€๊ฒฝ ํŒŒ์ผ๊ณผ Phase 2์˜ knowledge ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ๋Œ€์กฐํ•œ๋‹ค.
85
+ #### First Run ๋ชจ๋“œ
106
86
 
107
- #### Step 3-1: ๋งค์นญ
87
+ - ์Šค์บ” ๊ฒฐ๊ณผ๋ฅผ ๋ถ„์„ํ•˜์—ฌ knowledge ํŒŒ์ผ์„ ์ƒ์„ฑํ•œ๋‹ค.
88
+ - ํŒŒ์ผ๋ช…, ๊ตฌ์กฐ, ๊ณ„์ธต์€ ํ”„๋กœ์ ํŠธ ํŠน์„ฑ์— ๋งž๊ฒŒ ์ž์œ  ๊ฒฐ์ •. ํ•˜๋“œ์ฝ”๋”ฉ๋œ ํ…œํ”Œ๋ฆฟ ์—†์Œ.
89
+ - CLAUDE.md ์Šฌ๋ฆผํ™”: ํ•ต์‹ฌ ์ง€์‹œ์‚ฌํ•ญ๋งŒ ์œ ์ง€, ๋‚˜๋จธ์ง€๋Š” knowledge๋กœ ์ด๋™. ์›๋ณธ์€ `.claude/nexus/knowledge/` ์— ๋ฐฑ์—…. ์‚ฌ์šฉ์ž ์Šน์ธ์€ ๋ถˆํ•„์š”ํ•˜์ง€๋งŒ "CLAUDE.md๋ฅผ ์Šฌ๋ฆผํ™”ํ•ฉ๋‹ˆ๋‹ค" ์•ˆ๋‚ด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.
90
+ - `nx_knowledge_write`๋กœ ํŒŒ์ผ ์ƒ์„ฑ.
108
91
 
109
- ๊ฐ ๋ณ€๊ฒฝ ํŒŒ์ผ์— ๋Œ€ํ•ด:
110
- 1. knowledge ํŒŒ์ผ๋“ค์˜ **์†Œ์Šค ์ฐธ์กฐ**์— ํ•ด๋‹น ๊ฒฝ๋กœ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธ
111
- 2. knowledge ํŒŒ์ผ๋“ค์˜ **ํƒœ๊ทธ/ํ—ค๋”**๊ฐ€ ํ•ด๋‹น ๋ณ€๊ฒฝ ์˜์—ญ๊ณผ ๊ด€๋ จ๋˜๋Š”์ง€ ํŒ๋‹จ
112
- 3. ๋งค์นญ๋œ knowledge ํŒŒ์ผ์˜ ํ•ด๋‹น ์„น์…˜์„ ์ฝ์–ด **์‹ค์ œ ๋‚ด์šฉ์ด ๋ณ€๊ฒฝ ์‚ฌํ•ญ๊ณผ ์ผ์น˜ํ•˜๋Š”์ง€** ํ™•์ธ
92
+ #### Sync ๋ชจ๋“œ
113
93
 
114
- #### Step 3-2: ๋ถˆ์ผ์น˜ ํŒ์ •
94
+ - `.claude/nexus/knowledge/` ํ•˜์œ„ ๋ชจ๋“  .md ํŒŒ์ผ์„ ์ฝ๋Š”๋‹ค (ํ•˜์œ„ ๋””๋ ‰ํ† ๋ฆฌ ํฌํ•จ, ์ œ์™ธ ๊ทœ์น™ ์—†์Œ).
95
+ - ๊ฐ ํŒŒ์ผ์—์„œ ํƒœ๊ทธ(`<!-- tags: ... -->`), ํ—ค๋” ๊ตฌ์กฐ, ์†Œ์Šค ์ฐธ์กฐ ๊ฒฝ๋กœ๋ฅผ ์ถ”์ถœํ•˜์—ฌ ์ปค๋ฒ„๋ฆฌ์ง€ ์˜์—ญ์„ ํŒŒ์•…ํ•œ๋‹ค.
96
+ - Phase 1์˜ High/Medium ๋ณ€๊ฒฝ ํŒŒ์ผ๊ณผ knowledge ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ๋Œ€์กฐํ•˜์—ฌ ๋ถˆ์ผ์น˜๋ฅผ ํŒ์ •ํ•œ๋‹ค:
115
97
 
116
- | ์œ ํ˜• | ์กฐ๊ฑด | ์˜ˆ์‹œ |
117
- |------|------|------|
118
- | **STALE** | knowledge๊ฐ€ ๊ธฐ์ˆ ํ•˜๋Š” ๋‚ด์šฉ์ด ์ฝ”๋“œ์—์„œ ๋ณ€๊ฒฝ๋จ | architecture.md์— "๋ชจ๋“ˆ 3๊ฐœ"๋ผ๊ณ  ์ ํ˜€์žˆ๋Š”๋ฐ ์‹ค์ œ๋กœ 4๊ฐœ |
119
- | **MISSING** | ์ƒˆ ๋ชจ๋“ˆ/๊ตฌ์กฐ๊ฐ€ ์ถ”๊ฐ€๋๋Š”๋ฐ ์–ด๋–ค knowledge์—๋„ ๊ธฐ๋ก ์—†์Œ | ์ƒˆ `src/auth/` ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์ถ”๊ฐ€๋์ง€๋งŒ architecture.md์— ๋ฏธ๊ธฐ์žฌ |
120
- | **ORPHAN** | knowledge๊ฐ€ ๊ธฐ์ˆ ํ•˜๋Š” ๋Œ€์ƒ์ด ์ฝ”๋“œ์—์„œ ์‚ญ์ œ๋จ | architecture.md์— `src/legacy/` ์„ค๋ช…์ด ์žˆ๋Š”๋ฐ ํ•ด๋‹น ๋””๋ ‰ํ† ๋ฆฌ ์‚ญ์ œ๋จ |
98
+ | ์œ ํ˜• | ์กฐ๊ฑด |
99
+ |------|------|
100
+ | **STALE** | knowledge๊ฐ€ ๊ธฐ์ˆ ํ•˜๋Š” ๋‚ด์šฉ์ด ์ฝ”๋“œ์—์„œ ๋ณ€๊ฒฝ๋จ |
101
+ | **MISSING** | ์ƒˆ ๋ชจ๋“ˆ/๊ตฌ์กฐ๊ฐ€ ์ถ”๊ฐ€๋๋Š”๋ฐ ์–ด๋–ค knowledge์—๋„ ๋ฏธ๊ธฐ๋ก |
102
+ | **ORPHAN** | knowledge๊ฐ€ ๊ธฐ์ˆ ํ•˜๋Š” ๋Œ€์ƒ์ด ์ฝ”๋“œ์—์„œ ์‚ญ์ œ๋จ |
121
103
 
122
- **ํ™•์‹ ์ด ์—†์œผ๋ฉด ๋ฆฌํฌํŠธ์— ํฌํ•จํ•˜๋˜ `[UNCERTAIN]` ํ‘œ์‹œ.** LLM์ด ์ถ”์ธก์œผ๋กœ ํŒ์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
104
+ ํ™•์‹ ์ด ์—†์œผ๋ฉด `[UNCERTAIN]` ํ‘œ์‹œ. ์ถ”์ธก์œผ๋กœ ํŒ์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
123
105
 
124
- #### Step 3-3: ๋ฆฌํฌํŠธ ์ถœ๋ ฅ
106
+ ๋ฆฌํฌํŠธ ํ˜•์‹:
125
107
 
126
108
  ```
127
109
  ## Sync Report
@@ -133,46 +115,42 @@ Phase 1์˜ High/Medium ๋ณ€๊ฒฝ ํŒŒ์ผ๊ณผ Phase 2์˜ knowledge ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ๋Œ€
133
115
  ### Issues Found: N
134
116
 
135
117
  #### STALE (X)
136
- - architecture.md ยง"๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ" โ€” src/auth/ ๋ชจ๋“ˆ์ด ์ถ”๊ฐ€๋์ง€๋งŒ ๋ฏธ๊ธฐ์žฌ
137
- - conventions.md ยง"๋„ค์ด๋ฐ" โ€” ํ•จ์ˆ˜ ์ ‘๋‘์‚ฌ๊ฐ€ createโ†’make๋กœ ๋ณ€๊ฒฝ๋จ
118
+ - {ํŒŒ์ผ๋ช…} ยง"{์„น์…˜}" โ€” {์ด์œ }
138
119
 
139
120
  #### MISSING (X)
140
- - ์ƒˆ ๋ชจ๋“ˆ src/payments/ โ€” ์–ด๋–ค knowledge์—๋„ ๋ฏธ๊ธฐ๋ก
121
+ - {๋Œ€์ƒ} โ€” {์ด์œ }
141
122
 
142
123
  #### ORPHAN (X)
143
- - architecture.md ยง"๋ ˆ๊ฑฐ์‹œ ๋ชจ๋“ˆ" โ€” src/legacy/ ์‚ญ์ œ๋จ
124
+ - {ํŒŒ์ผ๋ช…} ยง"{์„น์…˜}" โ€” {์ด์œ }
144
125
 
145
126
  #### UNCERTAIN (X)
146
- - architecture.md ยง"์˜์กด์„ฑ" โ€” package.json ๋ณ€๊ฒฝ๋์œผ๋‚˜ ์ฃผ์š” ์˜์กด์„ฑ ๋ณ€๊ฒฝ์ธ์ง€ ๋ถˆํ™•์‹ค
127
+ - {ํŒŒ์ผ๋ช…} ยง"{์„น์…˜}" โ€” {์ด์œ }
147
128
 
148
129
  ### No Issues
149
- - conventions.md โ€” ๊ด€๋ จ ๋ณ€๊ฒฝ ์—†์Œ
130
+ - {ํŒŒ์ผ๋ช…} โ€” ๊ด€๋ จ ๋ณ€๊ฒฝ ์—†์Œ
150
131
  ```
151
132
 
152
- ### Phase 4: Apply Fixes (์‚ฌ์šฉ์ž ์Šน์ธ ํ›„)
153
-
154
- ๋ฆฌํฌํŠธ๋ฅผ ์ œ์‹œํ•œ ๋’ค: **"์ด ๋ถˆ์ผ์น˜๋ฅผ ์ˆ˜์ •ํ• ๊นŒ์š”?"**
133
+ ### Phase 3: Apply
155
134
 
156
- ์‚ฌ์šฉ์ž๊ฐ€ ์Šน์ธํ•˜๋ฉด:
135
+ #### First Run ๋ชจ๋“œ
157
136
 
158
- #### ์ˆ˜์ • ๊ทœ์น™
137
+ ์ž๋™ ์ ์šฉ (Phase 2์—์„œ ์ด๋ฏธ ์ƒ์„ฑ๋จ). ์™„๋ฃŒ ์•ˆ๋‚ด ์ถœ๋ ฅ: "์ดˆ๊ธฐ knowledge N๊ฐœ ํŒŒ์ผ ์ƒ์„ฑ, CLAUDE.md ์Šฌ๋ฆผํ™” ์™„๋ฃŒ"
159
138
 
160
- 1. **surgical edit๋งŒ** โ€” ๋ณ€๊ฒฝ๋œ ๋ถ€๋ถ„๋งŒ ์ˆ˜์ •. ์ „์ฒด ์„น์…˜์„ ๋‹ค์‹œ ์“ฐ์ง€ ์•Š๋Š”๋‹ค
161
- 2. **๊ธฐ์กด ์Šคํƒ€์ผ ์œ ์ง€** โ€” ํ•ด๋‹น knowledge ํŒŒ์ผ์˜ ๊ธฐ์กด ํ˜•์‹(ํ…Œ์ด๋ธ”, ๋ฆฌ์ŠคํŠธ, ์ฝ”๋“œ ๋ธ”๋ก ๋“ฑ)์„ ๋”ฐ๋ฅธ๋‹ค
162
- 3. **์†Œ์Šค์— ์žˆ๋Š” ์ •๋ณด๋งŒ** โ€” ์ฝ”๋“œ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์—†๋Š” ๋‚ด์šฉ์„ ์ถ”์ธกํ•ด์„œ ์“ฐ์ง€ ์•Š๋Š”๋‹ค
163
- 4. **UNCERTAIN์€ ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š๋Š”๋‹ค** โ€” ๋ฆฌํฌํŠธ์—๋งŒ ๋‚จ๊ธฐ๊ณ  ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ํŒ๋‹จํ•˜๋„๋ก ํ•œ๋‹ค
139
+ #### Sync ๋ชจ๋“œ
164
140
 
165
- #### ์ˆ˜์ • ์ ˆ์ฐจ
141
+ ๋ฆฌํฌํŠธ ์ถœ๋ ฅ ํ›„ ์ž๋™์œผ๋กœ ์ˆ˜์ •์„ ์ ์šฉํ•œ๋‹ค.
166
142
 
167
- ๊ฐ ์ด์Šˆ๋ณ„๋กœ:
168
- 1. ๋Œ€์ƒ knowledge ํŒŒ์ผ์˜ ํ•ด๋‹น ์„น์…˜์„ Read
169
- 2. Edit์œผ๋กœ ์ตœ์†Œ ๋ฒ”์œ„ ์ˆ˜์ • ์ ์šฉ
170
- 3. MISSING์˜ ๊ฒฝ์šฐ: ๊ด€๋ จ knowledge ํŒŒ์ผ์ด ์žˆ์œผ๋ฉด ํ•ด๋‹น ํŒŒ์ผ์— ์„น์…˜ ์ถ”๊ฐ€, ์—†์œผ๋ฉด ์ƒˆ ํŒŒ์ผ ์ƒ์„ฑ์„ ์ œ์•ˆ (์‚ฌ์šฉ์ž ํ™•์ธ ํ›„)
171
- 4. ORPHAN์˜ ๊ฒฝ์šฐ: ํ•ด๋‹น ์„น์…˜/ํ•ญ๋ชฉ์„ ์‚ญ์ œ
143
+ ์ˆ˜์ • ๊ทœ์น™:
144
+ 1. **surgical edit๋งŒ** โ€” ๋ณ€๊ฒฝ๋œ ๋ถ€๋ถ„๋งŒ ์ˆ˜์ •. ์ „์ฒด ์„น์…˜์„ ์žฌ์ž‘์„ฑํ•˜์ง€ ์•Š๋Š”๋‹ค.
145
+ 2. **๊ธฐ์กด ์Šคํƒ€์ผ ์œ ์ง€** โ€” ํ•ด๋‹น knowledge ํŒŒ์ผ์˜ ํ˜•์‹(ํ…Œ์ด๋ธ”, ๋ฆฌ์ŠคํŠธ, ์ฝ”๋“œ ๋ธ”๋ก ๋“ฑ)์„ ๋”ฐ๋ฅธ๋‹ค.
146
+ 3. **์†Œ์Šค์— ์žˆ๋Š” ์ •๋ณด๋งŒ** โ€” ์ฝ”๋“œ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์—†๋Š” ๋‚ด์šฉ์„ ์ถ”์ธกํ•˜์ง€ ์•Š๋Š”๋‹ค.
147
+ 4. **UNCERTAIN์€ ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š๋Š”๋‹ค** โ€” ๋ฆฌํฌํŠธ์—๋งŒ ๋‚จ๊ธฐ๊ณ  ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ํŒ๋‹จํ•œ๋‹ค.
148
+ 5. MISSING: ๊ด€๋ จ knowledge ํŒŒ์ผ์ด ์žˆ์œผ๋ฉด ์„น์…˜ ์ถ”๊ฐ€, ์—†์œผ๋ฉด ์ƒˆ ํŒŒ์ผ ์ƒ์„ฑ.
149
+ 6. ORPHAN: ํ•ด๋‹น ์„น์…˜/ํ•ญ๋ชฉ ์‚ญ์ œ.
172
150
 
173
- #### sync-state ๊ฐฑ์‹ 
151
+ ### Phase 4: Finalize
174
152
 
175
- ๋ชจ๋“  ์ˆ˜์ • ์™„๋ฃŒ ํ›„ `.nexus/sync-state.json`์„ ๊ฐฑ์‹ ํ•œ๋‹ค:
153
+ `.nexus/sync-state.json` ๊ฐฑ์‹ :
176
154
  ```json
177
155
  {
178
156
  "lastSyncCommit": "{ํ˜„์žฌ HEAD ์ปค๋ฐ‹ ํ•ด์‹œ}",
@@ -182,11 +160,12 @@ Phase 1์˜ High/Medium ๋ณ€๊ฒฝ ํŒŒ์ผ๊ณผ Phase 2์˜ knowledge ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ๋Œ€
182
160
 
183
161
  `.nexus/` ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์—†์œผ๋ฉด ์ƒ์„ฑํ•œ๋‹ค.
184
162
 
185
- ## What Belongs in Knowledge (์žฅ๊ธฐ ๊ธฐ์–ต ๊ธฐ์ค€)
163
+ ---
186
164
 
187
- sync๊ฐ€ MISSING์„ ํŒ์ •ํ•  ๋•Œ, ๋ชจ๋“  ์ƒˆ ์ฝ”๋“œ๊ฐ€ knowledge์— ๊ธฐ๋ก๋  ํ•„์š”๋Š” ์—†๋‹ค. ์•„๋ž˜ ๊ธฐ์ค€์œผ๋กœ ํŒ๋‹จํ•œ๋‹ค:
165
+ ## What Belongs in Knowledge
188
166
 
189
167
  ### ๊ธฐ๋กํ•ด์•ผ ํ•˜๋Š” ๊ฒƒ
168
+
190
169
  - ์•„ํ‚คํ…์ฒ˜: ๋””๋ ‰ํ† ๋ฆฌ ๊ตฌ์กฐ, ๋ชจ๋“ˆ ๊ฐ„ ๊ด€๊ณ„, ๋ฐ์ดํ„ฐ ํ๋ฆ„
191
170
  - ์ปจ๋ฒค์…˜: ๋„ค์ด๋ฐ ๊ทœ์น™, ์ฝ”๋“œ ์Šคํƒ€์ผ, ํŒจํ„ด
192
171
  - ๊ธฐ์ˆ  ์Šคํƒ: ์–ธ์–ด, ํ”„๋ ˆ์ž„์›Œํฌ, ์ฃผ์š” ์˜์กด์„ฑ, ๋นŒ๋“œ/ํ…Œ์ŠคํŠธ ๋„๊ตฌ
@@ -195,18 +174,22 @@ sync๊ฐ€ MISSING์„ ํŒ์ •ํ•  ๋•Œ, ๋ชจ๋“  ์ƒˆ ์ฝ”๋“œ๊ฐ€ knowledge์— ๊ธฐ๋ก๋ 
195
174
  - ๊ฐœ๋ฐœ ์›Œํฌํ”Œ๋กœ์šฐ: ๋นŒ๋“œ, ํ…Œ์ŠคํŠธ, ๋ฐฐํฌ ๋ช…๋ น
196
175
 
197
176
  ### ๊ธฐ๋กํ•˜์ง€ ์•Š๋Š” ๊ฒƒ
177
+
198
178
  - ๊ตฌํ˜„ ๋””ํ…Œ์ผ (ํ•จ์ˆ˜ ๋‚ด๋ถ€ ๋กœ์ง) โ€” ์ฝ”๋“œ๊ฐ€ source of truth
199
179
  - API ์Šคํ‚ค๋งˆ โ€” ํƒ€์ž… ์ •์˜์—์„œ ์ง์ ‘ ํ™•์ธ ๊ฐ€๋Šฅ
200
180
  - TODO/์ง„ํ–‰ ์ƒํ™ฉ โ€” tasks.json์ด ๋‹ด๋‹น
201
181
  - ์ž๋™ ์กฐํšŒ ๊ฐ€๋Šฅํ•œ ์ •๋ณด โ€” LSP/AST๋กœ ์‹ค์‹œ๊ฐ„ ํ™•์ธ
202
182
  - ๋น„๋ฐ€ ์ •๋ณด โ€” ๋ณด์•ˆ ์œ„ํ—˜
203
183
 
204
- **ํŒ๋‹จ ํœด๋ฆฌ์Šคํ‹ฑ**: "์ด ์ •๋ณด๊ฐ€ ์—†์œผ๋ฉด ์—์ด์ „ํŠธ๊ฐ€ ์ฝ”๋“œ๋ฒ ์ด์Šค๋ฅผ ์ฒ˜์Œ ๋ณด๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋А๋‚„ ๊ฒƒ์ธ๊ฐ€?" โ†’ Yes๋ฉด MISSING์œผ๋กœ ๋ณด๊ณ .
184
+ **ํŒ๋‹จ ํœด๋ฆฌ์Šคํ‹ฑ**: "์ด ์ •๋ณด๊ฐ€ ์—†์œผ๋ฉด ์—์ด์ „ํŠธ๊ฐ€ ์ฝ”๋“œ๋ฒ ์ด์Šค๋ฅผ ์ฒ˜์Œ ๋ณด๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋А๋‚„ ๊ฒƒ์ธ๊ฐ€?" โ†’ Yes๋ฉด ๊ธฐ๋ก ๋Œ€์ƒ.
185
+
186
+ ---
205
187
 
206
188
  ## Important Constraints
207
189
 
208
- - knowledge ๋ฌธ์„œ๋งŒ ์ˆ˜์ •ํ•œ๋‹ค. ์†Œ์Šค ์ฝ”๋“œ๋Š” ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
209
- - ํ™•์‹คํ•˜์ง€ ์•Š์€ ๋ณ€๊ฒฝ์€ ๋ฆฌํฌํŠธ์— [UNCERTAIN]์œผ๋กœ ํฌํ•จํ•˜๊ณ , ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
210
- - ์†Œ์Šค ์ฝ”๋“œ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์—†๋Š” ์ •๋ณด๋ฅผ ์ถ”์ธกํ•˜์—ฌ knowledge์— ์“ฐ์ง€ ์•Š๋Š”๋‹ค.
211
- - knowledge ํŒŒ์ผ์— ์ƒˆ ์„น์…˜์„ ์ถ”๊ฐ€ํ•  ๋•Œ๋Š” ๊ธฐ์กด ํŒŒ์ผ์˜ ์Šคํƒ€์ผ/๊ตฌ์กฐ๋ฅผ ๋”ฐ๋ฅธ๋‹ค.
212
- - git์ด ์—†๋Š” ํ”„๋กœ์ ํŠธ์—์„œ๋Š” ๋™์ž‘ํ•˜์ง€ ์•Š๋Š”๋‹ค.
190
+ - knowledge ๋ฌธ์„œ๋งŒ ์ˆ˜์ •ํ•œ๋‹ค (First Run ์‹œ์—๋Š” ์ƒ์„ฑ๋„ ํฌํ•จ). ์†Œ์Šค ์ฝ”๋“œ๋Š” ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
191
+ - ํ™•์‹คํ•˜์ง€ ์•Š์€ ๋ณ€๊ฒฝ์€ [UNCERTAIN]์œผ๋กœ ๋ฆฌํฌํŠธํ•˜๊ณ  ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.
192
+ - ์†Œ์Šค์—์„œ ํ™•์ธ ๋ถˆ๊ฐ€ํ•œ ์ •๋ณด๋ฅผ ์ถ”์ธกํ•˜์—ฌ knowledge์— ์“ฐ์ง€ ์•Š๋Š”๋‹ค.
193
+ - ๊ธฐ์กด ํŒŒ์ผ ์‚ญ์ œ๋Š” `--reset` ์‹œ์—๋งŒ (์‚ฌ์šฉ์ž ํ™•์ธ ํ›„).
194
+ - git์ด ์—†๋Š” ํ”„๋กœ์ ํŠธ: First Run์€ ๊ฐ€๋Šฅ, Sync๋Š” ๋ถˆ๊ฐ€ (์•ˆ๋‚ด ํ›„ ์ข…๋ฃŒ).
195
+ - ๋น„๋ฐ€ ์ •๋ณด(API ํ‚ค ๋“ฑ)๋ฅผ knowledge์— ์ €์žฅํ•˜์ง€ ์•Š๋Š”๋‹ค.
@@ -1,194 +0,0 @@
1
- ---
2
- name: nx-init
3
- description: Onboard a project to Nexus โ€” auto-generate knowledge from existing docs.
4
- disable-model-invocation: true
5
- ---
6
- # Init
7
-
8
- Onboard Nexus into an existing project โ€” scan, triage, and restructure project knowledge for optimal context efficiency.
9
-
10
- ## Trigger
11
- - Direct invocation: `/claude-nexus:nx-init`
12
-
13
- ## What It Does
14
-
15
- Scans the existing project, triages documentation, and generates structured Nexus knowledge files โ€” replacing scattered .md files with a clean, efficient knowledge base.
16
-
17
- ```
18
- SCAN โ†’ TRIAGE โ†’ PROPOSE โ†’ GENERATE โ†’ VERIFY
19
- ```
20
-
21
- ## Prerequisites
22
-
23
- - Nexus plugin must be installed and active
24
- - `.claude/nexus/knowledge/` directory should NOT already have project-specific files (if it does, ask user if they want to re-init)
25
-
26
- ## Workflow
27
-
28
- ### Phase 1: SCAN (์ž๋™)
29
-
30
- Gather all available project context:
31
-
32
- **Project Structure:**
33
- ```
34
- - List top-level directories and their purpose (src/, test/, docs/, config files)
35
- - Identify language/framework (package.json, Cargo.toml, pyproject.toml, go.mod, etc.)
36
- - Identify build system, test framework, linter
37
- - Count files by type for scale understanding
38
- ```
39
-
40
- **Existing Documentation:**
41
- ```
42
- - CLAUDE.md (always loaded by Claude Code โ€” most critical)
43
- - README.md
44
- - .claude/ directory contents (contexts, settings, etc.)
45
- - docs/ directory if exists
46
- - Any other .md files in project root
47
- - .cursorrules, .github/copilot-instructions.md, etc. (other AI tool configs)
48
- ```
49
-
50
- **Git Context:**
51
- ```
52
- - Recent commit messages (last 20) for project activity pattern
53
- - Branch structure for workflow understanding
54
- - Contributors for team context
55
- ```
56
-
57
- Output: A structured summary of everything found.
58
-
59
- ### Phase 2: TRIAGE (์ž๋™)
60
-
61
- Classify every piece of existing documentation into 4 categories:
62
-
63
- | Category | Meaning | Action |
64
- |----------|---------|--------|
65
- | **Essential** | Architecture, conventions, decisions that agents MUST know | โ†’ `knowledge/` |
66
- | **Useful** | Tips, practices, context that helps but isn't critical | โ†’ `knowledge/` (condensed) |
67
- | **Redundant** | Info that Nexus handles better (workflow instructions, agent tips) | โ†’ Skip |
68
- | **Outdated** | Stale, auto-generated, or no longer relevant | โ†’ Skip |
69
-
70
- **Triage Rules:**
71
- - Code structure descriptions โ†’ Essential (architecture.md)
72
- - Coding conventions, style rules โ†’ Essential (conventions.md)
73
- - Architecture decisions with rationale โ†’ Essential (decisions/)
74
- - Project goals, roadmap, team context โ†’ Useful (project-context.md)
75
- - "How to use Claude" instructions โ†’ Redundant (Nexus replaces this)
76
- - Auto-memory instructions, hook configs โ†’ Redundant
77
- - Old TODO lists, resolved issues โ†’ Outdated
78
- - Generated API docs โ†’ Outdated (can be regenerated)
79
-
80
- ### Phase 3: PROPOSE (์‚ฌ์šฉ์ž ์ƒํ˜ธ์ž‘์šฉ)
81
-
82
- Present the triage result using `AskUserQuestion`:
83
-
84
- ```
85
- AskUserQuestion({
86
- questions: [
87
- {
88
- question: "CLAUDE.md ์Šฌ๋ฆผํ™” ๋ฐฉ์‹์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”.",
89
- header: "CLAUDE.md",
90
- multiSelect: false,
91
- options: [
92
- {
93
- label: "์Šฌ๋ฆผํ™” (Recommended)",
94
- description: "ํ•ต์‹ฌ ์ง€์‹œ์‚ฌํ•ญ๋งŒ ์œ ์ง€, ๋‚˜๋จธ์ง€๋Š” knowledge/๋กœ ์ด๋™",
95
- preview: "## ๊ธฐ์กด CLAUDE.md (150์ค„)\nํ•ต์‹ฌ ์ง€์‹œ: 15์ค„\nํ”„๋กœ์ ํŠธ ์ง€์‹: 100์ค„ โ†’ knowledge/๋กœ\n์ค‘๋ณต/๋ถˆํ•„์š”: 35์ค„ โ†’ ์ œ๊ฑฐ\n\n## ์ƒˆ CLAUDE.md (20์ค„)\n- ํ•ต์‹ฌ ์ง€์‹œ์‚ฌํ•ญ (15์ค„)\n- Nexus ์—ฐ๋™ ์•ˆ๋‚ด (5์ค„)"
96
- },
97
- {
98
- label: "์œ ์ง€ + ์ถ”๊ฐ€๋งŒ",
99
- description: "๊ธฐ์กด CLAUDE.md ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š๊ณ  Nexus ์—ฐ๋™๋งŒ ์ถ”๊ฐ€"
100
- },
101
- {
102
- label: "์™„์ „ ๊ต์ฒด",
103
- description: "CLAUDE.md๋ฅผ Nexus ์ „์šฉ์œผ๋กœ ๊ต์ฒด (๊ธฐ์กด์€ ๋ฐฑ์—…)"
104
- }
105
- ]
106
- },
107
- {
108
- question: "knowledge ํŒŒ์ผ๋กœ ์ด๋™ํ•  ํ•ญ๋ชฉ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”.",
109
- header: "Knowledge",
110
- multiSelect: true,
111
- options: [
112
- { label: "architecture.md", description: "์ฝ”๋“œ ๊ตฌ์กฐ, ๊ธฐ์ˆ  ์Šคํƒ, ์ฃผ์š” ์˜์กด์„ฑ" },
113
- { label: "conventions.md", description: "์ฝ”๋”ฉ ๊ทœ์น™, ๋„ค์ด๋ฐ, ํŒจํ„ด" },
114
- { label: "project-context.md", description: "ํ”„๋กœ์ ํŠธ ๋ชฉ์ , ํ˜„์žฌ ์ƒํƒœ, ํŒ€ ์ปจํ…์ŠคํŠธ" }
115
- ]
116
- }
117
- ]
118
- })
119
- ```
120
-
121
- Note: The actual options should be populated based on SCAN/TRIAGE results, not hardcoded. The above is a template.
122
-
123
- ### Phase 4: GENERATE (์ž๋™)
124
-
125
- Based on user approval:
126
-
127
- 1. **Backup existing CLAUDE.md:**
128
- ```
129
- cp CLAUDE.md .claude/nexus/knowledge/original-claude-md.md
130
- ```
131
-
132
- 2. **Generate knowledge files** in `.claude/nexus/knowledge/`:
133
- ```
134
- architecture.md:
135
- - # {Project Name} Architecture
136
- - ## Tech Stack (language, framework, build, test)
137
- - ## Directory Structure (with purpose annotations)
138
- - ## Key Dependencies
139
- - ## Entry Points
140
-
141
- conventions.md:
142
- - # Coding Conventions
143
- - ## Style (from existing linter/prettier config + CLAUDE.md rules)
144
- - ## Naming Patterns (from code analysis)
145
- - ## Testing Conventions
146
- - ## Git/PR Conventions
147
-
148
- project-context.md:
149
- - # Project Context
150
- - ## Purpose (from README/CLAUDE.md)
151
- - ## Current State (from git activity)
152
- - ## Team Context (if available)
153
- - ## Key Decisions (extracted from docs)
154
- ```
155
-
156
- 3. **Slim down CLAUDE.md** (if user chose slimming):
157
- ```markdown
158
- # {Project Name}
159
-
160
- {ํ•ต์‹ฌ ์ง€์‹œ์‚ฌํ•ญ โ€” ๊ธฐ์กด์—์„œ ์ถ”์ถœ, 5-15์ค„}
161
-
162
- ## Nexus
163
- - ํ”„๋กœ์ ํŠธ ์ง€์‹: `.claude/nexus/knowledge/` ์ฐธ์กฐ
164
- - ์•„์นด์ด๋ธŒ: `.nexus/archives/` (๋กœ์ปฌ, ์„ธ์…˜ ๋…๋ฆฝ)
165
- - ์›๋ณธ CLAUDE.md: `.claude/nexus/knowledge/original-claude-md.md`
166
- ```
167
-
168
- 4. **Add `.claude/nexus/` to git** if not already tracked.
169
-
170
- ### Phase 5: VERIFY (์ž๋™)
171
-
172
- Quick validation:
173
- 1. All generated knowledge files are valid markdown
174
- 2. `nx_knowledge_read` can read them successfully
175
- 3. CLAUDE.md is valid and not empty
176
- 4. Original CLAUDE.md backup exists
177
- 5. Report: "Init ์™„๋ฃŒ. knowledge N๊ฐœ ํŒŒ์ผ, CLAUDE.md X์ค„ โ†’ Y์ค„"
178
-
179
- ## Important Constraints
180
-
181
- - NEVER delete existing files without user approval โ€” always backup first
182
- - If `.claude/nexus/knowledge/` already has files, ask before overwriting
183
- - If CLAUDE.md has critical instructions (API keys, deploy commands), keep them in CLAUDE.md
184
- - Don't extract secrets or credentials into knowledge files
185
- - If the project has no CLAUDE.md, create a minimal one
186
-
187
- ## Re-init
188
-
189
- If nexus knowledge already exists, `[init]` should:
190
- 1. Detect existing knowledge files
191
- 2. Ask: "๊ธฐ์กด knowledge๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์‹œ ์ดˆ๊ธฐํ™”ํ• ๊นŒ์š”?"
192
- 3. If yes: backup existing knowledge to `.claude/nexus/knowledge/backup-{date}/`
193
- 4. Re-run full workflow
194
-