Data Model: Canonical Status Model Cleanup

WP Frontmatter Schema (After Cleanup)

Retained Fields (static definition + operational metadata)

FieldTypeRequiredNotes
work_package_idstrYese.g., "WP01"
titlestrYesHuman-readable title
dependencieslist[str]YesWP IDs this WP depends on
subtaskslist[str]YesSubtask IDs (T001, T002, ...)
planning_base_branchstrYesBranch to plan from
merge_target_branchstrYesBranch to merge into
branch_strategystrYesHuman-readable branch description
execution_modestrYes"code_change" or "planning_artifact"
owned_fileslist[str]YesGlob patterns for owned files
authoritative_surfacestrYesPath prefix for ownership
requirement_refslist[str]NoFR-### references
agentstrNoAssigned agent name (operational)
assigneestrNoAssigned human (operational)
shell_pidstrNoClaiming process PID (operational)
historylist[HistoryEntry]NoLane-free notes (see below)

Removed Fields (no longer in active WP frontmatter)

FieldReason
laneStatus lives in status.events.jsonl only
review_statusStatus lives in canonical events
reviewed_byStatus lives in canonical events
review_feedbackWritten to WP body or feedback files, not frontmatter
progressDerived from canonical state, not stored in frontmatter

HistoryEntry (Lane-Free)

After cleanup, history entries contain:

FieldTypeRequiredNotes
atstr (ISO 8601)YesTimestamp
actorstrYesAgent or user name (replaces agent in history)
actionstrYesHuman-readable description
shell_pidstrNoProcess that performed the action

Removed from history: lane, event (when lane-bearing), any structured status data.

Canonical Status Entities (Unchanged)

These entities are defined by Feature 034 and are not modified by this cleanup.

StatusEvent (in status.events.jsonl)

FieldTypeNotes
event_idstr (ULID)Unique event identifier
feature_slugstrFeature this event belongs to
wp_idstrWork package ID
from_lanestrPrevious lane
to_lanestrNew lane
actorstrWho triggered the transition
atstr (ISO 8601)When it happened
reason`str \null`
forceboolWhether transition was forced
evidence`str \null`
execution_modestr"worktree" or "main"
review_ref`str \null`

StatusSnapshot (materialized status.json)

FieldTypeNotes
feature_slugstrFeature identifier
work_packagesdict[str, WPState]WP ID → current state
last_event_idstrMost recent event ID
materialized_atstr (ISO 8601)When snapshot was produced

WPState (within snapshot)

FieldTypeNotes
lanestrCurrent canonical lane
actorstrLast actor to change state
atstrWhen last transition occurred

State Transitions

Canonical Bootstrap (finalize-tasks)

[WP file exists, no canonical event]
    │
    └─ finalize-tasks scans WPs
         │
         ├─ event log exists, WP has events → skip (already canonical)
         ├─ event log exists, WP has no events → emit planned event
         └─ event log absent → create file, emit planned event for all WPs
              │
              └─ materialize status.json

Runtime Behavior (after cleanup)

[Runtime command needs WP lane]
    │
    ├─ status.events.jsonl exists?
    │     │
    │     ├─ Yes → reduce to snapshot
    │     │     │
    │     │     ├─ WP has state → use it
    │     │     └─ WP has no state → "uninitialized" (reads) or hard-fail (mutations)
    │     │
    │     └─ No → HARD FAIL: "Run finalize-tasks"
    │
    └─ NEVER: read frontmatter lane