Expand description
The frozen JSON contract for differential reading plans.
This crate is the product boundary: every consumer (shadow-branch stack, TUI, forge review) depends on these types and nothing else. Consumer conveniences must not leak in here.
Contract rules:
schema_versionis 1. 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
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. - 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