@handsupmin/gc-tree 0.8.4 → 0.8.6
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 +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/src/hook.js +51 -19
- package/dist/src/repo-map.js +2 -1
- package/dist/src/scaffold.js +18 -16
- package/docs/usage.es.md +1 -1
- package/docs/usage.ja.md +1 -1
- package/docs/usage.ko.md +1 -1
- package/docs/usage.md +1 -1
- package/docs/usage.zh.md +1 -1
- package/package.json +1 -1
package/README.es.md
CHANGED
|
@@ -74,7 +74,7 @@ gctree init
|
|
|
74
74
|
2. Instalar los archivos de integración en el repositorio actual
|
|
75
75
|
3. Completar el onboarding guiado para el gc-branch `main`
|
|
76
76
|
|
|
77
|
-
Después, tu herramienta de IA instala integración real de hooks SessionStart/UserPromptSubmit: revisa gc-tree automáticamente antes de trabajar y cachea resultados vacíos/no-match durante la sesión. La salida del hook se mantiene compacta: muestra el estado found/no-match junto con IDs
|
|
77
|
+
Después, tu herramienta de IA instala integración real de hooks SessionStart/UserPromptSubmit: revisa gc-tree automáticamente antes de trabajar y cachea resultados vacíos/no-match durante la sesión. La salida del hook se mantiene compacta: muestra el estado found/no-match junto con títulos e IDs de documentos coincidentes, y deja el documento completo detrás de `gctree resolve --id <id>`.
|
|
78
78
|
|
|
79
79
|
- **CLI:** `gctree`
|
|
80
80
|
- **Requisito:** Node.js 20+
|
package/README.ja.md
CHANGED
|
@@ -74,7 +74,7 @@ gctree init
|
|
|
74
74
|
2. 現在のリポジトリへの統合ファイルのインストール
|
|
75
75
|
3. `main` gc-branch のガイド付きオンボーディング実行
|
|
76
76
|
|
|
77
|
-
その後は、AI ツールに実際の SessionStart / UserPromptSubmit フック統合が入り、作業前に gc-tree を自動確認し、空結果や no-match をセッション中キャッシュします。フック出力はコンパクトに保たれ、found/no-match
|
|
77
|
+
その後は、AI ツールに実際の SessionStart / UserPromptSubmit フック統合が入り、作業前に gc-tree を自動確認し、空結果や no-match をセッション中キャッシュします。フック出力はコンパクトに保たれ、found/no-match 状態、マッチしたドキュメントのタイトルと ID だけを示し、全文は必要なときに `gctree resolve --id <id>` で開きます。
|
|
78
78
|
|
|
79
79
|
- **CLI:** `gctree`
|
|
80
80
|
- **動作条件:** Node.js 20+
|
package/README.ko.md
CHANGED
|
@@ -74,7 +74,7 @@ gctree init
|
|
|
74
74
|
2. 현재 레포에 통합 파일 스캐폴딩
|
|
75
75
|
3. `main` gc-branch 가이드형 온보딩 실행
|
|
76
76
|
|
|
77
|
-
이후 AI 도구에 실제 SessionStart/UserPromptSubmit 훅 통합이 설치되어, 작업 전에 gc-tree를 자동 확인하고 세션 동안 빈 결과·no-match를 캐시합니다. 훅 출력은 짧게 유지됩니다: 찾음/no-match 상태와 문서 ID
|
|
77
|
+
이후 AI 도구에 실제 SessionStart/UserPromptSubmit 훅 통합이 설치되어, 작업 전에 gc-tree를 자동 확인하고 세션 동안 빈 결과·no-match를 캐시합니다. 훅 출력은 짧게 유지됩니다: 찾음/no-match 상태와 매칭된 문서 제목/ID만 보여주고 전체 문서는 `gctree resolve --id <id>`로 필요할 때 엽니다.
|
|
78
78
|
|
|
79
79
|
- **CLI:** `gctree`
|
|
80
80
|
- **요구 사항:** Node.js 20+
|
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ gctree init
|
|
|
74
74
|
2. Scaffold the integration files into your current repo
|
|
75
75
|
3. Run guided onboarding for the `main` gc-branch
|
|
76
76
|
|
|
77
|
-
After that, your AI tool gets real SessionStart/UserPromptSubmit hook integration, so it auto-checks gc-tree before work and caches empty/no-match results for the session. Hook output stays compact: it reports found/no-match state plus document
|
|
77
|
+
After that, your AI tool gets real SessionStart/UserPromptSubmit hook integration, so it auto-checks gc-tree before work and caches empty/no-match results for the session. Hook output stays compact: it reports found/no-match state plus matching document titles and IDs, and full docs stay behind `gctree resolve --id <id>`.
|
|
78
78
|
|
|
79
79
|
- **CLI:** `gctree`
|
|
80
80
|
- **Requires:** Node.js 20+
|
package/README.zh.md
CHANGED
|
@@ -61,7 +61,7 @@ gctree init
|
|
|
61
61
|
2. 在当前仓库安装集成文件
|
|
62
62
|
3. 为 `main` gc-branch 完成引导式 onboarding
|
|
63
63
|
|
|
64
|
-
之后,AI 工具会安装真正的 SessionStart / UserPromptSubmit hook 集成:在开始工作前自动检查 gc-tree,并在整个会话内缓存空结果和 no-match。Hook 输出保持紧凑:只显示 found/no-match
|
|
64
|
+
之后,AI 工具会安装真正的 SessionStart / UserPromptSubmit hook 集成:在开始工作前自动检查 gc-tree,并在整个会话内缓存空结果和 no-match。Hook 输出保持紧凑:只显示 found/no-match 状态以及匹配文档的标题和 ID,完整文档需要时再通过 `gctree resolve --id <id>` 打开。
|
|
65
65
|
|
|
66
66
|
- **CLI:** `gctree`
|
|
67
67
|
- **要求:** Node.js 20+
|
package/dist/src/hook.js
CHANGED
|
@@ -13,46 +13,44 @@ function normalizeText(value) {
|
|
|
13
13
|
function hashQuery(query) {
|
|
14
14
|
return createHash('sha1').update(normalizeText(query).toLowerCase()).digest('hex');
|
|
15
15
|
}
|
|
16
|
+
function recentDuplicate(previousAt, now, windowMs = 5000) {
|
|
17
|
+
if (!previousAt)
|
|
18
|
+
return false;
|
|
19
|
+
const previousMs = Date.parse(previousAt);
|
|
20
|
+
if (!Number.isFinite(previousMs))
|
|
21
|
+
return false;
|
|
22
|
+
return now.getTime() - previousMs <= windowMs;
|
|
23
|
+
}
|
|
16
24
|
function limitMatches(matches, max = 3) {
|
|
17
25
|
return matches.slice(0, max);
|
|
18
26
|
}
|
|
19
27
|
function formatMatches(matches) {
|
|
20
28
|
return limitMatches(matches)
|
|
21
|
-
.map((match, index) => `${index + 1}. ${match.title} [
|
|
29
|
+
.map((match, index) => `${index + 1}. ${match.title} [${match.id}]`)
|
|
22
30
|
.join('\n');
|
|
23
31
|
}
|
|
24
32
|
function buildSessionStartContext({ gcBranch, currentRepo, repoScopeStatus, }) {
|
|
25
|
-
return [
|
|
26
|
-
`gc-tree auto-resolve is active for this session.`,
|
|
27
|
-
`Active gc-branch: "${gcBranch}".`,
|
|
28
|
-
`Current repo: ${currentRepo || 'unscoped'}.`,
|
|
29
|
-
`Repo scope status: ${repoScopeStatus}.`,
|
|
30
|
-
`Before acting on new user prompts, use gc-tree hook context first. If the hook reports no reusable global context, avoid redundant resolve calls for the same session state unless the repo, gc-branch, or task changes materially.`,
|
|
31
|
-
].join(' ');
|
|
33
|
+
return `[gc-tree] active gc-branch="${gcBranch}" repo="${currentRepo || 'unscoped'}" scope=${repoScopeStatus}.`;
|
|
32
34
|
}
|
|
33
35
|
function buildEmptyBranchContext({ gcBranch, currentRepo, cached, }) {
|
|
34
|
-
return `[gc-tree] no
|
|
36
|
+
return `[gc-tree] no docs: gc-branch="${gcBranch}" repo="${currentRepo || 'unscoped'}"${cached ? ' cached=true' : ''}.`;
|
|
35
37
|
}
|
|
36
38
|
function buildExcludedContext({ gcBranch, currentRepo, cached, }) {
|
|
37
|
-
return `[gc-tree]
|
|
39
|
+
return `[gc-tree] excluded: gc-branch="${gcBranch}" repo="${currentRepo || 'unknown'}"${cached ? ' cached=true' : ''}.`;
|
|
38
40
|
}
|
|
39
41
|
function buildNoMatchContext({ gcBranch, currentRepo, cached, }) {
|
|
40
|
-
return `[gc-tree] no
|
|
42
|
+
return `[gc-tree] no match: gc-branch="${gcBranch}" repo="${currentRepo || 'unscoped'}"${cached ? ' cached=true' : ''}.`;
|
|
41
43
|
}
|
|
42
44
|
function buildMatchContext({ gcBranch, currentRepo, repoScopeStatus, matches, }) {
|
|
43
45
|
return [
|
|
44
|
-
`[gc-tree]
|
|
46
|
+
`[gc-tree] USE FIRST: ${Math.min(matches.length, 3)} docs gc-branch="${gcBranch}" repo="${currentRepo || 'unscoped'}" scope=${repoScopeStatus}.`,
|
|
45
47
|
formatMatches(matches),
|
|
46
|
-
`
|
|
48
|
+
`Rule: apply these docs before tools; if insufficient, open full doc: gctree resolve --id <id>`,
|
|
47
49
|
].join('\n');
|
|
48
50
|
}
|
|
49
51
|
function buildSelfReviewAppend(promptCount) {
|
|
50
52
|
return [
|
|
51
|
-
`\n[gc-tree]
|
|
52
|
-
`At the END of your response to this task, review the current gc-tree global context and compare it against what you have observed or changed in this session.`,
|
|
53
|
-
`If any docs need updating (new conventions discovered, corrected info, new repos or workflows, outdated content), propose the specific changes to the user and ask whether to apply them.`,
|
|
54
|
-
`Use \`/gc-update-global-context\` (Claude Code), \`$gc-update-global-context\` (Codex), or \`gctree update-global-context\` (CLI) to apply.`,
|
|
55
|
-
`If nothing meaningful changed, skip silently — do not mention this review to the user.`,
|
|
53
|
+
`\n[gc-tree] self-review #${promptCount}: silently check whether durable context should change. If yes, propose a targeted gc-tree update; otherwise say nothing.`,
|
|
56
54
|
].join('\n');
|
|
57
55
|
}
|
|
58
56
|
async function readHookCache(home, sessionId) {
|
|
@@ -84,6 +82,10 @@ function nextCacheState(previous, { sessionId, gcBranch, currentRepo, repoScopeS
|
|
|
84
82
|
branch_excluded: changed ? false : previous.branch_excluded,
|
|
85
83
|
no_match_signatures: changed ? [] : previous.no_match_signatures,
|
|
86
84
|
prompt_count: (previous?.prompt_count ?? 0) + 1,
|
|
85
|
+
last_session_start_signature: previous?.last_session_start_signature,
|
|
86
|
+
last_session_start_at: previous?.last_session_start_at,
|
|
87
|
+
last_prompt_signature: previous?.last_prompt_signature,
|
|
88
|
+
last_prompt_at: previous?.last_prompt_at,
|
|
87
89
|
updated_at: new Date().toISOString(),
|
|
88
90
|
};
|
|
89
91
|
}
|
|
@@ -100,7 +102,30 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
100
102
|
const mapping = await readBranchRepoMap(home);
|
|
101
103
|
const repoScopeStatus = branchScopeStatus(mapping, gcBranch, currentRepo);
|
|
102
104
|
const sessionId = readSessionId(payload);
|
|
105
|
+
const now = new Date();
|
|
103
106
|
if (event === 'SessionStart') {
|
|
107
|
+
const previousCache = await readHookCache(home, sessionId);
|
|
108
|
+
const signature = hashQuery(`${event}:${gcBranch}:${currentRepo || ''}:${repoScopeStatus}`);
|
|
109
|
+
if (previousCache?.last_session_start_signature === signature &&
|
|
110
|
+
recentDuplicate(previousCache.last_session_start_at, now)) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
await writeHookCache(home, {
|
|
114
|
+
version: 1,
|
|
115
|
+
session_id: sessionId,
|
|
116
|
+
gc_branch: gcBranch,
|
|
117
|
+
current_repo: currentRepo,
|
|
118
|
+
repo_scope_status: repoScopeStatus,
|
|
119
|
+
branch_empty: previousCache?.branch_empty ?? false,
|
|
120
|
+
branch_excluded: previousCache?.branch_excluded ?? false,
|
|
121
|
+
no_match_signatures: previousCache?.no_match_signatures ?? [],
|
|
122
|
+
prompt_count: previousCache?.prompt_count ?? 0,
|
|
123
|
+
last_session_start_signature: signature,
|
|
124
|
+
last_session_start_at: now.toISOString(),
|
|
125
|
+
last_prompt_signature: previousCache?.last_prompt_signature,
|
|
126
|
+
last_prompt_at: previousCache?.last_prompt_at,
|
|
127
|
+
updated_at: now.toISOString(),
|
|
128
|
+
});
|
|
104
129
|
return {
|
|
105
130
|
hookSpecificOutput: {
|
|
106
131
|
hookEventName: event,
|
|
@@ -117,12 +142,19 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
117
142
|
return null;
|
|
118
143
|
const branchStatus = await statusForBranch(home, gcBranch);
|
|
119
144
|
const previousCache = await readHookCache(home, sessionId);
|
|
145
|
+
const promptSignature = hashQuery(`${event}:${gcBranch}:${currentRepo || ''}:${repoScopeStatus}:${prompt}`);
|
|
146
|
+
if (previousCache?.last_prompt_signature === promptSignature &&
|
|
147
|
+
recentDuplicate(previousCache.last_prompt_at, now)) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
120
150
|
const cache = nextCacheState(previousCache, {
|
|
121
151
|
sessionId,
|
|
122
152
|
gcBranch,
|
|
123
153
|
currentRepo,
|
|
124
154
|
repoScopeStatus,
|
|
125
155
|
});
|
|
156
|
+
cache.last_prompt_signature = promptSignature;
|
|
157
|
+
cache.last_prompt_at = now.toISOString();
|
|
126
158
|
let additionalContext;
|
|
127
159
|
if (repoScopeStatus === 'excluded') {
|
|
128
160
|
cache.branch_excluded = true;
|
|
@@ -159,7 +191,7 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
159
191
|
cache.prompt_count = 0;
|
|
160
192
|
}
|
|
161
193
|
}
|
|
162
|
-
cache.updated_at =
|
|
194
|
+
cache.updated_at = now.toISOString();
|
|
163
195
|
await writeHookCache(home, cache);
|
|
164
196
|
return { hookSpecificOutput: { hookEventName: event, additionalContext } };
|
|
165
197
|
}
|
package/dist/src/repo-map.js
CHANGED
|
@@ -132,7 +132,8 @@ export async function resolveBranchForRepo({ home, head, explicitBranch, cwd = p
|
|
|
132
132
|
}
|
|
133
133
|
export async function promptResolveScopeDecision(branch, repo, preferredLanguage = 'English') {
|
|
134
134
|
if (!stdin.isTTY && process.env.GCTREE_ALLOW_STDIN_PROMPT !== '1') {
|
|
135
|
-
|
|
135
|
+
process.stderr.write(`gc-tree: repo "${repo}" is not mapped to gc-branch "${branch}" — continuing without scope decision.\n`);
|
|
136
|
+
return 'continue-once';
|
|
136
137
|
}
|
|
137
138
|
const rl = createInterface({ input: stdin, output: stderr });
|
|
138
139
|
try {
|
package/dist/src/scaffold.js
CHANGED
|
@@ -8,14 +8,15 @@ function renderCodexAgentsSnippet() {
|
|
|
8
8
|
'',
|
|
9
9
|
'- Treat the active gctree branch as a **gc-branch** when you describe it to users.',
|
|
10
10
|
'- gctree init installs SessionStart and UserPromptSubmit hooks that auto-check gc-tree before work.',
|
|
11
|
-
'- When you encounter an unfamiliar term, acronym, concept, or domain word, follow this protocol **before** grepping or reading code files:',
|
|
12
|
-
' 1.
|
|
13
|
-
' 2.
|
|
14
|
-
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc
|
|
11
|
+
'- When you encounter an unfamiliar term, acronym, concept, or domain word, follow this scope-aware protocol **before** grepping or reading code files:',
|
|
12
|
+
' 1. Always run `gctree resolve --query "<term>"` first. If matched, use the result directly.',
|
|
13
|
+
' 2. Only if the current repo scope is **included** (not unmapped/excluded): if step 1 found nothing, try broader related queries to check if the concept exists in any doc.',
|
|
14
|
+
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc.',
|
|
15
15
|
' 4. If it does not exist anywhere → decide whether a new doc is needed and propose it to the user.',
|
|
16
|
-
'
|
|
17
|
-
'-
|
|
18
|
-
'-
|
|
16
|
+
' — If the repo is **unmapped** or **excluded**: do step 1 only; if no match, skip and proceed normally.',
|
|
17
|
+
'- When a UserPromptSubmit hook provides `[gc-tree] USE FIRST`, treat matched docs as mandatory grounding before any tool use.',
|
|
18
|
+
'- Do not ignore matched gc-tree docs and jump straight to grep/Explore. Use the listed docs directly, or open the full doc with `gctree resolve --id <id>` if the summary is not enough.',
|
|
19
|
+
'- Only use tools after the matched docs are clearly insufficient for the task.',
|
|
19
20
|
'- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
|
|
20
21
|
'- Use `$gc-onboard` only for an empty gc-branch.',
|
|
21
22
|
'- Use `$gc-update-global-context` when durable context in the active gc-branch should change.',
|
|
@@ -32,8 +33,8 @@ function renderCodexBootstrapPrompt() {
|
|
|
32
33
|
' 2. If that misses, run broader related `gctree resolve` queries.',
|
|
33
34
|
' 3. If the concept is documented but not indexed, propose adding it as an Index Entry to the right doc.',
|
|
34
35
|
' 4. Only if gc-tree still does not answer it should you search code or repo docs.',
|
|
35
|
-
'- When hook-injected
|
|
36
|
-
'- Only use tools (grep, file read, explore) if
|
|
36
|
+
'- When hook-injected gc-tree matches are present, treat them as mandatory grounding. Use them directly or open the full doc with `gctree resolve --id <id>` before grep/file reads/code exploration.',
|
|
37
|
+
'- Only use tools (grep, file read, explore) if matched docs are clearly insufficient — meaning the answer cannot be derived from them at all.',
|
|
37
38
|
'- If hook context is missing, resolve reusable global context before planning or implementation.',
|
|
38
39
|
'- Treat gctree docs as explicit source-of-truth markdown, not hidden memory.',
|
|
39
40
|
'',
|
|
@@ -123,14 +124,15 @@ function renderClaudeSnippet() {
|
|
|
123
124
|
'',
|
|
124
125
|
'- Treat the active gctree branch as a **gc-branch** in user-facing language.',
|
|
125
126
|
'- gctree init installs SessionStart and UserPromptSubmit hooks that auto-inject gc-tree context before every prompt.',
|
|
126
|
-
'- When you encounter an unfamiliar term, acronym, concept, or domain word, follow this protocol **before** grepping or reading code files:',
|
|
127
|
-
' 1.
|
|
128
|
-
' 2.
|
|
129
|
-
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc
|
|
127
|
+
'- When you encounter an unfamiliar term, acronym, concept, or domain word, follow this scope-aware protocol **before** grepping or reading code files:',
|
|
128
|
+
' 1. Always run `gctree resolve --query "<term>"` first. If matched, use the result directly.',
|
|
129
|
+
' 2. Only if the current repo scope is **included** (not unmapped/excluded): if step 1 found nothing, try broader related queries to check if the concept exists in any doc.',
|
|
130
|
+
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc.',
|
|
130
131
|
' 4. If it does not exist anywhere → decide whether a new doc is needed and propose it to the user.',
|
|
131
|
-
'
|
|
132
|
-
'-
|
|
133
|
-
'-
|
|
132
|
+
' — If the repo is **unmapped** or **excluded**: do step 1 only; if no match, skip and proceed normally.',
|
|
133
|
+
'- When a UserPromptSubmit hook provides `[gc-tree] USE FIRST`, treat matched docs as mandatory grounding before any tool use.',
|
|
134
|
+
'- Do not ignore matched gc-tree docs and jump straight to grep/Explore. Use the listed docs directly, or open the full doc with `gctree resolve --id <id>` if the summary is not enough.',
|
|
135
|
+
'- Only use tools after the matched docs are clearly insufficient for the task.',
|
|
134
136
|
'- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
|
|
135
137
|
'- Use `/gc-onboard` only for an empty gc-branch.',
|
|
136
138
|
'- Use `/gc-update-global-context` when durable context in the active gc-branch should change.',
|
package/docs/usage.es.md
CHANGED
|
@@ -157,7 +157,7 @@ Si un repositorio recién relevante también debería pasar a formar parte del c
|
|
|
157
157
|
|
|
158
158
|
`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
159
|
|
|
160
|
-
El hook UserPromptSubmit solo inyecta contexto previo compacto: estado found/no-match
|
|
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.
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
gctree scaffold --host codex --target /path/to/repo
|
package/docs/usage.ja.md
CHANGED
|
@@ -157,7 +157,7 @@ gctree ugc
|
|
|
157
157
|
|
|
158
158
|
`gctree init` はグローバルなプロバイダーフック面をインストールします。`gctree scaffold` は特定のリポジトリに独自の markdown スニペットやローカルなコマンド面が必要なときに、ターゲットディレクトリへローカル override をインストールします。
|
|
159
159
|
|
|
160
|
-
UserPromptSubmit フックが注入するのは compact な pre-task context だけです。found/no-match
|
|
160
|
+
UserPromptSubmit フックが注入するのは compact な pre-task context だけです。found/no-match 状態と、マッチしたドキュメントのタイトル/ID を示します。要約や長い excerpt はデフォルトではインラインしません。必要な場合は `gctree resolve --id <id>` で全文を開きます。
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
gctree scaffold --host codex --target /path/to/repo
|
package/docs/usage.ko.md
CHANGED
|
@@ -157,7 +157,7 @@ gctree ugc
|
|
|
157
157
|
|
|
158
158
|
`gctree init`은 전역 프로바이더 훅 표면을 설치합니다. `gctree scaffold`는 특정 저장소에 자체 markdown 스니펫이나 로컬 명령 표면이 필요할 때 대상 디렉토리에 로컬 override를 설치합니다.
|
|
159
159
|
|
|
160
|
-
UserPromptSubmit 훅은 compact pre-task context만 주입합니다: 찾음/no-match
|
|
160
|
+
UserPromptSubmit 훅은 compact pre-task context만 주입합니다: 찾음/no-match 상태와 매칭된 문서 제목/ID입니다. 기본적으로 요약이나 긴 excerpt를 인라인하지 않으며, 필요할 때 `gctree resolve --id <id>`로 전체 문서를 엽니다.
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
gctree scaffold --host codex --target /path/to/repo
|
package/docs/usage.md
CHANGED
|
@@ -157,7 +157,7 @@ If a newly relevant repo should also become part of the durable context, the nat
|
|
|
157
157
|
|
|
158
158
|
`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
159
|
|
|
160
|
-
The UserPromptSubmit hook injects compact pre-task context only: found/no-match state
|
|
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.
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
gctree scaffold --host codex --target /path/to/repo
|
package/docs/usage.zh.md
CHANGED
|
@@ -157,7 +157,7 @@ gctree ugc
|
|
|
157
157
|
|
|
158
158
|
`gctree init` 会安装全局 provider hook 表面。`gctree scaffold` 则在某个仓库需要自己的 markdown 片段或本地命令表面时,将本地 override 安装到目标目录中。
|
|
159
159
|
|
|
160
|
-
UserPromptSubmit hook 只注入紧凑的 pre-task context:found/no-match
|
|
160
|
+
UserPromptSubmit hook 只注入紧凑的 pre-task context:found/no-match 状态以及匹配文档的标题/ID。默认不内联摘要或长 excerpt;需要时用 `gctree resolve --id <id>` 打开完整文档。
|
|
161
161
|
|
|
162
162
|
```bash
|
|
163
163
|
gctree scaffold --host codex --target /path/to/repo
|