Optimize project CLAUDE.md from 105 to 42 lines

- Trim keyword triggers to distinctive terms per topic
- Remove redundant loading convention, directory triggers, priority sections
- Remove documentation structure tree (discoverable from repo)
- Consolidate file extension triggers into special loads
- Shrink maintenance section to just the auto-prompts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-02-14 08:17:04 -06:00
parent b237d6c056
commit 9c59b07baa

116
CLAUDE.md
View File

@ -9,96 +9,34 @@
- At session end, ask: "Should I update our documentation?"
- At 25% context remaining, ask: "Should I update docs before we lose context?"
## Automatic Context Loading
## Context Loading
When a topic comes up, load `{tech}/CONTEXT.md` + `{tech}/troubleshooting.md`. For scripts, also load `{tech}/scripts/CONTEXT.md`.
### Loading Convention (applies to all technologies below)
For each technology directory `{tech}/`:
- Auto-load: `{tech}/CONTEXT.md` (overview, patterns, best practices)
- Auto-load: `{tech}/troubleshooting.md` (errors, debugging, emergency procedures)
- If in `{tech}/scripts/`: Also load `{tech}/scripts/CONTEXT.md`
| Keywords | Directory |
|----------|-----------|
| tdarr, transcode, ffmpeg, nvenc | `tdarr/` |
| docker, container, compose, dockerfile | `docker/` |
| vm, proxmox, kvm, hypervisor | `vm-management/` |
| nginx, proxy, dns, firewall, ssh, ssl, pihole | `networking/` |
| monitoring, alert, uptime kuma, discord health check | `monitoring/` |
| productivity, n8n, workflow, automation, ko-fi | `productivity/` |
| openclaw, ai assistant, autonomous agent | `productivity/openclaw/` |
| jellyfin, plex, media server, watchstate | `media-servers/` |
| yt-dlp, playwright, media download, web scraping | `media-tools/` |
| steam, proton, steam tinker launch, gaming | `gaming/` |
| server config, gitea config, infrastructure | `server-configs/` |
| database, postgres, redis, sql | `databases/` |
### Keyword Triggers
| Keywords | Tech Directory |
|----------|----------------|
| tdarr, transcode, ffmpeg, gpu transcoding, nvenc, scheduler | `tdarr/` |
| docker, container, image, compose, kubernetes, k8s, dockerfile, podman | `docker/` |
| virtual machine, vm, proxmox, kvm, hypervisor, guest, virtualization | `vm-management/` |
| network, nginx, proxy, load balancer, dns, port, firewall, ssh, ssl, tls, npm, nginx proxy manager, reverse proxy, pihole, pi-hole, orbital sync | `networking/` |
| monitoring, alert, notification, discord, health check, status, uptime, uptime kuma, status page, windows reboot, system monitor, gpu monitor, nvidia monitor | `monitoring/` |
| task, todo, productivity, task manager, brain dump, focus, adhd, task tracking, context switch, task dashboard, n8n, workflow, automation, webhook, integration, ko-fi | `productivity/` |
| openclaw, ai assistant, personal assistant, minimax, autonomous agent, agent skills | `productivity/openclaw/` |
| jellyfin, plex, emby, media server, streaming, watchstate, watch history, nvidia driver, gpu transcoding | `media-servers/` |
| media download, video download, yt-dlp, playwright, pokeflix, streaming scraper, web scraping, media archival | `media-tools/` |
| gaming, steam, proton, steam tinker launch, stl, ready or not, gamescope, gamemode, dxvk, wine, windows games, linux gaming | `gaming/` |
| server config, lxc config, docker compose deploy, infrastructure config, gitea, n8n config, foundry config, home assistant config, config sync | `server-configs/` |
| database, sql, postgres, mysql, redis, mongodb, db optimization, query performance, database backup, connection pooling, schema migration | `databases/` |
**Special cases:**
- Pi-hole keywords → also load `networking/pihole-ha-setup.md`
- n8n keywords → also load `productivity/n8n/CONTEXT.md`
- Ko-fi keywords → also load `productivity/n8n/workflows/kofi-paper-dynasty.md`
- Jellyfin keywords → also load `media-servers/jellyfin-ubuntu-manticore.md`
### Directory Triggers
- Working in `/tdarr/`, `/docker/`, etc. → auto-load that tech's CONTEXT.md + troubleshooting.md
- Working in `/tdarr/scripts/`, etc. → auto-load parent CONTEXT.md + scripts/CONTEXT.md + troubleshooting.md
### Troubleshooting Triggers
Keywords: shutdown, stop, emergency, reset, recovery, crash, broken, not working, error, issue, problem, debug, troubleshoot, fix
- Detect tech from context → load BOTH CONTEXT.md AND troubleshooting.md
### File Extension Triggers
- `.py``development/python-CONTEXT.md`
- `.js`, `.mjs`, `.ts``development/nodejs-CONTEXT.md`
- `.sh`, `.bash`, `.zsh``development/bash-CONTEXT.md`
### Loading Priority
1. File extension triggers (highest)
2. Directory context
3. Keyword triggers (additive)
4. Load 3-4 files max per trigger
## Documentation Structure
```
/{technology}/ # Each tech is self-contained
├── CONTEXT.md # Overview, patterns, best practices
├── troubleshooting.md # Errors, debugging, emergency recovery
├── examples/ # Working configs and templates
└── scripts/
├── CONTEXT.md # Script-specific docs
└── *.py, *.sh # Active operational scripts (production code)
/development/ # Cross-tech language patterns
├── python-CONTEXT.md
├── nodejs-CONTEXT.md
└── bash-CONTEXT.md
```
Technologies: tdarr, docker, vm-management, networking, monitoring, productivity, productivity/openclaw, productivity/n8n, media-servers, media-tools, gaming, server-configs, databases
**Special loads:**
- Pi-hole → also `networking/pihole-ha-setup.md`
- n8n → also `productivity/n8n/CONTEXT.md`
- Ko-fi → also `productivity/n8n/workflows/kofi-paper-dynasty.md`
- Jellyfin → also `media-servers/jellyfin-ubuntu-manticore.md`
- `.py` files → `development/python-CONTEXT.md`
- `.js/.ts` files → `development/nodejs-CONTEXT.md`
- `.sh/.bash` files → `development/bash-CONTEXT.md`
## Documentation Maintenance
### Auto-prompt when:
1. **New tech** without dedicated directory → "Should I create `/{tech}/` structure?"
2. **New error solved** → "Should I add to `{tech}/troubleshooting.md`?"
3. **New scripts created** → "Should I update `{tech}/scripts/CONTEXT.md`?"
4. **Session end with changes** → "Should I update documentation?"
### Update checklist:
- `{tech}/CONTEXT.md` for new patterns/architecture
- `{tech}/troubleshooting.md` for new errors/solutions
- `{tech}/scripts/CONTEXT.md` for new procedures
- Main CLAUDE.md if new keywords/triggers needed
### Validation (periodic):
- All tech dirs have keyword triggers
- Loading paths match actual files
- Each tech has CONTEXT.md + troubleshooting.md
### Warning triggers:
- Working with tech lacking docs structure
- Solving problems not in troubleshooting guides
- Creating scripts without CONTEXT.md
- Loading rules reference missing files
- New tech without a directory → offer to create `/{tech}/` structure
- New error solved → offer to add to `{tech}/troubleshooting.md`
- New scripts created → offer to update `{tech}/scripts/CONTEXT.md`