| name | new-module |
| description | Scaffold a new Lumen module (store, ingest, search, chunker, etc.) following project patterns. TRIGGER when user asks to create, add, or scaffold a new module, extractor, or store layer. |
Scaffold New Lumen Module
Generate a new module following existing patterns. Follow all rules in CLAUDE.md.
Before Scaffolding
- Read
src/types/index.ts — check if needed types already exist
- Identify the layer:
store/ — SQLite CRUD for a table (see templates/store.ts.md)
ingest/ — content extractor for a source type (see templates/ingest.ts.md)
search/ — search signal implementation
chunker/ — format-specific chunker
compress/ — compression pipeline stage
graph/ — graph algorithm
delta/ — change tracking
- Check if a stub file already exists (many have placeholder comments)
Steps
- Add new types to
src/types/index.ts if needed
- Create the module following the template in
templates/
- If store module: add the table to
src/store/schema.ts and bump CURRENT_VERSION
- If ingest module: wire into
src/ingest/file.ts router
- Run
npx tsc --noEmit to verify
- Run
npx prettier --write on new files