# summary

Resolve and display the phase sequence for a story based on roles, profiles, and overrides.

# description

Merges the baseline phase registry with workspace profiles, task-declared roles, and phase overrides to produce a concrete execution plan. Useful for previewing which phases will run before starting a workflow.

Sources of phase inclusion (in priority order):

1. **Always-included** — developer, qa, release are always present.
2. **Required roles** — task.roles.required maps to phases.
3. **Optional roles** — task.roles.optional maps to phases.
4. **Profile triggers** — workspace config profiles trigger matching phases.
5. **Override add** — explicit `--add-phase` flags inject additional phases.

Phase overrides (`--skip-phase`, `--add-phase`, `--require-gate`, `--remove-gate`) take final precedence.

# examples

- <%= config.bin %> <%= command.id %> --story SA-200
- <%= config.bin %> <%= command.id %> --story SA-200 --skip-phase ux --skip-phase pm
- <%= config.bin %> <%= command.id %> --story SA-200 --add-phase security-review --require-gate developer

# flags.story.summary

Story/task ID to resolve the plan for.

# flags.story.description

The task ID whose declared roles and phase overrides will be used for resolution.

# flags.skip-phase.summary

Skip a phase from the resolved sequence.

# flags.skip-phase.description

Remove a phase that would otherwise be included. Can be specified multiple times.

# flags.add-phase.summary

Add a phase to the resolved sequence.

# flags.add-phase.description

Force-include a phase regardless of role/profile signals. Can be specified multiple times.

# flags.require-gate.summary

Add a gate after the specified phase.

# flags.require-gate.description

Forces a human-approval gate after this phase, even if the default gate configuration would not include one.

# flags.remove-gate.summary

Remove the gate after the specified phase.

# flags.remove-gate.description

Removes a gate that would otherwise be present, allowing the workflow to continue without pausing.

# flags.save.summary

Persist the overrides to the task record.

# flags.save.description

When set, writes the resolved phase overrides back to the task record so future `workflow run` invocations use them automatically.

# info.planHeader

Resolved phase plan for %s:

# info.planPhase

%s %s (%s) %s

# info.skipped

Skipped: %s — %s

# info.gates

Gates: %s

# info.saved

Phase overrides saved to task %s.
