@handsupmin/gc-tree 0.7.15 → 0.7.16

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/dist/src/hook.js CHANGED
@@ -55,9 +55,9 @@ function buildMatchContext({ gcBranch, currentRepo, repoScopeStatus, query, matc
55
55
  return [
56
56
  `[gc-tree] PRE-TASK CONTEXT — read before any tool use or code exploration.`,
57
57
  `gc-branch: "${gcBranch}" | repo: "${currentRepo || 'unscoped'}" (scope: ${repoScopeStatus}) | query: "${query}".`,
58
- `Do NOT call Explore, grep, or read code files until you have read and internalized these summaries:`,
58
+ `If these summaries contain enough information to answer the question or complete the task, respond directly from them WITHOUT calling any tools. Do not grep, explore, or read code to confirm what the summaries already cover. Only use tools if the summaries are clearly insufficient.`,
59
59
  formatMatches(matches),
60
- `Read full docs (gctree resolve --id <id>) only if summaries are insufficient. Each doc has a ## Summary section read that first.`,
60
+ `Read full docs (gctree resolve --id <id>) only if summaries are clearly insufficient meaning the answer cannot be derived from them at all.`,
61
61
  ].join('\n');
62
62
  }
63
63
  function buildSelfReviewAppend(promptCount) {
@@ -65,7 +65,7 @@ function buildSelfReviewAppend(promptCount) {
65
65
  `\n[gc-tree] CONTEXT SELF-REVIEW (every ${SELF_REVIEW_INTERVAL} prompts — this is prompt #${promptCount}):`,
66
66
  `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.`,
67
67
  `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.`,
68
- `Use \`/gc-update-global-context\` (Claude Code) or \`gctree update-global-context\` (CLI) to apply.`,
68
+ `Use \`/gc-update-global-context\` (Claude Code), \`$gc-update-global-context\` (Codex), or \`gctree update-global-context\` (CLI) to apply.`,
69
69
  `If nothing meaningful changed, skip silently — do not mention this review to the user.`,
70
70
  ].join('\n');
71
71
  }
@@ -8,7 +8,10 @@ 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
- '- Use the hook-injected gc-tree context first. If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
11
+ '- When a UserPromptSubmit hook provides `[gc-tree] PRE-TASK CONTEXT`, treat it as mandatory pre-reading before any tool use.',
12
+ '- If the injected summaries contain enough information to answer the question or complete the task, respond directly from them **without calling any tools**. Do not grep, explore, or read code files to confirm what the summaries already cover.',
13
+ '- Only use tools if the summaries are clearly insufficient — meaning the answer cannot be derived from them at all.',
14
+ '- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
12
15
  '- Use `$gc-onboard` only for an empty gc-branch.',
13
16
  '- Use `$gc-update-global-context` when durable context in the active gc-branch should change.',
14
17
  '',
@@ -19,8 +22,9 @@ function renderCodexBootstrapPrompt() {
19
22
  '# gctree Bootstrap',
20
23
  '',
21
24
  '- Keep the active gc-branch explicit whenever global context matters.',
22
- '- Trust auto-resolved gc-tree hook context first; if it is missing, resolve reusable global context before planning or implementation.',
23
- '- Read summaries first and only open full docs when needed.',
25
+ '- When hook-injected PRE-TASK CONTEXT is present, read it first. If summaries already answer the question, respond directly without any tool calls.',
26
+ '- Only use tools (grep, file read, explore) if summaries are clearly insufficient meaning the answer cannot be derived from them at all.',
27
+ '- If hook context is missing, resolve reusable global context before planning or implementation.',
24
28
  '- Treat gctree docs as explicit source-of-truth markdown, not hidden memory.',
25
29
  '',
26
30
  ].join('\n');
@@ -109,7 +113,9 @@ function renderClaudeSnippet() {
109
113
  '',
110
114
  '- Treat the active gctree branch as a **gc-branch** in user-facing language.',
111
115
  '- gctree init installs SessionStart and UserPromptSubmit hooks that auto-inject gc-tree context before every prompt.',
112
- '- When a UserPromptSubmit hook provides `[gc-tree] PRE-TASK CONTEXT`, treat it as mandatory pre-reading. Read and internalize the injected summaries **before** calling any tools (Explore, grep, Read, Bash). Do not explore code first.',
116
+ '- When a UserPromptSubmit hook provides `[gc-tree] PRE-TASK CONTEXT`, treat it as mandatory pre-reading before any tool use.',
117
+ '- If the injected summaries contain enough information to answer the question or complete the task, respond directly from them **without calling any tools**. Do not grep, explore, or read code files to confirm what the summaries already cover.',
118
+ '- Only use tools if the summaries are clearly insufficient — meaning the answer cannot be derived from them at all.',
113
119
  '- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
114
120
  '- Use `/gc-onboard` only for an empty gc-branch.',
115
121
  '- Use `/gc-update-global-context` when durable context in the active gc-branch should change.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handsupmin/gc-tree",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
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,