@handsupmin/gc-tree 0.7.9 → 0.7.10
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 +4 -4
- package/dist/src/scaffold.js +4 -3
- package/package.json +1 -1
package/dist/src/hook.js
CHANGED
|
@@ -52,11 +52,11 @@ function buildNoMatchContext({ gcBranch, currentRepo, query, cached, }) {
|
|
|
52
52
|
}
|
|
53
53
|
function buildMatchContext({ gcBranch, currentRepo, repoScopeStatus, query, matches, }) {
|
|
54
54
|
return [
|
|
55
|
-
`gc-tree
|
|
56
|
-
`
|
|
57
|
-
`
|
|
55
|
+
`[gc-tree] PRE-TASK CONTEXT — read before any tool use or code exploration.`,
|
|
56
|
+
`gc-branch: "${gcBranch}" | repo: "${currentRepo || 'unscoped'}" (scope: ${repoScopeStatus}) | query: "${query}".`,
|
|
57
|
+
`Do NOT call Explore, grep, or read code files until you have read and internalized these summaries:`,
|
|
58
58
|
formatMatches(matches),
|
|
59
|
-
`Read full docs only if
|
|
59
|
+
`Read full docs (gctree resolve --id <id>) only if summaries are insufficient. Each doc has a ## Summary section — read that first.`,
|
|
60
60
|
].join('\n');
|
|
61
61
|
}
|
|
62
62
|
async function readHookCache(home, sessionId) {
|
package/dist/src/scaffold.js
CHANGED
|
@@ -108,8 +108,9 @@ function renderClaudeSnippet() {
|
|
|
108
108
|
'# gctree Claude Code integration snippet',
|
|
109
109
|
'',
|
|
110
110
|
'- Treat the active gctree branch as a **gc-branch** in user-facing language.',
|
|
111
|
-
'- gctree init installs SessionStart and UserPromptSubmit hooks that auto-
|
|
112
|
-
'-
|
|
111
|
+
'- 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.',
|
|
113
|
+
'- If hooks are unavailable or clearly stale, run `gctree status` and `gctree resolve --query "<task>"` yourself before planning or implementation.',
|
|
113
114
|
'- Use `/gc-onboard` only for an empty gc-branch.',
|
|
114
115
|
'- Use `/gc-update-global-context` when durable context in the active gc-branch should change.',
|
|
115
116
|
'',
|
|
@@ -119,7 +120,7 @@ function renderClaudeSessionStartHook() {
|
|
|
119
120
|
return [
|
|
120
121
|
'# gctree Claude Code SessionStart note',
|
|
121
122
|
'',
|
|
122
|
-
'- gctree init installs real SessionStart/UserPromptSubmit hooks via `.claude/
|
|
123
|
+
'- gctree init installs real SessionStart/UserPromptSubmit hooks via `.claude/settings.json`.',
|
|
123
124
|
'- At session start, use the injected hook context to confirm the active gc-branch.',
|
|
124
125
|
'- Refer to gctree branches as **gc-branches** in user-facing language.',
|
|
125
126
|
'- If hook context is missing or stale, resolve summaries before planning or implementation when branch-level context may change the answer.',
|