Skip to content

Per-phase context factory: fresh context per invocation #138

@VincentShipsIt

Description

@VincentShipsIt

Parent: #126

What

Each phase invocation gets a fresh PhasePayload built by a factory function. No shared mutation between phases. Factory takes orchestrator state + previous phase output and produces a minimal, scoped context.

function buildPhasePayload(
  state: OrchestratorState,
  previousOutput: PhaseOutcome,
  materials: PromptMaterial[],
): PhasePayload

Scope

Estimate

~100 lines. Medium risk — depends on #131 and #132 landing clean.

Depends on

#131 (split context), #132 (dispatch loop).

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