gsd-codex-cli 1.20.3 → 1.20.5

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 (33) hide show
  1. package/.codex/prompts/gsd-add-phase.md +17 -16
  2. package/.codex/prompts/gsd-add-todo.md +17 -15
  3. package/.codex/prompts/gsd-audit-milestone.md +17 -15
  4. package/.codex/prompts/gsd-check-todos.md +17 -15
  5. package/.codex/prompts/gsd-complete-milestone.md +17 -15
  6. package/.codex/prompts/gsd-debug.md +17 -15
  7. package/.codex/prompts/gsd-discuss-phase.md +17 -15
  8. package/.codex/prompts/gsd-doctor.md +51 -0
  9. package/.codex/prompts/gsd-execute-phase.md +17 -15
  10. package/.codex/prompts/gsd-help.md +16 -14
  11. package/.codex/prompts/gsd-insert-phase.md +17 -15
  12. package/.codex/prompts/gsd-list-phase-assumptions.md +17 -15
  13. package/.codex/prompts/gsd-map-codebase.md +17 -15
  14. package/.codex/prompts/gsd-new-milestone.md +17 -15
  15. package/.codex/prompts/gsd-new-project.md +17 -15
  16. package/.codex/prompts/gsd-pause-work.md +17 -15
  17. package/.codex/prompts/gsd-plan-milestone-gaps.md +17 -15
  18. package/.codex/prompts/gsd-plan-phase.md +17 -15
  19. package/.codex/prompts/gsd-progress.md +17 -15
  20. package/.codex/prompts/gsd-quick.md +17 -15
  21. package/.codex/prompts/gsd-remove-phase.md +17 -15
  22. package/.codex/prompts/gsd-research-phase.md +17 -15
  23. package/.codex/prompts/gsd-resume-work.md +17 -15
  24. package/.codex/prompts/gsd-set-profile.md +17 -15
  25. package/.codex/prompts/gsd-settings.md +17 -15
  26. package/.codex/prompts/gsd-update.md +16 -14
  27. package/.codex/prompts/gsd-verify-work.md +17 -15
  28. package/.codex/skills/get-shit-done-codex/SKILL.md +6 -5
  29. package/README.md +88 -88
  30. package/bin/install-codex.js +8 -4
  31. package/get-shit-done/bin/gsd-tools.cjs +90 -91
  32. package/get-shit-done/bin/gsd-tools.js +29 -0
  33. package/package.json +1 -1
@@ -53,11 +53,11 @@
53
53
  * Progress:
54
54
  * progress [json|table|bar] Render progress in various formats
55
55
  *
56
- * Todos:
57
- * todo complete <filename> Move todo from pending to completed
58
- *
59
- * Update:
60
- * update check Check npm for newer GSD version
56
+ * Todos:
57
+ * todo complete <filename> Move todo from pending to completed
58
+ *
59
+ * Update:
60
+ * update check Check npm for newer GSD version
61
61
  *
62
62
  * Scaffolding:
63
63
  * scaffold context --phase <N> Create CONTEXT.md template
@@ -122,10 +122,10 @@
122
122
  * init progress All context for progress workflow
123
123
  */
124
124
 
125
- const fs = require('fs');
126
- const path = require('path');
127
- const os = require('os');
128
- const { execSync } = require('child_process');
125
+ const fs = require('fs');
126
+ const path = require('path');
127
+ const os = require('os');
128
+ const { execSync } = require('child_process');
129
129
 
130
130
  // ─── Model Profile Table ─────────────────────────────────────────────────────
131
131
 
@@ -566,10 +566,10 @@ function cmdListTodos(cwd, area, raw) {
566
566
  output(result, raw, count.toString());
567
567
  }
568
568
 
569
- function cmdVerifyPathExists(cwd, targetPath, raw) {
570
- if (!targetPath) {
571
- error('path required for verification');
572
- }
569
+ function cmdVerifyPathExists(cwd, targetPath, raw) {
570
+ if (!targetPath) {
571
+ error('path required for verification');
572
+ }
573
573
 
574
574
  const fullPath = path.isAbsolute(targetPath) ? targetPath : path.join(cwd, targetPath);
575
575
 
@@ -581,49 +581,49 @@ function cmdVerifyPathExists(cwd, targetPath, raw) {
581
581
  } catch {
582
582
  const result = { exists: false, type: null };
583
583
  output(result, raw, 'false');
584
- }
585
- }
586
-
587
- function cmdUpdateCheck(cwd, raw) {
588
- const homeDir = os.homedir();
589
- const cacheDir = path.join(homeDir, '.claude', 'cache');
590
- const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
591
- const projectVersionFile = path.join(cwd, '.claude', 'get-shit-done', 'VERSION');
592
- const globalVersionFile = path.join(homeDir, '.claude', 'get-shit-done', 'VERSION');
593
-
594
- let installed = '0.0.0';
595
- try {
596
- if (fs.existsSync(projectVersionFile)) {
597
- installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
598
- } else if (fs.existsSync(globalVersionFile)) {
599
- installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
600
- }
601
- } catch {}
602
-
603
- let latest = null;
604
- try {
605
- latest = execSync('npm view gsd-codex-cli version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
606
- } catch {}
607
- if (!latest) {
608
- try {
609
- latest = execSync('npm view get-shit-done-cc version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
610
- } catch {}
611
- }
612
-
613
- const result = {
614
- update_available: !!(latest && installed && latest !== installed),
615
- installed,
616
- latest: latest || 'unknown',
617
- checked: Math.floor(Date.now() / 1000),
618
- };
619
-
620
- try {
621
- fs.mkdirSync(cacheDir, { recursive: true });
622
- fs.writeFileSync(cacheFile, JSON.stringify(result));
623
- } catch {}
624
-
625
- output(result, raw);
626
- }
584
+ }
585
+ }
586
+
587
+ function cmdUpdateCheck(cwd, raw) {
588
+ const homeDir = os.homedir();
589
+ const cacheDir = path.join(homeDir, '.claude', 'cache');
590
+ const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
591
+ const projectVersionFile = path.join(cwd, '.claude', 'get-shit-done', 'VERSION');
592
+ const globalVersionFile = path.join(homeDir, '.claude', 'get-shit-done', 'VERSION');
593
+
594
+ let installed = '0.0.0';
595
+ try {
596
+ if (fs.existsSync(projectVersionFile)) {
597
+ installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
598
+ } else if (fs.existsSync(globalVersionFile)) {
599
+ installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
600
+ }
601
+ } catch {}
602
+
603
+ let latest = null;
604
+ try {
605
+ latest = execSync('npm view gsd-codex-cli version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
606
+ } catch {}
607
+ if (!latest) {
608
+ try {
609
+ latest = execSync('npm view get-shit-done-cc version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
610
+ } catch {}
611
+ }
612
+
613
+ const result = {
614
+ update_available: !!(latest && installed && latest !== installed),
615
+ installed,
616
+ latest: latest || 'unknown',
617
+ checked: Math.floor(Date.now() / 1000),
618
+ };
619
+
620
+ try {
621
+ fs.mkdirSync(cacheDir, { recursive: true });
622
+ fs.writeFileSync(cacheFile, JSON.stringify(result));
623
+ } catch {}
624
+
625
+ output(result, raw);
626
+ }
627
627
 
628
628
  function cmdConfigEnsureSection(cwd, raw) {
629
629
  const configPath = path.join(cwd, '.planning', 'config.json');
@@ -2742,35 +2742,35 @@ function cmdPhaseAdd(cwd, description, raw) {
2742
2742
  // Build phase entry
2743
2743
  const phaseEntry = `\n### Phase ${newPhaseNum}: ${description}\n\n**Goal:** [To be planned]\n**Depends on:** Phase ${maxPhase}\n**Plans:** 0 plans\n\nPlans:\n- [ ] TBD (run /gsd:plan-phase ${newPhaseNum} to break down)\n`;
2744
2744
 
2745
- // Find insertion point: inside last milestone block (if grouped), otherwise before Progress or end
2746
- const progressMatch = content.match(/^##\s+Progress\b/m);
2747
- const progressIdx = progressMatch ? progressMatch.index : -1;
2748
- const searchEnd = progressIdx >= 0 ? progressIdx : content.length;
2749
- const beforeProgress = content.slice(0, searchEnd);
2750
-
2751
- const milestonePattern = /^###\s+.*v\d+\.\d+.*$/gmi;
2752
- const milestoneHeaders = [];
2753
- let mm;
2754
- while ((mm = milestonePattern.exec(beforeProgress)) !== null) {
2755
- milestoneHeaders.push({ index: mm.index });
2756
- }
2757
-
2758
- let insertIdx = content.length;
2759
- if (milestoneHeaders.length > 0) {
2760
- const target = milestoneHeaders[milestoneHeaders.length - 1];
2761
- let nextHeaderIdx = searchEnd;
2762
- for (const header of milestoneHeaders) {
2763
- if (header.index > target.index) {
2764
- nextHeaderIdx = header.index;
2765
- break;
2766
- }
2767
- }
2768
- insertIdx = nextHeaderIdx;
2769
- } else if (progressIdx >= 0) {
2770
- insertIdx = progressIdx;
2771
- }
2772
-
2773
- const updatedContent = content.slice(0, insertIdx) + phaseEntry + content.slice(insertIdx);
2745
+ // Find insertion point: inside last milestone block (if grouped), otherwise before Progress or end
2746
+ const progressMatch = content.match(/^##\s+Progress\b/m);
2747
+ const progressIdx = progressMatch ? progressMatch.index : -1;
2748
+ const searchEnd = progressIdx >= 0 ? progressIdx : content.length;
2749
+ const beforeProgress = content.slice(0, searchEnd);
2750
+
2751
+ const milestonePattern = /^###\s+.*v\d+\.\d+.*$/gmi;
2752
+ const milestoneHeaders = [];
2753
+ let mm;
2754
+ while ((mm = milestonePattern.exec(beforeProgress)) !== null) {
2755
+ milestoneHeaders.push({ index: mm.index });
2756
+ }
2757
+
2758
+ let insertIdx = content.length;
2759
+ if (milestoneHeaders.length > 0) {
2760
+ const target = milestoneHeaders[milestoneHeaders.length - 1];
2761
+ let nextHeaderIdx = searchEnd;
2762
+ for (const header of milestoneHeaders) {
2763
+ if (header.index > target.index) {
2764
+ nextHeaderIdx = header.index;
2765
+ break;
2766
+ }
2767
+ }
2768
+ insertIdx = nextHeaderIdx;
2769
+ } else if (progressIdx >= 0) {
2770
+ insertIdx = progressIdx;
2771
+ }
2772
+
2773
+ const updatedContent = content.slice(0, insertIdx) + phaseEntry + content.slice(insertIdx);
2774
2774
 
2775
2775
  fs.writeFileSync(roadmapPath, updatedContent, 'utf-8');
2776
2776
 
@@ -5103,11 +5103,11 @@ async function main() {
5103
5103
  break;
5104
5104
  }
5105
5105
 
5106
- case 'config-get': {
5107
- cmdConfigGet(cwd, args[1], raw);
5108
- break;
5109
- }
5110
-
5106
+ case 'config-get': {
5107
+ cmdConfigGet(cwd, args[1], raw);
5108
+ break;
5109
+ }
5110
+
5111
5111
  case 'update': {
5112
5112
  const subcommand = args[1];
5113
5113
  if (subcommand === 'check') {
@@ -5117,7 +5117,6 @@ async function main() {
5117
5117
  }
5118
5118
  break;
5119
5119
  }
5120
-
5121
5120
  case 'history-digest': {
5122
5121
  cmdHistoryDigest(cwd, raw);
5123
5122
  break;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Backward-compatible wrapper: some workflows/prompts reference gsd-tools.js.
4
+ // Canonical implementation lives in gsd-tools.cjs (CommonJS) to avoid ESM issues.
5
+
6
+ const path = require('path');
7
+ const { spawnSync } = require('child_process');
8
+
9
+ const cjsPath = path.join(__dirname, 'gsd-tools.cjs');
10
+ const args = process.argv.slice(2);
11
+
12
+ const result = spawnSync(process.execPath, [cjsPath, ...args], { stdio: 'inherit' });
13
+
14
+ if (result.error) {
15
+ console.error(result.error.message || String(result.error));
16
+ process.exit(1);
17
+ }
18
+
19
+ if (result.signal) {
20
+ // Mirror the child termination signal if possible.
21
+ try {
22
+ process.kill(process.pid, result.signal);
23
+ } catch {
24
+ process.exit(1);
25
+ }
26
+ }
27
+
28
+ process.exit(typeof result.status === 'number' ? result.status : 0);
29
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-codex-cli",
3
- "version": "1.20.3",
3
+ "version": "1.20.5",
4
4
  "description": "Codex-native package for the get-shit-done workflow with native subagent orchestration.",
5
5
  "bin": {
6
6
  "gsd-codex-cli": "bin/install-codex.js",