@undeemed/get-shit-done-codex 1.6.12 → 1.20.2
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.
- package/README.md +22 -3
- package/agents/gsd-codebase-mapper.md +761 -0
- package/agents/gsd-debugger.md +1198 -0
- package/agents/gsd-executor.md +419 -0
- package/agents/gsd-integration-checker.md +423 -0
- package/agents/gsd-phase-researcher.md +469 -0
- package/agents/gsd-plan-checker.md +622 -0
- package/agents/gsd-planner.md +1159 -0
- package/agents/gsd-project-researcher.md +618 -0
- package/agents/gsd-research-synthesizer.md +236 -0
- package/agents/gsd-roadmapper.md +639 -0
- package/agents/gsd-verifier.md +541 -0
- package/bin/install.js +106 -100
- package/commands/gsd/add-phase.md +17 -185
- package/commands/gsd/add-todo.md +23 -163
- package/commands/gsd/audit-milestone.md +3 -219
- package/commands/gsd/check-todos.md +20 -196
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/debug.md +13 -0
- package/commands/gsd/discuss-phase.md +10 -3
- package/commands/gsd/execute-phase.md +3 -265
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +8 -369
- package/commands/gsd/insert-phase.md +9 -203
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/new-milestone.md +12 -678
- package/commands/gsd/new-project.md +8 -862
- package/commands/gsd/new-project.md.bak +1041 -0
- package/commands/gsd/pause-work.md +17 -105
- package/commands/gsd/plan-milestone-gaps.md +3 -247
- package/commands/gsd/plan-phase.md +13 -444
- package/commands/gsd/progress.md +5 -337
- package/commands/gsd/quick.md +40 -0
- package/commands/gsd/reapply-patches.md +110 -0
- package/commands/gsd/remove-phase.md +9 -315
- package/commands/gsd/research-phase.md +26 -19
- package/commands/gsd/set-profile.md +34 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/update.md +25 -160
- package/commands/gsd/verify-work.md +3 -183
- package/get-shit-done/bin/gsd-tools.cjs +5243 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
- package/get-shit-done/references/checkpoints.md +254 -267
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +3 -9
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +92 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +196 -0
- package/get-shit-done/references/questioning.md +4 -0
- package/get-shit-done/references/verification-patterns.md +17 -0
- package/get-shit-done/templates/UAT.md +1 -1
- package/get-shit-done/templates/codebase/structure.md +3 -3
- package/get-shit-done/templates/config.json +10 -0
- package/get-shit-done/templates/context.md +2 -10
- package/get-shit-done/templates/phase-prompt.md +18 -27
- package/get-shit-done/templates/planner-subagent-prompt.md +4 -4
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
- package/get-shit-done/templates/research.md +25 -2
- package/get-shit-done/templates/state.md +0 -30
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +5 -28
- package/get-shit-done/templates/user-setup.md +1 -13
- package/get-shit-done/templates/verification-report.md +1 -1
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/get-shit-done/workflows/add-todo.md +157 -0
- package/get-shit-done/workflows/audit-milestone.md +242 -0
- package/get-shit-done/workflows/check-todos.md +176 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +225 -301
- package/get-shit-done/workflows/diagnose-issues.md +3 -17
- package/get-shit-done/workflows/discovery-phase.md +6 -10
- package/get-shit-done/workflows/discuss-phase.md +99 -36
- package/get-shit-done/workflows/execute-phase.md +205 -349
- package/get-shit-done/workflows/execute-plan.md +179 -1569
- package/get-shit-done/workflows/health.md +156 -0
- package/get-shit-done/workflows/help.md +486 -0
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
- package/get-shit-done/workflows/map-codebase.md +55 -17
- package/get-shit-done/workflows/new-milestone.md +373 -0
- package/get-shit-done/workflows/new-project.md +1113 -0
- package/get-shit-done/workflows/pause-work.md +122 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
- package/get-shit-done/workflows/plan-phase.md +448 -0
- package/get-shit-done/workflows/progress.md +393 -0
- package/get-shit-done/workflows/quick.md +444 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +74 -0
- package/get-shit-done/workflows/resume-project.md +18 -23
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +200 -0
- package/get-shit-done/workflows/transition.md +78 -103
- package/get-shit-done/workflows/update.md +214 -0
- package/get-shit-done/workflows/verify-phase.md +107 -494
- package/get-shit-done/workflows/verify-work.md +18 -11
- package/hooks/dist/gsd-check-update.js +66 -0
- package/hooks/dist/gsd-statusline.js +91 -0
- package/package.json +19 -3
- package/scripts/build-hooks.js +42 -0
- package/commands/gsd/whats-new.md +0 -124
package/bin/install.js
CHANGED
|
@@ -4,16 +4,20 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const readline = require('readline');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
7
8
|
|
|
8
|
-
// Colors
|
|
9
9
|
const cyan = '\x1b[36m';
|
|
10
10
|
const green = '\x1b[32m';
|
|
11
11
|
const yellow = '\x1b[33m';
|
|
12
12
|
const dim = '\x1b[2m';
|
|
13
13
|
const reset = '\x1b[0m';
|
|
14
14
|
|
|
15
|
-
// Get version from package.json
|
|
16
15
|
const pkg = require('../package.json');
|
|
16
|
+
const NPM_PACKAGE = pkg.name;
|
|
17
|
+
const NPM_PACKAGE_LATEST = `${NPM_PACKAGE}@latest`;
|
|
18
|
+
const UPSTREAM_PACKAGE = 'get-shit-done-cc';
|
|
19
|
+
const UPSTREAM_REPO = 'https://github.com/glittercowboy/get-shit-done';
|
|
20
|
+
const FORK_REPO = 'https://github.com/undeemed/get-shit-done-codex';
|
|
17
21
|
|
|
18
22
|
const banner = `
|
|
19
23
|
${green} ██████╗ ███████╗██████╗
|
|
@@ -24,11 +28,10 @@ ${green} ██████╗ ███████╗██████╗
|
|
|
24
28
|
╚═════╝ ╚══════╝╚═════╝${reset}
|
|
25
29
|
|
|
26
30
|
Get Shit Done ${dim}v${pkg.version}${reset}
|
|
27
|
-
A meta
|
|
28
|
-
development system for OpenAI Codex CLI
|
|
31
|
+
A meta-prompting, context engineering, and spec-driven
|
|
32
|
+
development system for OpenAI Codex (CLI + Desktop).
|
|
29
33
|
`;
|
|
30
34
|
|
|
31
|
-
// Parse args
|
|
32
35
|
const args = process.argv.slice(2);
|
|
33
36
|
const hasGlobal = args.includes('--global') || args.includes('-g');
|
|
34
37
|
const hasLocal = args.includes('--local') || args.includes('-l');
|
|
@@ -36,56 +39,55 @@ const hasHelp = args.includes('--help') || args.includes('-h');
|
|
|
36
39
|
|
|
37
40
|
console.log(banner);
|
|
38
41
|
|
|
39
|
-
// Show help if requested
|
|
40
42
|
if (hasHelp) {
|
|
41
|
-
console.log(` ${yellow}
|
|
43
|
+
console.log(` ${yellow}Usage:${reset} npx ${NPM_PACKAGE} [options]
|
|
42
44
|
|
|
43
|
-
${yellow}
|
|
44
|
-
${cyan}
|
|
45
|
-
${cyan}
|
|
46
|
-
${cyan}
|
|
45
|
+
${yellow}Options:${reset}
|
|
46
|
+
${cyan}-g, --global${reset} Install globally (to ~/.codex/)
|
|
47
|
+
${cyan}-l, --local${reset} Install locally (to current directory)
|
|
48
|
+
${cyan}-h, --help${reset} Show this help message
|
|
47
49
|
|
|
48
|
-
${yellow}
|
|
49
|
-
${dim}# Install globally
|
|
50
|
-
npx
|
|
50
|
+
${yellow}Examples:${reset}
|
|
51
|
+
${dim}# Install globally${reset}
|
|
52
|
+
npx ${NPM_PACKAGE} --global
|
|
51
53
|
|
|
52
54
|
${dim}# Install to current project only${reset}
|
|
53
|
-
npx
|
|
54
|
-
|
|
55
|
-
${yellow}
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
- Global install goes to ~/.codex/(inherited by all projects)
|
|
60
|
-
- Local install puts files in current directory
|
|
55
|
+
npx ${NPM_PACKAGE} --local
|
|
56
|
+
|
|
57
|
+
${yellow}Notes:${reset}
|
|
58
|
+
- Installs AGENTS.md into the target directory
|
|
59
|
+
- Installs GSD prompt commands into prompts/
|
|
60
|
+
- Installs get-shit-done/ workflow files
|
|
61
61
|
`);
|
|
62
62
|
process.exit(0);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* Apply content replacements for Codex CLI compatibility
|
|
67
|
-
*/
|
|
68
65
|
function applyReplacements(content, pathPrefix) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
const runtimeRelativePrefix = pathPrefix.replace('~/', '');
|
|
67
|
+
const explicitRelativePrefix = runtimeRelativePrefix === './'
|
|
68
|
+
? './'
|
|
69
|
+
: `./${runtimeRelativePrefix}`;
|
|
70
|
+
|
|
71
|
+
// Replace explicit relative/global patterns first to avoid producing "././".
|
|
72
|
+
content = content.replace(/\.\/\.claude\//g, explicitRelativePrefix);
|
|
73
|
+
content = content.replace(/~\/\.claude\//g, '~/.codex/');
|
|
74
|
+
content = content.replace(/\.claude\//g, runtimeRelativePrefix);
|
|
72
75
|
|
|
73
|
-
// Claude → Codex naming
|
|
74
76
|
content = content.replace(/Claude Code/g, 'Codex CLI');
|
|
75
77
|
content = content.replace(/Claude/g, 'Codex');
|
|
76
78
|
|
|
77
|
-
// Command format: /gsd:name → /prompts:gsd-name (Codex CLI custom prompts format)
|
|
78
79
|
content = content.replace(/\/gsd:/g, '/prompts:gsd-');
|
|
79
80
|
|
|
81
|
+
// Keep update workflows pointed to this fork's npm package/repo.
|
|
82
|
+
content = content.replace(new RegExp(UPSTREAM_PACKAGE, 'g'), NPM_PACKAGE);
|
|
83
|
+
content = content.replace(new RegExp(UPSTREAM_REPO.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), FORK_REPO);
|
|
84
|
+
content = content.replace(/npmjs\.com\/package\/get-shit-done-cc/g, `npmjs.com/package/${encodeURIComponent(NPM_PACKAGE)}`);
|
|
85
|
+
|
|
80
86
|
return content;
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
/**
|
|
84
|
-
* Recursively copy directory, replacing paths in .md files
|
|
85
|
-
*/
|
|
86
89
|
function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
|
|
87
90
|
fs.mkdirSync(destDir, { recursive: true });
|
|
88
|
-
|
|
89
91
|
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
|
|
90
92
|
|
|
91
93
|
for (const entry of entries) {
|
|
@@ -94,118 +96,122 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
|
|
|
94
96
|
|
|
95
97
|
if (entry.isDirectory()) {
|
|
96
98
|
copyWithPathReplacement(srcPath, destPath, pathPrefix);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
fs.
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (entry.name.endsWith('.md')) {
|
|
103
|
+
const content = fs.readFileSync(srcPath, 'utf8');
|
|
104
|
+
fs.writeFileSync(destPath, applyReplacements(content, pathPrefix), 'utf8');
|
|
105
|
+
continue;
|
|
103
106
|
}
|
|
107
|
+
|
|
108
|
+
fs.copyFileSync(srcPath, destPath);
|
|
104
109
|
}
|
|
105
110
|
}
|
|
106
111
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const codexDir = isGlobal
|
|
113
|
-
? path.join(os.homedir(), '.codex')
|
|
114
|
-
: process.cwd();
|
|
115
|
-
|
|
116
|
-
const locationLabel = isGlobal
|
|
117
|
-
? '~/.codex'
|
|
118
|
-
: '.';
|
|
112
|
+
function writeVersionFile(destDir, isGlobal) {
|
|
113
|
+
const versionFile = path.join(destDir, 'VERSION');
|
|
114
|
+
const installType = isGlobal ? 'GLOBAL' : 'LOCAL';
|
|
115
|
+
fs.writeFileSync(versionFile, `${pkg.version}\n${installType}\n`, 'utf8');
|
|
116
|
+
}
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
function showCachedVersionWarning() {
|
|
119
|
+
try {
|
|
120
|
+
const latest = execSync(`npm view ${NPM_PACKAGE} version`, {
|
|
121
|
+
encoding: 'utf8',
|
|
122
|
+
timeout: 4000,
|
|
123
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
124
|
+
}).trim();
|
|
125
|
+
if (latest && latest !== pkg.version) {
|
|
126
|
+
console.log(` ${yellow}Update available:${reset} v${pkg.version} -> v${latest}`);
|
|
127
|
+
console.log(` Run ${cyan}npx ${NPM_PACKAGE_LATEST}${reset} to install the latest release.\n`);
|
|
128
|
+
}
|
|
129
|
+
} catch (_) {
|
|
130
|
+
// Offline or npm unavailable - skip.
|
|
131
|
+
}
|
|
132
|
+
}
|
|
124
133
|
|
|
125
|
-
|
|
134
|
+
function install(isGlobal) {
|
|
135
|
+
const src = path.join(__dirname, '..');
|
|
136
|
+
const codexDir = isGlobal ? path.join(os.homedir(), '.codex') : process.cwd();
|
|
137
|
+
const locationLabel = isGlobal ? '~/.codex' : '.';
|
|
138
|
+
const pathPrefix = isGlobal ? '~/.codex/' : './';
|
|
126
139
|
|
|
127
|
-
|
|
140
|
+
console.log(` Installing to ${cyan}${locationLabel}${reset}\n`);
|
|
128
141
|
fs.mkdirSync(codexDir, { recursive: true });
|
|
129
142
|
|
|
130
|
-
// Copy AGENTS.md
|
|
131
143
|
const agentsSrc = path.join(src, 'AGENTS.md');
|
|
132
144
|
const agentsDest = path.join(codexDir, 'AGENTS.md');
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
fs.writeFileSync(agentsDest, agentsContent);
|
|
145
|
+
const agentsContent = applyReplacements(fs.readFileSync(agentsSrc, 'utf8'), pathPrefix);
|
|
146
|
+
fs.writeFileSync(agentsDest, agentsContent, 'utf8');
|
|
136
147
|
console.log(` ${green}✓${reset} Installed AGENTS.md`);
|
|
137
148
|
|
|
138
|
-
// Create prompts directory (Codex CLI uses prompts/ for custom slash commands)
|
|
139
149
|
const promptsDir = path.join(codexDir, 'prompts');
|
|
140
150
|
fs.mkdirSync(promptsDir, { recursive: true });
|
|
141
151
|
|
|
142
|
-
// Copy commands/gsd as prompts (flatten the structure for Codex CLI)
|
|
143
|
-
// Codex CLI expects prompts/command-name.md format
|
|
144
152
|
const gsdSrc = path.join(src, 'commands', 'gsd');
|
|
145
153
|
const entries = fs.readdirSync(gsdSrc);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
let content = fs.readFileSync(srcPath, 'utf8');
|
|
153
|
-
content = applyReplacements(content, pathPrefix);
|
|
154
|
-
fs.writeFileSync(destPath, content);
|
|
155
|
-
}
|
|
154
|
+
const markdownEntries = entries.filter((entry) => entry.endsWith('.md'));
|
|
155
|
+
for (const entry of markdownEntries) {
|
|
156
|
+
const srcPath = path.join(gsdSrc, entry);
|
|
157
|
+
const destPath = path.join(promptsDir, `gsd-${entry}`);
|
|
158
|
+
const content = applyReplacements(fs.readFileSync(srcPath, 'utf8'), pathPrefix);
|
|
159
|
+
fs.writeFileSync(destPath, content, 'utf8');
|
|
156
160
|
}
|
|
157
|
-
console.log(` ${green}✓${reset} Installed prompts
|
|
161
|
+
console.log(` ${green}✓${reset} Installed prompts/gsd-*.md (${markdownEntries.length} commands)`);
|
|
158
162
|
|
|
159
|
-
// Copy get-shit-done skill with path replacement
|
|
160
163
|
const skillSrc = path.join(src, 'get-shit-done');
|
|
161
164
|
const skillDest = path.join(codexDir, 'get-shit-done');
|
|
162
165
|
copyWithPathReplacement(skillSrc, skillDest, pathPrefix);
|
|
163
|
-
|
|
166
|
+
writeVersionFile(skillDest, isGlobal);
|
|
167
|
+
console.log(` ${green}✓${reset} Installed get-shit-done/ workflow files`);
|
|
168
|
+
console.log(` ${green}✓${reset} Wrote get-shit-done/VERSION (${pkg.version})`);
|
|
164
169
|
|
|
165
170
|
console.log(`
|
|
166
|
-
${green}
|
|
167
|
-
|
|
168
|
-
${yellow}For Codex CLI:${reset}
|
|
169
|
-
- AGENTS.md
|
|
170
|
-
-
|
|
171
|
-
|
|
171
|
+
${green}Done!${reset}
|
|
172
|
+
|
|
173
|
+
${yellow}For Codex (CLI + Desktop):${reset}
|
|
174
|
+
- AGENTS.md: ${cyan}${codexDir}/AGENTS.md${reset}
|
|
175
|
+
- Prompt commands: ${cyan}${codexDir}/prompts/${reset}
|
|
176
|
+
|
|
172
177
|
${yellow}Getting Started:${reset}
|
|
173
|
-
1. Run ${cyan}codex${reset}
|
|
174
|
-
2.
|
|
175
|
-
3. Start with ${cyan}/prompts:gsd-new-project${reset}
|
|
178
|
+
1. Run ${cyan}codex${reset} (CLI) or ${cyan}codex app${reset} (Desktop)
|
|
179
|
+
2. Use ${cyan}/prompts:gsd-help${reset} to list commands
|
|
180
|
+
3. Start with ${cyan}/prompts:gsd-new-project${reset}
|
|
176
181
|
|
|
177
|
-
${
|
|
182
|
+
${yellow}Staying Updated:${reset}
|
|
183
|
+
- In Codex: ${cyan}/prompts:gsd-update${reset}
|
|
184
|
+
- In terminal: ${cyan}npx ${NPM_PACKAGE_LATEST}${reset}
|
|
178
185
|
`);
|
|
179
186
|
}
|
|
180
187
|
|
|
181
|
-
/**
|
|
182
|
-
* Prompt for install location
|
|
183
|
-
*/
|
|
184
188
|
function promptLocation() {
|
|
185
189
|
const rl = readline.createInterface({
|
|
186
190
|
input: process.stdin,
|
|
187
191
|
output: process.stdout
|
|
188
192
|
});
|
|
189
193
|
|
|
190
|
-
console.log(` ${yellow}Where would you like to install
|
|
194
|
+
console.log(` ${yellow}Where would you like to install?${reset}
|
|
191
195
|
|
|
192
|
-
${cyan}
|
|
193
|
-
${cyan}
|
|
196
|
+
${cyan}1${reset}) Global ${dim}(~/.codex)${reset} - available in all projects
|
|
197
|
+
${cyan}2${reset}) Local ${dim}(.)${reset} - this project only
|
|
194
198
|
`);
|
|
195
199
|
|
|
196
|
-
rl.question(` Choice ${dim}
|
|
200
|
+
rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
|
|
197
201
|
rl.close();
|
|
198
202
|
const choice = answer.trim() || '1';
|
|
199
|
-
|
|
200
|
-
install(isGlobal);
|
|
203
|
+
install(choice !== '2');
|
|
201
204
|
});
|
|
202
205
|
}
|
|
203
206
|
|
|
204
|
-
|
|
207
|
+
showCachedVersionWarning();
|
|
208
|
+
|
|
205
209
|
if (hasGlobal && hasLocal) {
|
|
206
|
-
console.error(` ${yellow}Cannot specify both--global and--local${reset}
|
|
210
|
+
console.error(` ${yellow}Cannot specify both --global and --local${reset}`);
|
|
207
211
|
process.exit(1);
|
|
208
|
-
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (hasGlobal) {
|
|
209
215
|
install(true);
|
|
210
216
|
} else if (hasLocal) {
|
|
211
217
|
install(false);
|
|
@@ -11,197 +11,29 @@ allowed-tools:
|
|
|
11
11
|
<objective>
|
|
12
12
|
Add a new integer phase to the end of the current milestone in the roadmap.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Routes to the add-phase workflow which handles:
|
|
15
|
+
- Phase number calculation (next sequential integer)
|
|
16
|
+
- Directory creation with slug generation
|
|
17
|
+
- Roadmap structure updates
|
|
18
|
+
- STATE.md roadmap evolution tracking
|
|
17
19
|
</objective>
|
|
18
20
|
|
|
19
21
|
<execution_context>
|
|
20
22
|
@.planning/ROADMAP.md
|
|
21
23
|
@.planning/STATE.md
|
|
24
|
+
@~/.claude/get-shit-done/workflows/add-phase.md
|
|
22
25
|
</execution_context>
|
|
23
26
|
|
|
24
27
|
<process>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Usage: /gsd:add-phase <description>
|
|
37
|
-
Example: /gsd:add-phase Add authentication system
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Exit.
|
|
41
|
-
</step>
|
|
42
|
-
|
|
43
|
-
<step name="load_roadmap">
|
|
44
|
-
Load the roadmap file:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
if [ -f .planning/ROADMAP.md ]; then
|
|
48
|
-
ROADMAP=".planning/ROADMAP.md"
|
|
49
|
-
else
|
|
50
|
-
echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Read roadmap content for parsing.
|
|
56
|
-
</step>
|
|
57
|
-
|
|
58
|
-
<step name="find_current_milestone">
|
|
59
|
-
Parse the roadmap to find the current milestone section:
|
|
60
|
-
|
|
61
|
-
1. Locate the "## Current Milestone:" heading
|
|
62
|
-
2. Extract milestone name and version
|
|
63
|
-
3. Identify all phases under this milestone (before next "---" separator or next milestone heading)
|
|
64
|
-
4. Parse existing phase numbers (including decimals if present)
|
|
65
|
-
|
|
66
|
-
Example structure:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
## Current Milestone: v1.0 Foundation
|
|
70
|
-
|
|
71
|
-
### Phase 4: Focused Command System
|
|
72
|
-
### Phase 5: Path Routing & Validation
|
|
73
|
-
### Phase 6: Documentation & Distribution
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
</step>
|
|
77
|
-
|
|
78
|
-
<step name="calculate_next_phase">
|
|
79
|
-
Find the highest integer phase number in the current milestone:
|
|
80
|
-
|
|
81
|
-
1. Extract all phase numbers from phase headings (### Phase N:)
|
|
82
|
-
2. Filter to integer phases only (ignore decimals like 4.1, 4.2)
|
|
83
|
-
3. Find the maximum integer value
|
|
84
|
-
4. Add 1 to get the next phase number
|
|
85
|
-
|
|
86
|
-
Example: If phases are 4, 5, 5.1, 6 → next is 7
|
|
87
|
-
|
|
88
|
-
Format as two-digit: `printf "%02d" $next_phase`
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
<step name="generate_slug">
|
|
92
|
-
Convert the phase description to a kebab-case slug:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
# Example transformation:
|
|
96
|
-
# "Add authentication" → "add-authentication"
|
|
97
|
-
# "Fix critical performance issues" → "fix-critical-performance-issues"
|
|
98
|
-
|
|
99
|
-
slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Phase directory name: `{two-digit-phase}-{slug}`
|
|
103
|
-
Example: `07-add-authentication`
|
|
104
|
-
</step>
|
|
105
|
-
|
|
106
|
-
<step name="create_phase_directory">
|
|
107
|
-
Create the phase directory structure:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
phase_dir=".planning/phases/${phase_num}-${slug}"
|
|
111
|
-
mkdir -p "$phase_dir"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Confirm: "Created directory: $phase_dir"
|
|
115
|
-
</step>
|
|
116
|
-
|
|
117
|
-
<step name="update_roadmap">
|
|
118
|
-
Add the new phase entry to the roadmap:
|
|
119
|
-
|
|
120
|
-
1. Find the insertion point (after last phase in current milestone, before "---" separator)
|
|
121
|
-
2. Insert new phase heading:
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
### Phase {N}: {Description}
|
|
125
|
-
|
|
126
|
-
**Goal:** [To be planned]
|
|
127
|
-
**Depends on:** Phase {N-1}
|
|
128
|
-
**Plans:** 0 plans
|
|
129
|
-
|
|
130
|
-
Plans:
|
|
131
|
-
- [ ] TBD (run /gsd:plan-phase {N} to break down)
|
|
132
|
-
|
|
133
|
-
**Details:**
|
|
134
|
-
[To be added during planning]
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
3. Write updated roadmap back to file
|
|
138
|
-
|
|
139
|
-
Preserve all other content exactly (formatting, spacing, other phases).
|
|
140
|
-
</step>
|
|
141
|
-
|
|
142
|
-
<step name="update_project_state">
|
|
143
|
-
Update STATE.md to reflect the new phase:
|
|
144
|
-
|
|
145
|
-
1. Read `.planning/STATE.md`
|
|
146
|
-
2. Under "## Current Position" → "**Next Phase:**" add reference to new phase
|
|
147
|
-
3. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
|
|
148
|
-
```
|
|
149
|
-
- Phase {N} added: {description}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
If "Roadmap Evolution" section doesn't exist, create it.
|
|
153
|
-
</step>
|
|
154
|
-
|
|
155
|
-
<step name="completion">
|
|
156
|
-
Present completion summary:
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
Phase {N} added to current milestone:
|
|
160
|
-
- Description: {description}
|
|
161
|
-
- Directory: .planning/phases/{phase-num}-{slug}/
|
|
162
|
-
- Status: Not planned yet
|
|
163
|
-
|
|
164
|
-
Roadmap updated: {roadmap-path}
|
|
165
|
-
Project state updated: .planning/STATE.md
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## ▶ Next Up
|
|
170
|
-
|
|
171
|
-
**Phase {N}: {description}**
|
|
172
|
-
|
|
173
|
-
`/gsd:plan-phase {N}`
|
|
174
|
-
|
|
175
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
**Also available:**
|
|
180
|
-
- `/gsd:add-phase <description>` — add another phase
|
|
181
|
-
- Review roadmap
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
```
|
|
185
|
-
</step>
|
|
186
|
-
|
|
28
|
+
**Follow the add-phase workflow** from `@~/.claude/get-shit-done/workflows/add-phase.md`.
|
|
29
|
+
|
|
30
|
+
The workflow handles all logic including:
|
|
31
|
+
1. Argument parsing and validation
|
|
32
|
+
2. Roadmap existence checking
|
|
33
|
+
3. Current milestone identification
|
|
34
|
+
4. Next phase number calculation (ignoring decimals)
|
|
35
|
+
5. Slug generation from description
|
|
36
|
+
6. Phase directory creation
|
|
37
|
+
7. Roadmap entry insertion
|
|
38
|
+
8. STATE.md updates
|
|
187
39
|
</process>
|
|
188
|
-
|
|
189
|
-
<anti_patterns>
|
|
190
|
-
|
|
191
|
-
- Don't modify phases outside current milestone
|
|
192
|
-
- Don't renumber existing phases
|
|
193
|
-
- Don't use decimal numbering (that's /gsd:insert-phase)
|
|
194
|
-
- Don't create plans yet (that's /gsd:plan-phase)
|
|
195
|
-
- Don't commit changes (user decides when to commit)
|
|
196
|
-
</anti_patterns>
|
|
197
|
-
|
|
198
|
-
<success_criteria>
|
|
199
|
-
Phase addition is complete when:
|
|
200
|
-
|
|
201
|
-
- [ ] Phase directory created: `.planning/phases/{NN}-{slug}/`
|
|
202
|
-
- [ ] Roadmap updated with new phase entry
|
|
203
|
-
- [ ] STATE.md updated with roadmap evolution note
|
|
204
|
-
- [ ] New phase appears at end of current milestone
|
|
205
|
-
- [ ] Next phase number calculated correctly (ignoring decimals)
|
|
206
|
-
- [ ] User informed of next steps
|
|
207
|
-
</success_criteria>
|