# LonZibaldoni — Claude Code Project Context
## What this is
Lon Setnik's Obsidian vault, dual-purpose:
- **Outward**: blog/digital garden at simulafunist.com (Obsidian Publish + custom JS/CSS)
- **Inward**: PKM/work system (notes, idea guides, journal, work projects)
## Key files
| File | Purpose |
|---|---|
| `publish.js` | Custom SPA layer on top of Obsidian Publish. Contains inlined AG_INDEX JSON between `/* AG_INDEX_START */` and `/* AG_INDEX_END */` markers. Do not edit those markers. |
| `publish.css` | Custom theme for simulafunist.com. Warm parchment palette with dark mode support via `@media (prefers-color-scheme: dark)`. |
| `scripts/generate_index.py` | Scans all published folders, extracts frontmatter/excerpts/links, writes index into notes-index.js AND inline into publish.js. **Run this after any note changes.** |
| `scripts/watch_and_index.sh` | fswatch watcher — runs generate_index.py with 3s debounce on .md changes. |
| `notes-index.js` | Standalone fallback index (window.AG_INDEX). Regenerated by generate_index.py. |
| `.obsidian/publish.json` | Obsidian Publish config — controls which folders are published. |
## Running the index generator
```bash
cd /Users/lonsetnik/Documents/LonZibaldoni
python3 scripts/generate_index.py
```
## Vault structure
```
🐓 Idea Farm/
🏠 Home/ # Internal notes, journal, home page ("😀 Better is always possible.md")
🗺️ Idea Guides/ # Long-form synthesis guides (e.g. Teaming, Writing, Leading)
🌿 Ideas/ # Atomic notes
✍️ Writing/ # Essays, fiction, reflections
⛰️ Adventures/ # Trip reports
📚 Books/ # Book notes
📄 Papers/ # Academic paper notes
💬 Quotes/ # Quote notes
🗂️ Resources/ # Reference material
```
## Section mapping (derive_section in generate_index.py)
Each folder maps to a section name used throughout the JS: Writing, Guides, Books, Papers, Quotes, Adventures, Ideas, Resources, Home.
## Key frontmatter fields
- `publish: false` — exclude from Obsidian Publish
- `note_type: index` — excluded from garden card grid
- `note_type: section_index` — triggers section landing page renderer in publish.js
- `section:` — overrides derived section (rarely used)
- `stage:` — bloom / growing / seed (used for section page grouping)
- `adequacy:` — alternative to stage
- `category:` — freeform category shown on cards
- `title:` — overrides filename as display title
## publish.js architecture
- **AG_INDEX**: inlined JSON of all published notes (1,008 notes as of 2026-05-30)
- **buildHomePage(area)**: injects section dropdown + search + card grid on home page
- **buildSectionPage(area, sectionNote)**: renders section landing page for `note_type: section_index` notes — groups by stage (bloom/growing/seed), with search
- **addNoteMetaBar(area)**: injects read time / stage / category chips on individual note pages
- **addGraphButton()**: floating 🌿 button, opens D3 force-directed graph overlay
- **addScheduleLink()**: injects "📅 Schedule with me" → cal.com/lon-setnik into header
- **SPA polling**: setInterval every 250ms checks location.pathname for Obsidian Publish navigation
## Home page
The home page note is `🐓 Idea Farm/🏠 Home/😀 Better is always possible.md`. Its URL on the live site is the one registered in HOME_SLUGS in publish.js. The garden card grid is injected on this page only (when isHomePage() returns true).
## Section landing pages (Option A — in progress)
- Create a note with `note_type: section_index` and `section: <SectionName>` in the target folder
- publish.js detects it and renders a grouped card grid (by stage) + search
- Writing.md was created as the first test: `🐓 Idea Farm/✍️ Writing/Writing.md`
- After creating section index notes, run generate_index.py and publish publish.js
## Excluded from index
- `🐓 Idea Farm/🏠 Home/Journal/`
- `🐓 Idea Farm/🏠 Home/Seasonal Notes/`
- `🐓 Idea Farm/🏠 Home/Dataview/`
- `🐓 Idea Farm/🏠 Home/Financial/`
- Notes with `publish: false` in frontmatter
## CSS variables (light mode defaults, dark mode overrides in @media)
```
--ag-parchment page background
--ag-paper card / input background
--ag-linen sidebar / header background
--ag-tan borders
--ag-walnut primary text
--ag-taupe secondary text
--ag-warm-grey muted / labels
--ag-terracotta accent (buttons, active states)
--ag-burnt headings
--ag-sage links
--ag-amber tags / warm accent
```
## Deploy process
1. Edit publish.js / publish.css / notes locally
2. Run `python3 scripts/generate_index.py` (updates inline index in publish.js)
3. Open Obsidian → Publish panel → publish changed files
4. Changes are live on simulafunist.com immediately
## Current active work
- **Section landing pages**: Writing.md created, buildSectionPage() implemented. Next: create index notes for Guides, Adventures, Books, Ideas, Papers, Quotes, Resources. Then wire up navigation from home page dropdown to section pages.
- **Site issues resolved**: sidebar hidden, "ON THIS PAGE" TOC hidden, full-width layout, schedule link in header, Home section notes excluded from card grid, dark mode CSS variables
- **Pending content work** (lower priority):
- Idea Guides work order: Writing → Teaming → Changing → Mentoring → Prebriefing → Leading
- Vault pruning: delete 12 empty stubs, merge duplicates, cross-pollinate 25 untagged notes
- Littleton Pediatric Readiness cluster: tag with #on/pediatric-readiness
## Notes on Obsidian Publish limitations
- Dataview does NOT render on Publish — use publish.js + AG_INDEX instead
- Direct URL navigation to note paths works on simulafunist.com (confirmed)
- Custom domain is simulafunist.com; Obsidian Publish host is publish-01.obsidian.md
- publish.js and publish.css are served as-is; no build step needed