todo2code

Ticket 037: Deterministic branch comparison contract

Goal

Define the dependency-free core t2c.branch/v1 read model that compares a bounded set of immutable branch snapshots against one exact base snapshot. The projector consumes already-materialized Git and semantic evidence; it does not fetch a remote, resolve mutable refs, call an LLM or mutate a branch.

This is the second delivery from ticket-036’s Branch Intelligence blueprint. It turns exact snapshot facts into deterministic pairwise interactions and conservative recommendations that Goal, Koru and validator-agent can later consume through separate adapters.

Input boundary

Every input binds:

An unknown or missing fact stays unknown; the core must never infer a clean merge, reviewer identity or branch freshness from a display name.

Output boundary

The sorted, fingerprinted t2c.branch/v1 portfolio contains:

Recommendations are a read model, not authorization. In particular, duplicate and stale never mean that a branch may be deleted.

Delivery boundary

Acceptance criteria

Participants

Approval boundary

The user explicitly approved ticket-037 after reviewing this input/output and recommendation contract. The bounded implementation was independently reviewed and merged through the protected path. Chat approval authorized the interactive edit only; merge authority came from exact-head App evidence and required checks.

Validation result

Protected completion evidence