@handsupmin/gc-tree 0.8.4 → 0.8.5
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/repo-map.js +2 -1
- package/dist/src/scaffold.js +10 -8
- package/package.json +1 -1
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,11 +8,12 @@ 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
|
+
' — If the repo is **unmapped** or **excluded**: do step 1 only; if no match, skip and proceed normally.',
|
|
16
17
|
'- When a UserPromptSubmit hook provides `[gc-tree] PRE-TASK CONTEXT`, treat it as mandatory pre-reading before any tool use.',
|
|
17
18
|
'- 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.',
|
|
18
19
|
'- Only use tools if the summaries are clearly insufficient — meaning the answer cannot be derived from them at all.',
|
|
@@ -123,11 +124,12 @@ 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.',
|
|
132
|
+
' — If the repo is **unmapped** or **excluded**: do step 1 only; if no match, skip and proceed normally.',
|
|
131
133
|
'- When a UserPromptSubmit hook provides `[gc-tree] PRE-TASK CONTEXT`, treat it as mandatory pre-reading before any tool use.',
|
|
132
134
|
'- 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.',
|
|
133
135
|
'- Only use tools if the summaries are clearly insufficient — meaning the answer cannot be derived from them at all.',
|