Skip to content

docs: v1.0.0 design — glossary, ADRs 0001-0006, public interface spec#898

Open
medelman17 wants to merge 8 commits into
mainfrom
v1/design-docs
Open

docs: v1.0.0 design — glossary, ADRs 0001-0006, public interface spec#898
medelman17 wants to merge 8 commits into
mainfrom
v1/design-docs

Conversation

@medelman17

Copy link
Copy Markdown
Owner

What this is

The complete v1.0.0 design package, produced through an architecture review, a four-way design-it-twice on the public interface, and a fork-by-fork grilling of every load-bearing decision. Docs only — no source changes, no changeset.

Contents

  • CONTEXT.md — canonical v1 vocabulary (citation document, family/kind, edge, group, antecedent, footnote zone, confidence level, reason code, lint finding, canonical rendering)
  • docs/v1-spec.md — the full public interface contract:
    • Pure-JSON citation document IR: 4 families × fine kinds, document-level edges/groups, content-hashed branded ids, textHash, schemaVersion
    • Two-function surface (extract, annotate) + pure helpers + optional CitationView; resolution always-on; footnotes on with one escape hatch
    • Categorical confidence { level, reasons } — no numeric score (prior art: the stalled feat!: confidence-scoring overhaul Phase 1-2 (structured Confidence type + scorer migration) #486/feat: structured confidence scoring (Phases 1-2) + README overhaul #487 overhaul and five miscalibration incidents)
    • format() (Bluebook rendering, the IR's inverse), lint() (R4.1 and friends as a pure IR consumer), published JSON Schema artifact, eyecite CLI
    • Three verification nets for the rewrite: regenerated corpus parity, the round-trip law over a generative corpus, schema validation
    • 0.x → v1 migration map, semver rules, deferred extension-layer blueprint
  • docs/adr/0001–0006 — no plugin layer in v1; textHash-not-text; edges-canonical relations; per-text content-hashed ids; categorical confidence; format/lint IR-sufficiency commitment

Related

🤖 Generated with Claude Code

medelman17 and others added 5 commits July 4, 2026 02:54
CONTEXT.md establishes the canonical v1 vocabulary (citation document,
family/kind, edge, group, antecedent, footnote zone). Four ADRs record
the load-bearing decisions from the v1 interface design review:

- 0001: no plugin layer in v1; reporter source is the only seam
- 0002: citation document carries textHash, not the input text
- 0003: relationships are document-level edges/groups; refersTo is the
  one enforced denormalization
- 0004: citation ids are content hashes, stable per-text only

Co-Authored-By: Claude Fable 5 <[email protected]>
Full contract for the v1 rewrite: two-function surface (extract/annotate)
plus pure helpers and an optional CitationView wrapper over a plain-JSON
citation document — four families x fine kinds, document-level edges and
groups, content-hashed ids, textHash verification, and a numbered
invariant list enforced by validateDocument. Includes the 0.x taxonomy
migration map, schema versioning CI rules, and the deferred extension-
layer blueprint from ADR 0001.

Co-Authored-By: Claude Fable 5 <[email protected]>
…eserved

Revisits the confidence system against prior art: the structured-scoring
overhaul (PRs #486/#487, preserved on feat/confidence-scoring-phase-1-2
and beta/confidence-scoring) stalled at the calibration phase for lack of
a labeled corpus, and the raw number shipped five miscalibration
incidents (#147, #555-557, #613). v1 adopts the overhaul's honest parts:

- Confidence = { level: certain|high|medium|low, reasons: ReasonCode[] }
  on citations and resolution edges (also closes the #832 ergonomics gap)
- score?: number reserved; may arrive as a minor only with a committed
  calibration artifact and published calibration error
- scoring runs as one late pipeline pass, eliminating the
  recompute-after-mutation bug class
- ADR 0005 records the decision and rejected alternatives

Co-Authored-By: Claude Fable 5 <[email protected]>
…tructure

The resolver rewrite gets an accuracy scoreboard (gold Id./supra labels),
not just behavior parity; #829 merges pre-rewrite and doubles as the
first 0.x->v1 migration consumer. Calibration stays post-1.0.

Co-Authored-By: Claude Fable 5 <[email protected]>
Four additions that close the loop on the IR:

- format(citation): canonical Bluebook rendering, the IR's inverse;
  semver contract is the round-trip law, not byte output
- lint(doc): Bluebook practice rules (R4.1 id-after-intervening,
  short-form-before-full, signal order, missing pincite, nonstandard
  abbreviation) as a pure IR consumer — never re-parses text
- citation-document.schema.json published from eyecite-ts/schema: the IR
  as a language-agnostic interchange format
- eyecite CLI bin (extract|annotate|lint|format), stdin/stdout, NDJSON,
  fail-on severity exit codes
- round-trip generative net added to the rewrite's definition of done
  (three nets: corpus parity, round-trip law, schema validation)
- ADR 0006 records the IR-sufficiency commitment

Co-Authored-By: Claude Fable 5 <[email protected]>
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (34133d0) to head (2ebfabd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #898   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files         136      136           
  Lines        6243     6243           
  Branches     2066     2066           
=======================================
  Hits         6150     6150           
  Misses         93       93           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

medelman17 and others added 3 commits July 4, 2026 04:51
…ernatives, sequencing draft

- docs/design/2026-07-04-architecture-review.md: the seven 0.x friction
  candidates with measured evidence, and how v1 resolves each
- docs/design/2026-07-04-v1-interface-alternatives.md: the four
  design-it-twice candidates in full, plus the fork-by-fork decision log
  with rejected alternatives
- docs/design/2026-07-04-rewrite-sequencing.md: DRAFT build order with
  per-step verification nets and open sequencing questions (not yet
  settled)
- spec: add §10a recording what is deliberately deferred beyond v1
  (incremental/editor mode, treatment detection, cross-document identity)

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant