# Moby Dick — A Basic Memory Knowledge Graph
The complete text of *Moby-Dick* modeled as a Basic Memory knowledge graph. About 215,000 words of source, 138 chapter notes, 23 characters, 10 themes, 6 locations, 10 symbols, 8 literary devices, and roughly 1,800 relations linking them.
We built it to stress-test Basic Memory's schema, tasks, and metadata-search skills at the hardest scale we could think of, and to ship the result as a reusable [`memory-literary-analysis`](skills/memory-literary-analysis/SKILL.md) skill so anyone can apply the same pattern to a novel, play, poetry collection, or any long-form work.
It is also the case study for the [Deep research playbook](https://basicmemory.com/playbooks/deep-research) on basicmemory.com.
## What's in here
```
basic-memory/ → the knowledge graph
├── schema/ → 6 picoschema definitions
├── chapters/ → 138 chapter notes (135 + Etymology, Extracts, Epilogue)
├── characters/
│ ├── major/ → 15 major characters
│ └── minor/ → 8 minor characters
├── themes/ → 10 thematic notes
├── locations/ → 6 settings
├── symbols/ → 10 symbol notes
├── literary-devices/ → 8 device notes
└── analysis/ → 4 meta-analysis notes + 2 Obsidian canvases
docs/
├── moby-dick-plan.md → the plan written before any chapter was processed
└── lithos-site.md → how to browse the graph as a static site
skills/
└── memory-literary-analysis/SKILL.md
→ reusable pipeline for any literary work
moby-dick.txt → the source text (Project Gutenberg #2701)
```
## How it was built
Five phases, documented in [`docs/moby-dick-plan.md`](docs/moby-dick-plan.md) and codified in [`skills/memory-literary-analysis/SKILL.md`](skills/memory-literary-analysis/SKILL.md).
1. **Schemas.** Six entity types (`Character`, `Theme`, `Chapter`, `Location`, `Symbol`, `LiteraryDevice`) defined in Basic Memory's picoschema format. Each names its observation categories and relation types.
2. **Seed.** Stub notes for the major characters, themes, locations, and symbols, so `[[wiki-links]]` resolved from the very first chapter processed.
3. **Process.** Chapter by chapter, in batches of about ten. Per chapter: a chapter note (POV, setting, events, quotes, significance), then appended observations on every related character, theme, symbol, and location.
4. **Cross-reference.** Full character arc summaries, theme-evolution observations, parallels and contrasts between structurally similar chapters, plus the analysis notes in `analysis/`.
5. **Validate and visualize.** `schema_validate` per entity type and the two canvas files in `analysis/` for the character web and theme map.
The Captain Ahab note ended up with about 50 chapter-attributed observations and a dozen direct Melville quotes. Every other major character and theme has a parallel structure. Ask an AI assistant connected to the project "how does Ahab's monomania evolve from Chapter 36 to Chapter 132?" and it walks the graph instead of re-reading the novel.
## Use it
### Open the graph in Basic Memory
Clone the repo, then open the `basic-memory/` directory as a Basic Memory project. Any MCP-connected AI assistant (Claude, ChatGPT, Cursor, and so on) can then read and query the graph directly.
### Browse it as a static site (Lithos)
[Lithos](https://github.com/jwintz/lithos) treats the same folder as a vault and generates a browsable site with a force-directed graph view, full-text search, and clickable wiki-links. See [`docs/lithos-site.md`](docs/lithos-site.md) for the exact setup. The interactive graph at `/graph` is the fastest way to feel the scale of the thing.
### Adapt the pattern to a different work
Read the skill at [`skills/memory-literary-analysis/SKILL.md`](skills/memory-literary-analysis/SKILL.md). The pipeline is generic. Swap `Chapter` for `Section` in non-fiction, `Act` and `Scene` for a play, `Poem` for a poetry collection. The skill includes guidance per genre and per work length.
## Source
The text of *Moby-Dick* is from [Project Gutenberg #2701](https://www.gutenberg.org/ebooks/2701), public domain. The notes, schemas, analysis, and the skill itself are produced by Basic Memory and are released under the same license as the rest of [Basic Memory](https://github.com/basicmachines-co/basic-memory).
## Links
- The Deep research playbook on the marketing site: <https://basicmemory.com/playbooks/deep-research>
- Basic Memory: <https://github.com/basicmachines-co/basic-memory>
- Basic Memory docs: <https://docs.basicmemory.com>
- Project Gutenberg #2701: <https://www.gutenberg.org/ebooks/2701>