# Home Lab Documentation System

## Core Instructions
- Always have permission to run tests
- Check imports when writing code (prevent NameErrors)
- Temp files go in `.claude/tmp/`, clean up after
- Prefer editing existing files over creating new ones
- After complex tasks, prompt to save learnings to cognitive memory
- At session end, ask: "Should I update our documentation?"
- At 25% context remaining, automatically run `/save-memories` before compaction loses detail

## Context Loading
When a topic comes up, load `{tech}/CONTEXT.md` + `{tech}/troubleshooting.md`. For 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/` |
| backup, restic, snapshot, restore, retention | `backups/` |
| workstation, dotfiles, symlink, fish, starship, mangohud, zed, fish config, fish alias, tmux, tmux alias | `workstation/` |
| tui testing, mcp-tui-driver, tui automation, terminal ui test | `development/tui-testing.md` |
| scheduled task, claude-scheduled, headless claude, timer, cowork | `~/.claude/skills/create-scheduled-task/SKILL.md` |

**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
- 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`
