Batch ws-1-1-god — REVIEW

Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 1 (“God”), Part 1 (“God and the Creation”). Pilot batch — proves out the WorldScripture ingestion pipeline end-to-end (ADR-0019 stage-2 + ADR-0020 sub-theme split via scripts/split_ws_chapter.py) on one chapter before batching the remaining 21.

This pilot was redone after ADR-0020 was amended to flip its file-granularity decision from chapter-per-file to sub-theme-per-file. The original cleaned chapter file (1,723 lines) is preserved in the staging dir as the splitter’s input; the 13 sub-theme output files in Chapter01-god/ are the deliverable.

What changed

  • New (13 files): resources/WorldScripture/Part1/Chapter01-god/ws-{subtheme-slug}.md. Each file is one sub-theme; line counts range 102–226. Total ~1,944 lines across the 13 files (vs 1,723 in the single source chapter file — extra is per-file frontmatter and per-file footnote sections).
  • New (1 file): staging/ws-notes-ch1/resources/WorldScripture/ws-notes.md — Chapter 1’s 39 footnote definitions, properly formatted in standard markdown footnote syntax. Partial scope: only Chapter 1 in this batch; the remaining chapters’ notes (and Preface/Invocation notes) are a follow-up batch.
  • Intermediate (1 file, kept in staging for reproducibility): resources/WorldScripture/Part1/ws-1-1-god.md — the splitter’s input. One small inline-edit was made before re-splitting: added [^16] anchor at the end of the Qur’an 2.115 quote in “Omniscient and Omnipresent” (Marker had dropped it).
  • Modified: _meta/quartz/quartz.config.ts — 3-level hierarchical filter (Part → Chapter → Sub-theme) per the amended ADR-0020.
  • Modified: _meta/adr/0020-worldscripture-resource-class.md, _meta/adr/0004-resource-granularity.md, CONTEXT.md — granularity reversal documented + anthology carve-out added + citation grammar row rewritten.
  • New script: scripts/split_ws_chapter.py — deterministic stage-2.5 splitter (cleaned chapter file → N sub-theme files). Will be reused for chapters 2–22.

Sub-theme files produced

Filenames carry a 2-digit ordinal prefix (ws-NN-) so alphabetical sort matches print order.

FileLinesSub-sub-themesSMM blocksFootnotes used
ws-01-knowledge-of-god.md176331–5
ws-02-the-one-god.md111016–9
ws-03-formless-invisible-mystery.md1320110
ws-04-transcendent-reality.md1470111–12
ws-05-sovereign-and-omnipotent.md1762213–15
ws-06-omniscient-and-omnipresent.md1020116
ws-07-immanent-and-dwelling-within-the-heart.md1090117–18
ws-08-unchanging-and-eternal.md1360119–23
ws-09-the-original-cause.md10422(none)
ws-10-god-s-goodness.md1582224
ws-11-divine-love-and-compassion.md2263325–27
ws-12-the-creator.md2173328–35
ws-13-heavenly-father-and-mother.md1500136–39

Inside each file: frontmatter title carries the sub-theme name; file body opens with intro prose (no # H1 — title is in frontmatter); sub-sub-themes (where they exist) are ## N. {title} H2; SMM blocks are ## SMM — {parent} H2.

Cleanup decisions (already applied in stage-2 chapter file, preserved through the split)

  • Marker heading-depth re-leveling, italics stripping, blockquote unwrapping — all preserved from the prior pilot pass.
  • Inline footnote markers (Marker bare digits like Intelligence."1) → [^N] markdown syntax. All 39 anchors present after the inline [^16] addition.
  • SMM block disambiguation: ## SMM — {parent} consistently used, with parent = preceding sub-theme title (when the sub-theme has no sub-sub-themes) or preceding sub-sub-theme title (when it does). The splitter passes these through unchanged.

Footnote backfill

Real footnote text (not TBD placeholders) is in the output. The splitter pulled definitions from staging/ws-notes-ch1/resources/WorldScripture/ws-notes.md via --notes-file. Per-file ## Footnotes sections contain only the notes referenced in that file’s body (markdown footnote scoping is file-local).

Flagged for human review

  1. ws-notes.md is partial. Only Chapter 1’s 39 notes are formatted. Cleaning the remaining 21 chapters’ notes + Preface notes + Invocation notes is a follow-up batch. The Marker output resources-raw/WorldScripture/extracted/99-back-matter/notes.md has a two-column layout issue where some chapter sections are interleaved (e.g. ch1 notes 35–39 appear after ch2 notes 1–5 in the extracted file). The follow-up batch will need careful reordering.

  2. SMM slug includes the “N. ” number prefix (e.g. smm-2-divine-mercy vs smm-divine-mercy). Pilot reads ADR-0020 “parent-slug” literally as parent heading text. Confirm this is the desired slug shape, or strip the number prefix from SMM headings during stage-2 cleanup.

  3. Mid-paragraph hard breaks from Marker preserved as-is. Reflowing would require sentence-boundary judgment per case.

  4. 5 stray > blockquotes added by Marker to random scripture quotes were stripped in stage-2 (rest of chapter is bare paragraphs). Reconfirm during Quartz preview.

  5. Minor: inconsistent tradition-tag italics on African Traditional Religions attributions; part-title casing matches print TOC; Acarangasutra 5.126-40 citation form preserved as printed.

Config diff (applied)

_meta/quartz/quartz.config.ts:

              displayNames: {
                ...
+               "WorldScripture": "World Scripture",
              },
            },
          },
          hierarchical: {
            CSG: { ... },
            "Believers-Responsibility": { ... },
+           WorldScripture: {
+             pathPattern: /WorldScripture\/(Part\d+)\/(Chapter\d+-[\w-]+)\/(ws-[\w-]+)/,
+             levelNames: ["Part", "Chapter", "Sub-theme"],
+           },

Out of scope (deferred to subsequent batches)

  • Chapters 2–22 (21 batches; same flow: stage-2 AI clean → splitter with --notes-file).
  • Full ws-notes.md cleanup (Preface notes, Invocation notes, ch2–22 notes). Required before the chapter 2–22 batches can backfill real footnotes.
  • Root-level front-matter (ws-preface.md, ws-invocation.md) and back-matter (ws-list-of-sources.md).
  • Atomization (stage-3, separate batches).

Verification checklist (for user review in Obsidian / VS Code)

  • Open one sub-theme file (e.g. ws-knowledge-of-god.md) — confirm frontmatter validates, body opens cleanly with intro prose, sub-sub-themes render as ## N. {title}, SMM blocks render as ## SMM — {parent}, ## Footnotes shows only the relevant notes with real text.
  • Confirm sub-theme file sizes (102–226 lines) are reader-friendly compared to the prior 1,723-line chapter file.
  • Local Quartz build: navigate WorldScripture filter pill → Part1 → Chapter01-god → ws-knowledge-of-god. Confirm 3-level filter tree and page renders, sub-sub-theme anchors work (e.g. #2-evidence-for-god-within-the-self).
  • Confirm the [^16] inline-addition lands at the right spot (after “All-knowing.” in the Qur’an 2.115 quote inside “Omniscient and Omnipresent”).