The discipline · v1.0

T2D2

Testing (and) Telemetry Driven Development

A discipline for keeping a checkable contract between what a human asked for and what a human-plus-agent pair actually built — from before the first line of code to whatever the system does in production, through however long it keeps running after that.

Language-agnostic · Free and open methodology · The tool is the reference implementation.

What T2D2 is

Test-driven, extended upward.

T2D2 extends Test-Driven Development's core move — write the check before the thing it checks — to the level of architecture and intent, not just function-level correctness.

The contract has three deliberately separate parts. A graph — a structural representation of the codebase, call shape and data shape — says what should exist. A test manifest — behavioral, Given/When/Then — says what should happen. An execution trace, once the system is live, says what actually did happen.

Graph and trace correlate by stable, deterministic node IDs. The test manifest is a separate, ordinary contract — not wired into that same ID scheme, on purpose: conflating structural and behavioral correctness into one check makes each less precise.

The graph does three jobs: proposed before code exists, for a human to review; regenerated after code is built, and diffed against the proposal; used as the map that production traces plot against once the system is live — which turns telemetry into something navigable rather than a firehose of logs.

The loop

Four phases. One loop. A check at every turn.

T2D2 follows Deming's Plan-Do-Check-Act cycle. Each phase has a specific ceremony and a specific artifact; nothing advances until the artifacts agree.

Plan

Brief → Survey → Calibration → Formalization

The agent proposes a structural edit to the graph. The human reviews it. Assumption corrections, a test manifest, and a formalization matrix are produced. Sign-off gates the next phase. No code is written before this closes.

Do

Build against the plan

Implementation proceeds against the approved proposal. Standard practice — this is the phase that already looks familiar.

Check

Fidelity Check & Test Manifest

The graph is regenerated from the real code and structurally diffed against the proposal. The test manifest is run against behavior. Both gates must pass. A mismatch returns work to Blueprint, not to another Build attempt.

Act

Handover & In Service

Deploy. Stable node IDs are injected into the running system. The graph becomes the live map that execution traces plot onto — for debugging, refactoring, and onboarding, indefinitely.

The point

Before code: a structured proposal that can be reviewed and disagreed with. After code: a deterministic check against that proposal — not a human reading a diff, not an LLM asking itself if the change "looks right." The check happens at both ends of Build, and the artifact is the same shape on both sides.

Shop manual, not a sales brochure.

The methodology is free and stays free. The tool implements it. The discipline is versioned — future revisions belong in new files, not silent edits — so it can be disagreed with, cited, and improved. What gets built on top of the methodology later is a separate question.