docs: resolve the consistency audit before v0.1.0 (#79) - #80
Merged
Conversation
…extrefs#79) Consistency audit findings A1, A2, A4, A5, A6, A7, B9, B10, B12. - A1: §13's worked example and the §5 class diagram omitted the required `preferred_citation_system_key`, so the spec's headline example failed `Work.safeParse`. Verified: it now parses, and did not before. - A2: clarify that the three tombstone statuses differ in reach — `deprecated` still resolves and stays projected, `withdrawn`/`blocked` do not. The definition itself is unchanged (ADR-0004). - A4: §14's requirement 10 demanded SPDX *identifier* syntax, which every conforming published record fails — published records carry the SPDX IRI. - A5: one `resolver_targets` array carried both license encodings. - A6: drop the unenforceable "presence for language-specific entries" from the validator list; §9 keeps it as an authoring obligation. - A7: `license` is a build failure, not a SHOULD, and deprecated SPDX ids are accepted, so "current" overstated the rule. - B9/B10: SKOS no longer carries mapping relations after ADR-0006; add the missing PROV-O row. - B12: `MappingAssertion` is a curated relation, not an equivalence — `isReferencedBy` targets a document *about* the work. Swept the §4 and §11 framing too, so the type is described consistently. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…extrefs#79) Consistency audit findings A3, D22, A6, plus the A2 wording spillover. - A3: the advertised alternate-link media type was `application/json`; the implementation emits `application/ld+json` and the spec requires it, so OpenAPI was the incorrect side. - D22: `Work.creators` is documented, implemented and in the published context, but was missing from the OpenAPI schema. Adds a `Creator` component mirroring the Zod discriminated union. - A6: §14 required validators to check BCP 47 syntax of `language`, but nothing did — all three layers had only `minLength: 2`. Adds a shared `LanguageTag` (RFC 5646 langtag + privateuse well-formedness) to `standard/schema/common.ts`, wires it into the published and source schemas, and mirrors it as an OpenAPI `pattern`. - A2: "non-tombstoned" was ambiguous — the projection filter is narrower than the spec's tombstone definition. Names the actual statuses instead. All 12 language values in the registry still validate; `compile:data` compiles 67,959 references with no rejections. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Consistency audit findings F32, F33, F34, F35, G37, G38, G39, D26. - F32: the published contributing page told contributors to branch from and PR against `main`, and omitted the entire `## Branching model` section. The actual infrastructure integrates on `staging` — Dependabot targets it and the registry's validate workflow checks out `parent/staging`. Most user-facing item in the audit. - F33: the site's release checklist had drifted to 7 steps and prescribed bare `npm run changelog`, which the canonical file warns files commits under `## [Unreleased]`. It also dropped the CITATION.cff and Pages-dispatch steps — the latter explains why a release PR stays blocked. Ported the canonical 9 steps. - F34: `AGENTS.md` did not list `ROADMAP.md` as a mirror pair, though ROADMAP.md declares itself one — plausibly how F32/F33 arose. - F35: the mirrored roadmap page linked to itself. - G37: README documented a `docs-internal/` directory that does not exist, and omitted `src/pages/`, `src/layouts/`, `src/lib/`. Also corrects the stale "scaffolds reserved for future repo splits" note in both README and AGENTS.md — those directories now hold the live schemas and the OpenAPI contract. - G38: the conformance-failure template required test IDs from a suite the roadmap lists as planned, so the field could not be satisfied. - G39: the "replace community placeholder pages" item was stale; all seven pages carry substantive prose and none says "placeholder". - D26: `verify` and `verify:fast` both run `npm test`, which four descriptions omitted. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Consistency audit findings A2, A8, B11, B12, D24, G40, G41. - A2: json-ld.md said the Work projection derives from "non-tombstoned" assertions, which under the spec's own definition would exclude `deprecated` — but the compiler projects those. Names the real filter. - A8: the `/`-in-locator check is not parse-time; it runs per reference during emission. Attributes each check to its actual stage. - B11: the vocabulary list omitted PROV-O, which now carries the primary mapping relation. - B12: drop the "equivalence" framing, including the diagram label, which excluded half the relation enum. - D24: the dcterms row omitted `description` and `isReplacedBy`. - G40: the `-draft` suffix is on the spec document's version, not on any tag. Adds the release-tag vs spec-version distinction, which was explained nowhere on the site. - G41: "a citable release will be tagged once the core stabilises" read oddly beside 0.1.0 metadata. States the actual position without claiming a tag that does not yet exist. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Consistency audit findings C13-C19, D20, D21, D23, D25, E27-E31, B11, B12. - C13/C14/C15: the "compiled registry record" blocks did not match what the compiler emits — bare SPDX ids instead of IRIs, `status: active` where every record in `data/` is `draft`, stale `modified` dates, and a John.3.16 example missing its second resolver target and showing an unescaped URL. Each block now matches `dist/dump/` field for field. - C16: wrong Wikidata QID for the Dhammapada in two files. - C17: the Dhammapada provider count was wrong in three places, and in authoring.md contradicted the YAML example directly below it. - C18: the `additional_systems` example used an unregistered citation system, which is a build error, and showed `status: active`. - C19: documented an `examples` key that the strict source schema rejects. - D20: told implementers to read a `mappings` array that no record has. - D21: attributed two nonexistent fields to `CitationSystem`. - D23: `url_by` misses are counted and warned about, not silent. - D25: there is no per-system reference list under `/reg/`. - E27: the edge-case bullet forbade edition-level mapping targets that both the same page and the spec permit. - E28/E29: TEI anchors belong in `resolver_targets`, and the PURL row had `/id/` and `/cite/` the wrong way round. - E30/B12: reading URLs and locators are not "mappings". - E31: "two sources" introduced a five-item list. - B11: add PROV-O to the vocabulary list. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Readability pass over the seven get-started pages, inspired by the rule intent of ASD-STE100 (Simplified Technical English). The specification and its Approved Word dictionary are copyrighted and are not used here, so this is an approximation, not a conformance claim. Applied: one thought per sentence, active voice with a named actor, simple present, noun clusters of at most three words, one term per concept, and paragraphs of at most six sentences. Long enumerating sentences became bulleted lists. Removed "e.g."/"i.e.", slash-as-conjunction, contractions, and semicolons that hid a second sentence — the changes that matter most for non-native readers and for translation. No facts changed. Verified mechanically: - every fenced code block is byte-identical to the previous commit, so the registry values corrected in the preceding commit are untouched; - every heading is unchanged, so no anchor target breaks; - no identifier, URL, count, date, QID, or UUID moved; - RFC 2119 keywords are preserved verbatim. `get-started/index.md` is deliberately exempt from the mechanical limits. It is the landing page and its cadence is intentional, so only three genuinely ambiguous sentences changed there — a dangling participle, a four-clause chain, and a verbless fragment. Its fragments and triads are untouched. Refs textrefs#79 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Resolves the documentation consistency audit for the v0.1.0 baseline by aligning the TextRefs standard docs, get-started guides, and community docs with the current implementation and published registry output, while also tightening schema validation and the published OpenAPI contract.
Changes:
- Introduces a shared
LanguageTagvalidator (BCP 47 well‑formedness) and wires it into canonical schemas, authoring validation, OpenAPI, and tests. - Updates the standard docs (spec/versioning/JSON‑LD/index) to correct mapping/tombstone semantics and bring worked examples in line with published output.
- Refreshes community and repo docs (contributing/roadmap/readme/agents) to reflect the current branching/release workflow and verification commands.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| standard/schema/work.ts | Clarifies Work mapping projection semantics (withdrawn/blocked filter). |
| standard/schema/common.ts | Adds LanguageTag shared Zod validator. |
| standard/schema/canonical-reference.ts | Uses LanguageTag for resolver-target language. |
| scripts/source-schema.ts | Enforces LanguageTag at authoring parse time. |
| scripts/compile.test.ts | Adds tests covering language-tag acceptance/rejection. |
| api/openapi.yaml | Aligns alternate media type, adds Creator, and adds language-tag pattern. |
| src/content/docs/standard/specification.md | Fixes normative statements/examples around mappings, tombstones, SPDX/license, vocabularies. |
| src/content/docs/standard/versioning.md | Clarifies tag vs spec versioning and invariant-check timing; mapping wording update. |
| src/content/docs/standard/json-ld.md | Corrects vocabulary table and mapping projection description. |
| src/content/docs/standard/index.md | Updates overview wording and vocab list; v0.1.0 baseline note. |
| src/content/docs/get-started/index.md | Adjusts intro copy and vocabulary list; example description tweaks. |
| src/content/docs/get-started/use-cases.md | Plain-language readability edits. |
| src/content/docs/get-started/url-layout.md | Plain-language edits and tighter URL-prefix explanations. |
| src/content/docs/get-started/related-systems.md | Refines comparison table and guidance on where identifiers belong. |
| src/content/docs/get-started/mappings-and-resolver-targets.md | Updates mapping vs resolver-target guidance and examples. |
| src/content/docs/get-started/how-it-works.md | Updates compiled-record examples to match published dump semantics/fields. |
| src/content/docs/get-started/authoring.md | Restructures authoring guidance; clarifies templates, statuses, and defaults. |
| src/content/docs/community/contributing.md | Adds branching model + release checklist updates; verification comment update. |
| src/content/docs/community/roadmap.md | States canonical roadmap source is root ROADMAP.md. |
| ROADMAP.md | Status wording update (“in progress” → “done”). |
| README.md | Expands layout documentation and updates verify command description. |
| CONTRIBUTING.md | Updates verify:fast comment to include tests. |
| AGENTS.md | Updates command descriptions and clarifies roadmap mirroring. |
| .github/ISSUE_TEMPLATE/conformance_failure.yml | Makes failing-cases field optional and updates guidance text. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reframe "Related identifier systems" as "Related standards and systems". The page grouped every system as an identifier scheme, but the listed systems address different layers of textual reference. Group the comparison into seven sections: canonical reference and text APIs, persistent identifiers, bibliographic and authority models, edition and fragment addressing, digital surrogates, editorial conceptual models, and platforms. Add IIIF Presentation API, W3C Web Annotation, BIBFRAME, IFLA LRM, and RAMEN. Add URN:NBN, which Appendix B of the specification already lists. Update the two inbound links in the get-started section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ules (textrefs#79) State the published `license` form first in §9. The bullet led with the bare SPDX identifier, which is the authoring form, while every example in the section and §14 item 10 carry the canonical SPDX IRI. Say which grandfathered language tags `LanguageTag` rejects. The regex excludes all seventeen irregular tags, including the four without an `i-` prefix, and accepts the nine regular ones. A test locks the split. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 13, 2026
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.
Resolves the documentation consistency audit in #79 — 40 of its 41 findings — and the related-systems rework in #81. All of it is intended for the
v0.1.0baseline.Closes #81.
Branched from
37faf37, the audit's own baseline, so every line number in the issue resolves.Why this lands before the tag
package.json,CITATION.cffandCHANGELOG.mdare all at0.1.0, but no tag exists yet. Once cut, these docs become a citable baseline. Four findings (A1, A3, A4, D22) would otherwise freeze wrong statements into the published API contract and the spec's headline example, and F32/F33 mislead contributors today by publishing the wrong branching model.Commits
fix(standard)specfix(api)OpenAPI + BCP 47docs(community)mirrorsdocs(standard)json-ld/versioning/indexdocs(get-started)examplesdocs(get-started)plain languagedocs(get-started)related standardsdocs(standard)license and language rulesNotable changes
A1 — §13's worked example and the §5 class diagram omitted the required
preferred_citation_system_key, so the spec's flagship example failedWork.safeParse. Verified both ways: it parses now, and did not before.A3 / D22 — the OpenAPI document advertised
application/jsonfor the alternate link where the implementation emitsapplication/ld+json, and omittedWork.creatorsentirely. Adds aCreatorcomponent mirroring the Zod discriminated union.A6 — BCP 47 is now actually enforced. §14 required validators to check language-tag syntax, but all three layers had only
minLength: 2. Adds a sharedLanguageTag(RFC 5646 langtag + privateuse well-formedness) tostandard/schema/common.ts, wires it into the published and source schemas, and mirrors it as an OpenAPIpattern. All 12 language values in the registry still validate. The unenforceable presence clause was removed from §14's validator list only; §9 keeps it as an authoring obligation.A2 — the two senses of "tombstone". ADR-0004 defines a tombstone as
deprecated,withdrawnorblocked, but the compiler'sTOMBSTONE_STATUSESis deliberately narrower (withdrawn,blocked) for the Work projection and the live-reference invariant. The definition and the code are both correct and unchanged; the dependent prose injson-ld.mdand the OpenAPI descriptions was wrong fordeprecatedand now names the real filter.C13–C15 — the "compiled registry record" blocks in
how-it-works.mdnow matchdist/dump/field for field: SPDX IRIs instead of bare ids,draftinstead ofactive, realmodifieddates, and the John.3.16 example regains its second resolver target.F32 / F33 — the published contributing page told contributors to branch from and PR against
main, and omitted the entire Branching model section. The actual infrastructure integrates onstaging: Dependabot targets it, and the registry's validate workflow checks outparent/staging. The release checklist is resynced from 7 stale steps to the canonical 9.#81 — related systems, grouped by layer. The page framed every neighbouring standard as an identifier scheme, but the systems it listed sit on different layers. It is now seven sections — canonical reference and text APIs, persistent identifiers, bibliographic and authority models, edition and fragment addressing, digital surrogates, editorial conceptual models, platforms — each with a framing sentence and the same four-column table. Adds IIIF Presentation API, W3C Web Annotation, BIBFRAME, IFLA LRM and RAMEN, plus URN:NBN, which Appendix B of the spec already listed and this page did not. The title changes to "Related standards and systems"; the URL does not. IIIF and Web Annotation are documented as
resolver_targets, consistent with the ADR-0006 test that already governs TEI anchors — nothing is added to Appendix B, because making IIIF aMappingAssertiontarget is a modelling decision that wants its own ADR.Review findings. Two threads from the automated review, both fixed in
ac81fd4: §9'slicensebullet stated the bare SPDX identifier as the requirement on the published field, where every example in the section and §14 item 10 carry the IRI; andLanguageTag's comment implied the excluded grandfathered tags are thei-forms. The regex rejects all 17 irregular tags and accepts all 9 regular ones, which a new test now locks.Verification
npm run verifygreen — format,astro check, 25/25 tests, 204,350 pages, all internal links valid, 67,959 references compiled with no rejections. The two commits added since carry the test count to 30/30, verified withnpm run verify:fast.Checked specifically:
Work.safeParse, and fails without the added key;grep -c '"status":"active"' dist/dump/references.jsonl→0;LanguageTagaccepts all 12 registry languages plusgrc-Grekandzh-Hant-TW, rejectse n,english!,e, and splits the 26 grandfathered tags 9 accepted / 17 rejected;Scope notes
F36 is deliberately excluded — the legal-reservation notice missing from the English association pages belongs with the statutes batch, which is being handled separately.
B12 swept wider than filed. The audit listed three "equivalence" sites for
MappingAssertion; there were nine. Fixing only three would have left spec §4 contradicting §5. The three remaining uses describe citation-system-to-citation-system equivalence, a different and correct sense, and were left alone.The plain-language pass is inspired by the rule intent of ASD-STE100. That specification and its Approved Word dictionary are copyrighted and are not used here, so this is an approximation and not a conformance claim.
Follow-ups, not in this PR
TOMBSTONE_STATUSESto make the narrow sense self-documenting in code — a refactor, not a docs fix.🤖 Generated with Claude Code