Skip to content

Split PipelineContext into orchestrator state and phase payload #136

@VincentShipsIt

Description

@VincentShipsIt

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.tsrunProviderPhase 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    Status

    Deferred

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions