Audit of .claude/memory found and fixed: - Broken link: Power Failure Runbook (../.claude/... -> ../...) - 8 orphaned memories not in MEMORY.md index (Graph CA/password-reset, vault-write-sequence, GURU-BEAST-ROG, 3x Cascades, identity proposal) -> now indexed under their sections, so they're discoverable - 5 files missing frontmatter -> added name/description/type - Duplicate index entry for reference_workstation_setup.md -> deduped - Trimmed the worst oversized index hooks (Syncro invoice line was 427 chars) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.0 KiB
4.0 KiB
name, description, type
| name | description | type |
|---|---|---|
| Proposal — centralize machine config in identity.json | Rationale for moving per-machine config (ollama endpoint/model, python cmd, platform, claudetools_root) into identity.json instead of per-script detection. Implemented 2026-05-27. | project |
Proposal: Centralize Machine-Specific Config in identity.json
Problem
Machine-specific settings are scattered across scripts with repeated detection logic:
- Ollama endpoint probed with curl on every use
- Python interpreter tried in sequence (
py,python3,python) - Hostname detection (
$COMPUTERNAMEvshostname) - Platform-specific path guessing
Solution
Store all machine-specific config in identity.json. Scripts read once, no probing.
Proposed Schema (Full)
{
"user": "mike",
"full_name": "Mike Swanson",
"email": "mike@azcomputerguru.com",
"role": "admin",
"machine": "GURU-5070",
"platform": "windows",
"architecture": "amd64",
"paths": {
"claudetools_root": "D:/claudetools",
"vault_path": "D:/vault"
},
"python": {
"command": "py"
},
"ollama": {
"endpoint": "http://localhost:11434",
"fallback": "http://100.101.122.4:11434",
"prose_model": "qwen3:8b"
},
"mode": "general",
"last_updated": "2026-05-26T19:00:00Z"
}
Ollama Integration (Current vs Proposed)
Current (OLLAMA.md pattern):
if curl -s -m 2 http://localhost:11434/api/tags >/dev/null 2>&1; then
OLLAMA="http://localhost:11434"
else
OLLAMA="http://100.101.122.4:11434" # Beast via Tailscale
fi
Proposed:
OLLAMA=$(jq -r '.ollama.endpoint // "http://100.101.122.4:11434"' "$IDENTITY_PATH")
Validation script (run during onboarding or manually):
# .claude/scripts/validate-ollama.sh
ENDPOINT=$(jq -r '.ollama.endpoint' .claude/identity.json)
if ! curl -s -m 2 "$ENDPOINT/api/tags" >/dev/null 2>&1; then
echo "[WARNING] Ollama endpoint $ENDPOINT unreachable"
FALLBACK=$(jq -r '.ollama.fallback' .claude/identity.json)
echo "Trying fallback: $FALLBACK"
if curl -s -m 2 "$FALLBACK/api/tags" >/dev/null 2>&1; then
echo "Fallback works. Update identity.json endpoint to: $FALLBACK"
fi
fi
Per-Machine Config Examples
GURU-5070 (Mike's primary, Windows):
{
"ollama": {
"endpoint": "http://localhost:11434",
"fallback": "http://100.101.122.4:11434",
"prose_model": "qwen3:8b"
},
"python": {"command": "py"},
"platform": "windows"
}
GURU-BEAST-ROG (always-on Ollama host):
{
"ollama": {
"endpoint": "http://localhost:11434",
"fallback": "http://localhost:11434",
"prose_model": "qwen3:14b"
},
"python": {"command": "python3"},
"platform": "windows"
}
GURU-KALI (no local Ollama, remote only):
{
"ollama": {
"endpoint": "http://100.101.122.4:11434",
"fallback": "http://100.101.122.4:11434",
"prose_model": "qwen3:14b"
},
"python": {"command": "python3"},
"platform": "linux"
}
Howard-Home (local Ollama):
{
"ollama": {
"endpoint": "http://localhost:11434",
"fallback": "http://100.101.122.4:11434",
"prose_model": "qwen3:14b"
},
"python": {"command": "python3"},
"platform": "windows"
}
Migration Path
- Add fields to identity.json template in CLAUDE.md onboarding
- Send coord message to all machines: "Update identity.json with Ollama/Python config"
- Each machine runs validation script, auto-detects, writes config
- Update syncro.md, OLLAMA.md, sync.sh to read from identity.json
- Remove detection logic from scripts
Benefits
- Faster: No curl probe on every Ollama call (saves 2 seconds)
- Explicit: Machine declares "I use local Ollama" vs "I use remote"
- Auditable:
cat .claude/identity.jsonshows full machine config - Consistent: Same pattern as
claudetools_root/vault_path(already working) - Offline-safe: Scripts work without network probe (use declared endpoint)
Rollout
Use coord API to send migration instructions to each machine (same pattern as claudetools_root rollout today).