From 27cd0b26c0087a36abf05a4dfe04a06ae2b4de90 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 16 Mar 2026 17:55:17 -0700 Subject: [PATCH] describe lexgen workflow --- CLAUDE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 2317a3fd..00fe4923 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,6 +45,14 @@ Documents are composed of **blocks** (text, image, embed, code, poll, etc.). Blo - **Appview** (`appview/`) consumes the firehose to index published content - **Feeds** (`feeds/`) provides subscription feeds for publications +### Lexicon Workflow + +The source of truth for lexicon schemas is the TypeScript files in `lexicons/src/` (e.g. `facet.ts`, `publication.ts`, `blocks.ts`). The JSON files in `lexicons/pub/` are **generated output** — do not edit them directly, as `npm run lexgen` will overwrite them. + +To add or modify a lexicon: +1. Edit the relevant source file in `lexicons/src/` +2. Run `npm run lexgen` to regenerate both the JSON schemas and the TypeScript API types in `lexicons/api/` + ### Key Directories - `app/` - Next.js App Router pages and API routes -- 2.51.2