diff --git a/commands/gsd/discuss-phase.md b/commands/gsd/discuss-phase.md index 7c48da851..02a72b1ad 100644 --- a/commands/gsd/discuss-phase.md +++ b/commands/gsd/discuss-phase.md @@ -1,7 +1,7 @@ --- name: gsd:discuss-phase description: Gather phase context through adaptive questioning before planning. -argument-hint: " [--all] [--auto] [--chain] [--batch] [--analyze] [--text] [--power]" +argument-hint: " [--all] [--auto] [--chain] [--batch] [--analyze] [--text] [--power] [--assumptions]" allowed-tools: - Read - Write @@ -49,6 +49,9 @@ Context files are resolved in-workflow using `init phase-op` and roadmap/state t DISCUSS_MODE=$(gsd-sdk query config-get workflow.discuss_mode 2>/dev/null || echo "discuss") ``` +If `--assumptions` is in $ARGUMENTS: +Read and execute `~/.claude/get-shit-done/workflows/list-phase-assumptions.md` end-to-end. + If `DISCUSS_MODE` is `"assumptions"`: Read and execute `~/.claude/get-shit-done/workflows/discuss-phase-assumptions.md` end-to-end. diff --git a/commands/gsd/import.md b/commands/gsd/import.md index 0abcae4d8..bbc56c7a5 100644 --- a/commands/gsd/import.md +++ b/commands/gsd/import.md @@ -1,7 +1,7 @@ --- name: gsd:import description: Ingest external plans with conflict detection against project decisions before writing anything. -argument-hint: "--from " +argument-hint: "--from | --from-gsd2" allowed-tools: - Read - Write @@ -17,8 +17,7 @@ allowed-tools: Import external plan files into the GSD planning system with conflict detection against PROJECT.md decisions. - **--from**: Import an external plan file, detect conflicts, write as GSD PLAN.md, validate via gsd-plan-checker. - -Future: `--prd` mode for PRD extraction is planned for a follow-up PR. +- **--from-gsd2**: Reverse-migrate a GSD-2 project (`.gsd/` directory) back to GSD v1 (`.planning/`) format. Runs `gsd-tools.cjs from-gsd2`. Pass `--path ` to migrate a project at a different path. @@ -33,5 +32,9 @@ $ARGUMENTS +If `--from-gsd2` is in $ARGUMENTS: +Run: `node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" from-gsd2` +Pass `--path ` if provided. Present the migration result to the user. + Execute the import workflow end-to-end. diff --git a/commands/gsd/manager.md b/commands/gsd/manager.md index ced2a95c0..575d01314 100644 --- a/commands/gsd/manager.md +++ b/commands/gsd/manager.md @@ -1,6 +1,7 @@ --- name: gsd:manager description: Interactive command center for managing multiple phases from one terminal +argument-hint: "[--analyze-deps]" allowed-tools: - Read - Write @@ -35,6 +36,9 @@ Project context, phase list, dependencies, and recommendations are resolved insi +If `--analyze-deps` is in $ARGUMENTS: +Read and execute `~/.claude/get-shit-done/workflows/analyze-dependencies.md` end-to-end. + Execute the manager workflow from @~/.claude/get-shit-done/workflows/manager.md end-to-end. Maintain the dashboard refresh loop until the user exits or all phases complete. diff --git a/commands/gsd/pause-work.md b/commands/gsd/pause-work.md index 9c25da536..d01114b60 100644 --- a/commands/gsd/pause-work.md +++ b/commands/gsd/pause-work.md @@ -1,6 +1,7 @@ --- name: gsd:pause-work description: Create context handoff when pausing work mid-phase +argument-hint: "[--report]" allowed-tools: - Read - Write @@ -27,6 +28,9 @@ State and phase progress are gathered in-workflow with targeted reads. +If `--report` is in $ARGUMENTS: +Read and execute `~/.claude/get-shit-done/workflows/session-report.md` end-to-end. + **Follow the pause-work workflow** from `@~/.claude/get-shit-done/workflows/pause-work.md`. The workflow handles all logic including: diff --git a/get-shit-done/workflows/help.md b/get-shit-done/workflows/help.md index 3f9a73ae7..553b8e9e6 100644 --- a/get-shit-done/workflows/help.md +++ b/get-shit-done/workflows/help.md @@ -64,12 +64,13 @@ Usage: `/gsd-map-codebase` ### Phase Planning -**`/gsd-discuss-phase [--chain | --analyze | --power] [--batch[=N]]`** +**`/gsd-discuss-phase [--chain | --analyze | --power | --assumptions] [--batch[=N]]`** Help articulate your vision for a phase before planning. - `--chain` — chained-prompt discuss flow - `--analyze` — deep assumption analysis pass - `--power` — power-user mode with extended question set +- `--assumptions` — surface Claude's implementation assumptions about the phase without an interactive session - Captures how you imagine this phase working - Creates CONTEXT.md with your vision, essentials, and boundaries @@ -271,9 +272,10 @@ Resume work from previous session with full context restoration. Usage: `/gsd-resume-work` -**`/gsd-pause-work`** +**`/gsd-pause-work [--report]`** Create context handoff when pausing work mid-phase. +- `--report` — generate a post-session summary in `.planning/reports/` capturing commits, file changes, and phase progress - Creates .continue-here file with current state - Updates STATE.md session continuity section - Captures in-progress work context @@ -543,7 +545,7 @@ The commands above cover the most common day-to-day flows. Every command listed - **`/gsd-spec-phase [--auto] [--text]`** — Clarify WHAT a phase delivers with ambiguity scoring; produces a SPEC.md before discuss-phase. - **`/gsd-ai-integration-phase [phase]`** — Generate an AI-SPEC.md design contract for phases that involve building AI systems. - **`/gsd-ui-phase [phase]`** — Generate UI design contract (UI-SPEC.md) for frontend phases. -- **`/gsd-import --from `** — Ingest external plans with conflict detection against project decisions before writing anything. +- **`/gsd-import --from | --from-gsd2`** — Ingest external plans with conflict detection, or reverse-migrate a GSD-2 (`.gsd/`) project back to GSD v1 (`.planning/`) format. - **`/gsd-ingest-docs [path] [--mode new|merge] [--manifest ] [--resolve auto|interactive]`** — Bootstrap or merge a `.planning/` setup from existing ADRs, PRDs, SPECs, and docs in a repo. ### Planning & Execution @@ -579,7 +581,7 @@ The commands above cover the most common day-to-day flows. Every command listed ### Workflow & Orchestration -- **`/gsd-manager`** — Interactive command center for managing multiple phases from one terminal. +- **`/gsd-manager [--analyze-deps]`** — Interactive command center for managing multiple phases from one terminal. `--analyze-deps` scans ROADMAP phases for dependency relationships before parallel execution. - **`/gsd-workspace [--new | --list | --remove] [name]`** — Manage GSD workspaces: create, list, or remove isolated workspace environments. - **`/gsd-workstreams`** — Manage parallel workstreams: list, create, switch, status, progress, complete, and resume. - **`/gsd-review-backlog`** — Review and promote backlog items to active milestone. diff --git a/tests/enh-2790-skill-consolidation.test.cjs b/tests/enh-2790-skill-consolidation.test.cjs index da5a80501..b9fdf66d1 100644 --- a/tests/enh-2790-skill-consolidation.test.cjs +++ b/tests/enh-2790-skill-consolidation.test.cjs @@ -134,12 +134,12 @@ describe('absorbed skills are removed', () => { describe('outright deleted dead skills are removed', () => { const deleted = [ 'join-discord', - 'research-phase', - 'session-report', - 'from-gsd2', - 'analyze-dependencies', - 'list-phase-assumptions', - 'plan-milestone-gaps', + // research-phase → plan-phase --research-phase (PR #3045, already absorbed) + // plan-milestone-gaps → inline in audit-milestone (PR #3038, already absorbed) + // list-phase-assumptions → discuss-phase --assumptions (pending #3131) + // session-report → pause-work --report (pending #3131) + // analyze-dependencies → manager --analyze-deps (pending #3131) + // from-gsd2 → import --from-gsd2 (pending #3131) ]; for (const name of deleted) { @@ -152,6 +152,96 @@ describe('outright deleted dead skills are removed', () => { } }); +// --------------------------------------------------------------------------- +// Group: #3131 — re-wired workflows absorbed as flags +// --------------------------------------------------------------------------- +describe('#3131 re-wired workflows: standalone command files must not exist', () => { + const rewired = [ + ['list-phase-assumptions', 'absorbed into discuss-phase.md --assumptions'], + ['session-report', 'absorbed into pause-work.md --report'], + ['analyze-dependencies', 'absorbed into manager.md --analyze-deps'], + ['from-gsd2', 'absorbed into import.md --from-gsd2'], + ]; + + for (const [name, reason] of rewired) { + test(`commands/gsd/${name}.md does NOT exist (${reason})`, () => { + assert.ok( + !fs.existsSync(skillPath(name)), + `${name}.md still exists as a standalone command but should be absorbed (${reason})`, + ); + }); + } +}); + +describe('#3131 re-wired workflows: parent command argument-hints advertise the new flags', () => { + test('discuss-phase.md argument-hint contains --assumptions', () => { + const fm = parseFrontmatter(skillPath('discuss-phase')); + assert.ok( + (fm['argument-hint'] || '').includes('--assumptions'), + 'discuss-phase.md argument-hint does not contain --assumptions. got: ' + (fm['argument-hint'] || '(none)'), + ); + }); + + test('pause-work.md argument-hint contains --report', () => { + const fm = parseFrontmatter(skillPath('pause-work')); + assert.ok( + (fm['argument-hint'] || '').includes('--report'), + 'pause-work.md argument-hint does not contain --report. got: ' + (fm['argument-hint'] || '(none)'), + ); + }); + + test('manager.md argument-hint contains --analyze-deps', () => { + const fm = parseFrontmatter(skillPath('manager')); + assert.ok( + (fm['argument-hint'] || '').includes('--analyze-deps'), + 'manager.md argument-hint does not contain --analyze-deps. got: ' + (fm['argument-hint'] || '(none)'), + ); + }); + + test('import.md argument-hint contains --from-gsd2', () => { + const fm = parseFrontmatter(skillPath('import')); + assert.ok( + (fm['argument-hint'] || '').includes('--from-gsd2'), + 'import.md argument-hint does not contain --from-gsd2. got: ' + (fm['argument-hint'] || '(none)'), + ); + }); +}); + +describe('#3131 re-wired workflows: parent command bodies dispatch to workflow files', () => { + function bodyContains(name, substring) { + const raw = fs.readFileSync(skillPath(name), 'utf8'); + return raw.includes(substring); + } + + test('discuss-phase.md body references list-phase-assumptions.md', () => { + assert.ok( + bodyContains('discuss-phase', 'list-phase-assumptions.md'), + 'discuss-phase.md body does not reference list-phase-assumptions.md — --assumptions flag dispatch is missing', + ); + }); + + test('pause-work.md body references session-report.md', () => { + assert.ok( + bodyContains('pause-work', 'session-report.md'), + 'pause-work.md body does not reference session-report.md — --report flag dispatch is missing', + ); + }); + + test('manager.md body references analyze-dependencies.md', () => { + assert.ok( + bodyContains('manager', 'analyze-dependencies.md'), + 'manager.md body does not reference analyze-dependencies.md — --analyze-deps flag dispatch is missing', + ); + }); + + test('import.md body references from-gsd2', () => { + assert.ok( + bodyContains('import', 'from-gsd2'), + 'import.md body does not reference from-gsd2 — --from-gsd2 flag dispatch is missing', + ); + }); +}); + // --------------------------------------------------------------------------- // Group: Parent skills updated with new flags // ---------------------------------------------------------------------------