epiphany/crates/epiphany-core/src
Levi Neuwirth 47a581a4de Agent I-0: real clef + key-signature data in the core graph
Prerequisite for the visible-slice engraving milestones (I-1+): give the
score graph the clef/key data the engrave pipeline needs for clef-relative
staff positioning and key-signature rendering, replacing the Chapter-7
TimeAnchor-only placeholders.

epiphany-core:
- ClefShape { G, F, C, Percussion } — each family's reference pitch (G4 / F3 /
  middle C4) pins the staff-position mapping.
- Clef { shape, line, octave_shift } — the SMuFL family, the staff line its
  reference pitch sits on (1 = bottom line), and an octave transposition; with
  treble/bass/alto/tenor constructors and a treble Default. Generalizes to any
  C-clef line and octave-transposing clefs.
- KeySignature — circle-of-fifths position, validated -7..=7: a private field
  behind KeySignature::new (Option) + fifths(), and a custom Codec that rejects
  an out-of-range count on decode (Reconstruct, as PowerOfTwo / Tempo do).
- ClefChange now carries clef: Clef; KeySignatureChange carries key: KeySignature.
- Codec (cstyle_enum_codec / struct_codec / the validating KeySignature impl),
  lib.rs re-exports, a round-trip test over every shape x line x octave and every
  fifths value, and an out-of-range decode-rejection regression test.

Zero blast radius: nothing constructed these with data (clef/key sequences are
always empty) and invariants only read .anchor, so existing Score bytes, hashes,
and goldens are unchanged. Fixtures get populated and the engrave pipeline reads
the data in I-1.

Gates: build/fmt/clippy -D warnings clean; cargo test --workspace green;
conformance_suite scale 1 passes. Stages only epiphany-core; the pre-existing
Agent-I working tree (engrave/layout-ir/render-svg + .gitignore) stays unstaged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:31:16 -04:00
..
prepass Cross-seam review fixes: respell→pre-pass visibility, profile enforcement, canonical fingerprint, catalog reconciliation 2026-06-25 18:52:34 -04:00
codec.rs Agent I-0: real clef + key-signature data in the core graph 2026-06-26 10:31:16 -04:00
event.rs Land M1 + M2 (Agent C): framework edge fixes and real-Score graph integration 2026-06-21 16:37:51 -04:00
generators.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
graph.rs Agent I-0: real clef + key-signature data in the core graph 2026-06-26 10:31:16 -04:00
ids.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
indexes.rs A B C D F 2026-06-19 12:42:31 -04:00
invariants.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
lib.rs Agent I-0: real clef + key-signature data in the core graph 2026-06-26 10:31:16 -04:00
pitch.rs Phase 2: spelling + decomposition pre-passes (Agent H) with F merge gate 2026-06-23 16:33:39 -04:00
prepass.rs Cross-seam review fixes: respell→pre-pass visibility, profile enforcement, canonical fingerprint, catalog reconciliation 2026-06-25 18:52:34 -04:00
tempo.rs Finish Agent B (item 5): tolerance/overflow, region-overlap honesty, id lock-down 2026-06-21 18:48:03 -04:00
time.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00