@handsupmin/gc-tree 0.8.19 → 1.0.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.
package/docs/usage.es.md CHANGED
@@ -41,6 +41,7 @@ Un flujo de trabajo estándar con `gctree` tiene este aspecto: inicializar gc-tr
41
41
  | `gctree update-global-context` | Iniciar una actualización duradera guiada para la gc-branch activa. |
42
42
  | `gctree update-gc` / `gctree ugc` | Alias para `gctree update-global-context`. |
43
43
  | `gctree scaffold --host <codex\|claude-code>` | Instalar un override local orientado al proveedor en un repositorio o workspace concreto. |
44
+ | `gctree update` | Actualizar gctree a la última versión de npm y reinstalar todos los providers previamente instalados. |
44
45
  | `gctree uninstall --yes` | Eliminar `~/.gctree` y la activación global de gctree. |
45
46
 
46
47
  ## Qué devuelve resolve
@@ -51,40 +52,22 @@ Un flujo de trabajo estándar con `gctree` tiene este aspecto: inicializar gc-tr
51
52
  gctree resolve --query "auth token rotation policy"
52
53
  ```
53
54
 
54
- ```json
55
- {
56
- "gc_branch": "main",
57
- "query": "auth token rotation policy",
58
- "status": "matched",
59
- "matches": [
60
- {
61
- "id": "auth",
62
- "title": "Auth & Session Conventions",
63
- "path": "docs/auth.md",
64
- "score": 4,
65
- "summary": "JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL",
66
- "excerpt": "## Auth Flow\nAccess token: 15-min TTL, rotated on every authenticated request...",
67
- "commands": {
68
- "show_doc": "gctree show-doc --id \"auth\" --home \"~/.gctree\" --branch \"main\"",
69
- "related": "gctree related --id \"auth\" --home \"~/.gctree\" --branch \"main\""
70
- }
71
- }
72
- ]
73
- }
55
+ ```
56
+ [gc-tree] 1 matching doc gc-branch="main" repo="my-repo"
57
+ [Auth & Session Conventions] JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL
58
+ [Auth & Session Conventions] show full doc: gctree show-doc --id "auth" --branch "main"
74
59
  ```
75
60
 
76
61
  El flujo recomendado es:
77
62
 
78
63
  1. `resolve` → índice compacto
79
- 2. `related` → documentos de apoyo alrededor de una coincidencia
80
- 3. `show-doc` → markdown completo solo cuando hace falta
64
+ 2. `show-doc` → markdown completo solo cuando hace falta
81
65
 
82
66
  La degradación elegante también es explícita:
83
67
 
84
- - gc-branch vacía → `status: "empty_branch"`
85
- - repo excluido → `status: "excluded"`
86
- - sin resultados → `status: "no_match"`
87
- - ID de documento inexistente → `status: "doc_not_found"`
68
+ - gc-branch vacía → mensaje en texto plano indicando que la gc-branch está vacía
69
+ - repo excluido → mensaje en texto plano indicando que el repo está excluido
70
+ - sin resultados → mensaje en texto plano indicando que no hay coincidencias
88
71
 
89
72
  ## Ejemplo de flujo de alcance del repositorio
90
73
 
@@ -157,7 +140,7 @@ Si un repositorio recién relevante también debería pasar a formar parte del c
157
140
 
158
141
  `gctree init` instala la superficie global de hooks orientada al proveedor. `gctree scaffold` instala un override local en un directorio de destino cuando un repositorio concreto necesita sus propios snippets markdown o una superficie de comandos local.
159
142
 
160
- El hook UserPromptSubmit solo inyecta contexto previo compacto: estado found/no-match más títulos e IDs de documentos coincidentes. No incluye resúmenes ni excerpts largos por defecto; abre documentos completos con `gctree resolve --id <id>` cuando sea necesario.
143
+ El hook UserPromptSubmit inyecta los resúmenes de los documentos coincidentes directamente en el contexto antes de cada prompt — de modo que la IA ve patrones y comandos reales, no solo títulos. Cuando un resumen es corto o genérico, el hook recurre a un fragmento del cuerpo del documento. Los documentos completos siempre están disponibles bajo demanda con `gctree resolve --id <id>`.
161
144
 
162
145
  ```bash
163
146
  gctree scaffold --host codex --target /path/to/repo
package/docs/usage.ja.md CHANGED
@@ -41,6 +41,7 @@
41
41
  | `gctree update-global-context` | アクティブな gc-branch に対するガイド付き永続的更新を開始します。 |
42
42
  | `gctree update-gc` / `gctree ugc` | `gctree update-global-context` の別名です。 |
43
43
  | `gctree scaffold --host <codex\|claude-code>` | 1つのリポジトリやワークスペースにローカルなプロバイダー override をインストールします。 |
44
+ | `gctree update` | gctree を最新 npm バージョンに更新し、以前インストールしたすべてのプロバイダーを再スキャフォールドします。 |
44
45
  | `gctree uninstall --yes` | `~/.gctree` とグローバルな gctree 有効化を削除します。 |
45
46
 
46
47
  ## resolve が返す内容
@@ -51,40 +52,22 @@
51
52
  gctree resolve --query "auth token rotation policy"
52
53
  ```
53
54
 
54
- ```json
55
- {
56
- "gc_branch": "main",
57
- "query": "auth token rotation policy",
58
- "status": "matched",
59
- "matches": [
60
- {
61
- "id": "auth",
62
- "title": "Auth & Session Conventions",
63
- "path": "docs/auth.md",
64
- "score": 4,
65
- "summary": "JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL",
66
- "excerpt": "## Auth Flow\nAccess token: 15-min TTL, rotated on every authenticated request...",
67
- "commands": {
68
- "show_doc": "gctree show-doc --id \"auth\" --home \"~/.gctree\" --branch \"main\"",
69
- "related": "gctree related --id \"auth\" --home \"~/.gctree\" --branch \"main\""
70
- }
71
- }
72
- ]
73
- }
55
+ ```
56
+ [gc-tree] 1 matching doc gc-branch="main" repo="my-repo"
57
+ [Auth & Session Conventions] JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL
58
+ [Auth & Session Conventions] show full doc: gctree show-doc --id "auth" --branch "main"
74
59
  ```
75
60
 
76
61
  推奨フローは次のとおりです。
77
62
 
78
63
  1. `resolve` → compact index
79
- 2. `related` → その match の周辺にある supporting docs
80
- 3. `show-doc` → 必要なときだけフル markdown
64
+ 2. `show-doc` → 必要なときだけフル markdown
81
65
 
82
66
  Graceful degradation も明示的です。
83
67
 
84
- - 空の gc-branch → `status: "empty_branch"`
85
- - 除外された repo → `status: "excluded"`
86
- - ヒットなし → `status: "no_match"`
87
- - 文書 ID が見つからない → `status: "doc_not_found"`
68
+ - 空の gc-branch → gc-branch が空であることを示すプレーンテキストメッセージ
69
+ - 除外された repo → そのリポジトリが除外されていることを示すプレーンテキストメッセージ
70
+ - ヒットなし → 一致がなかったことを示すプレーンテキストメッセージ
88
71
 
89
72
  ## repo scope の設定例
90
73
 
@@ -157,7 +140,7 @@ gctree ugc
157
140
 
158
141
  `gctree init` はグローバルなプロバイダーフック面をインストールします。`gctree scaffold` は特定のリポジトリに独自の markdown スニペットやローカルなコマンド面が必要なときに、ターゲットディレクトリへローカル override をインストールします。
159
142
 
160
- UserPromptSubmit フックが注入するのは compact pre-task context だけです。found/no-match 状態と、マッチしたドキュメントのタイトル/ID を示します。要約や長い excerpt はデフォルトではインラインしません。必要な場合は `gctree resolve --id <id>` で全文を開きます。
143
+ UserPromptSubmit フックは、各プロンプト前にマッチしたドキュメントの要約をコンテキストに直接注入します AI がタイトルだけでなく実際のパターンとコマンドを見られるようにするためです。要約が短すぎるか一般的すぎる場合、フックはドキュメント本文の excerpt にフォールバックします。全文はいつでも `gctree resolve --id <id>` でオンデマンドに取得できます。
161
144
 
162
145
  ```bash
163
146
  gctree scaffold --host codex --target /path/to/repo
package/docs/usage.ko.md CHANGED
@@ -41,6 +41,7 @@
41
41
  | `gctree update-global-context` | 활성 gc-branch의 안내된 지속 업데이트 실행. |
42
42
  | `gctree update-gc` / `gctree ugc` | `gctree update-global-context`의 별칭. |
43
43
  | `gctree scaffold --host <codex\|claude-code>` | 특정 저장소나 워크스페이스에 로컬 프로바이더 override 설치. |
44
+ | `gctree update` | gctree를 최신 npm 버전으로 업데이트하고 이전에 설치된 모든 프로바이더를 재스캐폴드. |
44
45
  | `gctree uninstall --yes` | `~/.gctree`와 전역 gctree 활성화를 제거. |
45
46
 
46
47
  ## resolve가 반환하는 것
@@ -51,40 +52,22 @@
51
52
  gctree resolve --query "auth token rotation policy"
52
53
  ```
53
54
 
54
- ```json
55
- {
56
- "gc_branch": "main",
57
- "query": "auth token rotation policy",
58
- "status": "matched",
59
- "matches": [
60
- {
61
- "id": "auth",
62
- "title": "Auth & Session Conventions",
63
- "path": "docs/auth.md",
64
- "score": 4,
65
- "summary": "JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL",
66
- "excerpt": "## Auth Flow\nAccess token: 15-min TTL, rotated on every authenticated request...",
67
- "commands": {
68
- "show_doc": "gctree show-doc --id \"auth\" --home \"~/.gctree\" --branch \"main\"",
69
- "related": "gctree related --id \"auth\" --home \"~/.gctree\" --branch \"main\""
70
- }
71
- }
72
- ]
73
- }
55
+ ```
56
+ [gc-tree] 1 matching doc gc-branch="main" repo="my-repo"
57
+ [Auth & Session Conventions] JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL
58
+ [Auth & Session Conventions] show full doc: gctree show-doc --id "auth" --branch "main"
74
59
  ```
75
60
 
76
61
  권장 흐름은 다음과 같습니다:
77
62
 
78
63
  1. `resolve` → compact index
79
- 2. `related` → 특정 match 주변 supporting docs
80
- 3. `show-doc` → 필요할 때만 전체 markdown
64
+ 2. `show-doc` → 필요할 때만 전체 markdown
81
65
 
82
66
  Graceful degradation도 명시적입니다:
83
67
 
84
- - 빈 gc-branch → `status: "empty_branch"`
85
- - 제외된 repo → `status: "excluded"`
86
- - 결과 없음 → `status: "no_match"`
87
- - 문서 ID 없음 → `status: "doc_not_found"`
68
+ - 빈 gc-branch → gc-branch가 비어 있다는 일반 텍스트 메시지
69
+ - 제외된 repo → 해당 repo가 제외되어 있다는 일반 텍스트 메시지
70
+ - 결과 없음 → 매칭 결과가 없다는 일반 텍스트 메시지
88
71
 
89
72
  ## 저장소 범위 설정 예시 흐름
90
73
 
@@ -157,7 +140,7 @@ gctree ugc
157
140
 
158
141
  `gctree init`은 전역 프로바이더 훅 표면을 설치합니다. `gctree scaffold`는 특정 저장소에 자체 markdown 스니펫이나 로컬 명령 표면이 필요할 때 대상 디렉토리에 로컬 override를 설치합니다.
159
142
 
160
- UserPromptSubmit 훅은 compact pre-task context만 주입합니다: 찾음/no-match 상태와 매칭된 문서 제목/ID입니다. 기본적으로 요약이나 excerpt 인라인하지 않으며, 필요할 `gctree resolve --id <id>`로 전체 문서를 엽니다.
143
+ UserPromptSubmit 훅은 프롬프트 전에 매칭된 문서 요약을 컨텍스트에 직접 주입합니다 AI가 제목만이 아니라 실제 패턴과 명령을 볼 수 있도록. 요약이 짧거나 일반적인 경우, 훅은 문서 본문에서 excerpt 대체합니다. 전체 문서는 언제든 `gctree resolve --id <id>`로 필요할 확인할 수 있습니다.
161
144
 
162
145
  ```bash
163
146
  gctree scaffold --host codex --target /path/to/repo
package/docs/usage.md CHANGED
@@ -41,6 +41,7 @@ A standard `gctree` workflow looks like this: initialize gc-tree, choose a provi
41
41
  | `gctree update-global-context` | Launch a guided durable update for the active gc-branch. |
42
42
  | `gctree update-gc` / `gctree ugc` | Aliases for `gctree update-global-context`. |
43
43
  | `gctree scaffold --host <codex\|claude-code>` | Install a local provider-facing override in one repository or workspace. |
44
+ | `gctree update` | Update gctree to the latest npm version and re-scaffold all previously installed providers. |
44
45
  | `gctree uninstall --yes` | Remove `~/.gctree` and the global gctree activation for the configured providers. |
45
46
 
46
47
  ## What resolve returns
@@ -51,40 +52,22 @@ A standard `gctree` workflow looks like this: initialize gc-tree, choose a provi
51
52
  gctree resolve --query "auth token rotation policy"
52
53
  ```
53
54
 
54
- ```json
55
- {
56
- "gc_branch": "main",
57
- "query": "auth token rotation policy",
58
- "status": "matched",
59
- "matches": [
60
- {
61
- "id": "auth",
62
- "title": "Auth & Session Conventions",
63
- "path": "docs/auth.md",
64
- "score": 4,
65
- "summary": "JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL",
66
- "excerpt": "## Auth Flow\nAccess token: 15-min TTL, rotated on every authenticated request...",
67
- "commands": {
68
- "show_doc": "gctree show-doc --id \"auth\" --home \"~/.gctree\" --branch \"main\"",
69
- "related": "gctree related --id \"auth\" --home \"~/.gctree\" --branch \"main\""
70
- }
71
- }
72
- ]
73
- }
55
+ ```
56
+ [gc-tree] 1 matching doc gc-branch="main" repo="my-repo"
57
+ [Auth & Session Conventions] JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL
58
+ [Auth & Session Conventions] show full doc: gctree show-doc --id "auth" --branch "main"
74
59
  ```
75
60
 
76
61
  The intended flow is:
77
62
 
78
- 1. `resolve` → compact index
79
- 2. `related` → supporting docs around one match
80
- 3. `show-doc` → full markdown only when needed
63
+ 1. `resolve` → compact text output with summary injected
64
+ 2. `show-doc` → full markdown only when needed
81
65
 
82
- Graceful degradation is explicit:
66
+ Graceful degradation is explicit — each case returns a plain text message:
83
67
 
84
- - empty gc-branch → `status: "empty_branch"`
85
- - excluded repo → `status: "excluded"`
86
- - no hits → `status: "no_match"`
87
- - missing doc id → `status: "doc_not_found"`
68
+ - empty gc-branch → `[gc-tree] No context found — gc-branch is empty.`
69
+ - excluded repo → `[gc-tree] Repo "..." is excluded from gc-branch "...".`
70
+ - no hits → `[gc-tree] No matching documents found.`
88
71
 
89
72
  ## Example repo-scope flow
90
73
 
@@ -157,7 +140,7 @@ If a newly relevant repo should also become part of the durable context, the nat
157
140
 
158
141
  `gctree init` installs the provider-facing hook surface globally. `gctree scaffold` installs a local override into one target directory when a specific repository needs its own markdown snippets or local command surface.
159
142
 
160
- The UserPromptSubmit hook injects compact pre-task context only: found/no-match state plus matched document titles and IDs. It does not inline summaries or long excerpts by default; open full documents with `gctree resolve --id <id>` when needed.
143
+ The UserPromptSubmit hook injects matched document summaries directly into context before each prompt so the AI sees actual patterns and commands, not just titles. When a summary is short or generic, the hook falls back to an excerpt from the document body. Full documents are always available on demand with `gctree resolve --id <id>`.
161
144
 
162
145
  ```bash
163
146
  gctree scaffold --host codex --target /path/to/repo
package/docs/usage.zh.md CHANGED
@@ -41,6 +41,7 @@
41
41
  | `gctree update-global-context` | 为活跃的 gc-branch 启动有引导的持久化更新。 |
42
42
  | `gctree update-gc` / `gctree ugc` | `gctree update-global-context` 的别名。 |
43
43
  | `gctree scaffold --host <codex\|claude-code>` | 在单个仓库或工作区中安装本地 provider override。 |
44
+ | `gctree update` | 将 gctree 更新到最新 npm 版本,并重新安装所有已有 provider。 |
44
45
  | `gctree uninstall --yes` | 删除 `~/.gctree` 和全局 gctree 激活。 |
45
46
 
46
47
  ## resolve 返回的内容
@@ -51,40 +52,22 @@
51
52
  gctree resolve --query "auth token rotation policy"
52
53
  ```
53
54
 
54
- ```json
55
- {
56
- "gc_branch": "main",
57
- "query": "auth token rotation policy",
58
- "status": "matched",
59
- "matches": [
60
- {
61
- "id": "auth",
62
- "title": "Auth & Session Conventions",
63
- "path": "docs/auth.md",
64
- "score": 4,
65
- "summary": "JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL",
66
- "excerpt": "## Auth Flow\nAccess token: 15-min TTL, rotated on every authenticated request...",
67
- "commands": {
68
- "show_doc": "gctree show-doc --id \"auth\" --home \"~/.gctree\" --branch \"main\"",
69
- "related": "gctree related --id \"auth\" --home \"~/.gctree\" --branch \"main\""
70
- }
71
- }
72
- ]
73
- }
55
+ ```
56
+ [gc-tree] 1 matching doc gc-branch="main" repo="my-repo"
57
+ [Auth & Session Conventions] JWT rotation on every request, refresh tokens in httpOnly cookies, 15-min access token TTL
58
+ [Auth & Session Conventions] show full doc: gctree show-doc --id "auth" --branch "main"
74
59
  ```
75
60
 
76
61
  推荐的流程是:
77
62
 
78
63
  1. `resolve` → 紧凑索引
79
- 2. `related` → 某个匹配周围的 supporting docs
80
- 3. `show-doc` → 仅在需要时读取完整 markdown
64
+ 2. `show-doc` → 仅在需要时读取完整 markdown
81
65
 
82
66
  Graceful degradation 也是显式的:
83
67
 
84
- - 空 gc-branch → `status: "empty_branch"`
85
- - 被排除的 repo → `status: "excluded"`
86
- - 无匹配结果 → `status: "no_match"`
87
- - 文档 ID 不存在 → `status: "doc_not_found"`
68
+ - 空 gc-branch → 纯文本提示:该 gc-branch 为空
69
+ - 被排除的 repo → 纯文本提示:该 repo 已被排除
70
+ - 无匹配结果 → 纯文本提示:没有匹配项
88
71
 
89
72
  ## 仓库作用范围示例流程
90
73
 
@@ -157,7 +140,7 @@ gctree ugc
157
140
 
158
141
  `gctree init` 会安装全局 provider hook 表面。`gctree scaffold` 则在某个仓库需要自己的 markdown 片段或本地命令表面时,将本地 override 安装到目标目录中。
159
142
 
160
- UserPromptSubmit hook 只注入紧凑的 pre-task context:found/no-match 状态以及匹配文档的标题/ID。默认不内联摘要或长 excerpt;需要时用 `gctree resolve --id <id>` 打开完整文档。
143
+ UserPromptSubmit hook 会在每次提示词前将匹配文档的摘要直接注入上下文——让 AI 看到的是真实的模式和命令,而不只是标题。当摘要过短或过于笼统时,hook 会回退到文档正文的摘录。完整文档随时可通过 `gctree resolve --id <id>` 按需获取。
161
144
 
162
145
  ```bash
163
146
  gctree scaffold --host codex --target /path/to/repo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handsupmin/gc-tree",
3
- "version": "0.8.19",
3
+ "version": "1.0.0",
4
4
  "description": "Global Context Tree, a lightweight branch-aware global context orchestrator for AI coding tools",
5
5
  "type": "module",
6
6
  "private": false,