From 4243c12ebfed89c3b216341f61cde43431ba2a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= <14755525+maehr@users.noreply.github.com> Date: Wed, 26 Aug 2026 07:48:20 +0200 Subject: [PATCH 1/3] feat(works): add Hume's first Enquiry with section-and-paragraph citation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified row from registry #25, tracked in #34. Hume Texts Online (Peter Millican, Hertford College, Oxford) addresses the Enquiry by section page with a per-paragraph anchor, and prints each paragraph's own canonical citation next to it ("E 10.1, SBN 109"), so the anchor and the locator agree by construction. Checked 2026-08-26 with invalid controls: /texts/e/99, /texts/t/9/9/9 and /texts/zzz/1 all return a real HTTP 404. That is the cleanest control behaviour of any provider verified for #25. The 12 paragraph counts were harvested from the site, not typed from memory, and verified at the boundary: on /texts/e/10 the anchor id 41 is present and 42 is absent; the same check passed for sections 1, 3 and 12. Sum = 255. Wikidata Q1306656 verified as the Work — "Philosophical Essays Concerning Human Understanding", the 1748 title, with "An Enquiry Concerning Human Understanding" among its aliases and P50 = Q37160 (David Hume). Most search hits for this title are editions or book chapters, which the authoring rule in AGENTS.md warns against. Refs #34 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs --- systems/hume-section-paragraph.yaml | 12 +++++ works/hume.enquiry-human-understanding.yaml | 58 +++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 systems/hume-section-paragraph.yaml create mode 100644 works/hume.enquiry-human-understanding.yaml diff --git a/systems/hume-section-paragraph.yaml b/systems/hume-section-paragraph.yaml new file mode 100644 index 00000000..e9d2e3ea --- /dev/null +++ b/systems/hume-section-paragraph.yaml @@ -0,0 +1,12 @@ +key: hume-section-paragraph +preferred_label: Hume section-and-paragraph +description: >- + Hume's first Enquiry cited by section and paragraph (`section.paragraph`), + e.g. 1.1 through 12.34, following the paragraph numbering of Hume Texts + Online. 12 sections, 255 paragraphs. +# Named capture groups expose `{section}` and `{paragraph}` to URL templates, +# plus the compiler's zero-padded variants. +locator_regex: '^(?
[1-9]|1[0-2])\.(?[1-9][0-9]{0,2})$' +status: draft +created: 2026-08-26 +modified: 2026-08-26 diff --git a/works/hume.enquiry-human-understanding.yaml b/works/hume.enquiry-human-understanding.yaml new file mode 100644 index 00000000..5c2a9d48 --- /dev/null +++ b/works/hume.enquiry-human-understanding.yaml @@ -0,0 +1,58 @@ +work: + key: hume.enquiry-human-understanding + preferred_label: An Enquiry concerning Human Understanding + alternative_labels: + - 'EHU' + - 'E' + - 'Enquiry concerning Human Understanding' + - 'First Enquiry' + - 'Philosophical Essays Concerning Human Understanding' + - 'Untersuchung über den menschlichen Verstand' + status: draft + created: 2026-08-26 + modified: 2026-08-26 + creators: + - kind: person + family: Hume + given: David + +citation_system: hume-section-paragraph + +mappings: + - relation: alternateOf + conforms_to: 'https://www.wikidata.org/' + identifier: 'https://www.wikidata.org/entity/Q1306656' + source: manual-curation + status: draft + created: 2026-08-26 + modified: 2026-08-26 + - relation: isReferencedBy + conforms_to: 'https://en.wikipedia.org/' + identifier: 'https://en.wikipedia.org/wiki/An_Enquiry_Concerning_Human_Understanding' + source: 'wikidata:Q1306656' + status: draft + created: 2026-08-26 + modified: 2026-08-26 + +resolvers: + - provider: Hume Texts Online + edition: 'Hume Texts Online, ed. Peter Millican (Hertford College, Oxford)' + language: en + access: open + # Per-section pages with a per-paragraph anchor. The site prints each + # paragraph's own citation ("E 10.1, SBN 109"), so the anchor and the + # locator agree by construction. Checked 2026-08-26: `/texts/e/10#1` -> + # "E 10.1, SBN 109"; `#41` -> "E 10.41, SBN 130-1". Controls: `/texts/e/99`, + # `/texts/t/9/9/9` and `/texts/zzz/1` all return a real HTTP 404. + # + # The site's own siglum is `E`, not `EHU`; both are in alternative_labels. + url: 'https://davidhume.org/texts/e/{section}#{paragraph}' + last_checked: '2026-08-26' + +# Paragraph counts per section, harvested from Hume Texts Online on 2026-08-26 +# by reading the highest paragraph anchor on each section page, and verified at +# the boundary: on `/texts/e/10` the id `41` is present and `42` is absent; the +# same check passed for sections 1, 3 and 12. Sum = 255 paragraphs. +references_range: + - kind: chapter_verse + counts: [17, 9, 3, 23, 22, 4, 30, 36, 6, 41, 30, 34] From 13803288667d5c717b5e9c52dba3b4d834bf33fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= <14755525+maehr@users.noreply.github.com> Date: Wed, 26 Aug 2026 08:06:58 +0200 Subject: [PATCH 2/3] feat(works): add Hume's Treatise with book-part-section-paragraph citation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified row from registry #25, tracked in #34. Structure and paragraph counts were harvested from Hume Texts Online on 2026-08-26 by walking /texts/t/{book}/{part}/{section} until the site returned 404, then reading the highest paragraph anchor on each page. The result is the canonical shape of the Treatise: 3 books, 10 parts (I.i-iv, II.i-iii, III.i-iii), 90 sections, 1,213 paragraphs. Two sections looked implausibly short, so they were checked by hand rather than trusted: T 1.1.2 has exactly one paragraph (anchor id 2 absent) and T 3.2.4 has exactly two (id 3 absent). Both are genuine. The compiler has no four-part range kind, so this uses one book_chapter_verse block per book-and-part with the `book` field carrying the `{book}.{part}` prefix. The expansion emits book.part.section.paragraph directly, and no compiler change is needed. Wikidata Q2451675 verified as the Work — "A Treatise of Human Nature", a written work with P50 = Q37160 (David Hume), not one of the several edition items that share the title. Refs #34 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs --- systems/hume-book-part-section-paragraph.yaml | 13 +++ works/hume.treatise.yaml | 90 +++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 systems/hume-book-part-section-paragraph.yaml create mode 100644 works/hume.treatise.yaml diff --git a/systems/hume-book-part-section-paragraph.yaml b/systems/hume-book-part-section-paragraph.yaml new file mode 100644 index 00000000..358775f1 --- /dev/null +++ b/systems/hume-book-part-section-paragraph.yaml @@ -0,0 +1,13 @@ +key: hume-book-part-section-paragraph +preferred_label: Hume book-part-section-paragraph +description: >- + Hume's Treatise of Human Nature cited by book, part, section and paragraph + (`book.part.section.paragraph`), e.g. 1.3.6.4, following the paragraph + numbering of Hume Texts Online. 3 books, 10 parts, 90 sections, + 1,213 paragraphs. +# Named capture groups expose `{book}`, `{part}`, `{section}` and +# `{paragraph}` to URL templates. +locator_regex: '^(?[1-3])\.(?[1-4])\.(?
[1-9]|1[0-6])\.(?[1-9][0-9]{0,2})$' +status: draft +created: 2026-08-26 +modified: 2026-08-26 diff --git a/works/hume.treatise.yaml b/works/hume.treatise.yaml new file mode 100644 index 00000000..84327fae --- /dev/null +++ b/works/hume.treatise.yaml @@ -0,0 +1,90 @@ +work: + key: hume.treatise + preferred_label: A Treatise of Human Nature + alternative_labels: + - 'T' + - 'THN' + - 'Treatise' + - 'Traktat über die menschliche Natur' + status: draft + created: 2026-08-26 + modified: 2026-08-26 + creators: + - kind: person + family: Hume + given: David + +citation_system: hume-book-part-section-paragraph + +mappings: + - relation: alternateOf + conforms_to: 'https://www.wikidata.org/' + identifier: 'https://www.wikidata.org/entity/Q2451675' + source: manual-curation + status: draft + created: 2026-08-26 + modified: 2026-08-26 + - relation: isReferencedBy + conforms_to: 'https://en.wikipedia.org/' + identifier: 'https://en.wikipedia.org/wiki/A_Treatise_of_Human_Nature' + source: 'wikidata:Q2451675' + status: draft + created: 2026-08-26 + modified: 2026-08-26 + +resolvers: + - provider: Hume Texts Online + edition: 'Hume Texts Online, ed. Peter Millican (Hertford College, Oxford)' + language: en + access: open + # Per-section pages with a per-paragraph anchor. The site prints each + # paragraph's own citation ("T 1.3.6.4, SBN 88-9"), so the anchor and the + # locator agree by construction. Checked 2026-08-26; controls + # `/texts/t/9/9/9` and `/texts/zzz/1` return a real HTTP 404. + url: 'https://davidhume.org/texts/t/{book}/{part}/{section}#{paragraph}' + last_checked: '2026-08-26' + +# Structure and paragraph counts harvested from Hume Texts Online on +# 2026-08-26 by walking `/texts/t/{book}/{part}/{section}` until the site +# returned 404, then reading the highest paragraph anchor on each page. +# Result: 3 books, 10 parts, 90 sections, 1,213 paragraphs — the canonical +# shape of the Treatise (I.i-iv, II.i-iii, III.i-iii). +# +# Two sections are genuinely tiny and were checked by hand rather than +# assumed: T 1.1.2 has exactly one paragraph (id 2 absent) and T 3.2.4 has +# exactly two (id 3 absent). +# +# One `book_chapter_verse` block per book-and-part, with the `book` field +# carrying the `{book}.{part}` prefix, so the expansion emits +# `book.part.section.paragraph` directly. +references_range: + - kind: book_chapter_verse + book: '1.1' + counts: [12, 1, 4, 7, 10, 3, 18] + - kind: book_chapter_verse + book: '1.2' + counts: [5, 10, 17, 33, 29, 9] + - kind: book_chapter_verse + book: '1.3' + counts: [7, 16, 9, 3, 7, 16, 8, 17, 19, 12, 13, 25, 20, 36, 12, 9] + - kind: book_chapter_verse + book: '1.4' + counts: [12, 57, 11, 15, 35, 23, 15] + - kind: book_chapter_verse + book: '2.1' + counts: [4, 6, 7, 5, 11, 10, 8, 9, 13, 12, 19, 9] + - kind: book_chapter_verse + book: '2.2' + counts: [9, 28, 10, 13, 21, 6, 6, 20, 20, 10, 6, 8] + - kind: book_chapter_verse + book: '2.3' + counts: [18, 8, 10, 10, 5, 10, 9, 13, 32, 12] + - kind: book_chapter_verse + book: '3.1' + counts: [27, 11] + - kind: book_chapter_verse + book: '3.2' + counts: [19, 28, 11, 2, 15, 11, 8, 9, 4, 19, 5, 9] + - kind: book_chapter_verse + book: '3.3' + counts: [31, 17, 9, 14, 6, 6] From fcb34ac91b74c56e2dd44e12b36773ae61f35750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=A4hr?= <14755525+maehr@users.noreply.github.com> Date: Wed, 26 Aug 2026 09:18:33 +0200 Subject: [PATCH 3/3] fix(systems): reject Treatise book-part pairs that do not exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot review on #38: the locator regex admitted 2.4.x.y and 3.4.x.y, which are not parts of the Treatise. They would have failed only by going unregistered, not by failing the shape check. A leading lookahead pins the pairs that exist — 1.1-1.4, 2.1-2.3, 3.1-3.3 — while keeping the named capture groups single and unduplicated, so URL templating is unaffected. Note this is deliberately stricter than the registry's usual convention, where the regex is a shape check and bounds live in the registered references (see `integer-section`, and `bekker` admitting pages up to 9999). Here the invalid combinations are a small closed set, so pinning them costs nothing and is better than deferring the error. Refs #34 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs --- systems/hume-book-part-section-paragraph.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/systems/hume-book-part-section-paragraph.yaml b/systems/hume-book-part-section-paragraph.yaml index 358775f1..d3d7cffc 100644 --- a/systems/hume-book-part-section-paragraph.yaml +++ b/systems/hume-book-part-section-paragraph.yaml @@ -7,7 +7,11 @@ description: >- 1,213 paragraphs. # Named capture groups expose `{book}`, `{part}`, `{section}` and # `{paragraph}` to URL templates. -locator_regex: '^(?[1-3])\.(?[1-4])\.(?
[1-9]|1[0-6])\.(?[1-9][0-9]{0,2})$' +# The leading lookahead pins the book-and-part pairs that actually exist — +# 1.1-1.4, 2.1-2.3, 3.1-3.3 — so 2.4.x.y and 3.4.x.y are rejected by the shape +# check rather than merely going unregistered. The named groups stay single and +# unduplicated, so URL templating is unaffected. +locator_regex: '^(?=1\.[1-4]|2\.[1-3]|3\.[1-3])(?[1-3])\.(?[1-4])\.(?
[1-9]|1[0-6])\.(?[1-9][0-9]{0,2})$' status: draft created: 2026-08-26 modified: 2026-08-26