Add formatters, hooks, memory entries and context-load improvements

- formatters/js, md, yaml: new/updated formatter scripts
- hooks/set-wezterm-profile.sh: new hook for WezTerm profile switching
- scripts/context-load: improvements from recent sessions
- HOOKS.md, MEMORY.md: updated documentation and index entries
- memory/log, memory/reference-infrastructure-docs.md: session logs and reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul O'Reilly
2026-03-19 10:54:49 +13:00
parent 9d747199fc
commit c3557a3d97
9 changed files with 200 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
# Session Log — 2026-03-18
## Summary
Created a shared infrastructure catalog repo (`homelab/infrastructure-docs`) documenting all homelab systems with dependency tracking. 20 system files covering physical hosts, cluster core, networking, identity, platform services, and applications.
## Decisions
- Decision: Infrastructure knowledge goes in a dedicated repo, not MEMORY.md — Rationale: Infrastructure maps are authoritative and maintained (add/remove systems), not accumulated learnings. Different lifecycle than gotchas/reflections.
- Decision: Located at `~/dev/claude/docs/infrastructure/homelab/` with parent structure supporting future locations (e.g., customer sites) — Rationale: User expects to have infrastructure at multiple logical locations in future.
- Decision: Repo in `homelab` org on Gitea, not `skynet` — Rationale: Infrastructure documentation, not AI-focused.
- Decision: Each system file uses consistent structure (what it does, depends on, depended on by, managed by) — Rationale: Enables tracing dependencies in either direction.
## Gotchas Discovered
- **[gitea]** Symptom: Push to new repo failed with "User permission denied for writing" — Fix: The SSH alias `gitea.oreillyit.nz-homelab` authenticates as `cluster-administrator`, but repo was created by `ai_admin` via API. Added `cluster-administrator` as admin collaborator via API before push succeeded.
## Key Context
- `ai_admin` Gitea token is in `cluster-bootstrap/local_secrets/gitea_ai_admin` (not in `~/dev/claude/secrets/`)
- Created repo via Gitea API: `POST /api/v1/orgs/homelab/repos`
- Added collaborator via API: `PUT /api/v1/repos/homelab/infrastructure-docs/collaborators/cluster-administrator`
- Memory reference added to both claude-foundations MEMORY.md and Claude profile memory
## Process Notes
- Good pattern: discussing the conceptual approach (MEMORY vs SPEC vs dedicated catalog) before jumping into implementation
- The Gitea permission issue could be avoided by always adding `cluster-administrator` as collaborator when creating repos via `ai_admin` API token for the `homelab` org