2026-01-13 21:07:14 -08:00
# CLAUDE.md
2026-02-04 07:09:28 -08:00
Guidance for Claude Code working in this repository. See also [[ai-assistance-guide]].
2026-01-13 21:07:14 -08:00
2026-02-04 07:09:28 -08:00
## Overview
2026-01-13 21:07:14 -08:00
2026-02-04 07:09:28 -08:00
blumeops is Erich Blume's GitOps repository for personal infrastructure, orchestrated via tailnet `tail8d86e.ts.net` .
2026-01-13 21:07:14 -08:00
2026-02-04 07:09:28 -08:00
**CRITICAL: Public repo at github.com/eblume/blumeops - never commit secrets!**
2026-01-15 09:02:27 -08:00
2026-01-16 18:47:47 -08:00
## Rules
2026-01-13 21:07:14 -08:00
2026-02-04 07:23:12 -08:00
1. **Always run `mise run zk-docs -- --style=header --color=never --decorations=always` at session start **
This will refresh your context with important information you will be assumed to know and follow.
2. **Always use `--context=minikube-indri` with kubectl ** - work contexts must never be touched
2026-02-04 07:09:28 -08:00
3. **Feature branches only ** - checkout main, pull, create branch, commit often
4. **Create PRs via `tea pr create` ** - user reviews before deploy, merges after
5. **Check PR comments with `mise run pr-comments <pr_number>` ** before proceeding
6. **Add changelog fragments ** - `docs/changelog.d/<branch>.<type>.md`
2026-02-04 07:23:12 -08:00
Types: `feature` , `bugfix` , `infra` , `doc` , `ai` , `misc`
2026-02-04 07:09:28 -08:00
7. **Test before applying ** - dry runs (`--check --diff` ), syntax checks, `ssh indri '...'`
8. **Wait for user review before deploying **
9. **Never merge PRs or push to main without explicit request **
10. **Verify deployments ** - `mise run indri-services-check`
2026-01-28 20:43:51 -08:00
2026-01-20 14:55:37 -08:00
## Project Structure
```
2026-02-04 07:09:28 -08:00
./docs/ # documentation (Diataxis, Quartz)
./docs/changelog.d/ # towncrier fragments
./mise-tasks/ # scripts via `mise run`
./ansible/playbooks/ # ansible (indri.yml primary)
./ansible/roles/ # indri service roles
./argocd/apps/ # ArgoCD Application definitions
./argocd/manifests/ # k8s manifests per service
./pulumi/ # Pulumi IaC (tailnet ACLs, cloud)
~/code/personal/ # user's projects
~/code/3rd/ # mirrored external projects
~/code/work # FORBIDDEN
2026-01-16 18:47:47 -08:00
```
2026-01-20 14:55:37 -08:00
## Service Deployment
2026-02-04 07:09:28 -08:00
### Kubernetes (ArgoCD)
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
Most services run in minikube on indri via ArgoCD (app-of-apps, manual sync).
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
**PR workflow:**
1. Create branch, modify `argocd/manifests/<service>/`
2. Push, then `argocd app sync apps`
3. Test on branch: `argocd app set <service> --revision <branch> && argocd app sync <service>`
4. After merge: `argocd app set <service> --revision main && argocd app sync <service>`
2026-01-23 17:00:12 -08:00
2026-02-04 07:09:28 -08:00
**Commands:** `argocd app list|get|diff|sync <app>`
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
**Login:** `argocd login argocd.ops.eblu.me --username admin --password "$(op --vault vg6xf6vvfmoh5hqjjhlhbeoaie item get srogeebssulhtb6tnqd7ls6qey --fields password --reveal)"`
### Indri (Ansible)
Native services: Forgejo, Zot, Caddy, Borgmatic, Alloy
2026-01-20 14:55:37 -08:00
```fish
2026-02-04 07:09:28 -08:00
mise run provision-indri # full
mise run provision-indri -- --tags <role> # specific
mise run provision-indri -- --check --diff # dry run
2026-01-13 21:12:24 -08:00
```
2026-01-14 13:23:05 -08:00
2026-02-04 07:09:28 -08:00
### Routing
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
| Domain | Mechanism | Reachable from |
|--------|-----------|----------------|
| `*.ops.eblu.me` | Caddy on indri (100.98.163.89) | everywhere incl. k8s pods |
| `*.tail8d86e.ts.net` | Tailscale MagicDNS | tailnet clients only |
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
Check tailscale serve: `ssh indri 'tailscale serve status --json'`
2026-01-20 14:55:37 -08:00
2026-02-04 07:09:28 -08:00
## Container Releases
2026-01-24 13:30:26 -08:00
```fish
2026-02-04 07:09:28 -08:00
mise run container-list # show images/tags
mise run container-release <name> <version> # tag and build
2026-01-24 13:30:26 -08:00
```
2026-01-17 17:34:53 -08:00
## Third-Party Projects
2026-02-04 07:09:28 -08:00
Ask user to mirror on forge first, then clone to `~/code/3rd/<project>/` .
2026-01-17 17:34:53 -08:00
2026-01-16 18:47:47 -08:00
## Task Discovery
2026-01-14 13:23:05 -08:00
2026-01-16 18:47:47 -08:00
```fish
2026-02-04 07:09:28 -08:00
mise run blumeops-tasks # fetch from Todoist, sorted by priority
2026-01-14 13:23:05 -08:00
```
2026-01-16 18:47:47 -08:00
## Credentials
2026-02-04 07:09:28 -08:00
Root store is 1Password. Never grab directly - use existing patterns (ansible pre_tasks, external-secrets, scripts with `op` CLI). Warn user before any credential access.