Repository navigation
feat(spec): canonical ASCII digit and case forms in citation-system profiles (#13) - #24
Merged
Merged
Conversation
…profiles Fixes the spec side of textrefs#13: system profiles MUST state their leading-zero policy (default forbidden) and canonical letter case (default case-sensitive declared casing). Seed-profile examples and the worked example follow the registry: Bekker pages from 1 without leading zeros, Stephanus likewise, Bible vocabulary pinned to case-sensitive OSIS book abbreviations. Submodule bumped to registry main d31ed0b (registry#8). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the TextRefs standard docs to require citation-system profiles to explicitly define (and enforce) canonical ASCII digit and case forms for locators, preventing identity splits caused by multiple regex-valid spellings of the same reference point.
Changes:
- Tightens the “Canonical locator form” contract to require explicit positions on leading-zero handling and letter casing.
- Updates seed profile examples (Bekker, Stephanus) to encode canonical forms directly in
locator_regex. - Aligns OSIS-related examples and get-started docs with the OSIS vocabulary decision (e.g.
Gen.1.1, label “(OSIS)”).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/content/docs/standard/system-profiles.md | Defines the normative canonical-form requirements and updates Bekker/Stephanus seed profile examples. |
| src/content/docs/standard/specification.md | Updates the OSIS system example/worded guidance and the worked example to reflect the canonical-form requirements. |
| src/content/docs/get-started/mappings-and-resolver-targets.md | Updates Genesis example locator to OSIS-style Gen.1.1. |
| src/content/docs/get-started/authoring.md | Updates the Genesis references_range example to use Gen as the book code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 1. **Digit sequences.** The profile MUST state whether leading zeros are permitted in numeric components. Unless the citation tradition itself uses them, leading zeros MUST be forbidden. | ||
| 2. **Letter case.** The profile MUST declare the canonical case of letter components. Locators are matched case-sensitively against that declared casing; case variants are non-canonical spellings. | ||
|
|
||
| A profile MAY add further locator rules for punctuation, whitespace, allowed scripts, or non-regex-checkable constraints (such as a pinned book vocabulary). Regex-checkable constraints — including the two axes above — SHOULD be encoded in `locator_regex`; other constraints MUST be documented in `description`. The machine-actionable contract is the flat key and `locator_regex`. |
Comment on lines
+147
to
+149
| "preferred_label": "Bible book-chapter-verse (OSIS)", | ||
| "description": "OSIS locator: `Book.Chapter.Verse`. The canonical book vocabulary is the OSIS book abbreviation list (CrossWire), case-sensitive as published there — e.g. `Gen`, `Exod`, `Matt`, `John`, `1Cor`. Chapter and verse are positive integers without leading zeros. Both the Hebrew Bible and the New Testament cite with this grammar.", | ||
| "locator_regex": "^(?<book>[1-4]?[A-Za-z][A-Za-z0-9]*)\\.(?<chapter>[1-9][0-9]*)\\.(?<verse>[1-9][0-9]*)$", |
Comment on lines
+322
to
+324
| "preferred_label": "Bible book-chapter-verse (OSIS)", | ||
| "description": "OSIS locator: `Book.Chapter.Verse`. The canonical book vocabulary is the OSIS book abbreviation list (CrossWire), case-sensitive as published there — e.g. `Gen`, `Exod`, `Matt`, `John`, `1Cor`. Chapter and verse are positive integers without leading zeros. Both the Hebrew Bible and the New Testament cite with this grammar.", | ||
| "locator_regex": "^(?<book>[1-4]?[A-Za-z][A-Za-z0-9]*)\\.(?<chapter>[1-9][0-9]*)\\.(?<verse>[1-9][0-9]*)$", |
This was referenced Aug 25, 2026
maehr
added a commit
to maehr/textrefs.org
that referenced
this pull request
Aug 25, 2026
Picks up four merged registry pull requests: - textrefs/registry#21 — document `alternative_labels` in AGENTS.md - textrefs/registry#29 — correct the Perseus editions, record two verified negatives (closes registry textrefs#22 and textrefs#24) - textrefs/registry#30 — drop the three Wikisource resolver targets - textrefs/registry#31 — seed alternative labels on all twelve works (closes registry textrefs#27) `/find/` now resolves `NE 1094a1` to the Nicomachean Ethics through `TIER.EXACT_ALTERNATIVE_LABEL`. Before this pin it resolved to the New Testament through `TITLE_PREFIX`, which is the failure ADR-0007 was written to close. `npm run verify` and `npm run validate:data` both pass on the new pin: 68,005 records valid, 204,364 pages built, all internal links valid. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs
maehr
added a commit
that referenced
this pull request
Aug 25, 2026
Picks up four merged registry pull requests: - textrefs/registry#21 — document `alternative_labels` in AGENTS.md - textrefs/registry#29 — correct the Perseus editions, record two verified negatives (closes registry #22 and #24) - textrefs/registry#30 — drop the three Wikisource resolver targets - textrefs/registry#31 — seed alternative labels on all twelve works (closes registry #27) `/find/` now resolves `NE 1094a1` to the Nicomachean Ethics through `TIER.EXACT_ALTERNATIVE_LABEL`. Before this pin it resolved to the New Testament through `TITLE_PREFIX`, which is the failure ADR-0007 was written to close. `npm run verify` and `npm run validate:data` both pass on the new pin: 68,005 records valid, 204,364 pages built, all internal links valid. Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs Co-authored-by: Moritz Mähr <14755525+maehr@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec side of #13, companion to textrefs/registry#8 (merged).
description.Gen.1.1, profile label "(OSIS)".data/submodule → registry maind31ed0b(canonical-forms data fix, registry#8).Reference UUIDs re-minted for the Genesis enumeration are permitted: all records are
draft(ADR-0003).Part of the v0.1.0 release train; #13 gets closed by the release PR.
🤖 Generated with Claude Code