epiphany/spec
Levi Neuwirth 2868f8c4b3 Text Projection 0.3.0: every production expanded, and one rule for values
0.1.0 left kind, action, policy, constraints and barrier derived-but-unwritten
and admitted it. All are now written. The grammar has no undefined nonterminal
(machine-checked) and 31 operation-kind productions in exact discriminant order,
cross-checked against envdecode.rs.

The one real decision was how embedded Chapter-5 values appear. An operation
payload carries an Event, a Pitch, a Region, a TimeSignature, and there were
three ways to write them:

  Forty hand-written productions would restate the entire Chapter-5 data model in
  a second normative document -- two normative listings of one struct, which is
  the exact drift P13-I1 was opened to close.

  Opaque canonical-value byte strings would be lossless and zero-drift, but a
  pitch would be unreadable without binary tooling, failing the core spec's own
  "format inspection and debugging" use case.

  One mechanical rule (req:textproj:value-projection, ratified): a struct is
  (<type-name> <field>...) with fields positional in the ratified declaration
  order; a newtype is transparent, exactly as in the binary form; a tagged union
  is (<variant> <field>...); an option is () or (some v); a sequence keeps the
  binary form's order. A rule cannot drift from what it reads.

Two leaf decisions follow from canonicality rather than taste. A rational is
(ratio n d), lowest terms, sign on the numerator. A CanonicalF64 is the byte
string of its eight canonical IEEE-754 bytes and never a decimal: decimal float
text is not canonically unique -- shortest-round-trip and 17-significant-digit
forms both round-trip, and -0.0 has two spellings -- so a decimal tempo would
break req:textproj:canonical-text at the first tempo mark.

Operation-kind names follow the Operation Catalog's sections (create-region,
create-staff), not OperationKindTag's (InsertRegion, InsertStaff), which renamed
three pairs for reasons internal to the tag space. The projection follows the
semantics.

One deferral, stated as such rather than left to inference:
affected_object_kinds and edit_barriers have ratified structured shapes AND
canonical byte encodings, and the bundle stores them opaquely. At 0.3.0 the
projection does the same, on the principle that it interprets nothing the bundle
does not. A later revision may project them structurally; their canonical bytes
are unchanged by that, so it changes the text and not the document.

Also corrected: the extension line now writes its fields in the ratified
declaration order, which had preserved_chunk_roots before affected_object_kinds
and edit_barriers.

Gate: clippy 0, 31 targets / 1031 passed / 0 failed, conformance 8/8, zero golden
churn; core_spec, binary_format and text_projection all build with no undefined
references. Grammar closure machine-checked: no undefined nonterminal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 21:55:49 -04:00
..
vectors One tag vocabulary the compiler owns, and ratify the corpus in the companion 2026-07-09 20:32:35 -04:00
PASS11_RATIFICATION_LOG.md P12-I2: wire the ratified MUSCLOID layout-object id derivation 2026-06-27 12:46:19 -04:00
PASS11_WORKLIST.md Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
PASS12_BATCH.md Pass 12 G-pass: ratify the full batch (28 rows) — spec tranche 2026-07-07 10:23:30 -04:00
PASS12_RATIFICATION_LOG.md Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
PASS12_WORKLIST.md Pass 12 G-pass: ratify the full batch (28 rows) — spec tranche 2026-07-07 10:23:30 -04:00
PASS13_CANDIDATES.md P13-S3: the engraved spelling set is a shared undo key, not the transpose's 2026-07-09 17:29:05 -04:00
PHASE2_F_WEEK0_WORKLIST.md Phase 2: spelling + decomposition pre-passes (Agent H) with F merge gate 2026-06-23 16:33:39 -04:00
PHASE2_QUICKSTART.md Phase 2: spelling + decomposition pre-passes (Agent H) with F merge gate 2026-06-23 16:33:39 -04:00
QUICKSTART.md Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
binary_format.pdf Text Projection design gate: the companion the core spec delegates to 2026-07-09 21:13:40 -04:00
binary_format.tex Text Projection design gate: the companion the core spec delegates to 2026-07-09 21:13:40 -04:00
core_spec.pdf Text Projection 0.2.0: the gate was lossy, and the cause was one missing rule 2026-07-09 21:34:36 -04:00
core_spec.tex Text Projection 0.2.0: the gate was lossy, and the cause was one missing rule 2026-07-09 21:34:36 -04:00
operation_catalog.pdf The pitch/spelling undo unit is broader than the transpose, on purpose 2026-07-09 18:15:43 -04:00
operation_catalog.tex The pitch/spelling undo unit is broader than the transpose, on purpose 2026-07-09 18:15:43 -04:00
quality_metric_catalog.pdf Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
quality_metric_catalog.tex Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
reference_suite.pdf Schema major 1 Phase A: ratify the v1 wire form + migration (spec only) 2026-07-05 18:05:38 -04:00
reference_suite.tex Schema major 1 Phase A: ratify the v1 wire form + migration (spec only) 2026-07-05 18:05:38 -04:00
text_projection.pdf Text Projection 0.3.0: every production expanded, and one rule for values 2026-07-09 21:55:49 -04:00
text_projection.tex Text Projection 0.3.0: every production expanded, and one rule for values 2026-07-09 21:55:49 -04:00