Data Model — Execution-Context Unification (01KTPKST)

The MissionExecutionContext is a doc-09 fragment / op-composite, NOT a flat field bag. It is grown on the existing mission_runtime.ExecutionContext substrate (which already carries feature_dir, target_branch, workspace_path, branch_name, execution_mode, mission_slug). Each fragment is a cohesive value object; an operation assembles only the fragments it needs.

> Fragment boundaries below are the proposed cut. The exact granularity (e.g. whether > allowed_command_cwd is part of Workspace or its own fragment) is an IC-02 design decision, > driven by which ops co-consume the values. Recorded as an open question in research.md.

Fragments

IdentityFragment

FieldTypeNotes
mission_idULID (26)canonical machine identity (immutable)
mid8str (8)derived once from mission_id; never recomputed at call sites (FR-012)
mission_slugstrhuman handle

Invariant: mid8 == mission_id[:8]. Single derivation point lives in this fragment.

BranchRefFragment

FieldTypeNotes
target_branchstrsingle source (FR-012) — resolved once, not re-derived from meta.json/git per surface
coordination_branchstr \None
destination_refCommitTargetthe ONE ref artifacts + status resolve to (ADR-2026-06-03-2)

CommitTarget (value object — ADR-2026-06-03-2)

FieldTypeNotes
refstrbranch/worktree ref that receives commits for this mission
kindenum {primary, coordination, flattened}flattened ⇒ landing == coordination == target

Invariant (FR-004): planning artifacts AND status events resolve to the same destination_ref. Under flattened topology, kind == flattened and there is no primary↔coord split to reconcile.

WorkspaceFragment

FieldTypeNotes
primary_rootPathrepo root checkout — single worktree-pointer parser (IC-04)
current_cwdPathwhere the command is actually running
coord_worktreePath \None
execution_workspacePathlane worktree for implement/review
allowed_command_cwdPathguard: which CWD a surface may run git ops in

StatusSurfaceFragment

FieldTypeNotes
status_read_dirPathwhere status events are read from
status_write_dirPathwhere status events are written

Resolved by the existing resolve_status_surface (IC-01) and carried on the context — consumers (esp. status_transition._identity_for_request) must NOT re-derive it (FR-003/FR-008/#1737). Under flattened topology, read_dir == write_dir.

ArtifactPlacementFragment

FieldTypeNotes
placement_refCommitTargetwhere planning artifacts (spec/plan/tasks/analysis) commit

Used by implement-claim (#1816) and record-analysis (#1814) instead of independent primary/coord logic (IC-05).

PromptSourceFragment

FieldTypeNotes
prompt_source_dirPathwhere implement/review prompt files are resolved (FR-012)

State / lifecycle

this mission changes who resolves where that log lives, not the log's reducer semantics.

  • The context is resolved once per command invocation (resolve_action_context, IC-02) and threaded.
  • WP lane state remains owned by the append-only status.events.jsonl event log (unchanged authority);

Deletions (net subtraction — NFR-005)

SurfaceDispositionIC
missions/feature_dir_resolver.candidate_feature_dir_for_missionfold into _read_path_resolverIC-03
workspace/root_resolver worktree parser (~200 LOC)delete; core/paths is the single parserIC-04
status_service.{EventLogWriteTarget,StatusContractError,StatusReadSource,append_event_log_batch,read_wp_lane_actor}delete (5 dead symbols)IC-09
status_transition._identity_for_request coord re-derivationreplace with carried StatusSurfaceFragmentIC-01

Occurrence-map schema extension (IC-10, #1815) — adjacent

ExistingAdded
8 term-rename categories (single target.term → replacement)moves: [{from: [paths], to: path}] multi-path structural-move block

Backward-compatible: a map with only the 8 categories and no moves: validates exactly as today.