Repository navigation
docs(guide/05): say why superseded documents are kept, and clear three stale locator examples - #26
Merged
Merged
Conversation
…e stale locator examples **The TL;DR stated the rule without the reason.** "Superseded documents are kept, not deleted. Every read must filter `is_current`" gives a reader a cost and no benefit, and the benefit was two screens down in a table. A reader who holds the rule without the reason will eventually delete the rows to save the duplication. The reason now rides with the rule, in both places it appears. **`summa:I.q2.a3` as a unit locator, three more sightings.** PR #24 fixed `architecture.md` and amended ADR-002; grepping only `docs/` was the mistake. It also lives in: - `types/domain.ts` — on `ContextUnit.locator`, the type the citation gate checks against, where an article locator is precisely what must never appear - `.claude/project.md` — non-negotiable 1, the first thing an agent reads - `supabase/migrations/0005_corpus.sql` — applied, so queued in status.md as a `comment on column units.locator` for migration `0006` **`scripts/eval-lint.ts`'s worked example is a fossil.** Its header says "the gold set names sources the corpus does not have yet: `summa:I.q2.a3`, `humani-generis:36`". Neither is true now: the Summa is ingested, the gold set was corrected to leaf locators in PR #11, and `humani-generis` is not in `sources.yaml` at all. Replaced with `kjv`, which really is declared with no documents block — and with the fact that matters more, that the pending branch has no members today, so a green run is not evidence that it works. **Chapter 07 now separates the pre-flight from the bake-off in its TL;DR.** Three times now a reader has read "we tested some models" and concluded ADR-008 was decided. The distinction was correct in chapter 07 but eighty lines down. `eval:preflight` asks only whether a model *can be served*; it is how a candidate is admitted, never how one wins. Also pinned the "no vector index yet" row to what lifts it: the dimensioned column and its index land with ADR-008's migration. Checked and unchanged: the ER diagram matches `0005` on every field it shows, `chunk_embeddings.dimensions` exists, `admin_users` and `rate_limit_log` are where the chapter says, `~9k current chunks` is right (9,183), the database really does hold more chunks than are current (17,778 v 9,183), and `scripts/eval-lint.ts` really is a correct `is_current` read. Chapter 05: 88 prose lines. Chapter 07: 130. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ancsingabor
added a commit
that referenced
this pull request
Sep 28, 2026
PR #26 narrowed ADR-008 to embeddings and recorded the generation provider as a separate ADR still owed, but only fixed the ADR index. Step 4 of the harness plan still read "ADR-008, the embedding and generation provider", so status.md and `docs/adr/README.md` disagreed about the scope of the same decision. Swept the rest: the only remaining hit for the old wording is the sentence in `adr/README.md` that quotes the old title to explain the change, which is correct. 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.
Review of
docs/guide/05-data-model.md. Independent of #25 — branched frommain, no overlapping files, so the two can merge in either order.1. The rule without the reason
That gives a reader a cost and no benefit. The benefit was two screens down in the choices table. Someone holding the rule without the reason eventually deletes the rows to save the duplication — and silently breaks every published citation. The reason now rides with the rule in both places.
2.
summa:I.q2.a3as a unit locator — three more sightingsPR #24 fixed
architecture.mdand amended ADR-002. Grepping onlydocs/was my mistake. It also lives in:types/domain.tsContextUnit.locator— the type the citation gate checks against, where an article locator is exactly what must never appear.claude/project.mdsupabase/migrations/0005_corpus.sqlcomment on column units.locatorfor0006That is now six files for one wrong example.
a-wrong-claim-has-siblingskeeps earning its name; the lesson this round is that the grep has to cover code and SQL, not just prose.3.
scripts/eval-lint.ts's worked example is a fossilIts header says:
Three things wrong now: the Summa is ingested, the gold set was corrected to leaf locators in PR #11, and
humani-generisis not insources.yamlat all. I checked the gold set — it contains onlyccc:*and leafsumma:*.Replaced with
kjv, which really is declared with nodocuments:block, and with the fact that matters more:I also caught myself mid-fix writing that "
humani-generisand the other encyclicals are insources.yamlwith no documents block" — they aren't; there are exactly three sources. Verified before committing rather than after.4. Chapter 07: the pre-flight is not the bake-off
This is the third time the pre-flight has been read as "we already tested models, so ADR-008 is decided". Chapter 07 has it right, at line 88. Its TL;DR — which is what gets read — mentioned only the bake-off. Added:
Three readers hitting the same wall is a documentation defect, not a reader defect.
What I checked and did not change
0005_corpus.sqlon every field it shows;chunk_embeddings.dimensionsexistsadmin_users(0001) andrate_limit_log(0003) are where the chapter says~9k current chunksis right — 9,183 (2,865 + 2,865 + 3,453). I briefly made it exact, then reverted: a number that must change when a few hundred chunks are added is status, and~9kis an order-of-magnitude supporting an argumentscripts/eval-lint.tsreally is a correctis_currentread (line 102)chunk_unitsjoin-table row from docs(guide/02): say what the join table is for, and stop claiming every article fits one chunk #23 is accurate as writtenpgvectoritself (ADR-001) is decided and not stale; what is undecided is the model, and the chapter says so correctly. Pinned the "no index yet" row to what lifts it: ADR-008's migrationNoticed, not fixed
Chapter 07's "Where this lives in code" table has a State column (
✅ v0 (10),✅, …) — the same status-outside-status.mdpattern the code map just lost. Left for the chapter 07 review.Verification
npx tsc --noEmit— cleannpx vitest run lib/citation— 24 passed (the type comment I edited is on the gate's context type)npm run docs:lint— clean🤖 Generated with Claude Code