Skip to content

feat(spec): canonical ASCII digit and case forms in citation-system profiles (#13) - #24

Merged
maehr merged 1 commit into
textrefs:stagingfrom
maehr:feat/13-canonical-ascii-forms
Jul 5, 2026
Merged

maehr merged 1 commit into
textrefs:stagingfrom
maehr:feat/13-canonical-ascii-forms

Conversation

@maehr

@maehr maehr commented Jul 5, 2026

Copy link
Copy Markdown
Member

Spec side of #13, companion to textrefs/registry#8 (merged).

  • system-profiles.md / Canonical locator form: profiles MUST now take an explicit position on two ASCII axes — leading zeros in numeric components (default: forbidden) and canonical letter case (default: case-sensitive declared casing). Pinned vocabularies (e.g. OSIS book codes) are documented as non-regex-checkable constraints in description.
  • Seed-profile examples updated to the tightened registry regexes (Bekker pages 1–9999 without leading zeros, Stephanus without zero/leading-zero page and sub-line).
  • Worked example + get-started docs follow the OSIS vocabulary decision: Gen.1.1, profile label "(OSIS)".
  • data/ submodule → registry main d31ed0b (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

…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>
Copilot AI review requested due to automatic review settings July 5, 2026 19:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]*)$",
@maehr
maehr merged commit a765770 into textrefs:staging Jul 5, 2026
2 checks passed
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>
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.

2 participants