@handsupmin/gc-tree 0.1.1

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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.es.md +166 -0
  3. package/README.ja.md +166 -0
  4. package/README.ko.md +166 -0
  5. package/README.md +166 -0
  6. package/README.zh.md +166 -0
  7. package/dist/src/cli.js +360 -0
  8. package/dist/src/markdown.js +81 -0
  9. package/dist/src/onboard.js +36 -0
  10. package/dist/src/onboarding-protocol.js +38 -0
  11. package/dist/src/paths.js +28 -0
  12. package/dist/src/proposals.js +73 -0
  13. package/dist/src/provider.js +121 -0
  14. package/dist/src/repo-map.js +149 -0
  15. package/dist/src/resolve.js +38 -0
  16. package/dist/src/scaffold.js +199 -0
  17. package/dist/src/settings.js +30 -0
  18. package/dist/src/store.js +149 -0
  19. package/dist/src/types.js +1 -0
  20. package/dist/src/update.js +26 -0
  21. package/docs/concept.es.md +81 -0
  22. package/docs/concept.ja.md +81 -0
  23. package/docs/concept.ko.md +81 -0
  24. package/docs/concept.md +81 -0
  25. package/docs/concept.zh.md +81 -0
  26. package/docs/local-development.es.md +83 -0
  27. package/docs/local-development.ja.md +83 -0
  28. package/docs/local-development.ko.md +83 -0
  29. package/docs/local-development.md +83 -0
  30. package/docs/local-development.zh.md +83 -0
  31. package/docs/principles.es.md +49 -0
  32. package/docs/principles.ja.md +49 -0
  33. package/docs/principles.ko.md +49 -0
  34. package/docs/principles.md +50 -0
  35. package/docs/principles.zh.md +49 -0
  36. package/docs/usage.es.md +119 -0
  37. package/docs/usage.ja.md +119 -0
  38. package/docs/usage.ko.md +119 -0
  39. package/docs/usage.md +121 -0
  40. package/docs/usage.zh.md +119 -0
  41. package/package.json +32 -0
  42. package/skills/checkout/SKILL.md +17 -0
  43. package/skills/onboard/SKILL.md +74 -0
  44. package/skills/reset-gc-branch/SKILL.md +14 -0
  45. package/skills/resolve-context/SKILL.md +21 -0
  46. package/skills/update-global-context/SKILL.md +21 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: onboard
3
+ description: Launch guided onboarding for the active gc-branch through the configured provider.
4
+ ---
5
+
6
+ # gctree Onboard
7
+
8
+ Use this when a user wants to create global context for a product, company, or workstream in an empty gc-branch.
9
+
10
+ ## Rules
11
+ - ask one question at a time
12
+ - keep the active gc-branch explicit
13
+ - this is global-context onboarding, not repo-local onboarding
14
+ - wait for the user's first answer before inspecting anything on your own
15
+ - start by asking the user to paste or share organized docs or reference material if they have any; otherwise ask what kind of work they mainly do
16
+ - do not start with a repo scan, a company guess, or a broad hypothesis built from directories like `~/sources`
17
+ - do not ask for a full information dump up front
18
+ - if docs, reference material, or reference paths are provided, read them first and summarize your understanding back before asking for more
19
+ - ask whether that summary is correct before continuing, let the user correct it, and skip questions the docs already answered well
20
+ - if no docs are available, continue from the user's own description first and ask for the most relevant repo, path, or file only when needed
21
+ - only inspect docs, repos, directories, or files after the user has pointed you at them or confirmed they matter
22
+ - dig only through the user-provided material and the minimum related files needed for the next question
23
+ - do not inspect every source file; prefer docs, READMEs, summaries, and a few pointed paths first
24
+ - when you do present a hypothesis, keep it lightweight and only after the user has narrowed the scope
25
+ - use structured numbered confirmations like:
26
+ 1. This is basically correct.
27
+ 2. Part of it is wrong. I will explain what differs.
28
+ 3. This is the wrong frame. I will explain what you should inspect or how this gc-branch should be approached.
29
+ - if the user picks 2 or 3, ask only for the delta or better pointer instead of restarting from scratch
30
+ - ask whether anything important is still missing before continuing deeper
31
+ - do not start by asking what one repo does
32
+ - ask who the person is and what work they usually own only after the provided docs or description still leave real gaps
33
+ - ask for multiple work types if needed, then multiple repos inside each work type if needed
34
+ - ask about glossary terms and default verification commands before you finish
35
+ - write compact source docs with a required `## Summary` section near the top
36
+ - keep `index.md` as an index only
37
+ - use onboarding only for an empty gc-branch
38
+
39
+ ## Procedure
40
+ 1. Confirm which gc-branch should hold this context. Offer `main` as the default.
41
+ 2. If the gc-branch already contains docs, stop and direct the user to `gctree reset-gc-branch --branch <current-gc-branch> --yes` or `gctree update-global-context`.
42
+ 3. Wait for the user's first answer. Start by asking them to paste or share organized docs or reference material if they have any; otherwise ask what kind of work they mainly do.
43
+ 4. Do not scan broad directories like `~/sources`, guess the company/product from unrelated repos, or inspect every source file before the user narrows the scope.
44
+ 5. If docs, reference material, or reference paths are provided, read those first, summarize your understanding back, ask whether that summary is correct, and ask whether anything important is still missing before moving on.
45
+ 6. If no docs are available, continue from the user's own description first and ask for the most relevant repo, path, or file only when needed.
46
+ 7. Only inspect docs, repos, directories, or files after the user has pointed you at them or confirmed they matter.
47
+ 8. When you inspect, dig only through the user-provided material and the minimum related files needed for the next question. Prefer docs, READMEs, summaries, and a few pointed paths first.
48
+ 9. Once the scope is narrow enough, present a lightweight hypothesis from the evidence you inspected, then ask the user to choose one:
49
+ 1. This is basically correct.
50
+ 2. Part of it is wrong. I will explain what differs.
51
+ 3. This is the wrong frame. I will explain what you should inspect or how this gc-branch should be approached.
52
+ 10. If the user picks 2 or 3, ask only for the delta or the next best pointer to inspect instead of requesting a full rewrite of the context.
53
+ 11. When the inspected evidence already covers the basics well, confirm that and skip ahead to the missing parts instead of re-asking everything from scratch.
54
+ 12. Start from the person only when the provided docs or description still do not make that clear:
55
+ - who they are
56
+ - what kind of work they usually own or lead
57
+ 13. Ask for one core recurring work type only when the provided docs or description still do not make the work types clear, then ask whether there are more work types to capture.
58
+ 14. For each work type, ask how it shows up in day-to-day work.
59
+ 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.
60
+ 16. For each relevant repo, ask:
61
+ - what role it plays
62
+ - which paths matter most
63
+ - what the actual workflow is
64
+ - what hidden conventions, glossary terms, boundaries, or constraints matter
65
+ 17. If a relevant repo, path, or doc is available locally and the user has pointed you to it, inspect it and show a lightweight hypothesis so the user can correct your frame.
66
+ 18. Ask for company/domain glossary terms and acronyms that should become durable context.
67
+ 19. Ask which verification commands should be treated as defaults for this gc-branch.
68
+ 20. Launch the guided onboarding flow with `gctree onboard [--branch <name>]`.
69
+ 21. After the onboarding docs are written, explicitly list which durable docs were saved.
70
+ 22. Summarize what you now understand from the saved docs instead of ending at the filenames alone.
71
+ 23. Ask whether that final summary matches the user's reality, and capture any corrections before you wrap up.
72
+ 24. Ask whether anything else should be saved while the context is still fresh.
73
+ 25. End with remaining risks, blind spots, or details that still need confirmation, and remind the user that future changes belong in `gctree update-global-context`.
74
+ 26. Keep the current gc-branch explicit while gathering context.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: reset-gc-branch
3
+ description: Clear an existing gc-branch so it can be onboarded again.
4
+ ---
5
+
6
+ # gctree Reset gc-branch
7
+
8
+ Use this when a gc-branch already contains context but the user truly wants to start that gc-branch over from an empty state.
9
+
10
+ ## Procedure
11
+ 1. Confirm which gc-branch will be reset.
12
+ 2. Remind the user that this clears the current branch context so onboarding can run again.
13
+ 3. Run `gctree reset-gc-branch --branch <name> --yes`.
14
+ 4. After reset, use `gctree onboard` to launch guided onboarding again.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: resolve-context
3
+ description: Resolve relevant context from the active gc-branch.
4
+ ---
5
+
6
+ # gctree Resolve Context
7
+
8
+ Use this before planning or implementation when the current tool supports reading external markdown context.
9
+
10
+ ## Rules
11
+ - consult `index.md` first
12
+ - prefer summaries before full-document reads
13
+ - stay inside the active gc-branch only
14
+ - do not treat linked docs as hidden memory; they are explicit source-of-truth docs
15
+
16
+ ## Procedure
17
+ 1. Run `gctree status` if the active gc-branch is unclear.
18
+ 2. Explicitly state which gc-branch is active.
19
+ 3. Run `gctree resolve --query <text>`.
20
+ 4. Read the returned summaries first.
21
+ 5. Read the full linked docs only if the summary is not enough.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: update-global-context
3
+ description: Launch a guided durable update for the active gc-branch.
4
+ ---
5
+
6
+ # gctree Update Global Context
7
+
8
+ Use this when work has revealed a durable change that should update the active gc-branch's global context.
9
+
10
+ ## Hard rule
11
+ Do not re-onboard a non-empty gc-branch.
12
+ Use guided updates for durable changes and reserve onboarding for empty gc-branches only.
13
+
14
+ ## Procedure
15
+ 1. Summarize what changed and why it should become durable context.
16
+ 2. Confirm the active gc-branch with `gctree status`.
17
+ 3. Launch the guided update flow with one of:
18
+ - `gctree update-global-context`
19
+ - `gctree update-gc`
20
+ - `gctree ugc`
21
+ 4. Keep the current gc-branch explicit throughout the conversation.