Expand description
The frozen JSON contract for differential reading plans.
This module is the product boundary (ADR 0008, superseded-in-form by ADR 0018): every consumer (shadow-branch stack, TUI, forge review) depends on these types and nothing else. It stays serde-only — consumer conveniences and engine internals must not leak in here; that discipline is enforced in review now that the crate boundary is gone.
Contract rules:
schema_versionis 3 (v3 gave every dependency edge its cause and moved the graph ontoclasses, ADR 0022). Readers must reject versions they do not know.- Deserialisation tolerates unknown fields, so additive changes are non-breaking.
groups/reading_planarenullwhen the grouping stage has not run. That is distinct from[], which would mean “grouping ran and produced nothing” and is always a bug.generator.stagesstates exactly which stages produced the document.- Optional fields serialise as explicit
null, never omitted.
Structs§
- Audit
- Structural audit. The first four fields exist for every document; the rest are
nulluntil the grouping stage runs. - Class
Edge - One class-level dependency edge.
- Class
Entry - A shape class: hunks whose diff text is identical after normalising away
identifiers and literals on BOTH sides. Ids
C0..Cn, numbered by descending member count. 100% hunk coverage is by construction. - Edge
- One group-level dependency edge.
- File
Entry - One changed file in the canonical (
--no-renames) view. A rename therefore appears as a D entry plus an A entry; the rename-detected view annotates both. - Forge
Position - Generator
- Group
- A merged, labelled group of shape classes. Produced by the grouping stage.
- Hunk
Entry - One canonical hunk from
git diff -U0 --no-renames. Ids are positional (h0..hNin enumeration order) and do NOT survive regeneration;digestdoes. - Plan
Document - The one JSON document: a grouped, ordered reading plan for a diff.
- Reading
Step - Remote
- Source
- Stats
- Submodule
Change - Symbol
Def - One declaration something in the change reads.
- Symbol
Index - Where each resolvable name is declared, and every token that reads one.
- Symbol
Use - One token that reads a
SymbolDef.
Enums§
- Cycle
- Why a dependency edge could not be honoured.
- Disposition
- Effort
- Generated
By - Read
Action - Role
- Schema
Error - Source
Kind