todo2code

Ticket 053: Match the local governance gate to CI before push

Goal and scope

make governance and the CI governance job answer different questions, and the gap between them is the single largest source of wasted work observed so far.

Three diagnostic classes are therefore invisible locally and can only fail after a push: GOV-INTENT-003 (intent must exist in a commit strictly earlier than the implementation it authorizes), GOV-TICKET-001 (a closed ticket has no authority over implementation paths) and the workstream/scope checks as they apply to the full branch diff.

The checker already supports the CI form. Nothing new has to be written:

bash project/governance-check.sh --actor ci \
  --base "$(git merge-base origin/main HEAD)" --head HEAD

This ticket makes that invocation a binding pre-push obligation in README.md, so it is run before a push rather than discovered from a failed pull request. A non-zero exit is blocking: an advisory gate would reproduce the present situation, where the signal exists but nobody acts on it.

Evidence that this is worth doing

Pull request #64 was opened, consumed a full CI round on four jobs, failed GOV-TICKET-001, and was closed without merging. The command above reports the same failure locally in well under a second. The subsequent rebuild (ticket-048) then republished code that had already been correct, purely because its commit topology could not satisfy GOV-INTENT-003.

Acceptance criteria

Participants

Architecture and bounds

Why neither a Makefile target nor an AGENTS.md rule

The owner chose the governance workstream so the work could start immediately, accepting the flagged risk. That risk was then verified and it is real, so the deliverable is documentation rather than a make target:

README.md is the only governance-owned, unlocked document that is not a ticket directory, so it carries the rule. The canonical agent-facing home is AGENTS.md, which belongs to wellmanifest/new-project; putting it there is a standard upgrade, the same class of dependency as ticket-050.

This costs little, because the capability already exists and works; what was missing is the obligation to use it. A make governance-ci convenience wrapper remains a worthwhile follow-up and must be an integration ticket, after ticket-048 releases that workstream.

Non-goals

Approval boundary

The human owner approved this ticket on 2026-08-06, selecting the governance workstream and a blocking failure policy. governance holds no other active ticket, so this does not contend with ticket-048 in integration.

Protected completion evidence