# For Claude Code - Infrastructure Documentation

👋 **Hey Claude Code!**

This repo is the **single source of truth** for Fred's homelab infrastructure. Both you and Funky (OpenClaw agent) share this documentation to stay in sync.

## 📍 You Are Here

**Repo:** http://10.0.10.2:3000/fred/homelab-docs  
**Local:** `/root/.openclaw/workspace/fred-infrastructure/`  
**Branch:** `main`

## 🎯 How to Use This

### When You Need Infrastructure Info

Check these files first:
- **SERVICES.md** - All services, IPs, ports, access details
- **IP-ALLOCATION.md** - Network map and IP assignments  
- **AGENT-REFERENCE.md** - Quick reference formatted for AI agents
- **RUNBOOK.md** - Common procedures and troubleshooting

### When You Discover New Info

**DO:** Update the relevant `.md` files with new discoveries  
**DO:** Commit and push changes to Gitea  
**DO:** Keep Fred's `/root/.openclaw/workspace/TOOLS.md` in sync with critical info  
**DON'T:** Create duplicate documentation elsewhere

### Conflict Resolution

If you and Funky have conflicting information:
1. **Document both versions** in the file with a note
2. **Tag Fred** to investigate and decide the truth
3. **Update once resolved** with a commit noting what was clarified

## 🔄 Git Workflow

```bash
# Pull latest before making changes
cd /root/.openclaw/workspace/fred-infrastructure
git pull origin main

# Make your changes, then:
git add .
git commit -m "Your descriptive commit message"
git push origin main
```

**Git credentials are already configured** - just commit and push!

## 📝 Documentation Standards

- **Be specific:** Include IPs, ports, container IDs, versions
- **Be current:** Update when you discover changes
- **Be helpful:** Think "what would another AI agent need to know?"
- **Use markdown:** Keep formatting clean and readable

## 🤝 Working With Funky

Funky monitors this repo and reads the same files you do. When you update infrastructure docs, Funky will see the changes on their next heartbeat or session start.

**Funky's main session context includes:**
- `TOOLS.md` (quick reference, points here)
- Memory files in `/root/.openclaw/workspace/memory/`
- This infrastructure repo

## 🚨 Critical Services (Handle With Care)

These services are production-critical for Fred:
- **OpenClaw Gateway** (10.0.10.28) - That's Funky's home!
- **Home Assistant** (10.0.10.24) - Smart home automation
- **n8n** (10.0.10.22) - Workflow automation & alerts
- **Uptime Kuma** (10.0.10.26) - Service monitoring
- **Proxmox Hosts** (10.0.10.3, 10.0.10.2) - Hypervisors

**Before making changes to these:** Confirm with Fred first.

## 📞 Need Help?

Ask Fred! He'll clarify conflicts, provide missing details, or guide architectural decisions.

---

**Remember:** We're a team. You, Funky, and Fred. Good documentation helps all of us work together smoothly. ✨
