ragarciaruben 1.20.7

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 (184) hide show
  1. package/.github/copilot-context/README.md +313 -0
  2. package/.github/copilot-context/agents/executor.agent.md +59 -0
  3. package/.github/copilot-context/agents/planner.agent.md +58 -0
  4. package/.github/copilot-context/agents/verifier.agent.md +68 -0
  5. package/.github/copilot-context/hooks/hooks.json +11 -0
  6. package/.github/copilot-context/hooks/inject-context.js +107 -0
  7. package/.github/copilot-context/instructions/architecture.instructions.md +33 -0
  8. package/.github/copilot-context/instructions/concerns.instructions.md +30 -0
  9. package/.github/copilot-context/instructions/conventions.instructions.md +25 -0
  10. package/.github/copilot-context/instructions/integrations.instructions.md +30 -0
  11. package/.github/copilot-context/instructions/stack.instructions.md +30 -0
  12. package/.github/copilot-context/instructions/structure.instructions.md +32 -0
  13. package/.github/copilot-context/instructions/testing.instructions.md +25 -0
  14. package/.github/copilot-context/prompts/execute-phase.prompt.md +148 -0
  15. package/.github/copilot-context/prompts/map-codebase.prompt.md +115 -0
  16. package/.github/copilot-context/prompts/new-project.prompt.md +85 -0
  17. package/.github/copilot-context/prompts/pause-work.prompt.md +104 -0
  18. package/.github/copilot-context/prompts/plan-phase.prompt.md +137 -0
  19. package/.github/copilot-context/prompts/progress.prompt.md +69 -0
  20. package/.github/copilot-context/prompts/resume-work.prompt.md +74 -0
  21. package/.github/copilot-context/prompts/sync-instructions.prompt.md +86 -0
  22. package/.github/copilot-context/prompts/verify-work.prompt.md +126 -0
  23. package/.github/copilot-context/skills/map-codebase/SKILL.md +49 -0
  24. package/.github/copilot-context/skills/project-history/SKILL.md +46 -0
  25. package/.github/copilot-instructions.md +68 -0
  26. package/.planning/PROJECT.md +61 -0
  27. package/.planning/REQUIREMENTS.md +70 -0
  28. package/.planning/ROADMAP.md +75 -0
  29. package/.planning/STATE.md +75 -0
  30. package/.planning/codebase/ARCHITECTURE.md +76 -0
  31. package/.planning/codebase/CONCERNS.md +102 -0
  32. package/.planning/codebase/CONVENTIONS.md +119 -0
  33. package/.planning/codebase/INTEGRATIONS.md +114 -0
  34. package/.planning/codebase/STACK.md +78 -0
  35. package/.planning/codebase/STRUCTURE.md +75 -0
  36. package/.planning/codebase/TESTING.md +157 -0
  37. package/.planning/continue-here.md +44 -0
  38. package/.vscode/settings.json +16 -0
  39. package/LICENSE +21 -0
  40. package/README.md +704 -0
  41. package/agents/gsd-codebase-mapper.md +764 -0
  42. package/agents/gsd-debugger.md +1246 -0
  43. package/agents/gsd-executor.md +469 -0
  44. package/agents/gsd-integration-checker.md +443 -0
  45. package/agents/gsd-phase-researcher.md +546 -0
  46. package/agents/gsd-plan-checker.md +690 -0
  47. package/agents/gsd-planner.md +1275 -0
  48. package/agents/gsd-project-researcher.md +621 -0
  49. package/agents/gsd-research-synthesizer.md +239 -0
  50. package/agents/gsd-roadmapper.md +642 -0
  51. package/agents/gsd-verifier.md +573 -0
  52. package/bin/install.js +2091 -0
  53. package/bin/setup-copilot-context.js +180 -0
  54. package/commands/gsd/add-phase.md +43 -0
  55. package/commands/gsd/add-tests.md +41 -0
  56. package/commands/gsd/add-todo.md +47 -0
  57. package/commands/gsd/audit-milestone.md +36 -0
  58. package/commands/gsd/check-todos.md +45 -0
  59. package/commands/gsd/cleanup.md +18 -0
  60. package/commands/gsd/complete-milestone.md +136 -0
  61. package/commands/gsd/debug.md +167 -0
  62. package/commands/gsd/discuss-phase.md +83 -0
  63. package/commands/gsd/execute-phase.md +41 -0
  64. package/commands/gsd/health.md +22 -0
  65. package/commands/gsd/help.md +22 -0
  66. package/commands/gsd/insert-phase.md +32 -0
  67. package/commands/gsd/join-discord.md +18 -0
  68. package/commands/gsd/list-phase-assumptions.md +46 -0
  69. package/commands/gsd/map-codebase.md +71 -0
  70. package/commands/gsd/new-milestone.md +44 -0
  71. package/commands/gsd/new-project.md +42 -0
  72. package/commands/gsd/new-project.md.bak +1041 -0
  73. package/commands/gsd/pause-work.md +38 -0
  74. package/commands/gsd/plan-milestone-gaps.md +34 -0
  75. package/commands/gsd/plan-phase.md +45 -0
  76. package/commands/gsd/progress.md +24 -0
  77. package/commands/gsd/quick.md +41 -0
  78. package/commands/gsd/reapply-patches.md +110 -0
  79. package/commands/gsd/remove-phase.md +31 -0
  80. package/commands/gsd/research-phase.md +189 -0
  81. package/commands/gsd/resume-work.md +40 -0
  82. package/commands/gsd/set-profile.md +34 -0
  83. package/commands/gsd/settings.md +36 -0
  84. package/commands/gsd/update.md +37 -0
  85. package/commands/gsd/verify-work.md +38 -0
  86. package/get-shit-done/bin/gsd-tools.cjs +585 -0
  87. package/get-shit-done/bin/lib/commands.cjs +553 -0
  88. package/get-shit-done/bin/lib/config.cjs +162 -0
  89. package/get-shit-done/bin/lib/core.cjs +411 -0
  90. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  91. package/get-shit-done/bin/lib/init.cjs +710 -0
  92. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  93. package/get-shit-done/bin/lib/phase.cjs +870 -0
  94. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  95. package/get-shit-done/bin/lib/state.cjs +521 -0
  96. package/get-shit-done/bin/lib/template.cjs +222 -0
  97. package/get-shit-done/bin/lib/verify.cjs +772 -0
  98. package/get-shit-done/references/checkpoints.md +776 -0
  99. package/get-shit-done/references/continuation-format.md +249 -0
  100. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  101. package/get-shit-done/references/git-integration.md +248 -0
  102. package/get-shit-done/references/git-planning-commit.md +38 -0
  103. package/get-shit-done/references/model-profile-resolution.md +34 -0
  104. package/get-shit-done/references/model-profiles.md +92 -0
  105. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  106. package/get-shit-done/references/planning-config.md +196 -0
  107. package/get-shit-done/references/questioning.md +145 -0
  108. package/get-shit-done/references/tdd.md +263 -0
  109. package/get-shit-done/references/ui-brand.md +160 -0
  110. package/get-shit-done/references/verification-patterns.md +612 -0
  111. package/get-shit-done/templates/DEBUG.md +164 -0
  112. package/get-shit-done/templates/UAT.md +247 -0
  113. package/get-shit-done/templates/VALIDATION.md +76 -0
  114. package/get-shit-done/templates/codebase/architecture.md +255 -0
  115. package/get-shit-done/templates/codebase/concerns.md +310 -0
  116. package/get-shit-done/templates/codebase/conventions.md +307 -0
  117. package/get-shit-done/templates/codebase/integrations.md +280 -0
  118. package/get-shit-done/templates/codebase/stack.md +186 -0
  119. package/get-shit-done/templates/codebase/structure.md +285 -0
  120. package/get-shit-done/templates/codebase/testing.md +480 -0
  121. package/get-shit-done/templates/config.json +37 -0
  122. package/get-shit-done/templates/context.md +283 -0
  123. package/get-shit-done/templates/continue-here.md +78 -0
  124. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  125. package/get-shit-done/templates/discovery.md +146 -0
  126. package/get-shit-done/templates/milestone-archive.md +123 -0
  127. package/get-shit-done/templates/milestone.md +115 -0
  128. package/get-shit-done/templates/phase-prompt.md +569 -0
  129. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  130. package/get-shit-done/templates/project.md +184 -0
  131. package/get-shit-done/templates/requirements.md +231 -0
  132. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  133. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  134. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  135. package/get-shit-done/templates/research-project/STACK.md +120 -0
  136. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  137. package/get-shit-done/templates/research.md +552 -0
  138. package/get-shit-done/templates/retrospective.md +54 -0
  139. package/get-shit-done/templates/roadmap.md +202 -0
  140. package/get-shit-done/templates/state.md +176 -0
  141. package/get-shit-done/templates/summary-complex.md +59 -0
  142. package/get-shit-done/templates/summary-minimal.md +41 -0
  143. package/get-shit-done/templates/summary-standard.md +48 -0
  144. package/get-shit-done/templates/summary.md +248 -0
  145. package/get-shit-done/templates/user-setup.md +311 -0
  146. package/get-shit-done/templates/verification-report.md +322 -0
  147. package/get-shit-done/workflows/add-phase.md +111 -0
  148. package/get-shit-done/workflows/add-tests.md +350 -0
  149. package/get-shit-done/workflows/add-todo.md +157 -0
  150. package/get-shit-done/workflows/audit-milestone.md +297 -0
  151. package/get-shit-done/workflows/check-todos.md +176 -0
  152. package/get-shit-done/workflows/cleanup.md +152 -0
  153. package/get-shit-done/workflows/complete-milestone.md +763 -0
  154. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  155. package/get-shit-done/workflows/discovery-phase.md +289 -0
  156. package/get-shit-done/workflows/discuss-phase.md +542 -0
  157. package/get-shit-done/workflows/execute-phase.md +449 -0
  158. package/get-shit-done/workflows/execute-plan.md +448 -0
  159. package/get-shit-done/workflows/health.md +156 -0
  160. package/get-shit-done/workflows/help.md +489 -0
  161. package/get-shit-done/workflows/insert-phase.md +129 -0
  162. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  163. package/get-shit-done/workflows/map-codebase.md +315 -0
  164. package/get-shit-done/workflows/new-milestone.md +382 -0
  165. package/get-shit-done/workflows/new-project.md +1116 -0
  166. package/get-shit-done/workflows/pause-work.md +122 -0
  167. package/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  168. package/get-shit-done/workflows/plan-phase.md +569 -0
  169. package/get-shit-done/workflows/progress.md +381 -0
  170. package/get-shit-done/workflows/quick.md +453 -0
  171. package/get-shit-done/workflows/remove-phase.md +154 -0
  172. package/get-shit-done/workflows/research-phase.md +73 -0
  173. package/get-shit-done/workflows/resume-project.md +306 -0
  174. package/get-shit-done/workflows/set-profile.md +80 -0
  175. package/get-shit-done/workflows/settings.md +213 -0
  176. package/get-shit-done/workflows/transition.md +544 -0
  177. package/get-shit-done/workflows/update.md +219 -0
  178. package/get-shit-done/workflows/verify-phase.md +242 -0
  179. package/get-shit-done/workflows/verify-work.md +569 -0
  180. package/hooks/dist/gsd-check-update.js +62 -0
  181. package/hooks/dist/gsd-context-monitor.js +122 -0
  182. package/hooks/dist/gsd-statusline.js +108 -0
  183. package/package.json +54 -0
  184. package/scripts/build-hooks.js +43 -0
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env node
2
+ // Context Monitor - PostToolUse hook
3
+ // Reads context metrics from the statusline bridge file and injects
4
+ // warnings when context usage is high. This makes the AGENT aware of
5
+ // context limits (the statusline only shows the user).
6
+ //
7
+ // How it works:
8
+ // 1. The statusline hook writes metrics to /tmp/claude-ctx-{session_id}.json
9
+ // 2. This hook reads those metrics after each tool use
10
+ // 3. When remaining context drops below thresholds, it injects a warning
11
+ // as additionalContext, which the agent sees in its conversation
12
+ //
13
+ // Thresholds:
14
+ // WARNING (remaining <= 35%): Agent should wrap up current task
15
+ // CRITICAL (remaining <= 25%): Agent should stop immediately and save state
16
+ //
17
+ // Debounce: 5 tool uses between warnings to avoid spam
18
+ // Severity escalation bypasses debounce (WARNING -> CRITICAL fires immediately)
19
+
20
+ const fs = require('fs');
21
+ const os = require('os');
22
+ const path = require('path');
23
+
24
+ const WARNING_THRESHOLD = 35; // remaining_percentage <= 35%
25
+ const CRITICAL_THRESHOLD = 25; // remaining_percentage <= 25%
26
+ const STALE_SECONDS = 60; // ignore metrics older than 60s
27
+ const DEBOUNCE_CALLS = 5; // min tool uses between warnings
28
+
29
+ let input = '';
30
+ process.stdin.setEncoding('utf8');
31
+ process.stdin.on('data', chunk => input += chunk);
32
+ process.stdin.on('end', () => {
33
+ try {
34
+ const data = JSON.parse(input);
35
+ const sessionId = data.session_id;
36
+
37
+ if (!sessionId) {
38
+ process.exit(0);
39
+ }
40
+
41
+ const tmpDir = os.tmpdir();
42
+ const metricsPath = path.join(tmpDir, `claude-ctx-${sessionId}.json`);
43
+
44
+ // If no metrics file, this is a subagent or fresh session -- exit silently
45
+ if (!fs.existsSync(metricsPath)) {
46
+ process.exit(0);
47
+ }
48
+
49
+ const metrics = JSON.parse(fs.readFileSync(metricsPath, 'utf8'));
50
+ const now = Math.floor(Date.now() / 1000);
51
+
52
+ // Ignore stale metrics
53
+ if (metrics.timestamp && (now - metrics.timestamp) > STALE_SECONDS) {
54
+ process.exit(0);
55
+ }
56
+
57
+ const remaining = metrics.remaining_percentage;
58
+ const usedPct = metrics.used_pct;
59
+
60
+ // No warning needed
61
+ if (remaining > WARNING_THRESHOLD) {
62
+ process.exit(0);
63
+ }
64
+
65
+ // Debounce: check if we warned recently
66
+ const warnPath = path.join(tmpDir, `claude-ctx-${sessionId}-warned.json`);
67
+ let warnData = { callsSinceWarn: 0, lastLevel: null };
68
+ let firstWarn = true;
69
+
70
+ if (fs.existsSync(warnPath)) {
71
+ try {
72
+ warnData = JSON.parse(fs.readFileSync(warnPath, 'utf8'));
73
+ firstWarn = false;
74
+ } catch (e) {
75
+ // Corrupted file, reset
76
+ }
77
+ }
78
+
79
+ warnData.callsSinceWarn = (warnData.callsSinceWarn || 0) + 1;
80
+
81
+ const isCritical = remaining <= CRITICAL_THRESHOLD;
82
+ const currentLevel = isCritical ? 'critical' : 'warning';
83
+
84
+ // Emit immediately on first warning, then debounce subsequent ones
85
+ // Severity escalation (WARNING -> CRITICAL) bypasses debounce
86
+ const severityEscalated = currentLevel === 'critical' && warnData.lastLevel === 'warning';
87
+ if (!firstWarn && warnData.callsSinceWarn < DEBOUNCE_CALLS && !severityEscalated) {
88
+ // Update counter and exit without warning
89
+ fs.writeFileSync(warnPath, JSON.stringify(warnData));
90
+ process.exit(0);
91
+ }
92
+
93
+ // Reset debounce counter
94
+ warnData.callsSinceWarn = 0;
95
+ warnData.lastLevel = currentLevel;
96
+ fs.writeFileSync(warnPath, JSON.stringify(warnData));
97
+
98
+ // Build warning message
99
+ let message;
100
+ if (isCritical) {
101
+ message = `CONTEXT MONITOR CRITICAL: Usage at ${usedPct}%. Remaining: ${remaining}%. ` +
102
+ 'STOP new work immediately. Save state NOW and inform the user that context is nearly exhausted. ' +
103
+ 'If using GSD, run /gsd:pause-work to save execution state.';
104
+ } else {
105
+ message = `CONTEXT MONITOR WARNING: Usage at ${usedPct}%. Remaining: ${remaining}%. ` +
106
+ 'Begin wrapping up current task. Do not start new complex work. ' +
107
+ 'If using GSD, consider /gsd:pause-work to save state.';
108
+ }
109
+
110
+ const output = {
111
+ hookSpecificOutput: {
112
+ hookEventName: "PostToolUse",
113
+ additionalContext: message
114
+ }
115
+ };
116
+
117
+ process.stdout.write(JSON.stringify(output));
118
+ } catch (e) {
119
+ // Silent fail -- never block tool execution
120
+ process.exit(0);
121
+ }
122
+ });
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env node
2
+ // Claude Code Statusline - GSD Edition
3
+ // Shows: model | current task | directory | context usage
4
+
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const os = require('os');
8
+
9
+ // Read JSON from stdin
10
+ let input = '';
11
+ process.stdin.setEncoding('utf8');
12
+ process.stdin.on('data', chunk => input += chunk);
13
+ process.stdin.on('end', () => {
14
+ try {
15
+ const data = JSON.parse(input);
16
+ const model = data.model?.display_name || 'Claude';
17
+ const dir = data.workspace?.current_dir || process.cwd();
18
+ const session = data.session_id || '';
19
+ const remaining = data.context_window?.remaining_percentage;
20
+
21
+ // Context window display (shows USED percentage scaled to 80% limit)
22
+ // Claude Code enforces an 80% context limit, so we scale to show 100% at that point
23
+ let ctx = '';
24
+ if (remaining != null) {
25
+ const rem = Math.round(remaining);
26
+ const rawUsed = Math.max(0, Math.min(100, 100 - rem));
27
+ // Scale: 80% real usage = 100% displayed
28
+ const used = Math.min(100, Math.round((rawUsed / 80) * 100));
29
+
30
+ // Write context metrics to bridge file for the context-monitor PostToolUse hook.
31
+ // The monitor reads this file to inject agent-facing warnings when context is low.
32
+ if (session) {
33
+ try {
34
+ const bridgePath = path.join(os.tmpdir(), `claude-ctx-${session}.json`);
35
+ const bridgeData = JSON.stringify({
36
+ session_id: session,
37
+ remaining_percentage: remaining,
38
+ used_pct: used,
39
+ timestamp: Math.floor(Date.now() / 1000)
40
+ });
41
+ fs.writeFileSync(bridgePath, bridgeData);
42
+ } catch (e) {
43
+ // Silent fail -- bridge is best-effort, don't break statusline
44
+ }
45
+ }
46
+
47
+ // Build progress bar (10 segments)
48
+ const filled = Math.floor(used / 10);
49
+ const bar = 'â–ˆ'.repeat(filled) + 'â–‘'.repeat(10 - filled);
50
+
51
+ // Color based on scaled usage (thresholds adjusted for new scale)
52
+ if (used < 63) { // ~50% real
53
+ ctx = ` \x1b[32m${bar} ${used}%\x1b[0m`;
54
+ } else if (used < 81) { // ~65% real
55
+ ctx = ` \x1b[33m${bar} ${used}%\x1b[0m`;
56
+ } else if (used < 95) { // ~76% real
57
+ ctx = ` \x1b[38;5;208m${bar} ${used}%\x1b[0m`;
58
+ } else {
59
+ ctx = ` \x1b[5;31m💀 ${bar} ${used}%\x1b[0m`;
60
+ }
61
+ }
62
+
63
+ // Current task from todos
64
+ let task = '';
65
+ const homeDir = os.homedir();
66
+ const todosDir = path.join(homeDir, '.claude', 'todos');
67
+ if (session && fs.existsSync(todosDir)) {
68
+ try {
69
+ const files = fs.readdirSync(todosDir)
70
+ .filter(f => f.startsWith(session) && f.includes('-agent-') && f.endsWith('.json'))
71
+ .map(f => ({ name: f, mtime: fs.statSync(path.join(todosDir, f)).mtime }))
72
+ .sort((a, b) => b.mtime - a.mtime);
73
+
74
+ if (files.length > 0) {
75
+ try {
76
+ const todos = JSON.parse(fs.readFileSync(path.join(todosDir, files[0].name), 'utf8'));
77
+ const inProgress = todos.find(t => t.status === 'in_progress');
78
+ if (inProgress) task = inProgress.activeForm || '';
79
+ } catch (e) {}
80
+ }
81
+ } catch (e) {
82
+ // Silently fail on file system errors - don't break statusline
83
+ }
84
+ }
85
+
86
+ // GSD update available?
87
+ let gsdUpdate = '';
88
+ const cacheFile = path.join(homeDir, '.claude', 'cache', 'gsd-update-check.json');
89
+ if (fs.existsSync(cacheFile)) {
90
+ try {
91
+ const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
92
+ if (cache.update_available) {
93
+ gsdUpdate = '\x1b[33m⬆ /gsd:update\x1b[0m │ ';
94
+ }
95
+ } catch (e) {}
96
+ }
97
+
98
+ // Output
99
+ const dirname = path.basename(dir);
100
+ if (task) {
101
+ process.stdout.write(`${gsdUpdate}\x1b[2m${model}\x1b[0m │ \x1b[1m${task}\x1b[0m │ \x1b[2m${dirname}\x1b[0m${ctx}`);
102
+ } else {
103
+ process.stdout.write(`${gsdUpdate}\x1b[2m${model}\x1b[0m │ \x1b[2m${dirname}\x1b[0m${ctx}`);
104
+ }
105
+ } catch (e) {
106
+ // Silent fail - don't break statusline on parse errors
107
+ }
108
+ });
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "ragarciaruben",
3
+ "version": "1.20.7",
4
+ "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code, OpenCode, Gemini and Codex by TÂCHES.",
5
+ "bin": {
6
+ "get-shit-done-cc": "bin/install.js"
7
+ },
8
+ "files": [
9
+ "bin",
10
+ "commands",
11
+ "get-shit-done",
12
+ "agents",
13
+ "hooks/dist",
14
+ "scripts",
15
+ ".github/copilot-context",
16
+ ".github/copilot-instructions.md",
17
+ ".planning",
18
+ ".vscode/settings.json"
19
+ ],
20
+ "keywords": [
21
+ "claude",
22
+ "claude-code",
23
+ "ai",
24
+ "meta-prompting",
25
+ "context-engineering",
26
+ "spec-driven-development",
27
+ "gemini",
28
+ "gemini-cli",
29
+ "codex",
30
+ "codex-cli"
31
+ ],
32
+ "author": "TÂCHES",
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/glittercowboy/get-shit-done.git"
37
+ },
38
+ "homepage": "https://github.com/glittercowboy/get-shit-done",
39
+ "bugs": {
40
+ "url": "https://github.com/glittercowboy/get-shit-done/issues"
41
+ },
42
+ "engines": {
43
+ "node": ">=16.7.0"
44
+ },
45
+ "dependencies": {},
46
+ "devDependencies": {
47
+ "esbuild": "^0.24.0"
48
+ },
49
+ "scripts": {
50
+ "build:hooks": "node scripts/build-hooks.js",
51
+ "prepublishOnly": "npm run build:hooks",
52
+ "test": "node --test tests/*.test.cjs"
53
+ }
54
+ }
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Copy GSD hooks to dist for installation.
4
+ */
5
+
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+
9
+ const HOOKS_DIR = path.join(__dirname, '..', 'hooks');
10
+ const DIST_DIR = path.join(HOOKS_DIR, 'dist');
11
+
12
+ // Hooks to copy (pure Node.js, no bundling needed)
13
+ const HOOKS_TO_COPY = [
14
+ 'gsd-check-update.js',
15
+ 'gsd-context-monitor.js',
16
+ 'gsd-statusline.js'
17
+ ];
18
+
19
+ function build() {
20
+ // Ensure dist directory exists
21
+ if (!fs.existsSync(DIST_DIR)) {
22
+ fs.mkdirSync(DIST_DIR, { recursive: true });
23
+ }
24
+
25
+ // Copy hooks to dist
26
+ for (const hook of HOOKS_TO_COPY) {
27
+ const src = path.join(HOOKS_DIR, hook);
28
+ const dest = path.join(DIST_DIR, hook);
29
+
30
+ if (!fs.existsSync(src)) {
31
+ console.warn(`Warning: ${hook} not found, skipping`);
32
+ continue;
33
+ }
34
+
35
+ console.log(`Copying ${hook}...`);
36
+ fs.copyFileSync(src, dest);
37
+ console.log(` → ${dest}`);
38
+ }
39
+
40
+ console.log('\nBuild complete.');
41
+ }
42
+
43
+ build();