Parent: #126
What
Separate PipelineContext into two structs:
OrchestratorState — retry counters, turn count, telemetry arrays, abort controller, phase routing config, model assignments. Owned by orchestrator, persists across phases.
PhasePayload — prompt materials, repo context, worktree path, model hints, reasoning effort. Built fresh per phase invocation from orchestrator state + previous phase output.
Scope
packages/pipeline/src/types.ts — new OrchestratorState and PhasePayload types
packages/pipeline/src/pipeline/context.ts — factory function buildPhasePayload(state, prevOutput)
packages/pipeline/src/pipeline/runtime.ts — runProviderPhase takes PhasePayload
packages/pipeline/src/pipeline/planning-phases.ts / execution-phases.ts — read from payload, not context
Estimate
~200 lines. Medium risk — touches core types used everywhere.
Depends on
#130 (consume snapshotPhaseInput) should land first.
Parent: #126
What
Separate
PipelineContextinto two structs:OrchestratorState— retry counters, turn count, telemetry arrays, abort controller, phase routing config, model assignments. Owned by orchestrator, persists across phases.PhasePayload— prompt materials, repo context, worktree path, model hints, reasoning effort. Built fresh per phase invocation from orchestrator state + previous phase output.Scope
packages/pipeline/src/types.ts— newOrchestratorStateandPhasePayloadtypespackages/pipeline/src/pipeline/context.ts— factory functionbuildPhasePayload(state, prevOutput)packages/pipeline/src/pipeline/runtime.ts—runProviderPhasetakesPhasePayloadpackages/pipeline/src/pipeline/planning-phases.ts/execution-phases.ts— read from payload, not contextEstimate
~200 lines. Medium risk — touches core types used everywhere.
Depends on
#130 (consume snapshotPhaseInput) should land first.