Repository navigation
Description
Overview
Wiki source and seed pages still carry **Canonical BibTeX key:** TODO markers (388 sections at 965d45f, up from the 345 counted in #24 now that seed/ is walked). Many already have a matching entry in bibliography/pyautomemory.bib. This task adds a read-only matching script that ranks candidates, then fills a first batch of sections whose match was verified against the public paper record. Uncertain matches stay TODO.
Plan
- Add
scripts/canonical_key_candidates.py. It finds every TODO section, matches it against the canonical bib by DOI, then arXiv id, then first-author + year ranked by title overlap with the heading tag, and prints a candidates report. It never writes keys. - Add unit tests for the script.
- Pick the unambiguous candidates in the cti and lensing wikis: one entry for that author+year, a title that fits the heading tag, and a DOI or arXiv id on the entry.
- Check each one against the public record (DOI/arXiv id → title, first author, year). Fill only the key and the
Reference:line.Supports/Use whenclaims stay TODO because claim support is a separate reading task. - Run
make validateandmake test. List the residual sections in the PR, along with the reason each one stays TODO (duplicate bib entries, title mismatch, no identifier).
Tier: notify — merge mode: auto-merge on green (in-turn wait, then /prm close-out). Batch contract overrides: this run ends at PR-open and the human merges via /prm.
Detailed implementation plan
Affected Repositories
- PyAutoMemory (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoMemory | main | clean |
Suggested branch: feature/canonical-key-todo-sweep
Implementation Steps
scripts/canonical_key_candidates.py: reusesSOURCE_SECTION/source_directoriesfromvalidate_literature_citations.py. It parses bib entries (key, first-author surname folded to ASCII, year, title, doi, arXiv) and outputs a Markdown or--jsonreport.tests/test_canonical_key_candidates.py: covers parsing, author folding, DOI-exact ranking, author+year ranking and confidence labels.- Fill the verified sections:
**Canonical BibTeX key:** \Key`andReference: <title>; doi:|arXiv:; `. - Validate with
make validateandpython -m pytest tests -q.
Key Files
scripts/canonical_key_candidates.py: new candidates reportwiki/{cti,lensing}/sources/*.md: filled sectionsbibliography/pyautomemory.bib: unchanged unless a verified entry is missing
Original Prompt
Click to expand starting prompt
Type: maintenance · Target: PyAutoMemory · Autonomy: safe · Consequence: notify
345 source-page sections across the wikis still carry "Canonical BibTeX key: TODO — no unique match found in bibliography/pyautomemory.bib" markers (count from the 2026-07-16 structure-cleanup audit, PyAutoMemory#24)…
Task: pair a matching script with a human verification loop to burn down the TODO count.
- Script: for each TODO section, extract the section heading (Author Year — tag) and any partial reference text; match against bibliography/pyautomemory.bib by author+year key stem, DOI, arXiv ID, then normalized title. Emit a ranked candidates report (section -> candidate keys + confidence), never auto-writing keys.
- Human loop: verify each proposed match against the public paper record before filling the section (per bibliography/README.md: never fabricate; uncertain stays TODO). Where no canonical entry exists, add verified metadata first.
- Batch by wiki (cti and galaxies have the densest TODO clusters); run make validate after each batch.
- Success: TODO count meaningfully down with zero fabricated keys; report the residual genuinely-unidentifiable sections.
Context: PyAutoMemory#24 design-note follow-up #1. The 856 canonical entries not yet cited by any wiki page are explicitly OUT of scope.
Full prompt: PyAutoMind active/canonical_key_todo_sweep.md.
Activity
chore: verified galaxies/methods/smbh canonical-key batch (#145)
chore: dedupe canonical bib, fix mis-keyed entries (#145)
feat: title-only and prefixed-heading matching in candidates script (#…
chore: fill 11 verified title-match sections (#145)
chore: fill 29 sections unlocked by bib cleanup + DOI re-verification (…
chore: identify papers for TODO sections; add 8 verified bib entries (#…
chore: second identification pass; add 17 verified bib entries (#145)
fix: repair six corrupted canonical entries; fill their sections (#145)
chore: fill 5 reviewed identifications; tidy Etherington2023 title (#145
chore: remove 21 placeholder 'sources' sections (#145)
Jammy2211 commentedon Nov 8, 2026
Shipped
Merged in #146 (merge commit
855eead).Canonical BibTeX key: TODOwent from 388 to 77. 290 sections are filled with a canonical key checked against the public record, and 21 placeholder sections were removed because they were not papers.scripts/canonical_key_candidates.pyis a read-only report of ranked candidates, covered by 9 tests.Do2014,Sanghvi2014.python -m scripts.canonical_key_candidatesregenerates it.Generated by Claude Code