@handsupmin/gc-tree 0.8.7 → 0.8.9
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.
|
@@ -20,11 +20,13 @@ export function onboardingProtocolLines() {
|
|
|
20
20
|
'For each work type, ask how that work shows up day to day.',
|
|
21
21
|
'Only after the work types are clear should you ask which repositories are involved in each work type.',
|
|
22
22
|
'Once the user names concrete repositories, do not ask them to explain those repositories from scratch when recoverable local evidence exists.',
|
|
23
|
-
'For each repository that can be inspected locally
|
|
23
|
+
'For each repository that can be inspected locally: (a) read README and any docs first for orientation; (b) then actively sample code — find and read at minimum one controller or route handler, one service or use-case file, and one DTO or schema definition; use `find` to locate representative files if needed; (c) extract concrete patterns from sampled code: naming conventions, validation style, error handling, response shape, spread vs. assign patterns, decorator usage, any notable quirks; (d) present a hypothesis covering repo role, important paths, cross-repo dependencies, and the concrete patterns you observed.',
|
|
24
24
|
'After that repository-level hypothesis, ask the user to choose only one structured confirmation: 1. This is mostly correct. 2. Some parts are wrong. Please explain what differs. 3. Most of this is wrong. Please explain the right frame.',
|
|
25
25
|
'When local evidence already covers the repository role, important paths, workflow, or conventions well enough, skip the open-ended questions and ask only for missing deltas.',
|
|
26
26
|
'Only ask open-ended repository questions when the needed detail cannot be recovered responsibly from local evidence.',
|
|
27
27
|
'After the user\'s first answer, proactively inspect relevant local repos, docs, paths, and workflows whenever the connection is strong enough to test your current frame.',
|
|
28
|
+
'For each confirmed repository, write a `docs/conventions/<repo>.md` file that includes a `## Patterns` section with the concrete code patterns extracted from sampled files — this file is what Claude will use on future tasks instead of re-reading code each time.',
|
|
29
|
+
'After individual repos are covered, ask explicitly about cross-repo workflows: for each domain action that spans repos (e.g. "add a DB column", "add an admin endpoint", "deploy a feature"), document the exact sequence of repos and steps as a dedicated file in `docs/workflows/` — these are the highest-value outputs of onboarding.',
|
|
28
30
|
'Ask whether there are additional repositories for the current work type before moving on.',
|
|
29
31
|
'After repository coverage, ask for company/domain glossary terms and acronyms that should become durable context.',
|
|
30
32
|
'Then ask which verification commands should be treated as defaults for this kind of work.',
|
package/dist/src/scaffold.js
CHANGED
|
@@ -8,8 +8,9 @@ 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
|
-
'-
|
|
12
|
-
'
|
|
11
|
+
'- Before starting ANY codebase task — new feature, schema change, bug fix, admin work, or any question about how something works — run `gctree resolve` first. Do not assume you know the domain from code alone. Field names, model names, repo names, and feature names are NOT self-explanatory; always verify workflows and cross-repo relationships via gc-tree before touching code.',
|
|
12
|
+
'- Follow this scope-aware protocol before any grep, file read, or code exploration:',
|
|
13
|
+
' 1. Always run `gctree resolve --query "<task or term>"` first. If matched, use the result directly.',
|
|
13
14
|
' 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
15
|
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc.',
|
|
15
16
|
' 4. If it does not exist anywhere → decide whether a new doc is needed and propose it to the user.',
|
|
@@ -28,8 +29,8 @@ function renderCodexBootstrapPrompt() {
|
|
|
28
29
|
'# gctree Bootstrap',
|
|
29
30
|
'',
|
|
30
31
|
'- Keep the active gc-branch explicit whenever global context matters.',
|
|
31
|
-
'-
|
|
32
|
-
' 1. Run `gctree resolve --query "<term>"`.',
|
|
32
|
+
'- Before any codebase task — feature, schema change, bug fix, admin work — do **not** grep or read code first. Follow this exact order:',
|
|
33
|
+
' 1. Run `gctree resolve --query "<task or term>"`.',
|
|
33
34
|
' 2. If that misses, run broader related `gctree resolve` queries.',
|
|
34
35
|
' 3. If the concept is documented but not indexed, propose adding it as an Index Entry to the right doc.',
|
|
35
36
|
' 4. Only if gc-tree still does not answer it should you search code or repo docs.',
|
|
@@ -124,8 +125,9 @@ function renderClaudeSnippet() {
|
|
|
124
125
|
'',
|
|
125
126
|
'- Treat the active gctree branch as a **gc-branch** in user-facing language.',
|
|
126
127
|
'- gctree init installs SessionStart and UserPromptSubmit hooks that auto-inject gc-tree context before every prompt.',
|
|
127
|
-
'-
|
|
128
|
-
'
|
|
128
|
+
'- Before starting ANY codebase task — new feature, schema change, bug fix, admin work, or any question about how something works — run `gctree resolve` first. Do not assume you know the domain from code alone. Field names, model names, repo names, and feature names are NOT self-explanatory; always verify workflows and cross-repo relationships via gc-tree before touching code.',
|
|
129
|
+
'- Follow this scope-aware protocol before any grep, file read, or code exploration:',
|
|
130
|
+
' 1. Always run `gctree resolve --query "<task or term>"` first. If matched, use the result directly.',
|
|
129
131
|
' 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
132
|
' 3. If the concept exists in a doc but was not indexed → propose adding it as an Index Entry to that doc.',
|
|
131
133
|
' 4. If it does not exist anywhere → decide whether a new doc is needed and propose it to the user.',
|
package/package.json
CHANGED
package/skills/onboard/SKILL.md
CHANGED
|
@@ -21,6 +21,9 @@ Use this when a user wants to create global context for a product, company, or w
|
|
|
21
21
|
- if no docs are available, continue from the user's own description first, then after the user's first answer, proactively inspect related repos, docs, paths, and workflows that appear materially connected
|
|
22
22
|
- use bounded local inspection to confirm or challenge the user's description instead of waiting for them to enumerate every related repo manually
|
|
23
23
|
- do not inspect every source file; prefer docs, READMEs, summaries, and a few pointed paths first
|
|
24
|
+
- for every repo that can be inspected locally, go beyond READMEs: sample at least one controller or route handler, one service or use-case file, and one DTO or schema definition — extract concrete patterns directly from code rather than asking the user to describe them
|
|
25
|
+
- every repo doc must include a `## Patterns` section documenting conventions visible in the actual code: naming conventions, validation style, error handling, response shape, dependency injection style, and any notable quirks
|
|
26
|
+
- capture cross-repo workflows explicitly: for any domain action that spans repos (schema change, new feature, admin work, migration, deployment), document which repos are involved and in what order as a dedicated workflow doc in `docs/workflows/`
|
|
24
27
|
- when you do present a hypothesis, keep it lightweight and only after the user has narrowed the scope
|
|
25
28
|
- offer only these structured numbered confirmations:
|
|
26
29
|
1. This is mostly correct.
|
|
@@ -68,7 +71,11 @@ Use this when a user wants to create global context for a product, company, or w
|
|
|
68
71
|
14. For each work type, ask how it shows up in day-to-day work.
|
|
69
72
|
15. Only after that ask which repositories are involved in that work type, and ask whether there are more repositories for that same work type.
|
|
70
73
|
16. Once the user names concrete repositories, do not ask them to explain those repositories from scratch when recoverable local evidence exists.
|
|
71
|
-
17. For each repository that can be inspected locally
|
|
74
|
+
17. For each repository that can be inspected locally:
|
|
75
|
+
a. Read README and any existing docs first to get orientation.
|
|
76
|
+
b. Then actively sample code — find and read at minimum: one controller or route handler, one service or use-case file, one DTO or schema definition. Use `find` to locate representative files if needed.
|
|
77
|
+
c. Extract concrete patterns from the sampled code: naming conventions, validation approach, error handling style, response shape, spread vs. assign patterns, decorator usage, etc.
|
|
78
|
+
d. Present a short hypothesis covering: repo role, important paths, cross-repo dependencies, workflow (e.g. "schema changes go to db-migration repo"), and the concrete patterns you observed in code.
|
|
72
79
|
18. After each repository-level hypothesis, ask the user to choose only one:
|
|
73
80
|
- 1. This is mostly correct.
|
|
74
81
|
- 2. Some parts are wrong. Please explain what differs.
|
|
@@ -76,6 +83,8 @@ Use this when a user wants to create global context for a product, company, or w
|
|
|
76
83
|
19. When the inspected evidence already covers the repository well enough, ask only for the missing deltas instead of re-asking role, paths, and workflow from scratch.
|
|
77
84
|
20. Only ask open-ended repository questions when the needed detail cannot be recovered responsibly from local evidence.
|
|
78
85
|
21. After the user's first answer, proactively inspect relevant local repos, docs, paths, and workflows whenever the connection is strong enough to test your current frame.
|
|
86
|
+
21a. For each confirmed repo, write a `docs/conventions/<repo>.md` file that includes: repo role, key paths, and a `## Patterns` section with the concrete code patterns extracted from sampled files. Do not skip this file — it is what Claude will use instead of re-reading code on every task.
|
|
87
|
+
21b. After covering individual repos, ask explicitly about cross-repo workflows. For each domain action the user names (e.g. "add a DB column", "add an admin endpoint", "deploy a feature"), document the exact sequence of repos and steps as a dedicated file in `docs/workflows/`. These workflow docs are the highest-value output of onboarding.
|
|
79
88
|
22. Ask for company/domain glossary terms and acronyms that should become durable context.
|
|
80
89
|
23. Ask which verification commands should be treated as defaults for this gc-branch.
|
|
81
90
|
24. Structure the durable docs as a small encyclopedia: split by category directory, keep one concept/repo/workflow/convention per file when possible, and keep a short `## Summary` at the top of each doc.
|