diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index 0abae3a64..6155b216a 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -460,23 +460,65 @@ Display banner: Context captured. Spawning plan-phase... ``` -Spawn plan-phase as Task: +Spawn plan-phase as Task with direct workflow file reference (do NOT use Skill tool — Skills don't resolve inside Task subagents): ``` Task( - prompt="Run /gsd:plan-phase ${PHASE} --auto", + prompt=" + + You are the plan-phase orchestrator. Create executable plans for Phase ${PHASE}: ${PHASE_NAME}, then auto-advance to execution. + + + + @~/.claude/get-shit-done/workflows/plan-phase.md + @~/.claude/get-shit-done/references/ui-brand.md + @~/.claude/get-shit-done/references/model-profile-resolution.md + + + + PHASE=${PHASE} + ARGUMENTS='${PHASE} --auto' + + + + 1. Read plan-phase.md from execution_context for your complete workflow + 2. Follow ALL steps: initialize, validate, load context, research, plan, verify, auto-advance + 3. When spawning agents (gsd-phase-researcher, gsd-planner, gsd-plan-checker), use Task with specified subagent_type and model + 4. For step 14 (auto-advance to execute): spawn execute-phase as a Task with DIRECT file reference — tell it to read execute-phase.md. Include @file refs to execute-phase.md, checkpoints.md, tdd.md, model-profile-resolution.md. Pass --no-transition flag so execute-phase returns results instead of chaining further. + 5. Do NOT use the Skill tool or /gsd: commands. Read workflow .md files directly. + 6. Return: PHASE COMPLETE (full pipeline success), PLANNING COMPLETE (planning done but execute failed/skipped), PLANNING INCONCLUSIVE, or GAPS FOUND + + ", subagent_type="general-purpose", description="Plan Phase ${PHASE}" ) ``` **Handle plan-phase return:** -- **PLANNING COMPLETE** → Plan-phase handles chaining to execute-phase (via its own auto_advance step) -- **PLANNING INCONCLUSIVE / CHECKPOINT** → Display result, stop chain: +- **PHASE COMPLETE** → Full chain succeeded. Display: + ``` + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + GSD ► PHASE ${PHASE} COMPLETE + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + Auto-advance pipeline finished: discuss → plan → execute + + Next: /gsd:discuss-phase ${NEXT_PHASE} --auto + /clear first → fresh context window + ``` +- **PLANNING COMPLETE** → Planning done, execution didn't complete: + ``` + Auto-advance partial: Planning complete, execution did not finish. + Continue: /gsd:execute-phase ${PHASE} + ``` +- **PLANNING INCONCLUSIVE / CHECKPOINT** → Stop chain: ``` Auto-advance stopped: Planning needs input. - - Review the output above and continue manually: - /gsd:plan-phase ${PHASE} + Continue: /gsd:plan-phase ${PHASE} + ``` +- **GAPS FOUND** → Stop chain: + ``` + Auto-advance stopped: Gaps found during execution. + Continue: /gsd:plan-phase ${PHASE} --gaps ``` **If neither `--auto` nor config enabled:** diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index 5e3397574..4e19abd84 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -383,6 +383,29 @@ node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete **Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd:plan-phase {X} --gaps`). No additional routing needed — skip auto-advance. +**No-transition check (spawned by auto-advance chain):** + +Parse `--no-transition` flag from $ARGUMENTS. + +**If `--no-transition` flag present:** + +Execute-phase was spawned by plan-phase's auto-advance. Do NOT run transition.md. +After verification passes and roadmap is updated, return completion status to parent: + +``` +## PHASE COMPLETE + +Phase: ${PHASE_NUMBER} - ${PHASE_NAME} +Plans: ${completed_count}/${total_count} +Verification: {Passed | Gaps Found} + +[Include aggregate_results output] +``` + +STOP. Do not proceed to auto-advance or transition. + +**If `--no-transition` flag is NOT present:** + **Auto-advance detection:** 1. Parse `--auto` flag from $ARGUMENTS diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index 89e7ef562..c7b023da0 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -366,10 +366,36 @@ Display banner: Plans ready. Spawning execute-phase... ``` -Spawn execute-phase as Task: +Spawn execute-phase as Task with direct workflow file reference (do NOT use Skill tool — Skills don't resolve inside Task subagents): ``` Task( - prompt="Run /gsd:execute-phase ${PHASE} --auto", + prompt=" + + You are the execute-phase orchestrator. Execute all plans for Phase ${PHASE}: ${PHASE_NAME}. + + + + @~/.claude/get-shit-done/workflows/execute-phase.md + @~/.claude/get-shit-done/references/checkpoints.md + @~/.claude/get-shit-done/references/tdd.md + @~/.claude/get-shit-done/references/model-profile-resolution.md + + + + PHASE=${PHASE} + ARGUMENTS='${PHASE} --auto --no-transition' + + + + 1. Read execute-phase.md from execution_context for your complete workflow + 2. Follow ALL steps: initialize, handle_branching, validate_phase, discover_and_group_plans, execute_waves, aggregate_results, close_parent_artifacts, verify_phase_goal, update_roadmap + 3. The --no-transition flag means: after verification + roadmap update, STOP and return status. Do NOT run transition.md. + 4. When spawning executor agents, use subagent_type='gsd-executor' with the existing @file pattern from the workflow + 5. When spawning verifier agents, use subagent_type='gsd-verifier' + 6. Preserve the classifyHandoffIfNeeded workaround (spot-check on that specific error) + 7. Do NOT use the Skill tool or /gsd: commands + + ", subagent_type="general-purpose", description="Execute Phase ${PHASE}" )