@handsupmin/gc-tree 0.2.0 → 0.2.1
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.es.md +60 -59
- package/README.ja.md +60 -59
- package/README.ko.md +62 -61
- package/README.md +61 -60
- package/README.zh.md +62 -61
- package/docs/concept.es.md +45 -33
- package/docs/concept.ja.md +41 -29
- package/docs/concept.ko.md +48 -36
- package/docs/concept.md +13 -1
- package/docs/concept.zh.md +48 -36
- package/docs/local-development.es.md +44 -22
- package/docs/local-development.ja.md +40 -18
- package/docs/local-development.ko.md +47 -25
- package/docs/local-development.md +27 -5
- package/docs/local-development.zh.md +27 -5
- package/docs/principles.es.md +39 -26
- package/docs/principles.ja.md +26 -13
- package/docs/principles.ko.md +40 -27
- package/docs/principles.md +15 -2
- package/docs/principles.zh.md +42 -29
- package/docs/usage.es.md +98 -50
- package/docs/usage.ja.md +71 -23
- package/docs/usage.ko.md +100 -52
- package/docs/usage.md +51 -3
- package/docs/usage.zh.md +95 -47
- package/package.json +3 -1
package/README.zh.md
CHANGED
|
@@ -36,6 +36,39 @@
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
+
## 安装与快速开始
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g @handsupmin/gc-tree
|
|
43
|
+
gctree init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`gctree init` 会引导你:
|
|
47
|
+
|
|
48
|
+
1. 选择 provider:`claude-code`、`codex` 或 `both`
|
|
49
|
+
2. 在当前仓库安装集成文件
|
|
50
|
+
3. 为 `main` gc-branch 完成引导式 onboarding
|
|
51
|
+
|
|
52
|
+
之后,AI 工具会自动学会在规划或实现前调用 `gctree resolve`。
|
|
53
|
+
|
|
54
|
+
- **CLI:** `gctree`
|
|
55
|
+
- **要求:** Node.js 20+
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 适合哪些人
|
|
60
|
+
|
|
61
|
+
如果以下几条符合你的情况,gc-tree 会很适合你:
|
|
62
|
+
|
|
63
|
+
- 工作横跨**多个仓库**(单体仓库团队、平台 + 客户仓库、后端 + 前端技术栈)
|
|
64
|
+
- 同一周内要在**多个产品或客户**之间来回切换
|
|
65
|
+
- 每次开 AI 会话都要**重复解释相同的上下文**
|
|
66
|
+
- 希望 AI 工具不只了解当前文件,还能理解**编码规范、架构和领域知识**
|
|
67
|
+
|
|
68
|
+
如果你只在一个仓库、一个产品里工作,不需要这个工具。`CLAUDE.md` 或 `.cursorrules` 就够了。
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
39
72
|
## gc-tree 做什么
|
|
40
73
|
|
|
41
74
|
`gc-tree` 工作在**仓库之上**。它把上下文存储为结构化的 Markdown 文件,让 AI 工具在每次会话前自动拉取相关内容。
|
|
@@ -64,34 +97,21 @@ AI 工具拿到的是正确的上下文——不是整个知识库,而是恰
|
|
|
64
97
|
|
|
65
98
|
---
|
|
66
99
|
|
|
67
|
-
## 适合哪些人
|
|
68
|
-
|
|
69
|
-
如果以下几条符合你的情况,gc-tree 会很适合你:
|
|
70
|
-
|
|
71
|
-
- 工作横跨**多个仓库**(单体仓库团队、平台 + 客户仓库、后端 + 前端技术栈)
|
|
72
|
-
- 同一周内要在**多个产品或客户**之间来回切换
|
|
73
|
-
- 每次开 AI 会话都要**重复解释相同的上下文**
|
|
74
|
-
- 希望 AI 工具不只了解当前文件,还能理解**编码规范、架构和领域知识**
|
|
75
|
-
|
|
76
|
-
如果你只在一个仓库、一个产品里工作,不需要这个工具。`CLAUDE.md` 或 `.cursorrules` 就够了。
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
100
|
## 和 CLAUDE.md 或 cursor rules 有什么区别?
|
|
81
101
|
|
|
82
102
|
`CLAUDE.md` 很好用——在单个仓库里。
|
|
83
103
|
|
|
84
104
|
一旦你有了多个仓库、客户或工作线:
|
|
85
105
|
|
|
86
|
-
|
|
|
87
|
-
|
|
88
|
-
| 作用范围
|
|
89
|
-
| 持久化方式
|
|
90
|
-
| 切换上下文
|
|
91
|
-
| 相关性过滤
|
|
92
|
-
| 初始化方式
|
|
93
|
-
| 支持 Codex
|
|
94
|
-
| 支持 Claude Code | ✅
|
|
106
|
+
| | `CLAUDE.md` / cursor rules | `gc-tree` |
|
|
107
|
+
| ---------------- | -------------------------- | -------------------------- |
|
|
108
|
+
| 作用范围 | 单个仓库 | 多个仓库,一套上下文 |
|
|
109
|
+
| 持久化方式 | 仓库内的文件 | 存储在仓库外,跨会话复用 |
|
|
110
|
+
| 切换上下文 | 手动编辑文件 | `gctree checkout client-b` |
|
|
111
|
+
| 相关性过滤 | 全部或全无 | 只注入匹配的文档(约 4%) |
|
|
112
|
+
| 初始化方式 | 手写 | 由 AI 工具引导完成 |
|
|
113
|
+
| 支持 Codex | ✅ | ✅ |
|
|
114
|
+
| 支持 Claude Code | ✅ | ✅ |
|
|
95
115
|
|
|
96
116
|
---
|
|
97
117
|
|
|
@@ -99,13 +119,13 @@ AI 工具拿到的是正确的上下文——不是整个知识库,而是恰
|
|
|
99
119
|
|
|
100
120
|
基于真实内部文档测试(4 份 Notion 导出,中英文混合查询):
|
|
101
121
|
|
|
102
|
-
| 指标
|
|
103
|
-
|
|
104
|
-
| Recall——相关查询找到正确文档的比例
|
|
105
|
-
| Precision——无关查询返回空结果的比例
|
|
106
|
-
| F1 分数
|
|
107
|
-
| 每次查询注入的 token 占总上下文的比例 | **约 4%**
|
|
108
|
-
| 支持中英文混合查询
|
|
122
|
+
| 指标 | 结果 |
|
|
123
|
+
| ------------------------------------- | ----------------- |
|
|
124
|
+
| Recall——相关查询找到正确文档的比例 | **100%**(16/16) |
|
|
125
|
+
| Precision——无关查询返回空结果的比例 | **80%**(4/5) |
|
|
126
|
+
| F1 分数 | **88.9%** |
|
|
127
|
+
| 每次查询注入的 token 占总上下文的比例 | **约 4%** |
|
|
128
|
+
| 支持中英文混合查询 | ✅ |
|
|
109
129
|
|
|
110
130
|
---
|
|
111
131
|
|
|
@@ -133,25 +153,6 @@ gctree resolve --query 'NestJS DTO plainToInstance'
|
|
|
133
153
|
|
|
134
154
|
---
|
|
135
155
|
|
|
136
|
-
## 安装与快速开始
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
npm install -g @handsupmin/gc-tree
|
|
140
|
-
gctree init
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
`gctree init` 会引导你:
|
|
144
|
-
1. 选择 provider:`claude-code`、`codex` 或 `both`
|
|
145
|
-
2. 在当前仓库安装集成文件
|
|
146
|
-
3. 为 `main` gc-branch 完成引导式 onboarding
|
|
147
|
-
|
|
148
|
-
之后,AI 工具会自动学会在规划或实现前调用 `gctree resolve`。
|
|
149
|
-
|
|
150
|
-
- **CLI:** `gctree`
|
|
151
|
-
- **要求:** Node.js 20+
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
156
|
## 常用操作
|
|
156
157
|
|
|
157
158
|
### 为不同工作线创建独立上下文
|
|
@@ -214,19 +215,19 @@ gctree set-repo-scope --branch client-b --exclude # 排除当前仓库
|
|
|
214
215
|
|
|
215
216
|
## 核心命令
|
|
216
217
|
|
|
217
|
-
| 目标
|
|
218
|
-
|
|
219
|
-
| 初始化 gc-tree 并选择 provider
|
|
220
|
-
| 确认当前激活的 gc-branch
|
|
221
|
-
| 搜索当前上下文
|
|
222
|
-
| 创建或切换 gc-branch
|
|
223
|
-
| 列出所有 gc-branch
|
|
224
|
-
| 对空 gc-branch 进行引导式 onboarding | `gctree onboard`
|
|
225
|
-
| 对当前 gc-branch 进行引导式更新
|
|
226
|
-
| 查看仓库范围规则
|
|
227
|
-
| 为 gc-branch 包含或排除当前仓库
|
|
228
|
-
| 重新 onboarding 前重置 gc-branch
|
|
229
|
-
| 在新环境中安装 scaffold
|
|
218
|
+
| 目标 | 命令 |
|
|
219
|
+
| ------------------------------------ | --------------------------------------------------------------- |
|
|
220
|
+
| 初始化 gc-tree 并选择 provider | `gctree init` |
|
|
221
|
+
| 确认当前激活的 gc-branch | `gctree status` |
|
|
222
|
+
| 搜索当前上下文 | `gctree resolve --query "..."` |
|
|
223
|
+
| 创建或切换 gc-branch | `gctree checkout <branch>` / `gctree checkout -b <branch>` |
|
|
224
|
+
| 列出所有 gc-branch | `gctree branches` |
|
|
225
|
+
| 对空 gc-branch 进行引导式 onboarding | `gctree onboard` |
|
|
226
|
+
| 对当前 gc-branch 进行引导式更新 | `gctree update-global-context` / `gctree ugc` |
|
|
227
|
+
| 查看仓库范围规则 | `gctree repo-map` |
|
|
228
|
+
| 为 gc-branch 包含或排除当前仓库 | `gctree set-repo-scope --branch <name> --include` / `--exclude` |
|
|
229
|
+
| 重新 onboarding 前重置 gc-branch | `gctree reset-gc-branch --branch <name> --yes` |
|
|
230
|
+
| 在新环境中安装 scaffold | `gctree scaffold --host codex --target /path/to/repo` |
|
|
230
231
|
|
|
231
232
|
---
|
|
232
233
|
|
package/docs/concept.es.md
CHANGED
|
@@ -4,49 +4,61 @@
|
|
|
4
4
|
|
|
5
5
|
## Resumen
|
|
6
6
|
|
|
7
|
-
`gctree` es una capa
|
|
7
|
+
`gctree` es una capa de contexto global ligera para herramientas de programación con IA. Mantiene el contexto de larga duración en documentos markdown explícitos fuera de cualquier repositorio individual, permite cambiar entre gc-branches y puede limitar cada gc-branch a los repositorios donde realmente corresponde.
|
|
8
8
|
|
|
9
9
|
## Qué es `gctree`
|
|
10
10
|
|
|
11
11
|
`gctree` es una CLI para gestionar contexto global reutilizable.
|
|
12
|
-
Está pensada para
|
|
12
|
+
Está pensada para personas y equipos que quieren que el contexto importante persista entre repositorios, sesiones y herramientas sin convertirse en memoria oculta.
|
|
13
13
|
|
|
14
|
-
En lugar de
|
|
14
|
+
En lugar de dispersar conocimiento clave entre archivos de prompt, notas locales de cada repositorio e instrucciones puntuales, `gctree` le da a ese conocimiento un lugar estable y respaldado por archivos donde vivir.
|
|
15
15
|
|
|
16
16
|
## Qué problema resuelve
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Muchas configuraciones de programación con IA empiezan siendo pequeñas:
|
|
19
19
|
|
|
20
20
|
- un `AGENTS.md`
|
|
21
21
|
- un `CLAUDE.md`
|
|
22
|
-
- un archivo de prompt
|
|
23
|
-
-
|
|
22
|
+
- un archivo de prompt local en el repositorio
|
|
23
|
+
- algunas notas copiadas en los prompts cuando se necesitan
|
|
24
24
|
|
|
25
|
-
Eso funciona
|
|
25
|
+
Eso funciona un tiempo. Luego llega el trabajo real y comienzan a aparecer las fisuras:
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
- el trabajo para clientes
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
- el contexto
|
|
32
|
-
- una
|
|
27
|
+
- diferentes productos necesitan contexto diferente
|
|
28
|
+
- el trabajo para clientes necesita un aislamiento limpio
|
|
29
|
+
- las guías reutilizables deberían vivir fuera de cualquier repositorio individual
|
|
30
|
+
- múltiples herramientas deberían poder leer la misma fuente de verdad
|
|
31
|
+
- el contexto de larga duración debería cambiar mediante un flujo explícito y revisable
|
|
32
|
+
- una persona puede tener muchas sesiones abiertas en varios repositorios al mismo tiempo
|
|
33
33
|
|
|
34
|
-
`gctree` existe para
|
|
34
|
+
`gctree` existe para gestionar esa capa de forma limpia.
|
|
35
|
+
|
|
36
|
+
## Cómo funciona resolve
|
|
37
|
+
|
|
38
|
+
Cuando una herramienta llama a `gctree resolve --query "..."`, gc-tree puntúa cada documento de la gc-branch activa contra la consulta usando coincidencia de palabras clave con soporte Unicode (las consultas en coreano, CJK e idiomas mixtos funcionan igual que en inglés). Las coincidencias en el título cuentan el doble que las coincidencias en el cuerpo.
|
|
39
|
+
|
|
40
|
+
La herramienta recibe únicamente los documentos que coinciden — título, resumen y fragmento — no la base de conocimiento completa. En la práctica, esto significa que se inyecta aproximadamente el 4 % del contexto total por consulta. La herramienta lee el documento completo solo cuando el resumen no es suficiente.
|
|
41
|
+
|
|
42
|
+
Esto mantiene el uso de tokens bajo sin ocultar nada. Todo el contexto sigue siendo explícito, respaldado por archivos y revisable.
|
|
43
|
+
|
|
44
|
+
## Compatibilidad con proveedores
|
|
45
|
+
|
|
46
|
+
`gctree` funciona tanto con Claude Code como con Codex. Ambos proveedores usan el mismo almacén de contexto subyacente. Haz scaffold una vez y ambas herramientas podrán hacer resolve, onboard y actualizar el contexto desde la misma gc-branch.
|
|
35
47
|
|
|
36
48
|
## Límite de alcance
|
|
37
49
|
|
|
38
|
-
`gctree` no
|
|
50
|
+
`gctree` intencionalmente no es:
|
|
39
51
|
|
|
40
|
-
- un orquestador
|
|
52
|
+
- un orquestador de entregas de solicitud a commit
|
|
41
53
|
- un sistema de memoria oculta
|
|
42
|
-
- un
|
|
54
|
+
- un entorno de colaboración en el navegador
|
|
43
55
|
- un producto de base de conocimiento de propósito general
|
|
44
56
|
|
|
45
|
-
Se
|
|
57
|
+
Se centra en un único trabajo: gestionar gc-branches de contexto global reutilizable y actualizaciones duraderas explícitas.
|
|
46
58
|
|
|
47
59
|
## Modelo de archivos
|
|
48
60
|
|
|
49
|
-
Un directorio
|
|
61
|
+
Un directorio de inicio típico tiene este aspecto:
|
|
50
62
|
|
|
51
63
|
```text
|
|
52
64
|
~/.gctree/
|
|
@@ -60,22 +72,22 @@ Un directorio personal típico queda así:
|
|
|
60
72
|
docs/
|
|
61
73
|
```
|
|
62
74
|
|
|
63
|
-
- `HEAD`
|
|
64
|
-
- `settings.json`
|
|
65
|
-
- `branch-repo-map.json`
|
|
66
|
-
- `branch.json`
|
|
67
|
-
- `index.md` es el punto de entrada compacto para herramientas
|
|
68
|
-
- `docs/` contiene los documentos markdown que
|
|
75
|
+
- `HEAD` registra la gc-branch activa predeterminada.
|
|
76
|
+
- `settings.json` almacena el modo de proveedor, el proveedor de onboarding elegido para el lanzamiento en tiempo de ejecución y el idioma de trabajo preferido.
|
|
77
|
+
- `branch-repo-map.json` almacena qué repositorios están incluidos o excluidos para cada gc-branch.
|
|
78
|
+
- `branch.json` almacena metadatos ligeros de la gc-branch.
|
|
79
|
+
- `index.md` es el punto de entrada compacto para las herramientas — se mantiene por debajo de 2000 caracteres para que cargue rápido sin consumir un presupuesto significativo de tokens.
|
|
80
|
+
- `docs/` contiene los documentos markdown que son la fuente de verdad.
|
|
69
81
|
|
|
70
|
-
## Comportamiento
|
|
82
|
+
## Comportamiento según el repositorio
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
Si la
|
|
84
|
+
Una gc-branch no tiene que aplicarse en todos lados.
|
|
85
|
+
Si la branch `A` solo es relevante para los repositorios `B`, `C` y `D`, `gctree` puede registrar eso en `branch-repo-map.json`.
|
|
74
86
|
|
|
75
|
-
Cuando `gctree resolve` se ejecuta
|
|
87
|
+
Cuando `gctree resolve` se ejecuta en otro repositorio como `F`, puede:
|
|
76
88
|
|
|
77
|
-
- continuar
|
|
78
|
-
- usar siempre
|
|
79
|
-
- ignorar
|
|
89
|
+
- continuar una vez
|
|
90
|
+
- usar siempre esa gc-branch en `F`
|
|
91
|
+
- ignorar esa gc-branch en `F`
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
Esto hace que gc-tree sea mucho más seguro para usuarios avanzados que mantienen muchas sesiones paralelas abiertas en repositorios no relacionados.
|
package/docs/concept.ja.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# コンセプト
|
|
2
2
|
|
|
3
3
|
[English](concept.md) | [한국어](concept.ko.md) | [简体中文](concept.zh.md) | [日本語](concept.ja.md) | [Español](concept.es.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 概要
|
|
6
6
|
|
|
7
|
-
`gctree` は AI
|
|
7
|
+
`gctree` は AI コーディングツール向けの軽量なグローバルコンテキスト層です。長期的なコンテキストを単一のリポジトリの外に置いた明示的なマークダウンドキュメントで管理し、gc-branch を切り替えながら文脈を使い分けられるようにし、各 gc-branch が本当に関係するリポジトリにだけ影響するよう制御できます。
|
|
8
8
|
|
|
9
9
|
## `gctree` とは何か
|
|
10
10
|
|
|
11
|
-
`gctree`
|
|
12
|
-
|
|
11
|
+
`gctree` は再利用可能なグローバルコンテキストを管理するための CLI です。
|
|
12
|
+
複数のリポジトリ・セッション・ツールをまたいでも重要なコンテキストが生き残るようにしつつ、それを隠れたメモリにはしない、という前提で作られています。
|
|
13
13
|
|
|
14
14
|
大事な知識がプロンプトファイル、リポジトリ内メモ、場当たり的な指示に散らばる代わりに、`gctree` はその知識に安定したファイルベースの置き場所を与えます。
|
|
15
15
|
|
|
@@ -22,31 +22,43 @@
|
|
|
22
22
|
- リポジトリ内の短いプロンプトファイルが 1 つ
|
|
23
23
|
- 必要なときだけプロンプトに貼り付けるメモが少し
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
しばらくはそれで回ります。けれど実務が積み重なると、同じやり方はすぐ苦しくなります。
|
|
26
26
|
|
|
27
27
|
- プロダクトごとに必要なコンテキストが違う
|
|
28
28
|
- クライアント案件は互いに分離しておく必要がある
|
|
29
29
|
- 再利用したいガイダンスは単一リポジトリの外に置きたい
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- 1
|
|
30
|
+
- 複数ツールが同じ信頼できる情報源を読めるべき
|
|
31
|
+
- 長期コンテキストは明示的でレビュー可能な流れで変更すべき
|
|
32
|
+
- 1 人のユーザーが複数のリポジトリで多くのセッションを同時に開くことがある
|
|
33
33
|
|
|
34
|
-
`gctree`
|
|
34
|
+
`gctree` は、まさにそのレイヤーをきれいに扱うために存在します。
|
|
35
|
+
|
|
36
|
+
## resolve の仕組み
|
|
37
|
+
|
|
38
|
+
ツールが `gctree resolve --query "..."` を呼び出すと、gc-tree はアクティブな gc-branch 内のすべてのドキュメントをクエリに対してスコアリングします。スコアリングには Unicode 対応のキーワードマッチングを使用しており、韓国語・CJK 文字・多言語混在クエリも英語と同様に機能します。タイトルの一致はボディの一致の 2 倍の重みを持ちます。
|
|
39
|
+
|
|
40
|
+
ツールが受け取るのは、マッチしたドキュメントのタイトル・サマリー・抜粋のみです。ナレッジベース全体は返されません。実際には 1 クエリあたり総コンテキストの約 4% が注入されます。サマリーだけでは不足する場合にのみ、ツールはフルドキュメントを読み込みます。
|
|
41
|
+
|
|
42
|
+
これによりトークン使用量を低く抑えながら、何も隠しません。すべてのコンテキストは引き続き明示的で、ファイルに裏付けられており、レビュー可能です。
|
|
43
|
+
|
|
44
|
+
## プロバイダーサポート
|
|
45
|
+
|
|
46
|
+
`gctree` は Claude Code と Codex の両方で動作します。どちらのプロバイダーも同じ基盤のコンテキストストアを使用します。一度 scaffold すれば、両方のツールが同じ gc-branch から resolve・onboard・コンテキスト更新を行えます。
|
|
35
47
|
|
|
36
48
|
## スコープの境界
|
|
37
49
|
|
|
38
|
-
`gctree`
|
|
50
|
+
`gctree` は意図的に以下のものではありません。
|
|
39
51
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
52
|
+
- リクエストからコミットまでの配信オーケストレーター
|
|
53
|
+
- 隠れたメモリシステム
|
|
54
|
+
- ブラウザ上のコラボレーションランタイム
|
|
43
55
|
- 汎用ナレッジベース製品
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
一つの仕事に集中します:再利用可能なグローバルコンテキストブランチの管理と、明示的な永続的更新です。
|
|
46
58
|
|
|
47
59
|
## ファイルモデル
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
典型的なホームディレクトリの構成は次のとおりです。
|
|
50
62
|
|
|
51
63
|
```text
|
|
52
64
|
~/.gctree/
|
|
@@ -60,22 +72,22 @@
|
|
|
60
72
|
docs/
|
|
61
73
|
```
|
|
62
74
|
|
|
63
|
-
- `HEAD`
|
|
64
|
-
- `settings.json`
|
|
65
|
-
- `branch-repo-map.json`
|
|
66
|
-
- `branch.json`
|
|
67
|
-
- `index.md`
|
|
68
|
-
- `docs/`
|
|
75
|
+
- `HEAD` はフォールバックとしてアクティブな gc-branch を追跡します。
|
|
76
|
+
- `settings.json` はプロバイダーモード、ランタイム起動時に選択したオンボーディングプロバイダー、および優先ワークフロー言語を保存します。
|
|
77
|
+
- `branch-repo-map.json` は各 gc-branch に対してどのリポジトリを含むか・除外するかを保存します。
|
|
78
|
+
- `branch.json` は軽量な gc-branch メタデータを保存します。
|
|
79
|
+
- `index.md` はツール向けのコンパクトなエントリーポイントです。高速に読み込めるよう 2000 文字以内に収められており、トークンバジェットを大きく消費しません。
|
|
80
|
+
- `docs/` は信頼できる情報源となるマークダウンドキュメントを格納します。
|
|
69
81
|
|
|
70
|
-
##
|
|
82
|
+
## リポジトリを意識した動作
|
|
71
83
|
|
|
72
|
-
gc-branch
|
|
73
|
-
|
|
84
|
+
gc-branch はすべての場所に適用する必要はありません。
|
|
85
|
+
ブランチ `A` がリポジトリ `B`・`C`・`D` にのみ関係する場合、`gctree` はそれを `branch-repo-map.json` に記録できます。
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
別のリポジトリ `F` で `gctree resolve` が実行された場合、次のいずれかを選択できます。
|
|
76
88
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
89
|
+
- 一度だけ続行する
|
|
90
|
+
- `F` でも常にその gc-branch を使用する
|
|
79
91
|
- `F` ではその gc-branch を無視する
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
これにより、無関係な多数のリポジトリで並行セッションを維持するヘビーユーザーにとって、gc-tree はより安全に使えます。
|
package/docs/concept.ko.md
CHANGED
|
@@ -4,49 +4,61 @@
|
|
|
4
4
|
|
|
5
5
|
## 요약
|
|
6
6
|
|
|
7
|
-
`gctree`는 AI 코딩 도구를 위한
|
|
7
|
+
`gctree`는 AI 코딩 도구를 위한 경량 전역 컨텍스트 레이어입니다. 오래 유지되는 컨텍스트를 특정 저장소 바깥에 명시적인 마크다운 문서로 관리하고, gc-branch 간 전환을 지원하며, 각 gc-branch를 실제로 관련된 저장소로만 범위를 제한할 수 있습니다.
|
|
8
8
|
|
|
9
|
-
## `gctree
|
|
9
|
+
## `gctree`란 무엇인가
|
|
10
10
|
|
|
11
|
-
`gctree`는 재사용 가능한
|
|
12
|
-
|
|
11
|
+
`gctree`는 재사용 가능한 전역 컨텍스트를 관리하기 위한 CLI입니다.
|
|
12
|
+
중요한 컨텍스트를 저장소, 세션, 도구를 가로질러 유지하되, 숨겨진 메모리처럼 블랙박스에 갇히지 않게 하려는 개인과 팀을 위해 만들어졌습니다.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
핵심 지식을 프롬프트 파일, 저장소 로컬 메모, 그때그때 추가하는 지시사항에 흩어놓는 대신, `gctree`는 그 지식이 안정적으로 파일 기반으로 자리잡을 수 있는 공간을 제공합니다.
|
|
15
15
|
|
|
16
|
-
## 어떤 문제를
|
|
16
|
+
## 어떤 문제를 해결하는가
|
|
17
17
|
|
|
18
|
-
많은 AI 코딩 환경은
|
|
18
|
+
많은 AI 코딩 환경은 작게 시작합니다:
|
|
19
19
|
|
|
20
20
|
- `AGENTS.md` 하나
|
|
21
21
|
- `CLAUDE.md` 하나
|
|
22
|
-
-
|
|
23
|
-
- 필요할
|
|
22
|
+
- 저장소 로컬 프롬프트 파일 하나
|
|
23
|
+
- 필요할 때 프롬프트에 복사해 넣는 메모 몇 가지
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
한동안은 잘 작동합니다. 그러다 실제 업무가 쌓이면서 문제가 드러나기 시작합니다:
|
|
26
26
|
|
|
27
|
-
- 제품마다
|
|
28
|
-
-
|
|
29
|
-
- 재사용 가능한
|
|
30
|
-
- 여러 도구가
|
|
31
|
-
-
|
|
32
|
-
- 한 사람이
|
|
27
|
+
- 제품마다 서로 다른 컨텍스트가 필요함
|
|
28
|
+
- 클라이언트 업무는 명확한 격리가 필요함
|
|
29
|
+
- 재사용 가능한 지침은 특정 저장소 바깥에 존재해야 함
|
|
30
|
+
- 여러 도구가 동일한 정보 소스를 읽을 수 있어야 함
|
|
31
|
+
- 오래 유지되는 컨텍스트는 명시적이고 검토 가능한 흐름으로만 변경되어야 함
|
|
32
|
+
- 한 사람이 여러 저장소에 걸쳐 많은 세션을 동시에 열어둘 수 있음
|
|
33
33
|
|
|
34
|
-
`gctree`는 바로
|
|
34
|
+
`gctree`는 바로 이 레이어를 깔끔하게 처리하기 위해 만들어졌습니다.
|
|
35
|
+
|
|
36
|
+
## resolve가 동작하는 방식
|
|
37
|
+
|
|
38
|
+
도구가 `gctree resolve --query "..."`를 호출하면, gc-tree는 활성 gc-branch 내의 모든 문서를 쿼리와 대조해 유니코드를 지원하는 키워드 매칭으로 점수를 매깁니다. 한국어, CJK 문자, 혼합 언어 쿼리도 영어와 동일하게 처리됩니다. 제목 매칭은 본문 매칭보다 두 배의 가중치를 가집니다.
|
|
39
|
+
|
|
40
|
+
도구는 전체 지식 베이스가 아닌 매칭된 문서만 받습니다 — 제목, 요약, 발췌문 형태로. 실제로 이는 쿼리당 전체 컨텍스트의 약 4%만 주입됨을 의미합니다. 도구는 요약만으로 충분하지 않을 때만 전체 문서를 읽습니다.
|
|
41
|
+
|
|
42
|
+
이를 통해 아무것도 숨기지 않으면서 토큰 사용량을 낮게 유지합니다. 모든 컨텍스트는 여전히 명시적이고, 파일 기반이며, 검토 가능합니다.
|
|
43
|
+
|
|
44
|
+
## 프로바이더 지원
|
|
45
|
+
|
|
46
|
+
`gctree`는 Claude Code와 Codex 모두에서 동작합니다. 두 프로바이더는 동일한 기반 컨텍스트 저장소를 사용합니다. 한 번만 scaffold하면 두 도구 모두 같은 gc-branch에서 resolve, onboard, 컨텍스트 업데이트를 수행할 수 있습니다.
|
|
35
47
|
|
|
36
48
|
## 범위 경계
|
|
37
49
|
|
|
38
|
-
`gctree`는 의도적으로
|
|
50
|
+
`gctree`는 의도적으로 다음을 지향하지 않습니다:
|
|
39
51
|
|
|
40
|
-
-
|
|
52
|
+
- 요청-커밋 배달 오케스트레이터
|
|
41
53
|
- 숨겨진 메모리 시스템
|
|
42
|
-
- 브라우저
|
|
54
|
+
- 브라우저 협업 런타임
|
|
43
55
|
- 범용 지식 베이스 제품
|
|
44
56
|
|
|
45
|
-
`gctree`는 한 가지
|
|
57
|
+
`gctree`는 한 가지 역할에 집중합니다: 재사용 가능한 전역 컨텍스트 브랜치 관리와 명시적인 지속 업데이트.
|
|
46
58
|
|
|
47
59
|
## 파일 모델
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
일반적인 홈 디렉토리 구조는 다음과 같습니다:
|
|
50
62
|
|
|
51
63
|
```text
|
|
52
64
|
~/.gctree/
|
|
@@ -60,22 +72,22 @@
|
|
|
60
72
|
docs/
|
|
61
73
|
```
|
|
62
74
|
|
|
63
|
-
- `HEAD`는
|
|
64
|
-
- `settings.json
|
|
65
|
-
- `branch-repo-map.json
|
|
66
|
-
- `branch.json
|
|
67
|
-
- `index.md`는
|
|
68
|
-
- `docs
|
|
75
|
+
- `HEAD`는 폴백 활성 gc-branch를 추적합니다.
|
|
76
|
+
- `settings.json`은 프로바이더 모드, 런타임 실행 시 선택된 온보딩 프로바이더, 선호 워크플로우 언어를 저장합니다.
|
|
77
|
+
- `branch-repo-map.json`은 각 gc-branch에 대해 어떤 저장소가 포함되거나 제외되는지 저장합니다.
|
|
78
|
+
- `branch.json`은 gc-branch의 경량 메타데이터를 저장합니다.
|
|
79
|
+
- `index.md`는 도구를 위한 간결한 진입점으로, 2000자 이하로 유지되어 상당한 토큰 예산을 소비하지 않고 빠르게 로드됩니다.
|
|
80
|
+
- `docs/`는 정보 소스가 되는 마크다운 문서들을 담습니다.
|
|
69
81
|
|
|
70
|
-
##
|
|
82
|
+
## 저장소 인식 동작
|
|
71
83
|
|
|
72
|
-
gc-branch
|
|
73
|
-
|
|
84
|
+
gc-branch가 모든 곳에 적용될 필요는 없습니다.
|
|
85
|
+
브랜치 `A`가 저장소 `B`, `C`, `D`에만 관련된다면, `gctree`는 이를 `branch-repo-map.json`에 기록할 수 있습니다.
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
다른 저장소 `F`에서 `gctree resolve`를 실행하면 다음 중 하나를 선택할 수 있습니다:
|
|
76
88
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- `F
|
|
89
|
+
- 한 번만 계속 진행
|
|
90
|
+
- `F`에서 항상 해당 gc-branch 사용
|
|
91
|
+
- `F`에서 해당 gc-branch 무시
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
이를 통해 관련 없는 여러 저장소에 걸쳐 많은 병렬 세션을 유지하는 헤비 유저에게도 gc-tree가 훨씬 안전하게 동작합니다.
|
package/docs/concept.md
CHANGED
|
@@ -33,6 +33,18 @@ That works for a while. Then real work shows up and the cracks start to show:
|
|
|
33
33
|
|
|
34
34
|
`gctree` exists to handle that layer cleanly.
|
|
35
35
|
|
|
36
|
+
## How resolve works
|
|
37
|
+
|
|
38
|
+
When a tool calls `gctree resolve --query "..."`, gc-tree scores every document in the active gc-branch against the query using keyword matching with Unicode support (Korean, CJK, and mixed-language queries work the same as English). Title matches count twice as much as body matches.
|
|
39
|
+
|
|
40
|
+
The tool receives only the matching documents — title, summary, and excerpt — not the full knowledge base. In practice this means roughly 4% of total context is injected per query. The tool reads the full document only when the summary is not enough.
|
|
41
|
+
|
|
42
|
+
This keeps token use low without hiding anything. All context is still explicit, file-backed, and reviewable.
|
|
43
|
+
|
|
44
|
+
## Provider support
|
|
45
|
+
|
|
46
|
+
`gctree` works with both Claude Code and Codex. Both providers use the same underlying context store. Scaffold once and both tools can resolve, onboard, and update context from the same gc-branch.
|
|
47
|
+
|
|
36
48
|
## Scope boundary
|
|
37
49
|
|
|
38
50
|
`gctree` is intentionally not:
|
|
@@ -64,7 +76,7 @@ A typical home directory looks like this:
|
|
|
64
76
|
- `settings.json` stores the provider mode, the onboarding provider chosen for runtime launch, and the preferred workflow language.
|
|
65
77
|
- `branch-repo-map.json` stores which repositories are included or excluded for each gc-branch.
|
|
66
78
|
- `branch.json` stores lightweight gc-branch metadata.
|
|
67
|
-
- `index.md` is the compact entry point for tools.
|
|
79
|
+
- `index.md` is the compact entry point for tools — kept under 2000 characters so it loads fast without consuming significant token budget.
|
|
68
80
|
- `docs/` holds the source-of-truth markdown documents.
|
|
69
81
|
|
|
70
82
|
## Repo-aware behavior
|