data2dsl is a planned, evidence-first comparison layer. It will turn facts
from existing data sources into comparable observations and deterministic
differences that other systems can reason about.
The short version:
Ask one bounded question, acquire the relevant facts from two or more sources, normalize them without losing provenance, compare like with like, and return the result together with evidence.
The project is currently in contract and integration planning. The repository contains governance, capability evidence and architectural decisions, but no functional product implementation or final public DSL yet.
Useful facts already exist across Markdown documents, Git repositories, GitHub,
configuration files, code analyzers and browser-backed sources. Each source has
its own structure and vocabulary. Today a consumer such as todo2code must
either understand every source or rely on an LLM to interpret incomparable
outputs.
That creates four recurring problems:
- the same metric can be named or represented differently by each source;
- values may refer to different actors, repositories or time windows;
- conclusions can lose the evidence needed to verify them;
- source acquisition, deterministic comparison and higher-level reasoning get mixed into one component.
data2dsl is intended to provide the missing factual boundary between source
tools and reasoning consumers.
The primary consumers are programs and agents that need to compare claims with
observed data while preserving provenance. Initial consumers are expected to
include todo2code and repository-governance workflows, but the core must not
depend on either one.
A human may formulate the question, inspect the differences and follow the
evidence. A source adapter acquires facts. data2dsl normalizes and compares
them. A separate consumer decides what the result means or what action, if any,
should follow.
The first end-to-end case is:
Compare statements in
work-summary.mdwith actual GitHub activity for the same repository, actor, metric and time window.
For example, a summary might claim 12 commits for a person during a given week, while the GitHub source reports 10. The planned result is not prose or an LLM verdict. It is an evidence-bearing comparison containing, conceptually:
| Field | Example |
|---|---|
| Subject | repository and actor |
| Metric | commit count |
| Window | explicit start and end |
| Left observation | claimed value from a Markdown location |
| Right observation | measured value from GitHub pages/API results |
| Outcome | CONFLICT |
| Delta | -2 |
| Evidence | immutable references and content digests for both sides |
This table illustrates intended behavior; it is not a final API or schema.
A bounded comparison needs three kinds of input:
- a query describing the subject, metric, sources and time window;
- source locations and the authority or credentials needed by their existing adapters;
- explicit mapping/comparison rules when source vocabularies differ.
Natural-language interpretation may help construct a query, but it must not silently change the metric, window or source identity. Unresolved ambiguity must remain visible.
The factual output should contain:
- normalized source observations with stable identity and source state;
- deterministic scalar or set comparisons;
- outcomes such as
MATCH,CONFLICT,MISSING_LEFT,MISSING_RIGHTandUNEVALUABLE; - typed deltas where a delta is meaningful;
- evidence references sufficient to locate, integrity-check and reproduce the source facts;
- explicit gaps when acquisition, mapping or comparison cannot be completed.
UNEVALUABLE is not success and missing data is not zero. Comparison outcomes
are also distinct from the state of an individual observation.
flowchart LR
Q["Bounded query"] --> R["Routing and explicit mapping"]
R --> M["Markdown via mdflow"]
R --> G["Git factual seam"]
R --> H["GitHub via Diagit extension"]
R --> C["Existing code/data analyzers"]
M --> O["Comparable observations + evidence"]
G --> O
H --> O
C --> O
O --> D["Deterministic comparator"]
D --> F["Facts, outcomes, deltas, gaps, evidence"]
F --> X["todo2code or another reasoning consumer"]
This is a composition hypothesis, not a final runtime contract. Current
reuse decisions and their pinned evidence are recorded in
docs/CAPABILITY_MAP.md.
The project should own only the smallest missing responsibilities:
- routing a bounded query to declared source capabilities;
- explicit mapping from source facts to comparable metric keys;
- normalization that preserves source identity, time and evidence;
- deterministic comparability checks and scalar/set differences;
- a thin adapter boundary for existing source tools;
- factual results and typed gaps for downstream consumers.
The project is not intended to become:
- a universal parser framework;
- a replacement Git or GitHub client;
- a replacement for
mdflow, Diagit, code analyzers ortodo2code; - an LLM reasoning or conclusion engine;
- an autonomous enforcement or mutation system;
- a Digital Twin event store or all-traits Twin runtime;
- a place to copy code from neighboring repositories without an explicit, compatibility-tested extraction decision.
Source adapters remain responsible for truthful acquisition. Standards owners remain responsible for shared contracts. Consumers remain responsible for reasoning, policy and action.
Every capability follows this order:
- REUSE an existing public API or CLI when its behavior and ownership fit.
- EXTRACT the smallest neutral seam when useful behavior is trapped inside another product; preserve its language and compatibility.
- EXTEND the established owning component when a nearby capability exists.
- Mark a capability MISSING and implement it locally only after the first three options have been disproved with current evidence.
Examples from the Phase 0 inventory include reusing mdflow for Markdown
structure, extending Diagit's established GitHub boundary for commit metrics,
and keeping todo2code as a reasoning consumer rather than moving its policy
into data2dsl.
The planned delivery order is dependency-driven:
- decide the observation/evidence contract and its compatibility with
subactor/twin; - agree a minimal shared query/result profile with its standards owner;
- define the smallest deterministic scalar/set comparison semantics;
- extend Diagit with the read-only GitHub metrics required by the golden case;
- implement and validate
work-summary.mdversus GitHub in Docker; - evaluate Git/config/AST extraction from
todo2codeonly when a real second consumer proves it is necessary; - integrate factual results back into
todo2codewithout moving reasoning into data2dsl.
Each step requires its own bounded ticket and evidence. Changes to another repository require that repository's owner-approved workflow.
- Phase 0 governance bootstrap and capability inventory are complete.
- Docker bootstrap and the deterministic governance gate pass.
- No product source, final observation schema, query DSL, GitHub extension or golden-case implementation exists yet.
- Open architectural claims must remain explicitly provisional until their owning contracts and compatibility tests exist.
See TODO.md for current work and
project/TICKETS.md for governed evidence.
This repository adopts an immutable published revision of
wellmanifest/new-project. Multi-step work is ticket-governed and bounded by
the active ticket's intent.json. Human-owned user-* files are never written
by agents, and implementation claims require deterministic validation rather
than README text alone.