Background
sci-brain's knowledge bases handle papers first-class (arXiv IDs, DOIs), but books only incidentally: a book or chapter with a DOI rides the DOI path if Semantic Scholar knows it; anything else enters as a hand-written stub with hand-written BibTeX — no metadata fetch, no validation. bibtex_to_manifest.py recognizes only eprint and doi fields. papis treats books as first-class citizens via an ISBN importer and per-type BibLaTeX knowledge (@book requires publisher/year, etc.). Research KBs need textbooks and monographs (e.g. Hewson's The Kondo Problem appears as a bare stub in quantum.harness's KB today). Motivation and full papis analysis: #30.
Objective
Make ISBN a supported identifier in download-ref: metadata fetched from an open bibliographic API, rendered as a typed KB entry, @book BibTeX generated — with the existing stub mechanism as the explicit no-metadata fallback.
Interface (Input → Output)
In: manifest schema gains "isbn": ["9780521599474", ...] (ISBN-10 or -13, hyphens tolerated and normalized); bibtex_to_manifest.py additionally recognizes isbn = {…} fields.
Out:
.raw/isbn/<isbn13>.json — normalized metadata (title, authors in the S2 shape, year, publisher) with a metadata_source marker.
- Rendered
<isbn13>_<slug>.md with frontmatter type: book, canonical_id: <isbn13>, isbn:, full_text: no (no PDF fetch — books are not legally downloadable; the note: key can point to a shelf/ebook).
append_bibtex.py propose/append emits @book{lastname_year_keyword, title, author, publisher, year, isbn}.
INDEX.md lists the entry (— in the full-text column).
Technical recommendations (non-binding)
OpenLibrary's https://openlibrary.org/isbn/<isbn>.json (+ authors endpoint) is keyless and stdlib-friendly; Google Books is an alternative. Normalize ISBN-10→13 with the standard check-digit arithmetic (~15 lines, no isbnlib dependency). Renderer support is a small render_isbn() following render_stubs' shape.
Verification
- Known-answer positive: manifest with ISBN
9780521599474 → .raw/isbn/9780521599474.json written; rendered .md frontmatter has type: book and title matching the OpenLibrary record for that ISBN (Hewson, The Kondo Problem to Heavy Fermions, Cambridge University Press — paste the fetched values in the PR); append_bibtex.py propose returns an @book entry containing publisher and year — which proves the full identifier→metadata→render→bib chain.
kb_doctor's bib-required-keys (companion issue) passes on the generated @book entry — machine-checked type correctness. Until kb_doctor lands, assert the two fields are present with a grep pair in the test.
- Negative controls: (a) syntactically invalid ISBN
1234567890128 (bad check digit) → rejected at manifest validation with a clear message, no network call; (b) well-formed but unassigned ISBN → miss line, no files written, exit without traceback.
- Regression: existing arXiv/DOI manifests produce byte-identical results (new key is additive).
Assumes
- OpenLibrary's coverage of the chosen verification ISBN is stable; if it drifts, substitute another canonical physics textbook ISBN and record it in the PR.
Dependencies
Part of #30. Pairs with the importer-chain child (shared normalization) and kb_doctor child (bib-required-keys).
Out of scope
Book PDF/EPUB retrieval; theses/reports (@phdthesis, @techreport — same pattern, add on demand); ISBN identity dedup beyond exact-match (covered by the dedup child once ISBN lands).
🤖 Generated with Claude Code
Background
sci-brain's knowledge bases handle papers first-class (arXiv IDs, DOIs), but books only incidentally: a book or chapter with a DOI rides the DOI path if Semantic Scholar knows it; anything else enters as a hand-written stub with hand-written BibTeX — no metadata fetch, no validation.
bibtex_to_manifest.pyrecognizes onlyeprintanddoifields. papis treats books as first-class citizens via an ISBN importer and per-type BibLaTeX knowledge (@bookrequires publisher/year, etc.). Research KBs need textbooks and monographs (e.g. Hewson's The Kondo Problem appears as a bare stub in quantum.harness's KB today). Motivation and full papis analysis: #30.Objective
Make ISBN a supported identifier in
download-ref: metadata fetched from an open bibliographic API, rendered as a typed KB entry,@bookBibTeX generated — with the existing stub mechanism as the explicit no-metadata fallback.Interface (Input → Output)
In: manifest schema gains
"isbn": ["9780521599474", ...](ISBN-10 or -13, hyphens tolerated and normalized);bibtex_to_manifest.pyadditionally recognizesisbn = {…}fields.Out:
.raw/isbn/<isbn13>.json— normalized metadata (title,authorsin the S2 shape,year,publisher) with ametadata_sourcemarker.<isbn13>_<slug>.mdwith frontmattertype: book,canonical_id: <isbn13>,isbn:,full_text: no(no PDF fetch — books are not legally downloadable; thenote:key can point to a shelf/ebook).append_bibtex.py propose/appendemits@book{lastname_year_keyword, title, author, publisher, year, isbn}.INDEX.mdlists the entry (— in the full-text column).Technical recommendations (non-binding)
OpenLibrary's
https://openlibrary.org/isbn/<isbn>.json(+ authors endpoint) is keyless and stdlib-friendly; Google Books is an alternative. Normalize ISBN-10→13 with the standard check-digit arithmetic (~15 lines, no isbnlib dependency). Renderer support is a smallrender_isbn()followingrender_stubs' shape.Verification
9780521599474→.raw/isbn/9780521599474.jsonwritten; rendered.mdfrontmatter hastype: bookand title matching the OpenLibrary record for that ISBN (Hewson, The Kondo Problem to Heavy Fermions, Cambridge University Press — paste the fetched values in the PR);append_bibtex.py proposereturns an@bookentry containingpublisherandyear— which proves the full identifier→metadata→render→bib chain.kb_doctor'sbib-required-keys(companion issue) passes on the generated@bookentry — machine-checked type correctness. Until kb_doctor lands, assert the two fields are present with a grep pair in the test.1234567890128(bad check digit) → rejected at manifest validation with a clear message, no network call; (b) well-formed but unassigned ISBN →missline, no files written, exit without traceback.Assumes
Dependencies
Part of #30. Pairs with the importer-chain child (shared normalization) and kb_doctor child (
bib-required-keys).Out of scope
Book PDF/EPUB retrieval; theses/reports (
@phdthesis,@techreport— same pattern, add on demand); ISBN identity dedup beyond exact-match (covered by the dedup child once ISBN lands).🤖 Generated with Claude Code