gsd-opencode 1.10.2 → 1.20.0

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 (164) hide show
  1. package/agents/gsd-codebase-mapper.md +29 -3
  2. package/agents/gsd-debugger.md +19 -21
  3. package/agents/gsd-executor.md +213 -528
  4. package/agents/gsd-integration-checker.md +20 -0
  5. package/agents/gsd-phase-researcher.md +189 -267
  6. package/agents/gsd-plan-checker.md +278 -279
  7. package/agents/gsd-planner.md +299 -490
  8. package/agents/gsd-project-researcher.md +103 -345
  9. package/agents/gsd-research-synthesizer.md +5 -22
  10. package/agents/gsd-roadmapper.md +43 -6
  11. package/agents/gsd-verifier.md +158 -377
  12. package/{lib → bin/dm/lib}/constants.js +10 -3
  13. package/{src → bin/dm/src}/commands/install.js +5 -4
  14. package/{src → bin/dm/src}/commands/uninstall.js +3 -1
  15. package/{src → bin/dm/src}/services/backup-manager.js +1 -1
  16. package/{src → bin/dm/src}/services/config.js +1 -1
  17. package/{src → bin/dm/src}/services/file-ops.js +20 -4
  18. package/{src → bin/dm/src}/services/health-checker.js +3 -1
  19. package/{src → bin/dm/src}/services/repair-service.js +3 -1
  20. package/{src → bin/dm/src}/services/settings.js +1 -1
  21. package/{src → bin/dm/src}/services/update-service.js +2 -2
  22. package/bin/gsd-install.js +0 -0
  23. package/bin/gsd.js +9 -9
  24. package/commands/gsd/gsd-add-phase.md +43 -0
  25. package/commands/gsd/gsd-add-todo.md +47 -0
  26. package/commands/gsd/gsd-audit-milestone.md +36 -0
  27. package/commands/gsd/gsd-check-todos.md +45 -0
  28. package/commands/gsd/gsd-cleanup.md +18 -0
  29. package/commands/gsd/{complete-milestone.md → gsd-complete-milestone.md} +1 -1
  30. package/commands/gsd/{debug.md → gsd-debug.md} +16 -21
  31. package/commands/gsd/{discuss-phase.md → gsd-discuss-phase.md} +6 -9
  32. package/commands/gsd/gsd-execute-phase.md +41 -0
  33. package/commands/gsd/gsd-health.md +22 -0
  34. package/commands/gsd/gsd-help.md +22 -0
  35. package/commands/gsd/gsd-insert-phase.md +32 -0
  36. package/commands/gsd/gsd-join-discord.md +18 -0
  37. package/commands/gsd/{list-phase-assumptions.md → gsd-list-phase-assumptions.md} +3 -7
  38. package/commands/gsd/{map-codebase.md → gsd-map-codebase.md} +3 -3
  39. package/commands/gsd/gsd-new-milestone.md +44 -0
  40. package/commands/gsd/gsd-new-project.md +42 -0
  41. package/commands/gsd/gsd-pause-work.md +38 -0
  42. package/commands/gsd/gsd-plan-milestone-gaps.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +44 -0
  44. package/commands/gsd/gsd-progress.md +24 -0
  45. package/commands/gsd/gsd-quick.md +41 -0
  46. package/commands/gsd/gsd-reapply-patches.md +119 -0
  47. package/commands/gsd/gsd-remove-phase.md +31 -0
  48. package/commands/gsd/{research-phase.md → gsd-research-phase.md} +38 -49
  49. package/commands/gsd/{resume-work.md → gsd-resume-work.md} +2 -2
  50. package/commands/gsd/gsd-set-profile.md +34 -0
  51. package/commands/gsd/gsd-settings.md +36 -0
  52. package/commands/gsd/gsd-update.md +37 -0
  53. package/commands/gsd/gsd-verify-work.md +38 -0
  54. package/get-shit-done/bin/gsd-tools.cjs +553 -0
  55. package/get-shit-done/bin/gsd-tools.test.cjs +2346 -0
  56. package/get-shit-done/bin/lib/commands.cjs +556 -0
  57. package/get-shit-done/bin/lib/config.cjs +162 -0
  58. package/get-shit-done/bin/lib/core.cjs +377 -0
  59. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  60. package/get-shit-done/bin/lib/init.cjs +694 -0
  61. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  62. package/get-shit-done/bin/lib/phase.cjs +877 -0
  63. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  64. package/get-shit-done/bin/lib/state.cjs +490 -0
  65. package/get-shit-done/bin/lib/template.cjs +222 -0
  66. package/get-shit-done/bin/lib/verify.cjs +772 -0
  67. package/get-shit-done/references/checkpoints.md +62 -364
  68. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  69. package/get-shit-done/references/git-integration.md +10 -16
  70. package/get-shit-done/references/git-planning-commit.md +38 -0
  71. package/get-shit-done/references/model-profile-resolution.md +34 -0
  72. package/get-shit-done/references/model-profiles.md +54 -66
  73. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  74. package/get-shit-done/references/planning-config.md +112 -10
  75. package/get-shit-done/references/questioning.md +4 -0
  76. package/get-shit-done/references/ui-brand.md +1 -1
  77. package/get-shit-done/templates/UAT.md +1 -1
  78. package/get-shit-done/templates/VALIDATION.md +104 -0
  79. package/get-shit-done/templates/codebase/structure.md +6 -6
  80. package/get-shit-done/templates/config.json +37 -0
  81. package/get-shit-done/templates/context.md +2 -10
  82. package/get-shit-done/templates/continue-here.md +6 -6
  83. package/get-shit-done/templates/debug-subagent-prompt.md +2 -2
  84. package/get-shit-done/templates/discovery.md +6 -6
  85. package/get-shit-done/templates/milestone-archive.md +3 -3
  86. package/get-shit-done/templates/phase-prompt.md +9 -7
  87. package/get-shit-done/templates/planner-subagent-prompt.md +6 -6
  88. package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
  89. package/get-shit-done/templates/research.md +29 -6
  90. package/get-shit-done/templates/roadmap.md +1 -1
  91. package/get-shit-done/templates/state.md +0 -30
  92. package/get-shit-done/templates/summary-complex.md +59 -0
  93. package/get-shit-done/templates/summary-minimal.md +41 -0
  94. package/get-shit-done/templates/summary-standard.md +48 -0
  95. package/get-shit-done/templates/summary.md +16 -37
  96. package/get-shit-done/templates/user-setup.md +1 -13
  97. package/get-shit-done/templates/verification-report.md +5 -5
  98. package/get-shit-done/workflows/add-phase.md +111 -0
  99. package/{commands/gsd → get-shit-done/workflows}/add-todo.md +24 -60
  100. package/{commands/gsd → get-shit-done/workflows}/audit-milestone.md +83 -63
  101. package/{commands/gsd → get-shit-done/workflows}/check-todos.md +21 -73
  102. package/get-shit-done/workflows/cleanup.md +152 -0
  103. package/get-shit-done/workflows/complete-milestone.md +251 -312
  104. package/get-shit-done/workflows/diagnose-issues.md +6 -31
  105. package/get-shit-done/workflows/discovery-phase.md +11 -11
  106. package/get-shit-done/workflows/discuss-phase.md +156 -49
  107. package/get-shit-done/workflows/execute-phase.md +238 -396
  108. package/get-shit-done/workflows/execute-plan.md +180 -1609
  109. package/get-shit-done/workflows/health.md +156 -0
  110. package/{commands/gsd → get-shit-done/workflows}/help.md +33 -35
  111. package/get-shit-done/workflows/insert-phase.md +129 -0
  112. package/get-shit-done/workflows/list-phase-assumptions.md +3 -3
  113. package/get-shit-done/workflows/map-codebase.md +73 -80
  114. package/get-shit-done/workflows/new-milestone.md +382 -0
  115. package/{commands/gsd → get-shit-done/workflows}/new-project.md +281 -234
  116. package/get-shit-done/workflows/oc-set-profile.md +320 -0
  117. package/{commands/gsd → get-shit-done/workflows}/pause-work.md +31 -43
  118. package/{commands/gsd → get-shit-done/workflows}/plan-milestone-gaps.md +29 -50
  119. package/get-shit-done/workflows/plan-phase.md +478 -0
  120. package/{commands/gsd → get-shit-done/workflows}/progress.md +64 -47
  121. package/get-shit-done/workflows/quick.md +453 -0
  122. package/get-shit-done/workflows/remove-phase.md +154 -0
  123. package/get-shit-done/workflows/research-phase.md +73 -0
  124. package/get-shit-done/workflows/resume-project.md +17 -26
  125. package/get-shit-done/workflows/set-profile.md +80 -0
  126. package/get-shit-done/workflows/settings.md +213 -0
  127. package/get-shit-done/workflows/transition.md +84 -104
  128. package/{commands/gsd → get-shit-done/workflows}/update.md +70 -28
  129. package/get-shit-done/workflows/verify-phase.md +106 -492
  130. package/get-shit-done/workflows/verify-work.md +26 -53
  131. package/package.json +7 -4
  132. package/rules/gsd-oc-work-hard.md +36 -0
  133. package/skills/gsd-oc-select-model/SKILL.md +348 -0
  134. package/skills/gsd-oc-select-model/scripts/select-models.cjs +268 -0
  135. package/agents/gsd-set-model.md +0 -287
  136. package/agents/gsd-set-profile.md +0 -239
  137. package/agents/gsd-settings.md +0 -749
  138. package/bin/install.js +0 -323
  139. package/commands/gsd/add-phase.md +0 -207
  140. package/commands/gsd/execute-phase.md +0 -339
  141. package/commands/gsd/insert-phase.md +0 -227
  142. package/commands/gsd/new-milestone.md +0 -721
  143. package/commands/gsd/plan-phase.md +0 -525
  144. package/commands/gsd/quick.md +0 -309
  145. package/commands/gsd/remove-phase.md +0 -349
  146. package/commands/gsd/set-model.md +0 -77
  147. package/commands/gsd/set-profile.md +0 -46
  148. package/commands/gsd/settings.md +0 -33
  149. package/commands/gsd/verify-work.md +0 -219
  150. package/commands/gsd/whats-new.md +0 -124
  151. /package/{src → bin/dm/src}/commands/check.js +0 -0
  152. /package/{src → bin/dm/src}/commands/config.js +0 -0
  153. /package/{src → bin/dm/src}/commands/list.js +0 -0
  154. /package/{src → bin/dm/src}/commands/repair.js +0 -0
  155. /package/{src → bin/dm/src}/commands/update.js +0 -0
  156. /package/{src → bin/dm/src}/services/manifest-manager.js +0 -0
  157. /package/{src → bin/dm/src}/services/migration-service.js +0 -0
  158. /package/{src → bin/dm/src}/services/scope-manager.js +0 -0
  159. /package/{src → bin/dm/src}/services/structure-detector.js +0 -0
  160. /package/{src → bin/dm/src}/utils/hash.js +0 -0
  161. /package/{src → bin/dm/src}/utils/interactive.js +0 -0
  162. /package/{src → bin/dm/src}/utils/logger.js +0 -0
  163. /package/{src → bin/dm/src}/utils/npm-registry.js +0 -0
  164. /package/{src → bin/dm/src}/utils/path-resolver.js +0 -0
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Milestone — Milestone and requirements lifecycle operations
3
+ */
4
+
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const { output, error } = require('./core.cjs');
8
+ const { extractFrontmatter } = require('./frontmatter.cjs');
9
+
10
+ function cmdRequirementsMarkComplete(cwd, reqIdsRaw, raw) {
11
+ if (!reqIdsRaw || reqIdsRaw.length === 0) {
12
+ error('requirement IDs required. Usage: requirements mark-complete REQ-01,REQ-02 or REQ-01 REQ-02');
13
+ }
14
+
15
+ // Accept comma-separated, space-separated, or bracket-wrapped: [REQ-01, REQ-02]
16
+ const reqIds = reqIdsRaw
17
+ .join(' ')
18
+ .replace(/[\[\]]/g, '')
19
+ .split(/[,\s]+/)
20
+ .map(r => r.trim())
21
+ .filter(Boolean);
22
+
23
+ if (reqIds.length === 0) {
24
+ error('no valid requirement IDs found');
25
+ }
26
+
27
+ const reqPath = path.join(cwd, '.planning', 'REQUIREMENTS.md');
28
+ if (!fs.existsSync(reqPath)) {
29
+ output({ updated: false, reason: 'REQUIREMENTS.md not found', ids: reqIds }, raw, 'no requirements file');
30
+ return;
31
+ }
32
+
33
+ let reqContent = fs.readFileSync(reqPath, 'utf-8');
34
+ const updated = [];
35
+ const notFound = [];
36
+
37
+ for (const reqId of reqIds) {
38
+ let found = false;
39
+
40
+ // Update checkbox: - [ ] **REQ-ID** → - [x] **REQ-ID**
41
+ const checkboxPattern = new RegExp(`(-\\s*\\[)[ ](\\]\\s*\\*\\*${reqId}\\*\\*)`, 'gi');
42
+ if (checkboxPattern.test(reqContent)) {
43
+ reqContent = reqContent.replace(checkboxPattern, '$1x$2');
44
+ found = true;
45
+ }
46
+
47
+ // Update traceability table: | REQ-ID | Phase N | Pending | → | REQ-ID | Phase N | Complete |
48
+ const tablePattern = new RegExp(`(\\|\\s*${reqId}\\s*\\|[^|]+\\|)\\s*Pending\\s*(\\|)`, 'gi');
49
+ if (tablePattern.test(reqContent)) {
50
+ // Re-read since test() advances lastIndex for global regex
51
+ reqContent = reqContent.replace(
52
+ new RegExp(`(\\|\\s*${reqId}\\s*\\|[^|]+\\|)\\s*Pending\\s*(\\|)`, 'gi'),
53
+ '$1 Complete $2'
54
+ );
55
+ found = true;
56
+ }
57
+
58
+ if (found) {
59
+ updated.push(reqId);
60
+ } else {
61
+ notFound.push(reqId);
62
+ }
63
+ }
64
+
65
+ if (updated.length > 0) {
66
+ fs.writeFileSync(reqPath, reqContent, 'utf-8');
67
+ }
68
+
69
+ output({
70
+ updated: updated.length > 0,
71
+ marked_complete: updated,
72
+ not_found: notFound,
73
+ total: reqIds.length,
74
+ }, raw, `${updated.length}/${reqIds.length} requirements marked complete`);
75
+ }
76
+
77
+ function cmdMilestoneComplete(cwd, version, options, raw) {
78
+ if (!version) {
79
+ error('version required for milestone complete (e.g., v1.0)');
80
+ }
81
+
82
+ const roadmapPath = path.join(cwd, '.planning', 'ROADMAP.md');
83
+ const reqPath = path.join(cwd, '.planning', 'REQUIREMENTS.md');
84
+ const statePath = path.join(cwd, '.planning', 'STATE.md');
85
+ const milestonesPath = path.join(cwd, '.planning', 'MILESTONES.md');
86
+ const archiveDir = path.join(cwd, '.planning', 'milestones');
87
+ const phasesDir = path.join(cwd, '.planning', 'phases');
88
+ const today = new Date().toISOString().split('T')[0];
89
+ const milestoneName = options.name || version;
90
+
91
+ // Ensure archive directory exists
92
+ fs.mkdirSync(archiveDir, { recursive: true });
93
+
94
+ // Gather stats from phases
95
+ let phaseCount = 0;
96
+ let totalPlans = 0;
97
+ let totalTasks = 0;
98
+ const accomplishments = [];
99
+
100
+ try {
101
+ const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
102
+ const dirs = entries.filter(e => e.isDirectory()).map(e => e.name).sort();
103
+
104
+ for (const dir of dirs) {
105
+ phaseCount++;
106
+ const phaseFiles = fs.readdirSync(path.join(phasesDir, dir));
107
+ const plans = phaseFiles.filter(f => f.endsWith('-PLAN.md') || f === 'PLAN.md');
108
+ const summaries = phaseFiles.filter(f => f.endsWith('-SUMMARY.md') || f === 'SUMMARY.md');
109
+ totalPlans += plans.length;
110
+
111
+ // Extract one-liners from summaries
112
+ for (const s of summaries) {
113
+ try {
114
+ const content = fs.readFileSync(path.join(phasesDir, dir, s), 'utf-8');
115
+ const fm = extractFrontmatter(content);
116
+ if (fm['one-liner']) {
117
+ accomplishments.push(fm['one-liner']);
118
+ }
119
+ // Count tasks
120
+ const taskMatches = content.match(/##\s*task\s*\d+/gi) || [];
121
+ totalTasks += taskMatches.length;
122
+ } catch {}
123
+ }
124
+ }
125
+ } catch {}
126
+
127
+ // Archive ROADMAP.md
128
+ if (fs.existsSync(roadmapPath)) {
129
+ const roadmapContent = fs.readFileSync(roadmapPath, 'utf-8');
130
+ fs.writeFileSync(path.join(archiveDir, `${version}-ROADMAP.md`), roadmapContent, 'utf-8');
131
+ }
132
+
133
+ // Archive REQUIREMENTS.md
134
+ if (fs.existsSync(reqPath)) {
135
+ const reqContent = fs.readFileSync(reqPath, 'utf-8');
136
+ const archiveHeader = `# Requirements Archive: ${version} ${milestoneName}\n\n**Archived:** ${today}\n**Status:** SHIPPED\n\nFor current requirements, see \`.planning/REQUIREMENTS.md\`.\n\n---\n\n`;
137
+ fs.writeFileSync(path.join(archiveDir, `${version}-REQUIREMENTS.md`), archiveHeader + reqContent, 'utf-8');
138
+ }
139
+
140
+ // Archive audit file if exists
141
+ const auditFile = path.join(cwd, '.planning', `${version}-MILESTONE-AUDIT.md`);
142
+ if (fs.existsSync(auditFile)) {
143
+ fs.renameSync(auditFile, path.join(archiveDir, `${version}-MILESTONE-AUDIT.md`));
144
+ }
145
+
146
+ // Create/append MILESTONES.md entry
147
+ const accomplishmentsList = accomplishments.map(a => `- ${a}`).join('\n');
148
+ const milestoneEntry = `## ${version} ${milestoneName} (Shipped: ${today})\n\n**Phases completed:** ${phaseCount} phases, ${totalPlans} plans, ${totalTasks} tasks\n\n**Key accomplishments:**\n${accomplishmentsList || '- (none recorded)'}\n\n---\n\n`;
149
+
150
+ if (fs.existsSync(milestonesPath)) {
151
+ const existing = fs.readFileSync(milestonesPath, 'utf-8');
152
+ fs.writeFileSync(milestonesPath, existing + '\n' + milestoneEntry, 'utf-8');
153
+ } else {
154
+ fs.writeFileSync(milestonesPath, `# Milestones\n\n${milestoneEntry}`, 'utf-8');
155
+ }
156
+
157
+ // Update STATE.md
158
+ if (fs.existsSync(statePath)) {
159
+ let stateContent = fs.readFileSync(statePath, 'utf-8');
160
+ stateContent = stateContent.replace(
161
+ /(\*\*Status:\*\*\s*).*/,
162
+ `$1${version} milestone complete`
163
+ );
164
+ stateContent = stateContent.replace(
165
+ /(\*\*Last Activity:\*\*\s*).*/,
166
+ `$1${today}`
167
+ );
168
+ stateContent = stateContent.replace(
169
+ /(\*\*Last Activity Description:\*\*\s*).*/,
170
+ `$1${version} milestone completed and archived`
171
+ );
172
+ fs.writeFileSync(statePath, stateContent, 'utf-8');
173
+ }
174
+
175
+ // Archive phase directories if requested
176
+ let phasesArchived = false;
177
+ if (options.archivePhases) {
178
+ try {
179
+ const phaseArchiveDir = path.join(archiveDir, `${version}-phases`);
180
+ fs.mkdirSync(phaseArchiveDir, { recursive: true });
181
+
182
+ const phaseEntries = fs.readdirSync(phasesDir, { withFileTypes: true });
183
+ const phaseDirNames = phaseEntries.filter(e => e.isDirectory()).map(e => e.name);
184
+ for (const dir of phaseDirNames) {
185
+ fs.renameSync(path.join(phasesDir, dir), path.join(phaseArchiveDir, dir));
186
+ }
187
+ phasesArchived = phaseDirNames.length > 0;
188
+ } catch {}
189
+ }
190
+
191
+ const result = {
192
+ version,
193
+ name: milestoneName,
194
+ date: today,
195
+ phases: phaseCount,
196
+ plans: totalPlans,
197
+ tasks: totalTasks,
198
+ accomplishments,
199
+ archived: {
200
+ roadmap: fs.existsSync(path.join(archiveDir, `${version}-ROADMAP.md`)),
201
+ requirements: fs.existsSync(path.join(archiveDir, `${version}-REQUIREMENTS.md`)),
202
+ audit: fs.existsSync(path.join(archiveDir, `${version}-MILESTONE-AUDIT.md`)),
203
+ phases: phasesArchived,
204
+ },
205
+ milestones_updated: true,
206
+ state_updated: fs.existsSync(statePath),
207
+ };
208
+
209
+ output(result, raw);
210
+ }
211
+
212
+ module.exports = {
213
+ cmdRequirementsMarkComplete,
214
+ cmdMilestoneComplete,
215
+ };