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,222 @@
1
+ /**
2
+ * Template — Template selection and fill operations
3
+ */
4
+
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const { normalizePhaseName, findPhaseInternal, generateSlugInternal, output, error } = require('./core.cjs');
8
+ const { reconstructFrontmatter } = require('./frontmatter.cjs');
9
+
10
+ function cmdTemplateSelect(cwd, planPath, raw) {
11
+ if (!planPath) {
12
+ error('plan-path required');
13
+ }
14
+
15
+ try {
16
+ const fullPath = path.join(cwd, planPath);
17
+ const content = fs.readFileSync(fullPath, 'utf-8');
18
+
19
+ // Simple heuristics
20
+ const taskMatch = content.match(/###\s*Task\s*\d+/g) || [];
21
+ const taskCount = taskMatch.length;
22
+
23
+ const decisionMatch = content.match(/decision/gi) || [];
24
+ const hasDecisions = decisionMatch.length > 0;
25
+
26
+ // Count file mentions
27
+ const fileMentions = new Set();
28
+ const filePattern = /`([^`]+\.[a-zA-Z]+)`/g;
29
+ let m;
30
+ while ((m = filePattern.exec(content)) !== null) {
31
+ if (m[1].includes('/') && !m[1].startsWith('http')) {
32
+ fileMentions.add(m[1]);
33
+ }
34
+ }
35
+ const fileCount = fileMentions.size;
36
+
37
+ let template = 'templates/summary-standard.md';
38
+ let type = 'standard';
39
+
40
+ if (taskCount <= 2 && fileCount <= 3 && !hasDecisions) {
41
+ template = 'templates/summary-minimal.md';
42
+ type = 'minimal';
43
+ } else if (hasDecisions || fileCount > 6 || taskCount > 5) {
44
+ template = 'templates/summary-complex.md';
45
+ type = 'complex';
46
+ }
47
+
48
+ const result = { template, type, taskCount, fileCount, hasDecisions };
49
+ output(result, raw, template);
50
+ } catch (e) {
51
+ // Fallback to standard
52
+ output({ template: 'templates/summary-standard.md', type: 'standard', error: e.message }, raw, 'templates/summary-standard.md');
53
+ }
54
+ }
55
+
56
+ function cmdTemplateFill(cwd, templateType, options, raw) {
57
+ if (!templateType) { error('template type required: summary, plan, or verification'); }
58
+ if (!options.phase) { error('--phase required'); }
59
+
60
+ const phaseInfo = findPhaseInternal(cwd, options.phase);
61
+ if (!phaseInfo || !phaseInfo.found) { output({ error: 'Phase not found', phase: options.phase }, raw); return; }
62
+
63
+ const padded = normalizePhaseName(options.phase);
64
+ const today = new Date().toISOString().split('T')[0];
65
+ const phaseName = options.name || phaseInfo.phase_name || 'Unnamed';
66
+ const phaseSlug = phaseInfo.phase_slug || generateSlugInternal(phaseName);
67
+ const phaseId = `${padded}-${phaseSlug}`;
68
+ const planNum = (options.plan || '01').padStart(2, '0');
69
+ const fields = options.fields || {};
70
+
71
+ let frontmatter, body, fileName;
72
+
73
+ switch (templateType) {
74
+ case 'summary': {
75
+ frontmatter = {
76
+ phase: phaseId,
77
+ plan: planNum,
78
+ subsystem: '[primary category]',
79
+ tags: [],
80
+ provides: [],
81
+ affects: [],
82
+ 'tech-stack': { added: [], patterns: [] },
83
+ 'key-files': { created: [], modified: [] },
84
+ 'key-decisions': [],
85
+ 'patterns-established': [],
86
+ duration: '[X]min',
87
+ completed: today,
88
+ ...fields,
89
+ };
90
+ body = [
91
+ `# Phase ${options.phase}: ${phaseName} Summary`,
92
+ '',
93
+ '**[Substantive one-liner describing outcome]**',
94
+ '',
95
+ '## Performance',
96
+ '- **Duration:** [time]',
97
+ '- **Tasks:** [count completed]',
98
+ '- **Files modified:** [count]',
99
+ '',
100
+ '## Accomplishments',
101
+ '- [Key outcome 1]',
102
+ '- [Key outcome 2]',
103
+ '',
104
+ '## Task Commits',
105
+ '1. **Task 1: [task name]** - `hash`',
106
+ '',
107
+ '## Files Created/Modified',
108
+ '- `path/to/file.ts` - What it does',
109
+ '',
110
+ '## Decisions & Deviations',
111
+ '[Key decisions or "None - followed plan as specified"]',
112
+ '',
113
+ '## Next Phase Readiness',
114
+ '[What\'s ready for next phase]',
115
+ ].join('\n');
116
+ fileName = `${padded}-${planNum}-SUMMARY.md`;
117
+ break;
118
+ }
119
+ case 'plan': {
120
+ const planType = options.type || 'execute';
121
+ const wave = parseInt(options.wave) || 1;
122
+ frontmatter = {
123
+ phase: phaseId,
124
+ plan: planNum,
125
+ type: planType,
126
+ wave,
127
+ depends_on: [],
128
+ files_modified: [],
129
+ autonomous: true,
130
+ user_setup: [],
131
+ must_haves: { truths: [], artifacts: [], key_links: [] },
132
+ ...fields,
133
+ };
134
+ body = [
135
+ `# Phase ${options.phase} Plan ${planNum}: [Title]`,
136
+ '',
137
+ '## Objective',
138
+ '- **What:** [What this plan builds]',
139
+ '- **Why:** [Why it matters for the phase goal]',
140
+ '- **Output:** [Concrete deliverable]',
141
+ '',
142
+ '## Context',
143
+ '@.planning/PROJECT.md',
144
+ '@.planning/ROADMAP.md',
145
+ '@.planning/STATE.md',
146
+ '',
147
+ '## Tasks',
148
+ '',
149
+ '<task type="code">',
150
+ ' <name>[Task name]</name>',
151
+ ' <files>[file paths]</files>',
152
+ ' <action>[What to do]</action>',
153
+ ' <verify>[How to verify]</verify>',
154
+ ' <done>[Definition of done]</done>',
155
+ '</task>',
156
+ '',
157
+ '## Verification',
158
+ '[How to verify this plan achieved its objective]',
159
+ '',
160
+ '## Success Criteria',
161
+ '- [ ] [Criterion 1]',
162
+ '- [ ] [Criterion 2]',
163
+ ].join('\n');
164
+ fileName = `${padded}-${planNum}-PLAN.md`;
165
+ break;
166
+ }
167
+ case 'verification': {
168
+ frontmatter = {
169
+ phase: phaseId,
170
+ verified: new Date().toISOString(),
171
+ status: 'pending',
172
+ score: '0/0 must-haves verified',
173
+ ...fields,
174
+ };
175
+ body = [
176
+ `# Phase ${options.phase}: ${phaseName} — Verification`,
177
+ '',
178
+ '## Observable Truths',
179
+ '| # | Truth | Status | Evidence |',
180
+ '|---|-------|--------|----------|',
181
+ '| 1 | [Truth] | pending | |',
182
+ '',
183
+ '## Required Artifacts',
184
+ '| Artifact | Expected | Status | Details |',
185
+ '|----------|----------|--------|---------|',
186
+ '| [path] | [what] | pending | |',
187
+ '',
188
+ '## Key Link Verification',
189
+ '| From | To | Via | Status | Details |',
190
+ '|------|----|----|--------|---------|',
191
+ '| [source] | [target] | [connection] | pending | |',
192
+ '',
193
+ '## Requirements Coverage',
194
+ '| Requirement | Status | Blocking Issue |',
195
+ '|-------------|--------|----------------|',
196
+ '| [req] | pending | |',
197
+ '',
198
+ '## Result',
199
+ '[Pending verification]',
200
+ ].join('\n');
201
+ fileName = `${padded}-VERIFICATION.md`;
202
+ break;
203
+ }
204
+ default:
205
+ error(`Unknown template type: ${templateType}. Available: summary, plan, verification`);
206
+ return;
207
+ }
208
+
209
+ const fullContent = `---\n${reconstructFrontmatter(frontmatter)}\n---\n\n${body}\n`;
210
+ const outPath = path.join(cwd, phaseInfo.directory, fileName);
211
+
212
+ if (fs.existsSync(outPath)) {
213
+ output({ error: 'File already exists', path: path.relative(cwd, outPath) }, raw);
214
+ return;
215
+ }
216
+
217
+ fs.writeFileSync(outPath, fullContent, 'utf-8');
218
+ const relPath = path.relative(cwd, outPath);
219
+ output({ created: true, path: relPath, template: templateType }, raw, relPath);
220
+ }
221
+
222
+ module.exports = { cmdTemplateSelect, cmdTemplateFill };