Revert 12 PRs merged without authorization

Reverts:
- #413 fix(install): build hooks/dist on the fly for dev installs
- #396 refactor(statusline): display git branch in status line
- #543 Add in-progress state for todos
- #532 feat: add git_tag config option
- #171 Add OpenCode installer package
- #519 feat: Add Mistral Vibe CLI Support
- #389 docs: use @latest for uninstall commands
- #288 fix(install): auto-migrate renamed statusline.js reference
- #502 fix(#501): verify-work defers diagnosis/planning
- #497 fix: move resolved debug sessions to resolved/ folder
- #512 fix: create feature branch before first commit
- #545 fix: add Write tool to gsd-verifier

These were merged without owner approval.
This commit is contained in:
Lex Christopherson
2026-02-14 14:25:26 -06:00
parent e146b0846a
commit 9d815d31db
26 changed files with 424 additions and 1383 deletions

View File

@@ -51,8 +51,7 @@
* progress [json|table|bar] Render progress in various formats
*
* Todos:
* todo start <filename> Move todo from pending to in-progress
* todo complete <filename> Move todo from in-progress (or pending) to done
* todo complete <filename> Move todo from pending to completed
*
* Scaffolding:
* scaffold context --phase <N> Create CONTEXT.md template
@@ -161,7 +160,6 @@ function loadConfig(cwd) {
model_profile: 'balanced',
commit_docs: true,
search_gitignored: false,
git_tag: true,
branching_strategy: 'none',
phase_branch_template: 'gsd/phase-{phase}-{slug}',
milestone_branch_template: 'gsd/{milestone}-{slug}',
@@ -195,7 +193,6 @@ function loadConfig(cwd) {
model_profile: get('model_profile') ?? defaults.model_profile,
commit_docs: get('commit_docs', { section: 'planning', field: 'commit_docs' }) ?? defaults.commit_docs,
search_gitignored: get('search_gitignored', { section: 'planning', field: 'search_gitignored' }) ?? defaults.search_gitignored,
git_tag: get('git_tag', { section: 'planning', field: 'git_tag' }) ?? defaults.git_tag,
branching_strategy: get('branching_strategy', { section: 'git', field: 'branching_strategy' }) ?? defaults.branching_strategy,
phase_branch_template: get('phase_branch_template', { section: 'git', field: 'phase_branch_template' }) ?? defaults.phase_branch_template,
milestone_branch_template: get('milestone_branch_template', { section: 'git', field: 'milestone_branch_template' }) ?? defaults.milestone_branch_template,
@@ -518,12 +515,9 @@ function cmdCurrentTimestamp(format, raw) {
function cmdListTodos(cwd, area, raw) {
const pendingDir = path.join(cwd, '.planning', 'todos', 'pending');
const inProgressDir = path.join(cwd, '.planning', 'todos', 'in-progress');
let count = 0;
const todos = [];
let inProgressCount = 0;
const inProgressTodos = [];
try {
const files = fs.readdirSync(pendingDir).filter(f => f.endsWith('.md'));
@@ -552,35 +546,7 @@ function cmdListTodos(cwd, area, raw) {
}
} catch {}
try {
const files = fs.readdirSync(inProgressDir).filter(f => f.endsWith('.md'));
for (const file of files) {
try {
const content = fs.readFileSync(path.join(inProgressDir, file), 'utf-8');
const createdMatch = content.match(/^created:\s*(.+)$/m);
const titleMatch = content.match(/^title:\s*(.+)$/m);
const areaMatch = content.match(/^area:\s*(.+)$/m);
const startedMatch = content.match(/^started:\s*(.+)$/m);
const todoArea = areaMatch ? areaMatch[1].trim() : 'general';
if (area && todoArea !== area) continue;
inProgressCount++;
inProgressTodos.push({
file,
created: createdMatch ? createdMatch[1].trim() : 'unknown',
started: startedMatch ? startedMatch[1].trim() : 'unknown',
title: titleMatch ? titleMatch[1].trim() : 'Untitled',
area: todoArea,
path: path.join('.planning', 'todos', 'in-progress', file),
});
} catch {}
}
} catch {}
const result = { count, todos, in_progress_count: inProgressCount, in_progress_todos: inProgressTodos };
const result = { count, todos };
output(result, raw, count.toString());
}
@@ -632,7 +598,6 @@ function cmdConfigEnsureSection(cwd, raw) {
model_profile: 'balanced',
commit_docs: true,
search_gitignored: false,
git_tag: true,
branching_strategy: 'none',
phase_branch_template: 'gsd/phase-{phase}-{slug}',
milestone_branch_template: 'gsd/{milestone}-{slug}',
@@ -3418,35 +3383,6 @@ function cmdProgressRender(cwd, format, raw) {
}
}
// ─── Todo Start ──────────────────────────────────────────────────────────────
function cmdTodoStart(cwd, filename, raw) {
if (!filename) {
error('filename required for todo start');
}
const pendingDir = path.join(cwd, '.planning', 'todos', 'pending');
const inProgressDir = path.join(cwd, '.planning', 'todos', 'in-progress');
const sourcePath = path.join(pendingDir, filename);
if (!fs.existsSync(sourcePath)) {
error(`Todo not found: ${filename}`);
}
// Ensure in-progress directory exists
fs.mkdirSync(inProgressDir, { recursive: true });
// Read, add started timestamp, move
let content = fs.readFileSync(sourcePath, 'utf-8');
const today = new Date().toISOString().split('T')[0];
content = `started: ${today}\n` + content;
fs.writeFileSync(path.join(inProgressDir, filename), content, 'utf-8');
fs.unlinkSync(sourcePath);
output({ started: true, file: filename, date: today }, raw, 'started');
}
// ─── Todo Complete ────────────────────────────────────────────────────────────
function cmdTodoComplete(cwd, filename, raw) {
@@ -3454,28 +3390,23 @@ function cmdTodoComplete(cwd, filename, raw) {
error('filename required for todo complete');
}
const inProgressDir = path.join(cwd, '.planning', 'todos', 'in-progress');
const pendingDir = path.join(cwd, '.planning', 'todos', 'pending');
const doneDir = path.join(cwd, '.planning', 'todos', 'done');
const completedDir = path.join(cwd, '.planning', 'todos', 'completed');
const sourcePath = path.join(pendingDir, filename);
// Check in-progress first, then fall back to pending
let sourcePath = path.join(inProgressDir, filename);
if (!fs.existsSync(sourcePath)) {
sourcePath = path.join(pendingDir, filename);
if (!fs.existsSync(sourcePath)) {
error(`Todo not found: ${filename}`);
}
error(`Todo not found: ${filename}`);
}
// Ensure done directory exists
fs.mkdirSync(doneDir, { recursive: true });
// Ensure completed directory exists
fs.mkdirSync(completedDir, { recursive: true });
// Read, add completion timestamp, move
let content = fs.readFileSync(sourcePath, 'utf-8');
const today = new Date().toISOString().split('T')[0];
content = `completed: ${today}\n` + content;
fs.writeFileSync(path.join(doneDir, filename), content, 'utf-8');
fs.writeFileSync(path.join(completedDir, filename), content, 'utf-8');
fs.unlinkSync(sourcePath);
output({ completed: true, file: filename, date: today }, raw, 'completed');
@@ -3721,7 +3652,6 @@ function cmdInitPlanPhase(cwd, phase, includes, raw) {
research_enabled: config.research,
plan_checker_enabled: config.plan_checker,
commit_docs: config.commit_docs,
branching_strategy: config.branching_strategy,
// Phase info
phase_found: !!phaseInfo,
@@ -3731,17 +3661,6 @@ function cmdInitPlanPhase(cwd, phase, includes, raw) {
phase_slug: phaseInfo?.phase_slug || null,
padded_phase: phaseInfo?.phase_number?.padStart(2, '0') || null,
// Branch name (pre-computed) — ensures early branching before first commit
branch_name: config.branching_strategy === 'phase' && phaseInfo
? config.phase_branch_template
.replace('{phase}', phaseInfo.phase_number)
.replace('{slug}', phaseInfo.phase_slug || 'phase')
: config.branching_strategy === 'milestone'
? config.milestone_branch_template
.replace('{milestone}', getMilestoneInfo(cwd).version)
.replace('{slug}', generateSlugInternal(getMilestoneInfo(cwd).name) || 'milestone')
: null,
// Existing artifacts
has_research: phaseInfo?.has_research || false,
has_context: phaseInfo?.has_context || false,
@@ -4000,13 +3919,11 @@ function cmdInitVerifyWork(cwd, phase, raw) {
function cmdInitPhaseOp(cwd, phase, raw) {
const config = loadConfig(cwd);
const phaseInfo = findPhaseInternal(cwd, phase);
const milestone = getMilestoneInfo(cwd);
const result = {
// Config
commit_docs: config.commit_docs,
brave_search: config.brave_search,
branching_strategy: config.branching_strategy,
// Phase info
phase_found: !!phaseInfo,
@@ -4016,17 +3933,6 @@ function cmdInitPhaseOp(cwd, phase, raw) {
phase_slug: phaseInfo?.phase_slug || null,
padded_phase: phaseInfo?.phase_number?.padStart(2, '0') || null,
// Branch name (pre-computed) — ensures early branching before first commit
branch_name: config.branching_strategy === 'phase' && phaseInfo
? config.phase_branch_template
.replace('{phase}', phaseInfo.phase_number)
.replace('{slug}', phaseInfo.phase_slug || 'phase')
: config.branching_strategy === 'milestone'
? config.milestone_branch_template
.replace('{milestone}', milestone.version)
.replace('{slug}', generateSlugInternal(milestone.name) || 'milestone')
: null,
// Existing artifacts
has_research: phaseInfo?.has_research || false,
has_context: phaseInfo?.has_context || false,
@@ -4046,7 +3952,7 @@ function cmdInitTodos(cwd, area, raw) {
const config = loadConfig(cwd);
const now = new Date();
// List pending todos
// List todos (reuse existing logic)
const pendingDir = path.join(cwd, '.planning', 'todos', 'pending');
let count = 0;
const todos = [];
@@ -4075,37 +3981,6 @@ function cmdInitTodos(cwd, area, raw) {
}
} catch {}
// List in-progress todos
const inProgressDir = path.join(cwd, '.planning', 'todos', 'in-progress');
let inProgressCount = 0;
const inProgressTodos = [];
try {
const files = fs.readdirSync(inProgressDir).filter(f => f.endsWith('.md'));
for (const file of files) {
try {
const content = fs.readFileSync(path.join(inProgressDir, file), 'utf-8');
const createdMatch = content.match(/^created:\s*(.+)$/m);
const titleMatch = content.match(/^title:\s*(.+)$/m);
const areaMatch = content.match(/^area:\s*(.+)$/m);
const startedMatch = content.match(/^started:\s*(.+)$/m);
const todoArea = areaMatch ? areaMatch[1].trim() : 'general';
if (area && todoArea !== area) continue;
inProgressCount++;
inProgressTodos.push({
file,
created: createdMatch ? createdMatch[1].trim() : 'unknown',
started: startedMatch ? startedMatch[1].trim() : 'unknown',
title: titleMatch ? titleMatch[1].trim() : 'Untitled',
area: todoArea,
path: path.join('.planning', 'todos', 'in-progress', file),
});
} catch {}
}
} catch {}
const result = {
// Config
commit_docs: config.commit_docs,
@@ -4117,20 +3992,16 @@ function cmdInitTodos(cwd, area, raw) {
// Todo inventory
todo_count: count,
todos,
in_progress_count: inProgressCount,
in_progress_todos: inProgressTodos,
area_filter: area || null,
// Paths
pending_dir: '.planning/todos/pending',
in_progress_dir: '.planning/todos/in-progress',
done_dir: '.planning/todos/done',
completed_dir: '.planning/todos/completed',
// File existence
planning_exists: pathExistsInternal(cwd, '.planning'),
todos_dir_exists: pathExistsInternal(cwd, '.planning/todos'),
pending_dir_exists: pathExistsInternal(cwd, '.planning/todos/pending'),
in_progress_dir_exists: pathExistsInternal(cwd, '.planning/todos/in-progress'),
};
output(result, raw);
@@ -4623,12 +4494,10 @@ async function main() {
case 'todo': {
const subcommand = args[1];
if (subcommand === 'start') {
cmdTodoStart(cwd, args[2], raw);
} else if (subcommand === 'complete') {
if (subcommand === 'complete') {
cmdTodoComplete(cwd, args[2], raw);
} else {
error('Unknown todo subcommand. Available: start, complete');
error('Unknown todo subcommand. Available: complete');
}
break;
}

View File

@@ -1885,60 +1885,6 @@ describe('progress command', () => {
});
});
// ─────────────────────────────────────────────────────────────────────────────
// todo start command
// ─────────────────────────────────────────────────────────────────────────────
describe('todo start command', () => {
let tmpDir;
beforeEach(() => {
tmpDir = createTempProject();
});
afterEach(() => {
cleanup(tmpDir);
});
test('moves todo from pending to in-progress', () => {
const pendingDir = path.join(tmpDir, '.planning', 'todos', 'pending');
fs.mkdirSync(pendingDir, { recursive: true });
fs.writeFileSync(
path.join(pendingDir, 'add-dark-mode.md'),
`title: Add dark mode\narea: ui\ncreated: 2025-01-01\n`
);
const result = runGsdTools('todo start add-dark-mode.md', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.started, true);
// Verify moved
assert.ok(
!fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'pending', 'add-dark-mode.md')),
'should be removed from pending'
);
assert.ok(
fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'in-progress', 'add-dark-mode.md')),
'should be in in-progress'
);
// Verify started timestamp added
const content = fs.readFileSync(
path.join(tmpDir, '.planning', 'todos', 'in-progress', 'add-dark-mode.md'),
'utf-8'
);
assert.ok(content.startsWith('started:'), 'should have started timestamp');
});
test('fails for nonexistent todo', () => {
const result = runGsdTools('todo start nonexistent.md', tmpDir);
assert.ok(!result.success, 'should fail');
assert.ok(result.error.includes('not found'), 'error mentions not found');
});
});
// ─────────────────────────────────────────────────────────────────────────────
// todo complete command
// ─────────────────────────────────────────────────────────────────────────────
@@ -1954,12 +1900,12 @@ describe('todo complete command', () => {
cleanup(tmpDir);
});
test('completes todo from in-progress', () => {
const inProgressDir = path.join(tmpDir, '.planning', 'todos', 'in-progress');
fs.mkdirSync(inProgressDir, { recursive: true });
test('moves todo from pending to completed', () => {
const pendingDir = path.join(tmpDir, '.planning', 'todos', 'pending');
fs.mkdirSync(pendingDir, { recursive: true });
fs.writeFileSync(
path.join(inProgressDir, 'add-dark-mode.md'),
`started: 2025-01-01\ntitle: Add dark mode\narea: ui\ncreated: 2025-01-01\n`
path.join(pendingDir, 'add-dark-mode.md'),
`title: Add dark mode\narea: ui\ncreated: 2025-01-01\n`
);
const result = runGsdTools('todo complete add-dark-mode.md', tmpDir);
@@ -1970,47 +1916,22 @@ describe('todo complete command', () => {
// Verify moved
assert.ok(
!fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'in-progress', 'add-dark-mode.md')),
'should be removed from in-progress'
!fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'pending', 'add-dark-mode.md')),
'should be removed from pending'
);
assert.ok(
fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'done', 'add-dark-mode.md')),
'should be in done'
fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'completed', 'add-dark-mode.md')),
'should be in completed'
);
// Verify completion timestamp added
const content = fs.readFileSync(
path.join(tmpDir, '.planning', 'todos', 'done', 'add-dark-mode.md'),
path.join(tmpDir, '.planning', 'todos', 'completed', 'add-dark-mode.md'),
'utf-8'
);
assert.ok(content.startsWith('completed:'), 'should have completed timestamp');
});
test('completes todo from pending directly', () => {
const pendingDir = path.join(tmpDir, '.planning', 'todos', 'pending');
fs.mkdirSync(pendingDir, { recursive: true });
fs.writeFileSync(
path.join(pendingDir, 'fix-bug.md'),
`title: Fix bug\narea: api\ncreated: 2025-01-01\n`
);
const result = runGsdTools('todo complete fix-bug.md', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.completed, true);
// Verify moved to done (not completed)
assert.ok(
!fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'pending', 'fix-bug.md')),
'should be removed from pending'
);
assert.ok(
fs.existsSync(path.join(tmpDir, '.planning', 'todos', 'done', 'fix-bug.md')),
'should be in done'
);
});
test('fails for nonexistent todo', () => {
const result = runGsdTools('todo complete nonexistent.md', tmpDir);
assert.ok(!result.success, 'should fail');

View File

@@ -6,8 +6,7 @@ Configuration options for `.planning/` directory behavior.
```json
"planning": {
"commit_docs": true,
"search_gitignored": false,
"git_tag": true
"search_gitignored": false
},
"git": {
"branching_strategy": "none",
@@ -20,7 +19,6 @@ Configuration options for `.planning/` directory behavior.
|--------|---------|-------------|
| `commit_docs` | `true` | Whether to commit planning artifacts to git |
| `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
| `git_tag` | `true` | Create git tags on milestone completion |
| `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
| `git.phase_branch_template` | `"gsd/phase-{phase}-{slug}"` | Branch template for phase strategy |
| `git.milestone_branch_template` | `"gsd/{milestone}-{slug}"` | Branch template for milestone strategy |

View File

@@ -8,8 +8,7 @@
},
"planning": {
"commit_docs": true,
"search_gitignored": false,
"git_tag": true
"search_gitignored": false
},
"parallelization": {
"enabled": true,

View File

@@ -19,7 +19,7 @@ Extract from init JSON: `commit_docs`, `date`, `timestamp`, `todo_count`, `todos
Ensure directories exist:
```bash
mkdir -p .planning/todos/pending .planning/todos/in-progress .planning/todos/done
mkdir -p .planning/todos/pending .planning/todos/done
```
Note existing areas from the todos array for consistency in infer_area step.

View File

@@ -105,7 +105,7 @@ Use AskUserQuestion:
- header: "Action"
- question: "This todo relates to Phase [N]: [name]. What would you like to do?"
- options:
- "Work on it now" — move to in-progress, start working
- "Work on it now" — move to done, start working
- "Add to phase plan" — include when planning Phase [N]
- "Brainstorm approach" — think through before deciding
- "Put it back" — return to list
@@ -116,7 +116,7 @@ Use AskUserQuestion:
- header: "Action"
- question: "What would you like to do with this todo?"
- options:
- "Work on it now" — move to in-progress, start working
- "Work on it now" — move to done, start working
- "Create a phase" — /gsd:add-phase with this scope
- "Brainstorm approach" — think through before deciding
- "Put it back" — return to list
@@ -125,7 +125,7 @@ Use AskUserQuestion:
<step name="execute_action">
**Work on it now:**
```bash
mv ".planning/todos/pending/[filename]" ".planning/todos/in-progress/"
mv ".planning/todos/pending/[filename]" ".planning/todos/done/"
```
Update STATE.md todo count. Present problem/solution context. Begin work or ask how to proceed.
@@ -150,11 +150,11 @@ Re-run `init todos` to get updated count, then update STATE.md "### Pending Todo
</step>
<step name="git_commit">
If todo was moved to in-progress/, commit the change:
If todo was moved to done/, commit the change:
```bash
git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs: start work on todo - [title]" --files .planning/todos/in-progress/[filename] .planning/STATE.md
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs: start work on todo - [title]" --files .planning/todos/done/[filename] .planning/STATE.md
```
Tool respects `commit_docs` config and gitignore automatically.
@@ -172,5 +172,5 @@ Confirm: "Committed: docs: start work on todo - [title]"
- [ ] Appropriate actions offered
- [ ] Selected action executed
- [ ] STATE.md updated if todo count changed
- [ ] Changes committed to git (if todo moved to in-progress/)
- [ ] Changes committed to git (if todo moved to done/)
</success_criteria>

View File

@@ -531,11 +531,6 @@ fi
<step name="git_tag">
<config-check>
Read `planning.git_tag` from `.planning/config.json` (default: `true` if not set).
If `git_tag` is `false` → skip this step entirely, proceed to `git_commit_milestone`.
</config-check>
Create git tag:
```bash

View File

@@ -114,7 +114,7 @@ Phase number from argument (required).
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.js init phase-op "${PHASE}")
```
Parse JSON for: `commit_docs`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`.
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`.
**If `phase_found` is false:**
```
@@ -124,22 +124,7 @@ Use /gsd:progress to see available phases.
```
Exit workflow.
**If `phase_found` is true:** Continue to handle_branching.
</step>
<step name="handle_branching">
Check `branching_strategy` from init:
**"none":** Skip, continue on current branch.
**"phase" or "milestone":** Use pre-computed `branch_name` from init:
```bash
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
```
This ensures all phase documentation commits (context, research, plans) go to the feature branch, not main.
Continue to check_existing.
**If `phase_found` is true:** Continue to check_existing.
</step>
<step name="check_existing">

View File

@@ -226,52 +226,94 @@ After all waves:
```
</step>
<step name="verify_phase_goal">
Verify phase achieved its GOAL, not just completed tasks.
```
Task(
prompt="Verify phase {phase_number} goal achievement.
Phase directory: {phase_dir}
Phase goal: {goal from ROADMAP.md}
Check must_haves against actual codebase. Create VERIFICATION.md.",
subagent_type="gsd-verifier",
model="{verifier_model}"
)
```
Read status:
```bash
grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
```
| Status | Action |
|--------|--------|
| `passed` | → update_roadmap |
| `human_needed` | Present items for human testing, get approval or feedback |
| `gaps_found` | Present gap summary, offer `/gsd:plan-phase {phase} --gaps` |
**If human_needed:**
```
## ✓ Phase {X}: {Name} — Human Verification Required
All automated checks passed. {N} items need human testing:
{From VERIFICATION.md human_verification section}
"approved" → continue | Report issues → gap closure
```
**If gaps_found:**
```
## ⚠ Phase {X}: {Name} — Gaps Found
**Score:** {N}/{M} must-haves verified
**Report:** {phase_dir}/{phase}-VERIFICATION.md
### What's Missing
{Gap summaries from VERIFICATION.md}
---
## ▶ Next Up
`/gsd:plan-phase {X} --gaps`
<sub>`/clear` first → fresh context window</sub>
Also: `cat {phase_dir}/{phase}-VERIFICATION.md` — full report
Also: `/gsd:verify-work {X}` — manual testing first
```
Gap closure cycle: `/gsd:plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/gsd:execute-phase {X} --gaps-only` → verifier re-runs.
</step>
<step name="update_roadmap">
Mark phase complete in ROADMAP.md (date, status).
```bash
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/phases/{phase_dir}/*-VERIFICATION.md .planning/REQUIREMENTS.md
```
</step>
<step name="offer_next">
**Route based on execution mode:**
**If `--gaps-only` (gap closure execution):**
**If more phases:**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► GAP FIXES EXECUTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## Next Up
Phase {X}: {Name} — gap closure plans executed.
**Phase {X+1}: {Name}** — {Goal}
───────────────────────────────────────────────────────────────
`/gsd:plan-phase {X+1}`
## ▶ Next Up
**Re-verify fixes** — confirm gaps are closed
`/clear` then `/gsd:verify-work {X}`
───────────────────────────────────────────────────────────────
<sub>`/clear` first for fresh context</sub>
```
**If normal execution (no flags):**
**If milestone complete:**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► EXECUTION COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MILESTONE COMPLETE!
Phase {X}: {Name} — all plans executed.
All {N} phases executed.
───────────────────────────────────────────────────────────────
## ▶ Next Up
**Verify what was built** — manual acceptance testing
`/clear` then `/gsd:verify-work {X}`
───────────────────────────────────────────────────────────────
**Also available:**
- `/gsd:plan-phase {X+1}` — skip verification, plan next phase
- `/gsd:complete-milestone` — if all phases done
`/gsd:complete-milestone`
```
</step>

View File

@@ -18,25 +18,12 @@ Load all context in one call (include file contents to avoid redundant reads):
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.js init plan-phase "$PHASE" --include state,roadmap,requirements,context,research,verification,uat)
```
Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `commit_docs`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`.
Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`.
**File contents (from --include):** `state_content`, `roadmap_content`, `requirements_content`, `context_content`, `research_content`, `verification_content`, `uat_content`. These are null if files don't exist.
**If `planning_exists` is false:** Error — run `/gsd:new-project` first.
## 1.5. Handle Branching
Check `branching_strategy` from init:
**"none":** Skip, continue on current branch.
**"phase" or "milestone":** Use pre-computed `branch_name` from init:
```bash
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
```
This ensures research and planning commits go to the feature branch, not main. If `/gsd:discuss-phase` already created the branch, the `git checkout` fallback switches to it.
## 2. Parse and Normalize Arguments
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`).

View File

@@ -30,7 +30,6 @@ Parse current values (default to `true` if not present):
- `workflow.verifier` — spawn verifier during execute-phase
- `model_profile` — which model each agent uses (default: `balanced`)
- `git.branching_strategy` — branching approach (default: `"none"`)
- `planning.git_tag` — create git tags on milestone completion (default: `true`)
</step>
<step name="present_settings">
@@ -84,15 +83,6 @@ AskUserQuestion([
{ label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
{ label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
]
},
{
question: "Create git tags on milestone completion?",
header: "Git Tagging",
multiSelect: false,
options: [
{ label: "Yes (Recommended)", description: "Tag releases with version (e.g., v1.0) on milestone completion" },
{ label: "No", description: "Skip git tagging — use if your project doesn't use tags or uses a different convention" }
]
}
])
```
@@ -110,10 +100,6 @@ Merge new settings into existing config.json:
"plan_check": true/false,
"verifier": true/false
},
"planning": {
...existing_planning,
"git_tag": true/false
},
"git": {
"branching_strategy": "none" | "phase" | "milestone"
}
@@ -138,7 +124,6 @@ Display:
| Plan Checker | {On/Off} |
| Execution Verifier | {On/Off} |
| Git Branching | {None/Per Phase/Per Milestone} |
| Git Tagging | {On/Off} |
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
@@ -154,7 +139,7 @@ Quick commands:
<success_criteria>
- [ ] Current config read
- [ ] User presented with 6 settings (profile + 3 workflow toggles + git branching + git tagging)
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
- [ ] Config updated with model_profile, workflow, and git sections
- [ ] Changes confirmed to user
</success_criteria>

View File

@@ -311,31 +311,7 @@ Present summary:
[List from Issues section]
```
**If issues > 0:**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► ISSUES RECORDED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{N} issue(s) recorded in UAT.md with structured gaps.
| # | Test | Severity | Issue |
|---|------|----------|-------|
[table of issues from Gaps section]
───────────────────────────────────────────────────────────────
## ▶ Next Up
**Plan fixes** in a fresh context (saves tokens):
`/clear` then `/gsd:plan-phase {phase} --gaps`
This will read the UAT gaps and create targeted fix plans.
───────────────────────────────────────────────────────────────
```
**If issues > 0:** Proceed to `diagnose_issues`
**If issues == 0:**
```
@@ -344,6 +320,203 @@ All tests passed. Ready to continue.
- `/gsd:plan-phase {next}` — Plan next phase
- `/gsd:execute-phase {next}` — Execute next phase
```
</step>
<step name="diagnose_issues">
**Diagnose root causes before planning fixes:**
```
---
{N} issues found. Diagnosing root causes...
Spawning parallel debug agents to investigate each issue.
```
- Load diagnose-issues workflow
- Follow @~/.claude/get-shit-done/workflows/diagnose-issues.md
- Spawn parallel debug agents for each issue
- Collect root causes
- Update UAT.md with root causes
- Proceed to `plan_gap_closure`
Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
</step>
<step name="plan_gap_closure">
**Auto-plan fixes from diagnosed gaps:**
Display:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► PLANNING FIXES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ Spawning planner for gap closure...
```
Spawn gsd-planner in --gaps mode:
```
Task(
prompt="""
<planning_context>
**Phase:** {phase_number}
**Mode:** gap_closure
**UAT with diagnoses:**
@.planning/phases/{phase_dir}/{phase}-UAT.md
**Project State:**
@.planning/STATE.md
**Roadmap:**
@.planning/ROADMAP.md
</planning_context>
<downstream_consumer>
Output consumed by /gsd:execute-phase
Plans must be executable prompts.
</downstream_consumer>
""",
subagent_type="gsd-planner",
model="{planner_model}",
description="Plan gap fixes for Phase {phase}"
)
```
On return:
- **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
- **PLANNING INCONCLUSIVE:** Report and offer manual intervention
</step>
<step name="verify_gap_plans">
**Verify fix plans with checker:**
Display:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► VERIFYING FIX PLANS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
◆ Spawning plan checker...
```
Initialize: `iteration_count = 1`
Spawn gsd-plan-checker:
```
Task(
prompt="""
<verification_context>
**Phase:** {phase_number}
**Phase Goal:** Close diagnosed gaps from UAT
**Plans to verify:**
@.planning/phases/{phase_dir}/*-PLAN.md
</verification_context>
<expected_output>
Return one of:
- ## VERIFICATION PASSED — all checks pass
- ## ISSUES FOUND — structured issue list
</expected_output>
""",
subagent_type="gsd-plan-checker",
model="{checker_model}",
description="Verify Phase {phase} fix plans"
)
```
On return:
- **VERIFICATION PASSED:** Proceed to `present_ready`
- **ISSUES FOUND:** Proceed to `revision_loop`
</step>
<step name="revision_loop">
**Iterate planner ↔ checker until plans pass (max 3):**
**If iteration_count < 3:**
Display: `Sending back to planner for revision... (iteration {N}/3)`
Spawn gsd-planner with revision context:
```
Task(
prompt="""
<revision_context>
**Phase:** {phase_number}
**Mode:** revision
**Existing plans:**
@.planning/phases/{phase_dir}/*-PLAN.md
**Checker issues:**
{structured_issues_from_checker}
</revision_context>
<instructions>
Read existing PLAN.md files. Make targeted updates to address checker issues.
Do NOT replan from scratch unless issues are fundamental.
</instructions>
""",
subagent_type="gsd-planner",
model="{planner_model}",
description="Revise Phase {phase} plans"
)
```
After planner returns → spawn checker again (verify_gap_plans logic)
Increment iteration_count
**If iteration_count >= 3:**
Display: `Max iterations reached. {N} issues remain.`
Offer options:
1. Force proceed (execute despite issues)
2. Provide guidance (user gives direction, retry)
3. Abandon (exit, user runs /gsd:plan-phase manually)
Wait for user response.
</step>
<step name="present_ready">
**Present completion and next steps:**
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► FIXES READY ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created
| Gap | Root Cause | Fix Plan |
|-----|------------|----------|
| {truth 1} | {root_cause} | {phase}-04 |
| {truth 2} | {root_cause} | {phase}-04 |
Plans verified and ready for execution.
───────────────────────────────────────────────────────────────
## ▶ Next Up
**Execute fixes** — run fix plans
`/clear` then `/gsd:execute-phase {phase} --gaps-only`
───────────────────────────────────────────────────────────────
```
</step>
</process>
@@ -389,7 +562,9 @@ Default to **major** if unclear. User can correct if needed.
- [ ] Severity inferred from description (never asked)
- [ ] Batched writes: on issue, every 5 passes, or completion
- [ ] Committed on completion
- [ ] If issues: gaps recorded in structured YAML in UAT.md
- [ ] If issues: user routed to `/gsd:plan-phase {N} --gaps` in fresh context
- [ ] If no issues: user routed to next phase
- [ ] If issues: parallel debug agents diagnose root causes
- [ ] If issues: gsd-planner creates fix plans (gap_closure mode)
- [ ] If issues: gsd-plan-checker verifies fix plans
- [ ] If issues: revision loop until plans pass (max 3 iterations)
- [ ] Ready for `/gsd:execute-phase --gaps-only` when complete
</success_criteria>