@handsupmin/gc-tree 0.8.5 → 0.8.7
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 +85 -26
- package/dist/src/scaffold.js +8 -8
- 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,48 @@ 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
|
-
|
|
44
|
-
`[gc-tree]
|
|
45
|
+
const lines = [
|
|
46
|
+
`[gc-tree] USE FIRST: ${Math.min(matches.length, 3)} docs gc-branch="${gcBranch}" repo="${currentRepo || 'unscoped'}" scope=${repoScopeStatus}.`,
|
|
45
47
|
formatMatches(matches),
|
|
46
|
-
`
|
|
47
|
-
]
|
|
48
|
+
`Rule: apply these docs before tools; if insufficient, open full doc: gctree resolve --id <id>`,
|
|
49
|
+
];
|
|
50
|
+
if (repoScopeStatus === 'unmapped' && currentRepo) {
|
|
51
|
+
lines.push(`Note: repo "${currentRepo}" is unmapped. If it belongs here, offer to run: gctree set-repo-scope --branch ${gcBranch} --include`);
|
|
52
|
+
}
|
|
53
|
+
return lines.join('\n');
|
|
48
54
|
}
|
|
49
55
|
function buildSelfReviewAppend(promptCount) {
|
|
50
56
|
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.`,
|
|
57
|
+
`\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
58
|
].join('\n');
|
|
57
59
|
}
|
|
58
60
|
async function readHookCache(home, sessionId) {
|
|
@@ -83,7 +85,12 @@ function nextCacheState(previous, { sessionId, gcBranch, currentRepo, repoScopeS
|
|
|
83
85
|
branch_empty: changed ? false : previous.branch_empty,
|
|
84
86
|
branch_excluded: changed ? false : previous.branch_excluded,
|
|
85
87
|
no_match_signatures: changed ? [] : previous.no_match_signatures,
|
|
88
|
+
unmapped_shown_repos: previous?.unmapped_shown_repos ?? [],
|
|
86
89
|
prompt_count: (previous?.prompt_count ?? 0) + 1,
|
|
90
|
+
last_session_start_signature: previous?.last_session_start_signature,
|
|
91
|
+
last_session_start_at: previous?.last_session_start_at,
|
|
92
|
+
last_prompt_signature: previous?.last_prompt_signature,
|
|
93
|
+
last_prompt_at: previous?.last_prompt_at,
|
|
87
94
|
updated_at: new Date().toISOString(),
|
|
88
95
|
};
|
|
89
96
|
}
|
|
@@ -100,7 +107,31 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
100
107
|
const mapping = await readBranchRepoMap(home);
|
|
101
108
|
const repoScopeStatus = branchScopeStatus(mapping, gcBranch, currentRepo);
|
|
102
109
|
const sessionId = readSessionId(payload);
|
|
110
|
+
const now = new Date();
|
|
103
111
|
if (event === 'SessionStart') {
|
|
112
|
+
const previousCache = await readHookCache(home, sessionId);
|
|
113
|
+
const signature = hashQuery(`${event}:${gcBranch}:${currentRepo || ''}:${repoScopeStatus}`);
|
|
114
|
+
if (previousCache?.last_session_start_signature === signature &&
|
|
115
|
+
recentDuplicate(previousCache.last_session_start_at, now)) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
await writeHookCache(home, {
|
|
119
|
+
version: 1,
|
|
120
|
+
session_id: sessionId,
|
|
121
|
+
gc_branch: gcBranch,
|
|
122
|
+
current_repo: currentRepo,
|
|
123
|
+
repo_scope_status: repoScopeStatus,
|
|
124
|
+
branch_empty: previousCache?.branch_empty ?? false,
|
|
125
|
+
branch_excluded: previousCache?.branch_excluded ?? false,
|
|
126
|
+
no_match_signatures: previousCache?.no_match_signatures ?? [],
|
|
127
|
+
unmapped_shown_repos: previousCache?.unmapped_shown_repos ?? [],
|
|
128
|
+
prompt_count: previousCache?.prompt_count ?? 0,
|
|
129
|
+
last_session_start_signature: signature,
|
|
130
|
+
last_session_start_at: now.toISOString(),
|
|
131
|
+
last_prompt_signature: previousCache?.last_prompt_signature,
|
|
132
|
+
last_prompt_at: previousCache?.last_prompt_at,
|
|
133
|
+
updated_at: now.toISOString(),
|
|
134
|
+
});
|
|
104
135
|
return {
|
|
105
136
|
hookSpecificOutput: {
|
|
106
137
|
hookEventName: event,
|
|
@@ -117,12 +148,19 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
117
148
|
return null;
|
|
118
149
|
const branchStatus = await statusForBranch(home, gcBranch);
|
|
119
150
|
const previousCache = await readHookCache(home, sessionId);
|
|
151
|
+
const promptSignature = hashQuery(`${event}:${gcBranch}:${currentRepo || ''}:${repoScopeStatus}:${prompt}`);
|
|
152
|
+
if (previousCache?.last_prompt_signature === promptSignature &&
|
|
153
|
+
recentDuplicate(previousCache.last_prompt_at, now)) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
120
156
|
const cache = nextCacheState(previousCache, {
|
|
121
157
|
sessionId,
|
|
122
158
|
gcBranch,
|
|
123
159
|
currentRepo,
|
|
124
160
|
repoScopeStatus,
|
|
125
161
|
});
|
|
162
|
+
cache.last_prompt_signature = promptSignature;
|
|
163
|
+
cache.last_prompt_at = now.toISOString();
|
|
126
164
|
let additionalContext;
|
|
127
165
|
if (repoScopeStatus === 'excluded') {
|
|
128
166
|
cache.branch_excluded = true;
|
|
@@ -137,21 +175,42 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
137
175
|
cache.branch_empty = true;
|
|
138
176
|
additionalContext = buildEmptyBranchContext({ gcBranch, currentRepo, cached: wasCached });
|
|
139
177
|
}
|
|
178
|
+
else if (repoScopeStatus === 'unmapped' && currentRepo && cache.unmapped_shown_repos.includes(currentRepo)) {
|
|
179
|
+
// Already showed context for this unmapped repo this session — skip silently.
|
|
180
|
+
cache.updated_at = now.toISOString();
|
|
181
|
+
await writeHookCache(home, cache);
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
140
184
|
else {
|
|
141
|
-
|
|
185
|
+
// For unmapped repos: use prompt only (no repo prefix) to avoid bias; apply higher score threshold.
|
|
186
|
+
const isUnmapped = repoScopeStatus === 'unmapped';
|
|
187
|
+
const query = !isUnmapped && currentRepo ? `${currentRepo} ${prompt}` : prompt;
|
|
142
188
|
const signature = hashQuery(query);
|
|
143
|
-
if (cache.no_match_signatures.includes(signature)) {
|
|
189
|
+
if (!isUnmapped && cache.no_match_signatures.includes(signature)) {
|
|
144
190
|
additionalContext = buildNoMatchContext({ gcBranch, currentRepo, cached: true });
|
|
145
191
|
}
|
|
146
192
|
else {
|
|
147
193
|
const result = await resolveContext({ home, branch: gcBranch, query });
|
|
148
|
-
|
|
194
|
+
const effectiveMatches = result.matches;
|
|
195
|
+
if (effectiveMatches.length === 0) {
|
|
196
|
+
if (isUnmapped) {
|
|
197
|
+
// Unmapped + no strong match: skip silently, no noise.
|
|
198
|
+
cache.updated_at = now.toISOString();
|
|
199
|
+
await writeHookCache(home, cache);
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
149
202
|
cache.no_match_signatures = [...new Set([...cache.no_match_signatures, signature])];
|
|
150
203
|
additionalContext = buildNoMatchContext({ gcBranch, currentRepo, cached: false });
|
|
151
204
|
}
|
|
152
205
|
else {
|
|
153
|
-
|
|
154
|
-
|
|
206
|
+
if (!isUnmapped) {
|
|
207
|
+
cache.no_match_signatures = cache.no_match_signatures.filter((entry) => entry !== signature);
|
|
208
|
+
}
|
|
209
|
+
else if (currentRepo) {
|
|
210
|
+
// Mark this unmapped repo as shown so we don't repeat next prompt.
|
|
211
|
+
cache.unmapped_shown_repos = [...new Set([...cache.unmapped_shown_repos, currentRepo])];
|
|
212
|
+
}
|
|
213
|
+
additionalContext = buildMatchContext({ gcBranch, currentRepo, repoScopeStatus, matches: effectiveMatches });
|
|
155
214
|
}
|
|
156
215
|
}
|
|
157
216
|
if (cache.prompt_count > 0 && cache.prompt_count % SELF_REVIEW_INTERVAL === 0) {
|
|
@@ -159,7 +218,7 @@ export async function dispatchGcTreeHook({ event, home, payload, }) {
|
|
|
159
218
|
cache.prompt_count = 0;
|
|
160
219
|
}
|
|
161
220
|
}
|
|
162
|
-
cache.updated_at =
|
|
221
|
+
cache.updated_at = now.toISOString();
|
|
163
222
|
await writeHookCache(home, cache);
|
|
164
223
|
return { hookSpecificOutput: { hookEventName: event, additionalContext } };
|
|
165
224
|
}
|
package/dist/src/scaffold.js
CHANGED
|
@@ -14,9 +14,9 @@ function renderCodexAgentsSnippet() {
|
|
|
14
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
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]
|
|
18
|
-
'-
|
|
19
|
-
'- Only use tools
|
|
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.',
|
|
20
20
|
'- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
|
|
21
21
|
'- Use `$gc-onboard` only for an empty gc-branch.',
|
|
22
22
|
'- Use `$gc-update-global-context` when durable context in the active gc-branch should change.',
|
|
@@ -33,8 +33,8 @@ function renderCodexBootstrapPrompt() {
|
|
|
33
33
|
' 2. If that misses, run broader related `gctree resolve` queries.',
|
|
34
34
|
' 3. If the concept is documented but not indexed, propose adding it as an Index Entry to the right doc.',
|
|
35
35
|
' 4. Only if gc-tree still does not answer it should you search code or repo docs.',
|
|
36
|
-
'- When hook-injected
|
|
37
|
-
'- 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.',
|
|
38
38
|
'- If hook context is missing, resolve reusable global context before planning or implementation.',
|
|
39
39
|
'- Treat gctree docs as explicit source-of-truth markdown, not hidden memory.',
|
|
40
40
|
'',
|
|
@@ -130,9 +130,9 @@ function renderClaudeSnippet() {
|
|
|
130
130
|
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc.',
|
|
131
131
|
' 4. If it does not exist anywhere → decide whether a new doc is needed and propose it to the user.',
|
|
132
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]
|
|
134
|
-
'-
|
|
135
|
-
'- Only use tools
|
|
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.',
|
|
136
136
|
'- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
|
|
137
137
|
'- Use `/gc-onboard` only for an empty gc-branch.',
|
|
138
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
|