todo2code

Ticket 043: Add a governed workspace preflight command

Goal and scope

Make ticket-040’s existing read-only workspace observer usable at the normal pre-edit boundary without adding another policy implementation. Add one explicit make preflight PREFLIGHT_EXPECTED_BRANCH=<branch> entry point that builds the current checkout and invokes a dependency-free Node wrapper over inspectWorkspace().

The command accepts an explicit expected branch and an optional already-local full baseline ref, defaulting to refs/remotes/origin/main. It prints the canonical t2c.workspace-preflight/v1 JSON report, returns success only for a PASS verdict and returns a stable non-zero exit for BLOCKED. It never fetches, stashes, checks out, resets, cleans or otherwise mutates Git state.

Architecture before implementation

Delivery boundary

Acceptance criteria

Participants

Approval boundary

The Founder approved this exact command, scope and accepted base in the active session with an explicit tak, authorizing the transition to EDIT. Implementation was completed inside that boundary and independently validated before protected merge.

Validation evidence

Protected completion evidence