* fix(claude): restore namespaced /gsd:<command> references * test(claude): align slash-command expectations to /gsd: form * test(claude): align generated command references to /gsd: * test(claude): finish /gsd: namespace expectation updates
4.0 KiB
--chain mode — interactive discuss, then auto-advance
Lazy-loaded. Read this file from
workflows/discuss-phase.mdwhen--chainis present in$ARGUMENTS, or when the parent'sauto_advancestep needs to dispatch to plan-phase under--auto.
Effect
- Discussion is fully interactive — questions, gray-area selection, and follow-ups behave exactly the same as default mode.
- After discussion completes, auto-advance to plan-phase → execute-phase
(same downstream behavior as
--auto). - This is the middle ground: the user controls the discuss decisions, then plan and execute run autonomously.
auto_advance step (executed by the parent file)
-
Parse
--autoand--chainflags from$ARGUMENTS. Note:--allis NOT an auto-advance trigger — it only affects area selection. A session with--allbut without--autoor--chainreturns to manual next-steps after discussion completes. -
Sync chain flag with intent — if user invoked manually (no
--autoand no--chain), clear the ephemeral chain flag from any previous interrupted--autochain. This does NOT touchworkflow.auto_advance(the user's persistent settings preference):if [[ ! "$ARGUMENTS" =~ --auto ]] && [[ ! "$ARGUMENTS" =~ --chain ]]; then gsd-sdk query config-set workflow._auto_chain_active false || true fi -
Read consolidated auto-mode (
active= chain flag OR user preference):AUTO_MODE=$(gsd-sdk query check auto-mode --pick active 2>/dev/null || echo "false") -
If
--autoor--chainflag present ANDAUTO_MODEis not true: Persist chain flag to config (handles direct usage without new-project):gsd-sdk query config-set workflow._auto_chain_active true -
If
--autoflag present OR--chainflag present ORAUTO_MODEis true: display banner and launch plan-phase.Banner:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► AUTO-ADVANCING TO PLAN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Context captured. Launching plan-phase...Launch plan-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting — see #686):
Skill(skill="gsd-plan-phase", args="${PHASE} --auto ${GSD_WS}")This keeps the auto-advance chain flat — discuss, plan, and execute all run at the same nesting level rather than spawning increasingly deep Task agents.
-
Handle plan-phase return:
- PHASE COMPLETE → Full chain succeeded. Display:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► PHASE ${PHASE} COMPLETE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Auto-advance pipeline finished: discuss → plan → execute /clear then: Next: /gsd:discuss-phase ${NEXT_PHASE} ${WAS_CHAIN ? "--chain" : "--auto"} ${GSD_WS} - PLANNING COMPLETE → Planning done, execution didn't complete:
Auto-advance partial: Planning complete, execution did not finish. Continue: /gsd:execute-phase ${PHASE} ${GSD_WS} - PLANNING INCONCLUSIVE / CHECKPOINT → Stop chain:
Auto-advance stopped: Planning needs input. Continue: /gsd:plan-phase ${PHASE} ${GSD_WS} - GAPS FOUND → Stop chain:
Auto-advance stopped: Gaps found during execution. Continue: /gsd:plan-phase ${PHASE} --gaps ${GSD_WS}
- PHASE COMPLETE → Full chain succeeded. Display:
-
If none of
--auto,--chain, nor config enabled: route toconfirm_creationstep (existing behavior — show manual next steps).