todo2code

Ticket 036: Canonical multi-source truth map DSL

Goal and scope

Add a deterministic projection over the existing canonical t2c.graph/v1 model so that records extracted from natural language, tickets, documentation, Git, source code, tests and configuration can be navigated as one map without losing their original provenance.

This ticket does not introduce another extraction DSL and does not declare one source to be universally more truthful than another. The graph remains the canonical evidence store. The new t2c.truth-map/v1 view groups mapped records, separates declared intent, observed facts and unverified claims, and exposes conflicts instead of silently choosing a winner.

The first delivery is deliberately limited to the reusable core contract and its deterministic tests. Writing the projection as a pipeline artifact, exposing it through CLI/MCP/A2A and documenting the user workflow require follow-up tickets in the runtime, interfaces and integration workstreams; this core ticket cannot take ownership of those paths.

The immediate operational use case is analysis of many Git branches before PR merge decisions. The coordinated todo2code/Koru/Goal/Validator design, exact base/head freshness rules and rollout are specified in BRANCH_INTELLIGENCE.md. That blueprint is planning evidence only; this ticket still owns only the two core truth-map files.

The concrete failure-explanation contract and pre-push workflow are documented separately in GOVERNANCE_DIAGNOSTICS.md. It records why local, push, PR and mergeability checks currently disagree, which structured evidence is hidden by the text renderer, and how existing ecosystem projects can share one t2c.branch/v1 artifact instead of duplicating policy logic.

Proposed data flow

NL / tickets / docs / Git / AST / tests / config
                       |
              source-specific extractors
                       |
              t2c.intent/v1 records
                       |
                 t2c.graph/v1
            (canonical evidence store)
                       |
          deterministic truth-map projector
                       |
               t2c.truth-map/v1
       +---------------+----------------+
       |               |                |
 declared intent   observed facts   claims/inferences
       +---------------+----------------+
                       |
          supported / gap / conflict status
          plus record -> assertion reverse map

Resolution semantics

Delivery boundary

Acceptance criteria

Participants

Approval boundary

The user approved continuation after reviewing the truth-map, Branch Intelligence and live-audit plans by instructing the agent to continue, test and repair the ecosystem integrations. The bounded core implementation and local validation completed, but the first hosted review found one complexity violation in the new validator. The responsibilities were split into bounded helpers, local Lizard reported zero threshold violations, Koru and Validator approved exact head 65b4bc1, and PR #35 merged as main@15d2b26.

Verification evidence