Enter plan mode with deterministic continuation instructions.
This skill is invoked when a phase concludes — to create a plan-mode handoff that survives context compaction. For most phases it derives the next phase from state; for the discovery handoff the destination is supplied, because discovery is the first phase and the next phase isn't in state yet, so there's nothing to derive.
⚠️ ZERO OUTPUT RULE: Do not narrate your processing. Produce no output until a step or reference file explicitly specifies display content. No "proceeding with...", no discovery summaries, no routing decisions, no transition text. Your first output must be content explicitly called for by the instructions.
Instructions
Load framework.md and follow its instructions as written.
This skill receives positional arguments:
$0— work_unit: the work unit name (directory under.workflows/). Held downstream as{work_unit}.$1— completed_phase: the phase that just completed —discoveryor any later phase. Held downstream as{completed_phase}.$2— next_phase (optional): supplied when the caller already knows the destination — discovery handing a single-phase work type to its first phase. Held downstream as{next_phase}. Absent or the literalnonemeans the continuation computes the next phase from discovery output.
Step 1: Read Work Type and Run Discovery
Output the next fenced block as markdown (not a code block):
**`□ Read Work Type and Run Discovery`**
Output the next fenced block as markdown (not a code block):
> Reading the work unit's type, then computing the next phase from pipeline state when it isn't already known.
Read work type from the manifest:
node .claude/skills/workflow-engine/scripts/engine.cjs manifest get {work_unit} work_type
If completed phase is discovery
The discovery handoff needs no state computation. Discovery is the first phase, so the next phase isn't in pipeline state yet — the destination is given, not derived: an epic returns to its menu, and single-phase types use the next_phase the discovery endpoint decided and supplied. Skip the discovery script.
→ Proceed to Step 2.
If work type is epic
→ Proceed to Step 2 (epic continuation runs its own enriched discovery).
Otherwise
Run the discovery script with the work unit:
node .claude/skills/workflow-bridge/scripts/gateway.cjs {work_unit}
The output contains next_phase, completed_phases (in pipeline order), and revisitable_phases — the completed phases before next_phase, filtered to the work type's pipeline. When candidates exist, a labelled MENU: revisit phases section follows the dump — emitted only at the continuation's revisit gate, never here.
→ Proceed to Step 2.
Step 2: Route to Continuation Reference
Output the next fenced block as markdown (not a code block):
**`□ Route to Continuation Reference`**
Output the next fenced block as markdown (not a code block):
> Handing off to the continuation that builds the plan-mode handoff for whatever phase comes next.
Based on the completed phase and work type, load the appropriate continuation reference. The completed-phase check runs first so an epic concluding discovery routes to the deterministic discovery continuation; non-discovery epic completions fall through to the work-type branches below.
If completed phase is discovery
Load discovery-continuation.md and follow its instructions as written.
If work type is feature
Load feature-continuation.md and follow its instructions as written.
If work type is bugfix
Load bugfix-continuation.md and follow its instructions as written.
If work type is quick-fix
Load quickfix-continuation.md and follow its instructions as written.
If work type is cross-cutting
Load cross-cutting-continuation.md and follow its instructions as written.
If work type is epic
Load epic-continuation.md and follow its instructions as written.
Notes
Feature/bugfix continuation references:
- Use discovery output to compute a single
next_phase - Call
EnterPlanModetool, write plan file with instructions to invokeworkflow-{next_phase}-entrywith work_unit + work_type - Call
ExitPlanModetool for user approval
The user will then clear context, and the fresh session will invoke the appropriate phase entry skill with the work_unit and work_type provided, causing it to skip discovery and proceed directly to validation/processing.
Epic continuation is interactive — epic is phase-centric with multiple actionable items, so there is no single next phase. The reference displays state, presents a menu of choices, waits for user selection, then enters plan mode with that specific choice. The plan mode content is deterministic (same as feature/bugfix) once the user has chosen.