feat(skills): add read-book and book-to-notes skills - #13671
Conversation
Add two complementary note-taking skills for deep reading and knowledge extraction: - read-book: Socratic four-pass protocol (structural, emphatic, critical, syntopical) based on Adler's How to Read a Book. Produces original synthesis, not summaries. - book-to-notes: Automated extraction pipeline for long texts. Uses subagent delegation with disk-state pattern to handle books up to ~400 pages without context overflow. Includes chapter splitting script and subagent quality checklist. Both skills are vault-agnostic and configurable via BOOK_VAULT_PATH. Tested end-to-end on a 314-page psychology text (Csikszentmihalyi, Flow), producing 66 atomic notes and 12 concept pages. Requires: terminal, files, delegate toolsets (declared in metadata).
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the long-form reading workflow and the reusable splitting helper. The capability remains distinct from current llm-wiki, but this needs a few corrections before salvage.
Problems
skills/note-taking/book-to-notes/SKILL.md:13requiresfilesanddelegate, while current toolsets arefileanddelegation(toolsets.py:191-195,toolsets.py:245-248). The prompt builder hides a skill when any required toolset is absent (agent/prompt_builder.py:1418-1421).SKILL.md:23putsBOOK_VAULT_PATHin.env;AGENTS.md:888-914requires behavioral settings inconfig.yaml. The existing skill-config mechanism is documented inagent/skill_utils.py:622-765.scripts/split_book.py:7advertises a non-capturing--pattern, but line 42 depends on captures being retained byre.split, so that documented form cannot yield title/content pairs.- The added skills do not meet current description, contributor-credit, and test requirements (
AGENTS.md:888-900,AGENTS.md:926-950).
Suggested changes
- Use
[terminal, file, delegation], migrate vault configuration tometadata.hermes.config, and add focused skill/script tests. - Make custom chapter patterns work without capture groups, or validate the required capture group explicitly.
Automated hermes-sweeper review.
| category: note-taking | ||
| related_skills: [read-book, ocr-and-documents, obsidian, llm-wiki] | ||
| requires_toolsets: [terminal, files, delegate] | ||
| --- |
There was a problem hiding this comment.
files and delegate are not current toolset names (file and delegation are). Because required toolsets are an all-required visibility gate, this makes the skill hidden when normal toolset filtering is active. Please use [terminal, file, delegation] and add a visibility regression test.
|
|
||
| This skill writes to a configurable vault. Set your preferred path via environment variable: | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
This is a non-secret behavioral setting, so it must not be introduced through .env. Declare a metadata.hermes.config path setting instead; Hermes resolves those under skills.config.* and can prompt for it during setup.
| return None | ||
|
|
||
| parts = re.split(pattern, text) | ||
| if len(parts) < 3: |
There was a problem hiding this comment.
The documented --pattern "CHAPTER\\s+[0-9]+" has no capture group. re.split then drops the marker, while the loop below assumes alternating marker/content entries. Either split from finditer spans or validate and document a required capture group; add a test for the advertised command.
Add two complementary note-taking skills for deep reading and knowledge extraction from long-form texts, filling the missing ingestion layer for the LLM Wiki.
What does this PR do?
The
llm-wikiskill provides an excellent architecture for persistent knowledge — raw sources, cross-linked concept pages, schema enforcement, and querying. But its ingestion flow assumes the agent can hold the entire source in context. This works for articles and papers, but fails for books: a 300-page text is ~100k tokens, which degrades quality and buries early chapters.This PR adds the missing long-form ingestion layer:
read-book— A Socratic four-pass reading protocol (structural → emphatic → critical → syntopical) based on Adler's How to Read a Book. The agent does not summarize; it produces original understanding: reframed models, critiques, applications, or teachings.book-to-notes— A Zettelkasten ingestion pipeline for books too long for single-context processing. Uses subagent delegation with disk-state pattern:Tested end-to-end on Flow: The Psychology of Optimal Experience (Csikszentmihalyi, 314 pages): 5 subagent chunks, 66 atomic notes, 39 preserved quotes, 12 cross-linked concept pages.
Both skills are vault-agnostic (default
~/notes/, configurable viaBOOK_VAULT_PATH) and feed directly into the existingllm-wikiskill's concept/entity layer.Related Issue
No existing issue. This is a new capability gap identified during real-world usage.
Type of Change
Changes Made
skills/note-taking/read-book/SKILL.md— Deep reading protocol (Adler's four passes: structural, emphatic, critical, syntopical)skills/note-taking/book-to-notes/SKILL.md— Zettelkasten extraction pipeline with subagent delegation, disk-state pattern, and architecture decisionsskills/note-taking/book-to-notes/scripts/split_book.py— Cross-platform chapter splitting utility (pure Python stdlib + pathlib)skills/note-taking/book-to-notes/templates/reading-tool.md— Subagent quality checklist enforcing two-pass extraction, concept crystallization, and anti-parroting guardsHow to Test
~/books/)pdftotext book.pdf book.txtto extract text (Unix; on Windows useocr-and-documentsskill or pymupdf fallback)Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass (ranpytest tests/cli -q— 476 passed; skills are markdown files, not exercised by core test suite)Documentation & Housekeeping
split_book.pyis pure Python stdlib + pathlib; pdftotext recommendation is Unix-only but skill documents EPUB and OCR fallbacksFor New Skills
split_book.pyis pure stdlib.pdftotextis recommended but advisory; skill documents EPUB and OCR fallbackshermes --toolsets skills -q "Use the X skill to do Y"— skills load inhermes skills listandhermes chat; tested ingestion pipeline on 314-page book producing 66 atomic notes and 12 concept pagesScreenshots / Logs
Tested on Flow: The Psychology of Optimal Experience (Mihaly Csikszentmihalyi, 314 pages, 10 chapters)