@handsupmin/gc-tree 0.1.3 → 0.1.4

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.
package/README.ko.md CHANGED
@@ -1,107 +1,101 @@
1
1
  # gc-tree
2
2
 
3
- AI 코딩 도구를 위한 브랜치 기반 글로벌 컨텍스트 레이어.
3
+ <div align="center">
4
+
5
+ <img src="./logo.png" alt="gc-tree 로고" width="260" />
6
+
7
+ ### 프로젝트 밖까지 이어지는 글로벌 컨텍스트.
8
+
9
+ 기존 AI 도구 위에 오래 가는, 재사용 가능한 컨텍스트 레이어를 얹어보세요.
10
+ Git 브랜치 다루듯 여러 컨텍스트를 나눠 관리할 수 있습니다.
11
+
12
+ [![npm version](https://img.shields.io/npm/v/%40handsupmin%2Fgc-tree)](https://www.npmjs.com/package/@handsupmin/gc-tree)
13
+ [![npm downloads](https://img.shields.io/npm/dm/%40handsupmin%2Fgc-tree)](https://www.npmjs.com/package/@handsupmin/gc-tree)
14
+ [![GitHub stars](https://img.shields.io/github/stars/handsupmin/gc-tree)](https://github.com/handsupmin/gc-tree/stargazers)
15
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/handsupmin/gc-tree/blob/main/LICENSE)
16
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)
4
17
 
5
18
  [English](https://github.com/handsupmin/gc-tree/blob/main/README.md) | [한국어](https://github.com/handsupmin/gc-tree/blob/main/README.ko.md) | [简体中文](https://github.com/handsupmin/gc-tree/blob/main/README.zh.md) | [日本語](https://github.com/handsupmin/gc-tree/blob/main/README.ja.md) | [Español](https://github.com/handsupmin/gc-tree/blob/main/README.es.md)
6
19
 
7
- ## 소개
20
+ </div>
8
21
 
9
- `gctree`는 AI 코딩 도구를 위한 가벼운 **Global Context Tree**입니다.
10
- 장기적으로 유지해야 하는 컨텍스트를 파일 기반으로 명시적으로 관리할 수 있게 해주며, 브랜치 단위로 분리해서 기존 워크플로에 자연스럽게 붙일 수 있습니다.
22
+ 실제 업무가 여러 레포, 제품, 고객사, 워크플로에 걸쳐 있는 개발자를 위해 만들었습니다.
11
23
 
12
- 하나의 `AGENTS.md`, `CLAUDE.md`, 혹은 짧은 프롬프트 파일만으로는 부족해질 `gctree`는 다음을 도와줍니다.
24
+ `gc-tree`는 AI 코딩 도구에 **레포 바깥 레벨의 재사용 가능한 컨텍스트 레이어**를 붙여줍니다. 오래 가는 맥락은 유지하고, 관련 있는 레포에서만 적용하고, 지금 레포와 무관할 때는 조용히 빠집니다.
13
25
 
14
- - 제품, 고객사, 업무 트랙별로 컨텍스트를 분리하기
15
- - 숨겨진 메모리 대신 markdown 기반의 source-of-truth 문서로 관리하기
16
- - 작은 인덱스와 summary-first 문서 구조로 필요한 컨텍스트를 빠르게 찾기
17
- - 선호하는 LLM CLI를 통해 온보딩과 장기 업데이트를 진행하기
18
- - 특정 gc-branch가 실제로 관련 있는 레포에만 적용되게 하기
26
+ ---
19
27
 
20
- ## 간단 특징
28
+ ## gc-tree인가요?
21
29
 
22
- - **Provider 기반 온보딩**
23
- `gctree init`은 `claude-code`, `codex`, `both` 중 어떤 provider 모드를 쓸지 묻고, 이어서 응답 언어를 고르게 한 뒤, 그 선택을 저장하고 필요한 명령 표면을 스캐폴딩한 다음 기본 `main` gc-branch 온보딩을 시작합니다.
24
- - **레포 범위 인식 gc-branch**
25
- `~/.gctree/branch-repo-map.json`을 통해 하나의 gc-branch를 특정 레포 집합에만 연결할 수 있습니다. 예를 들어 A는 B/C/D에만 적용하고 F에서는 무시하게 만들 수 있습니다.
26
- - **인터랙티브 범위 가드**
27
- `gctree resolve`가 현재 레포가 아직 이 gc-branch에 매핑되지 않았다고 판단하면, 이번만 진행할지 / 항상 사용할지 / 여기서는 무시할지를 물어볼 수 있습니다.
28
- - **Summary-first 문서 구조**
29
- 도구가 먼저 짧은 요약을 읽고, 필요할 때만 본문을 확장해서 읽을 수 있습니다.
30
- - **가이드형 장기 업데이트**
31
- JSON 파일을 직접 만들지 않아도 같은 provider 흐름으로 글로벌 컨텍스트를 갱신할 수 있습니다.
30
+ AI 에이전트를 진짜 실무에 쓰기 시작하면 repo-local context만으로는 금방 한계가 옵니다.
32
31
 
33
- ## 설치 빠른 시작
32
+ 작업이 여러 레포와 여러 워크스트림으로 퍼지기 시작하면 보통 이런 문제가 생깁니다.
34
33
 
35
- ### npm으로 설치
34
+ - 장기 컨텍스트가 프롬프트 안으로 계속 밀려 들어감
35
+ - 상관없는 컨텍스트가 다른 레포까지 새어 나감
36
+ - 새 세션을 열 때마다 같은 설명을 또 해야 함
37
+ - 고객사나 제품 지식이 채팅 기록 속에만 숨어 있음
38
+ - 작업 전환 때마다 사람 머리로 컨텍스트 스위칭을 직접 해야 함
36
39
 
37
- ```bash
38
- npm install -g @handsupmin/gc-tree
39
- ```
40
+ `gc-tree`는 Codex, Claude Code 같은 AI 코딩 도구를 이미 깊게 쓰고 있고, 이제는 컨텍스트 관리까지 수작업으로 하고 싶지 않은 사람을 위한 도구입니다.
40
41
 
41
- 글로벌 설치 없이 한 번만 실행하려면:
42
+ ---
42
43
 
43
- ```bash
44
- npx @handsupmin/gc-tree init
45
- ```
44
+ ## 바로 얻는 것들
46
45
 
47
- - **패키지 이름:** `@handsupmin/gc-tree`
48
- - **CLI 명령어:** `gctree`
49
- - **요구 사항:** Node.js 20+
50
- 소스 기반 개발은 [docs/local-development.md](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.md)를 참고하세요.
46
+ - **여러 개의 장기 컨텍스트**
47
+ 제품, 고객사, 워크스트림마다 컨텍스트 레인을 따로 유지할 수 있습니다.
51
48
 
52
- ### 빠른 시작
49
+ - **레포 기준의 관련성 관리**
50
+ 어떤 컨텍스트가 어떤 레포에만 적용되어야 하는지 명확하게 묶을 수 있습니다.
53
51
 
54
- #### 1) gc-tree 초기화
52
+ - **스마트한 범위 가드**
53
+ 아직 매핑되지 않은 레포에 들어가면, 이번만 계속할지 / 여기서는 항상 쓸지 / 여기서는 무시할지를 고를 수 있습니다.
55
54
 
56
- ```bash
57
- gctree init
58
- ```
55
+ - **가이드형 온보딩과 업데이트**
56
+ Codex, Claude Code, 혹은 둘 다를 써서 컨텍스트를 처음 만들고 계속 다듬을 수 있습니다.
59
57
 
60
- 명령은 다음을 수행합니다.
58
+ - **summary-first markdown 지식 구조**
59
+ 숨겨진 메모리가 아니라 파일에 남기고, 도구는 먼저 짧은 요약부터 읽게 할 수 있습니다.
61
60
 
62
- - `~/.gctree` 생성
63
- - 기본 `main` gc-branch 생성
64
- - 사용할 provider 모드(`claude-code`, `codex`, `both`) 선택
65
- - `both`를 고르면 이번 온보딩을 어느 provider로 시작할지 한 번 더 선택
66
- - 사용할 언어(`English`, `Korean`, 또는 직접 입력한 언어) 선택
67
- - provider 모드, 실제 온보딩 provider, 언어를 `~/.gctree/settings.json`에 저장
68
- - 현재 환경에 맞는 명령 표면 스캐폴딩
69
- - `main`이 비어 있으면 활성 gc-branch에 대한 가이드형 온보딩 시작
61
+ ---
70
62
 
71
- #### 2) 현재 컨텍스트 조회
63
+ ## 설치 & 빠른 시작
72
64
 
73
65
  ```bash
74
- gctree resolve --query "auth token rotation"
66
+ npm install -g @handsupmin/gc-tree
67
+ gctree init
75
68
  ```
76
69
 
77
- 만약 현재 레포가 gc-branch의 매핑 범위 밖이라면, `gctree`는 다음 중 하나를 고르게 할 수 있습니다.
70
+ 정도면 시작 준비는 끝입니다.
71
+ 그다음부터는 원래 하던 방식대로 개발하면 됩니다. `gc-tree`가 평소 워크플로 바깥에서 글로벌 컨텍스트만 붙여줍니다.
78
72
 
79
- 1. 이번만 진행
80
- 2. 레포에서 항상 이 gc-branch 사용
81
- 3. 이 레포에서는 이 gc-branch 무시
82
-
83
- 2번 또는 3번을 고르면 `~/.gctree/branch-repo-map.json`이 갱신됩니다.
73
+ - **CLI 명령어:** `gctree`
74
+ - **요구 사항:** Node.js 20+
84
75
 
85
- #### 3) 별도 컨텍스트가 필요하면 새 gc-branch 생성
76
+ 소스 기반 개발은 [docs/local-development.ko.md](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.ko.md)를 참고하세요.
86
77
 
87
- ```bash
88
- gctree checkout -b client-b
89
- ```
78
+ ---
90
79
 
91
- `checkout -b`는 **새로운 빈 gc-branch**를 만듭니다. 기존 브랜치 문서를 복사하지 않습니다.
80
+ ## 자주 쓰는 흐름
92
81
 
93
- #### 4) 비어 있는 gc-branch를 온보딩
82
+ ### 작업 흐름이 갈라지면 컨텍스트 만들기
94
83
 
95
84
  ```bash
85
+ gctree checkout -b client-b
96
86
  gctree onboard
97
87
  ```
98
88
 
99
- #### 5) 나중에 장기 컨텍스트 업데이트
89
+ 고객사, 제품, 마이그레이션, 특정 이니셔티브처럼 별도 맥락이 필요한 일은 gc-branch를 따로 파두면 됩니다.
90
+
91
+ ### 나중에 장기 컨텍스트 업데이트하기
100
92
 
101
93
  ```bash
102
94
  gctree update-global-context
103
95
  ```
104
96
 
97
+ 작업이 쌓이면 활성 gc-branch에 장기 컨텍스트를 덧붙이세요.
98
+
105
99
  짧은 별칭:
106
100
 
107
101
  ```bash
@@ -109,33 +103,102 @@ gctree update-gc
109
103
  gctree ugc
110
104
  ```
111
105
 
112
- 만약 실제 작업을 하다 보니 어떤 레포가 현재 gc-branch에 포함되어야 할 것 같다면, 자연스러운 흐름은 이렇습니다.
106
+ ### 필요할 때만 컨텍스트 불러오기
107
+
108
+ ```bash
109
+ gctree resolve --query "auth token rotation"
110
+ ```
113
111
 
114
- 1. 먼저 레포를 branch repo map에 포함시키고
115
- 2. 그 다음 `gctree update-global-context`로 이 레포가 어떤 역할을 하는지, 왜 중요한지 같은 장기 컨텍스트를 추가
112
+ 지금 필요한 순간에만 관련 맥락을 다시 꺼내 쓰면 됩니다.
116
113
 
117
- #### 6) 다시 온보딩하려면 먼저 gc-branch 리셋
114
+ ---
115
+
116
+ ## 왜 자연스럽게 느껴질까요?
117
+
118
+ **Git 브랜치처럼 여러 컨텍스트를 유지하되, Git 브랜치처럼 매번 신경 쓸 필요는 없습니다.**
119
+
120
+ 다음처럼 컨텍스트를 따로 나눌 수 있습니다.
121
+
122
+ - 고객사
123
+ - 제품 라인
124
+ - 플랫폼 팀
125
+ - 함께 움직이는 백엔드 + 프론트엔드 스택
126
+ - 일시적인 이니셔티브나 마이그레이션
127
+
128
+ 그리고 익숙한 브랜치 느낌의 명령으로 오갈 수 있습니다.
118
129
 
119
130
  ```bash
120
- gctree reset-gc-branch --branch client-b --yes
131
+ gctree checkout -b client-b
132
+ gctree checkout main
121
133
  ```
122
134
 
123
- ### 런타임에서 보이는 provider 명령
135
+ 하지만 Git과 달리, 전환을 사용자가 계속 수동으로 챙길 필요는 없습니다.
136
+
137
+ 현재 들어와 있는 레포가 활성 컨텍스트의 범위 밖이라면, `gc-tree`는 그 컨텍스트를 관련 없는 것으로 판단하고 조용히 비켜날 수 있습니다. 덕분에 상관없는 컨텍스트가 엉뚱한 세션으로 새지 않습니다.
138
+
139
+ 즉, 여러 개의 장기 컨텍스트를 오래 들고 가면서도 매번 모든 세션에 다 끌고 들어갈 필요가 없습니다.
140
+
141
+ ---
142
+
143
+ ## 현실적인 워크플로
144
+
145
+ 예를 들어 이런 식으로 일한다고 해봅시다.
146
+
147
+ - 공용 플랫폼 레포 하나
148
+ - 고객사 레포 두 개
149
+ - 사내 툴링 레포 하나
150
+
151
+ `gc-tree`가 없으면 새 AI 세션을 열 때마다 다시 설명해야 합니다.
152
+
153
+ - 지금 어느 고객사 얘기인지
154
+ - 어떤 레포들이 한 묶음인지
155
+ - 여기서 중요한 워크플로가 뭔지
156
+ - 지금은 어떤 컨텍스트가 오히려 방해가 되는지
157
+
158
+ `gc-tree`가 있으면 레인별로 컨텍스트를 따로 유지하고, 세션을 바꿔도 재사용하고, repo scope 규칙으로 불필요한 컨텍스트 유입도 막을 수 있습니다.
159
+
160
+ 결국 핵심은 이겁니다.
161
+
162
+ > 프롬프트를 더 많이 저장하는 게 아니라,
163
+ > **일의 단위에 맞는 컨텍스트를 올바른 레벨에서 관리하는 것.**
164
+
165
+ ---
166
+
167
+ ## 핵심 개념
168
+
169
+ - **gc-branch**
170
+ 제품, 고객사, 워크스트림, 도메인 하나를 위한 장기 컨텍스트 레인입니다.
171
+
172
+ - **repo scope**
173
+ 어떤 레포에서 이 컨텍스트를 적용할지 결정하는 규칙입니다.
174
+
175
+ - **provider-guided flow**
176
+ JSON을 손으로 쓰는 대신, 선호하는 AI 코딩 도구를 통해 온보딩과 업데이트를 진행하는 방식입니다.
177
+
178
+ - **context tree**
179
+ 내부적으로 `gc-tree`는 브랜치 단위의 파일 기반 지식 트리로 컨텍스트를 관리합니다.
180
+ 사용자가 체감하는 가치는 결국 프로젝트 밖까지 이어지는 재사용 가능한 컨텍스트입니다.
181
+
182
+ ---
183
+
184
+ ## 런타임에서 보이는 provider 명령
124
185
 
125
186
  스캐폴딩 이후 런타임에서 보이는 명령은 다음과 같습니다.
126
187
 
127
188
  - **Codex:** `$gc-onboard`, `$gc-update-global-context`
128
189
  - **Claude Code:** `/gc-onboard`, `/gc-update-global-context`
129
190
 
130
- 이 명령들은 항상 현재 활성 gc-branch가 무엇인지 먼저 밝히고, 사용자가 명시적으로 바꾸라고 하지 않는 한 저장된 언어를 끝까지 유지하면서 컨텍스트를 수집하거나 업데이트해야 합니다.
191
+ 이 명령들은 항상 현재 활성 gc-branch가 무엇인지 먼저 밝히고, 사용자가 명시적으로 바꾸라고 하지 않는 한 저장된 언어를 유지한 장기 컨텍스트를 수집하거나 업데이트해야 합니다.
192
+
193
+ ---
131
194
 
132
- ### 핵심 명령 한눈에 보기
195
+ ## 핵심 명령 한눈에 보기
133
196
 
134
197
  | 목적 | 명령 |
135
198
  | --- | --- |
136
199
  | gc-tree 초기화 및 provider 선택 | `gctree init` |
137
200
  | 현재 gc-branch 확인 | `gctree status` |
138
- | 현재 컨텍스트 검색 | `gctree resolve --query "..."` |
201
+ | 활성 컨텍스트 검색 | `gctree resolve --query "..."` |
139
202
  | 레포 범위 규칙 확인 | `gctree repo-map` |
140
203
  | gc-branch에 레포 포함/제외 설정 | `gctree set-repo-scope --branch <name> --include` / `--exclude` |
141
204
  | gc-branch 생성/전환 | `gctree checkout <branch>` / `gctree checkout -b <branch>` |
@@ -144,6 +207,8 @@ gctree reset-gc-branch --branch client-b --yes
144
207
  | 다시 온보딩하기 전 gc-branch 초기화 | `gctree reset-gc-branch --branch <name> --yes` |
145
208
  | 다른 환경에 수동 스캐폴딩 | `gctree scaffold --host codex --target /path/to/repo` |
146
209
 
210
+ ---
211
+
147
212
  ## 문서
148
213
 
149
214
  자세한 문서는 [`docs/`](https://github.com/handsupmin/gc-tree/tree/main/docs) 아래에 정리되어 있습니다.
@@ -157,10 +222,14 @@ gctree reset-gc-branch --branch client-b --yes
157
222
  - **로컬 실행방법** — [`docs/local-development.ko.md`](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.ko.md)
158
223
  의존성 설치, 로컬 CLI 실행, 변경 검증 방법을 설명합니다.
159
224
 
225
+ ---
226
+
160
227
  ## 기여하기
161
228
 
162
229
  기여는 언제든 환영합니다. 개발 흐름과 PR 체크리스트는 영어 문서인 [CONTRIBUTING.md](https://github.com/handsupmin/gc-tree/blob/main/CONTRIBUTING.md)를 참고해주세요.
163
230
 
231
+ ---
232
+
164
233
  ## 라이선스
165
234
 
166
235
  MIT. 자세한 내용은 [`LICENSE`](https://github.com/handsupmin/gc-tree/blob/main/LICENSE)를 참고하세요.
package/README.md CHANGED
@@ -1,107 +1,101 @@
1
1
  # gc-tree
2
2
 
3
- Branch-aware global context for AI coding tools.
3
+ <div align="center">
4
+
5
+ <img src="./logo.png" alt="gc-tree logo" width="260" />
6
+
7
+ ### Global context, beyond the project.
8
+
9
+ Attach durable, reusable context to your existing AI tools.
10
+ Manage multiple contexts like Git branches.
11
+
12
+ [![npm version](https://img.shields.io/npm/v/%40handsupmin%2Fgc-tree)](https://www.npmjs.com/package/@handsupmin/gc-tree)
13
+ [![npm downloads](https://img.shields.io/npm/dm/%40handsupmin%2Fgc-tree)](https://www.npmjs.com/package/@handsupmin/gc-tree)
14
+ [![GitHub stars](https://img.shields.io/github/stars/handsupmin/gc-tree)](https://github.com/handsupmin/gc-tree/stargazers)
15
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/handsupmin/gc-tree/blob/main/LICENSE)
16
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)
4
17
 
5
18
  [English](https://github.com/handsupmin/gc-tree/blob/main/README.md) | [한국어](https://github.com/handsupmin/gc-tree/blob/main/README.ko.md) | [简体中文](https://github.com/handsupmin/gc-tree/blob/main/README.zh.md) | [日本語](https://github.com/handsupmin/gc-tree/blob/main/README.ja.md) | [Español](https://github.com/handsupmin/gc-tree/blob/main/README.es.md)
6
19
 
7
- ## Introduction
20
+ </div>
8
21
 
9
- `gctree` is a lightweight **Global Context Tree** for AI coding tools.
10
- It gives long-lived context a reusable, file-backed home that stays explicit, branch-aware, and easy to plug into existing workflows.
22
+ Built for developers whose real work spans **multiple repos, products, clients, and workflows**.
11
23
 
12
- When a single `AGENTS.md`, `CLAUDE.md`, or prompt snippet is no longer enough, `gctree` helps you:
24
+ `gc-tree` gives AI coding tools a reusable context layer **above the repo level**. Keep long-lived context across sessions, scope it to the right repos, and let `gc-tree` stay out of the way when the current repo is unrelated.
13
25
 
14
- - separate context by product, client, or workstream
15
- - keep source-of-truth knowledge in markdown instead of hidden memory
16
- - resolve the active context quickly with a slim index and summary-first docs
17
- - onboard and update durable context through your preferred LLM CLI provider
18
- - limit a gc-branch to the repositories where it actually applies
26
+ ---
19
27
 
20
- ## Key Features
28
+ ## Why gc-tree?
21
29
 
22
- - **Provider-driven onboarding**
23
- `gctree init` asks which provider mode you want (`claude-code`, `codex`, or `both`), then asks which language to use for responses, saves both choices, scaffolds the right command surface, and starts guided onboarding for the default `main` gc-branch.
24
- - **Repo-aware gc-branch scope**
25
- `gctree` can map a gc-branch to specific repositories through `~/.gctree/branch-repo-map.json`, so one branch can apply to B/C/D while being ignored in F.
26
- - **Interactive scope guard**
27
- If `gctree resolve` runs in a repo that is not yet mapped to the current gc-branch, it can ask whether to continue once, always use this gc-branch here, or ignore it here.
28
- - **Summary-first documentation**
29
- Let tools read the short version first and expand only when they need more detail.
30
- - **Guided durable updates**
31
- Reuse the same provider-driven flow to update context without hand-authoring JSON files.
30
+ If you use AI agents seriously, repo-local context stops being enough.
32
31
 
33
- ## Install & Quick Start
32
+ Once your work spans multiple repos and workstreams, the usual setup starts to break:
34
33
 
35
- ### Install from npm
34
+ - durable context gets stuffed into prompts
35
+ - unrelated context leaks into the wrong repo
36
+ - every new session needs the same onboarding again
37
+ - client or product knowledge lives in hidden chat history
38
+ - switching workstreams means manually switching mental context too
36
39
 
37
- ```bash
38
- npm install -g @handsupmin/gc-tree
39
- ```
40
+ `gc-tree` is for the people who already use Codex, Claude Code, and other AI coding tools heavily — and want context management to stop being another manual workflow.
40
41
 
41
- Or run it once without a global install:
42
+ ---
42
43
 
43
- ```bash
44
- npx @handsupmin/gc-tree init
45
- ```
44
+ ## What you get
46
45
 
47
- - **Package name:** `@handsupmin/gc-tree`
48
- - **CLI command:** `gctree`
49
- - **Requirements:** Node.js 20+
50
- For source-based development details, see [docs/local-development.md](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.md).
46
+ - **Multiple durable contexts**
47
+ Keep separate context lanes for different products, clients, or workstreams.
51
48
 
52
- ### Quick Start
49
+ - **Repo-scoped relevance**
50
+ Map each context to the repos where it actually belongs.
53
51
 
54
- #### 1) Initialize gc-tree
52
+ - **Smart scope guard**
53
+ If you enter a repo that is not mapped yet, `gc-tree` can ask whether to continue once, always use this context here, or ignore it here.
55
54
 
56
- ```bash
57
- gctree init
58
- ```
55
+ - **Guided onboarding and updates**
56
+ Use Codex, Claude Code, or both to onboard and maintain context over time.
59
57
 
60
- This command:
58
+ - **Summary-first markdown knowledge**
59
+ Store reusable context in files, not hidden memory, and let tools read the short version first.
61
60
 
62
- - creates `~/.gctree`
63
- - creates the default `main` gc-branch
64
- - asks which provider mode you want to use (`claude-code`, `codex`, or `both`)
65
- - if you choose `both`, asks which provider should start onboarding now
66
- - asks which language the workflow should use (`English`, `Korean`, or a custom language)
67
- - saves provider mode, onboarding provider, and language in `~/.gctree/settings.json`
68
- - scaffolds the current environment for the selected provider mode
69
- - launches guided onboarding for the active gc-branch when `main` is still empty
61
+ ---
70
62
 
71
- #### 2) Resolve the active context
63
+ ## Install & quick start
72
64
 
73
65
  ```bash
74
- gctree resolve --query "auth token rotation"
66
+ npm install -g @handsupmin/gc-tree
67
+ gctree init
75
68
  ```
76
69
 
77
- If the current repo is outside the mapped scope for the chosen gc-branch, `gctree` can ask whether to:
70
+ That is enough to get started.
71
+ After that, keep working the way you already do — `gc-tree` adds a reusable global context lane around your normal workflow.
78
72
 
79
- 1. continue once
80
- 2. always use this gc-branch for this repo
81
- 3. ignore this gc-branch for this repo
82
-
83
- Choosing 2 or 3 updates `~/.gctree/branch-repo-map.json`.
73
+ - **CLI command:** `gctree`
74
+ - **Requirements:** Node.js 20+
84
75
 
85
- #### 3) Create another gc-branch when you need a separate context tree
76
+ For source-based development, see [docs/local-development.md](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.md).
86
77
 
87
- ```bash
88
- gctree checkout -b client-b
89
- ```
78
+ ---
90
79
 
91
- `checkout -b` creates a **new empty gc-branch**. It does not copy existing branch docs.
80
+ ## Common moves
92
81
 
93
- #### 4) Onboard that empty gc-branch through the configured provider
82
+ ### Create a new context when a workstream deserves its own lane
94
83
 
95
84
  ```bash
85
+ gctree checkout -b client-b
96
86
  gctree onboard
97
87
  ```
98
88
 
99
- #### 5) Make a durable update later
89
+ When a client, product, migration, or initiative deserves its own durable lane, give it its own gc-branch.
90
+
91
+ ### Update durable context later
100
92
 
101
93
  ```bash
102
94
  gctree update-global-context
103
95
  ```
104
96
 
97
+ Refresh the active gc-branch as the work evolves.
98
+
105
99
  Short aliases:
106
100
 
107
101
  ```bash
@@ -109,18 +103,85 @@ gctree update-gc
109
103
  gctree ugc
110
104
  ```
111
105
 
112
- If a repo turns out to belong to the current gc-branch after real work, the natural flow is:
106
+ ### Resolve context when you need it
107
+
108
+ ```bash
109
+ gctree resolve --query "auth token rotation"
110
+ ```
111
+
112
+ Pull relevant context back into the current moment when you want it.
113
+
114
+ ---
115
+
116
+ ## Why it feels natural
117
+
118
+ **Keep multiple contexts like Git branches — without babysitting them like Git branches.**
113
119
 
114
- 1. allow that repo in the branch repo map
115
- 2. then run `gctree update-global-context` to add durable context about what that repo is and why it matters
120
+ You can create separate contexts for:
116
121
 
117
- #### 6) Re-onboard only after resetting a gc-branch
122
+ - a client
123
+ - a product line
124
+ - a platform team
125
+ - a shared backend + frontend stack
126
+ - a temporary initiative or migration
127
+
128
+ Then switch between them with familiar branch-like commands:
118
129
 
119
130
  ```bash
120
- gctree reset-gc-branch --branch client-b --yes
131
+ gctree checkout -b client-b
132
+ gctree checkout main
121
133
  ```
122
134
 
123
- ### Provider-facing commands inside the runtime
135
+ But unlike Git, you do **not** have to manually manage that switch all the time.
136
+
137
+ If the repo you are in is outside the scope of the current context, `gc-tree` can detect that and treat the context as irrelevant instead of leaking it into the wrong session.
138
+
139
+ That means you can keep multiple long-lived contexts around without dragging unrelated context into every tool session.
140
+
141
+ ---
142
+
143
+ ## A realistic workflow
144
+
145
+ You work across:
146
+
147
+ - one shared platform repo
148
+ - two client repos
149
+ - one internal tooling repo
150
+
151
+ Without `gc-tree`, every AI session has to be re-taught:
152
+
153
+ - which client this is
154
+ - which repos belong together
155
+ - which workflows matter here
156
+ - which context is irrelevant right now
157
+
158
+ With `gc-tree`, you can keep separate contexts for each lane, reuse them across sessions, and let repo-scope rules prevent irrelevant context from showing up where it should not.
159
+
160
+ This is the real job to be done:
161
+
162
+ > not “store more prompt text,”
163
+ > but **manage the right context at the right level of work**.
164
+
165
+ ---
166
+
167
+ ## Core concepts
168
+
169
+ - **gc-branch**
170
+ A durable context lane for one product, client, workstream, or domain.
171
+
172
+ - **repo scope**
173
+ Rules that decide which repos a context should apply to.
174
+
175
+ - **provider-guided flow**
176
+ Use your preferred AI coding tool to onboard and update context instead of hand-authoring JSON.
177
+
178
+ - **context tree**
179
+ Under the hood, `gc-tree` organizes context as branch-aware, file-backed knowledge.
180
+ The “tree” is the implementation model; the user-facing benefit is reusable context beyond the project.
181
+
182
+ ---
183
+
184
+ ## Provider-facing commands inside the runtime
124
185
 
125
186
  After scaffolding, the visible commands are:
126
187
 
@@ -129,20 +190,24 @@ After scaffolding, the visible commands are:
129
190
 
130
191
  Those commands should always mention the current active gc-branch before gathering or updating durable context, and they should keep using the saved workflow language unless the user explicitly asks to switch.
131
192
 
132
- ### Core commands at a glance
133
-
134
- | Goal | Command |
135
- | --- | --- |
136
- | Initialize gc-tree and choose a provider | `gctree init` |
137
- | Confirm the active gc-branch | `gctree status` |
138
- | Search the active context | `gctree resolve --query "..."` |
139
- | Show repo-scope rules | `gctree repo-map` |
140
- | Explicitly include/exclude a repo for a gc-branch | `gctree set-repo-scope --branch <name> --include` / `--exclude` |
141
- | Create or switch gc-branches | `gctree checkout <branch>` / `gctree checkout -b <branch>` |
142
- | Guided onboarding for an empty gc-branch | `gctree onboard` |
143
- | Guided durable update for the active gc-branch | `gctree update-global-context` / `gctree update-gc` / `gctree ugc` |
144
- | Reset a gc-branch before re-onboarding | `gctree reset-gc-branch --branch <name> --yes` |
145
- | Scaffold another environment manually | `gctree scaffold --host codex --target /path/to/repo` |
193
+ ---
194
+
195
+ ## Core commands at a glance
196
+
197
+ | Goal | Command |
198
+ | ------------------------------------------------- | ------------------------------------------------------------------ |
199
+ | Initialize gc-tree and choose a provider | `gctree init` |
200
+ | Confirm the active gc-branch | `gctree status` |
201
+ | Search the active context | `gctree resolve --query "..."` |
202
+ | Show repo-scope rules | `gctree repo-map` |
203
+ | Explicitly include/exclude a repo for a gc-branch | `gctree set-repo-scope --branch <name> --include` / `--exclude` |
204
+ | Create or switch gc-branches | `gctree checkout <branch>` / `gctree checkout -b <branch>` |
205
+ | Guided onboarding for an empty gc-branch | `gctree onboard` |
206
+ | Guided durable update for the active gc-branch | `gctree update-global-context` / `gctree update-gc` / `gctree ugc` |
207
+ | Reset a gc-branch before re-onboarding | `gctree reset-gc-branch --branch <name> --yes` |
208
+ | Scaffold another environment manually | `gctree scaffold --host codex --target /path/to/repo` |
209
+
210
+ ---
146
211
 
147
212
  ## Documentation
148
213
 
@@ -157,10 +222,14 @@ Detailed docs live in the [`docs/`](https://github.com/handsupmin/gc-tree/tree/m
157
222
  - **Local development** — [`docs/local-development.md`](https://github.com/handsupmin/gc-tree/blob/main/docs/local-development.md)
158
223
  Learn how to run the CLI locally and verify changes before contributing.
159
224
 
225
+ ---
226
+
160
227
  ## Contribution
161
228
 
162
229
  Contributions are welcome. See [CONTRIBUTING.md](https://github.com/handsupmin/gc-tree/blob/main/CONTRIBUTING.md) for the development workflow and pull request checklist.
163
230
 
231
+ ---
232
+
164
233
  ## License
165
234
 
166
235
  MIT. See [`LICENSE`](https://github.com/handsupmin/gc-tree/blob/main/LICENSE).