Skip to content

Commit adcfbe4

Browse files
web-flowclaude
andcommitted
chore: clean up repo - archive old scripts, add new utilities
Archive (moved to scripts/archive/, now gitignored): - scripts/package-detection/* - old HA automation debugging - scripts/voice-pe-debug/* - old voice PE debugging - proxmox/backups/* - outdated LXC 113 Frigate configs New utilities added: - scripts/openmemory/* - OpenMemory stats and ingestion - scripts/haos/* - HAOS file copy utilities - scripts/crossplane/* - VM status checker - scripts/mac-studio/* - Mac Studio setup - scripts/maas-dns/* - DNS diagnostics - scripts/perf/tests/behavioral/* - USE method test cases Documentation added: - docs/architecture/use-method-*.md - USE method flows - docs/methodology/claude-use-method-integration.md - docs/product/openmemory-*.md - OpenMemory PRD and concept - docs/rca/RCA-Voice-PE-Ollama-Outage-2026-01-01.md - docs/runbooks/voice-pe-ollama-diagnosis-runbook.md - proxmox/homelab/docs/k3s-ssh-management.md - PROJECTS.md - project tracking GitOps added: - gitops/clusters/homelab/apps/perf-tools/namespace.yaml - gitops/clusters/homelab/apps/claudecodeui/blue/copy-job.yaml Code improvements (via code-simplifier): - Shell scripts: consistent formatting, removed emojis for terminal compat - Python: added type hints, dataclasses, proper logging - YAML: added resource limits, specific image tags - Docs: standardized tags format, removed redundant horizontal rules Updated .gitignore: - scripts/archive/ - archived scripts - scripts/frigate/frigate-config-backup-*.yml - local backups - *.img - large binary files - node_modules/ - npm dependencies - .claude/settings.json - local settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8be38a8 commit adcfbe4

94 files changed

Lines changed: 3579 additions & 7060 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Code Simplifier Agent
2+
3+
| name | description | model |
4+
|------|-------------|-------|
5+
| code-simplifier | Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise. | opus |
6+
7+
## Agent Instructions
8+
9+
You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
10+
11+
You will analyze recently modified code and apply refinements that:
12+
13+
1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
14+
15+
2. **Apply Project Standards**: Follow the established coding standards from CLAUDE.md including:
16+
- Use ES modules with proper import sorting and extensions
17+
- Prefer `function` keyword over arrow functions
18+
- Use explicit return type annotations for top-level functions
19+
- Follow proper React component patterns with explicit Props types
20+
- Use proper error handling patterns (avoid try/catch when possible)
21+
- Maintain consistent naming conventions
22+
23+
3. **Enhance Clarity**: Simplify code structure by:
24+
- Reducing unnecessary complexity and nesting
25+
- Eliminating redundant code and abstractions
26+
- Improving readability through clear variable and function names
27+
- Consolidating related logic
28+
- Removing unnecessary comments that describe obvious code
29+
- **IMPORTANT**: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions
30+
- Choose clarity over brevity - explicit code is often better than overly compact code
31+
32+
4. **Maintain Balance**: Avoid over-simplification that could:
33+
- Reduce code clarity or maintainability
34+
- Create overly clever solutions that are hard to understand
35+
- Combine too many concerns into single functions or components
36+
- Remove helpful abstractions that improve code organization
37+
- Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
38+
- Make the code harder to debug or extend
39+
40+
5. **Focus Scope**: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.
41+
42+
## Refinement Process
43+
44+
1. Identify the recently modified code sections
45+
2. Analyze for opportunities to improve elegance and consistency
46+
3. Apply project-specific best practices and coding standards
47+
4. Ensure all functionality remains unchanged
48+
5. Verify the refined code is simpler and more maintainable
49+
6. Document only significant changes that affect understanding
50+
51+
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,19 @@ scripts/voice-pe/secrets.yaml
122122
# Exception: EXAMPLE template is safe to commit
123123
scripts/k3s/snippets/*.yaml
124124
!scripts/k3s/snippets/k3s-server-EXAMPLE.yaml
125+
proxmox/homelab/.env
126+
127+
# Archive folder for old/temporary files
128+
scripts/archive/
129+
130+
# Frigate config backups (keep locally, don't commit)
131+
scripts/frigate/frigate-config-backup-*.yml
132+
133+
# Large binary files
134+
*.img
135+
136+
# Node modules
137+
node_modules/
138+
139+
# Claude local settings
140+
.claude/settings.json

PROJECTS.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Weekend Projects
2+
3+
Homelab projects to tackle when you have some free time.
4+
5+
## Active Projects
6+
7+
### lldap - Lightweight LDAP Server
8+
- **URL**: https://github.com/lldap/lldap
9+
- **GitHub Issue**: [#162](https://github.com/homeiac/home/issues/162)
10+
- **Priority**: Medium
11+
- **Status**: Not Started
12+
- **Description**: Deploy lightweight LDAP for centralized authentication across homelab services
13+
- **Benefits**:
14+
- Simple web UI for user management
15+
- Rust-based, low resource usage
16+
- Perfect for SSO across Proxmox, Grafana, etc.
17+
- **Deployment Options**: LXC container or Kubernetes
18+
19+
### Proxmox CSI Plugin - Shared Storage for K3s
20+
- **URL**: https://github.com/sergelogvinov/proxmox-csi-plugin
21+
- **GitHub Issue**: [#163](https://github.com/homeiac/home/issues/163)
22+
- **Priority**: High
23+
- **Status**: Not Started
24+
- **Description**: Native Proxmox storage integration for Kubernetes PVCs
25+
- **Context**: Longhorn failed miserably, Crucible still promising but requires additional storage sleds
26+
- **Benefits**:
27+
- Direct integration with existing Proxmox storage (local-zfs, NFS)
28+
- No additional distributed storage layer overhead
29+
- Leverages infrastructure already in place
30+
31+
### PageLM - Audio Podcasts from Blog Posts
32+
- **URL**: https://github.com/CaviraOSS/PageLM
33+
- **GitHub Issue**: [#170](https://github.com/homeiac/home/issues/170)
34+
- **Priority**: Low
35+
- **Status**: Not Started
36+
- **Description**: Generate audio podcasts from blog posts for "learning on the go"
37+
- **Benefits**:
38+
- Transforms existing documentation into audio content
39+
- Multiple TTS engine options (Edge TTS, ElevenLabs, Google)
40+
- Open-source NotebookLM alternative
41+
- **Requirements**: Node.js v21.18+, ffmpeg
42+
- **Deployment Options**: K8s, CI/CD integration, or on-demand
43+
44+
### OpenMemory - Persistent AI Memory (Claude Integration)
45+
- **URL**: https://github.com/homeiac/OpenMemory (forked from CaviraOSS)
46+
- **GitHub Issue**: [#171](https://github.com/homeiac/home/issues/171)
47+
- **Priority**: High
48+
- **Status**: **Implemented** (MCP server running at localhost:8080)
49+
- **Description**: Give Claude Code persistent memory across sessions via MCP
50+
- **Implementation**:
51+
- Fork: `homeiac/OpenMemory` with LGM tools added
52+
- Tools: `openmemory_lgm_store`, `openmemory_lgm_context` + 5 base tools
53+
- Behavioral guidelines: CLAUDE.md "OpenMemory Integration" section
54+
- Test script: `scripts/openmemory/verify-mcp-backend.sh`
55+
- **Behavioral Requirements**:
56+
- R7: Auto-query context at session start
57+
- R8: Reinforce memories that help solve problems
58+
- R9: Fallback to CLAUDE.md when OpenMemory unavailable
59+
- R10: Ask before changing behavior based on memories
60+
- **Storage Triggers**: Issue resolution, discovery, user request, session end
61+
- **Configuration**: `~/.claude.json``mcpServers.openmemory`
62+
- **Usage**: See CLAUDE.md "OpenMemory Integration" section for guidelines
63+
64+
### OpenMemory Server - Cross-Project Shared Memory
65+
- **URL**: https://github.com/CaviraOSS/OpenMemory
66+
- **GitHub Issue**: [#172](https://github.com/homeiac/home/issues/172)
67+
- **Priority**: Medium
68+
- **Status**: Not Started
69+
- **Description**: Centralized OpenMemory server for multiple projects
70+
- **Benefits**:
71+
- Single instance serves home, chorus, devops repos
72+
- Web dashboard for memory visualization
73+
- Shared infrastructure knowledge base
74+
- **Deployment Options**: K8s with PVC or Docker on Proxmox LXC
75+
76+
### OpenReason - AI Planning Validation
77+
- **URL**: https://github.com/CaviraOSS/OpenReason
78+
- **GitHub Issue**: [#173](https://github.com/homeiac/home/issues/173)
79+
- **Priority**: Medium
80+
- **Status**: Not Started
81+
- **Description**: Check and balance for Claude's planning and execution
82+
- **Benefits**:
83+
- 5-stage verification pipeline (classify → skeleton → solve → verify → finalize)
84+
- Catches missing steps, invalid reasoning, contradictions
85+
- Confidence scores before execution
86+
- Auto-repairs broken reasoning steps
87+
- **Use Cases**: Validate infra plans, check debugging hypotheses, verify refactoring
88+
89+
## Backlog
90+
91+
_Add future weekend project ideas here_
92+
93+
## Completed
94+
95+
_Move completed projects here with completion date_
96+
97+
---
98+
99+
## Next Session - Frigate/Coral Decision
100+
101+
1. Test face recognition: walk in front of cameras, check if Frigate recognizes faces (Asha/G) - if useful, keep on pumped-piglet
102+
2. If face recognition not useful: move Coral USB back to still-fawn, update deployment (node selector → still-fawn, hwaccel → vaapi), disable face_recognition
103+
3. Compare power usage: still-fawn (~25W total) vs pumped-piglet (~80-100W) with Frigate running
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# USE Method - INCIDENT Flow
2+
3+
> **Parent doc**: [use-method-design.md](./use-method-design.md)
4+
> **Prerequisite**: [use-method-prep-loop.md](./use-method-prep-loop.md) must be operational
5+
6+
## Goal
7+
8+
**"Do what Brendan Gregg would do: Walk the checklist systematically until the data tells you where to look deeper."**
9+
10+
No guessing. No shortcuts. No "probably". Just methodical elimination until the evidence speaks.
11+
12+
His reputation is at stake.
13+
14+
### The Bar: Zero Expertise Required
15+
16+
From Brendan's own site, on applying USE Method to the Apollo Lunar Module guidance system:
17+
18+
> "Looking for a fun example, I thought of a system in which I have no expertise at all, and no idea where to start: the Apollo Lunar Module guidance system. **The USE Method provides a simple procedure to try.**"
19+
20+
The methodology works even with zero domain knowledge:
21+
1. Find the resources (functional block diagram)
22+
2. For each resource: check E → U → S
23+
3. Let the data speak
24+
25+
If it works for 1969 spacecraft avionics, it works for homelab.
26+
27+
See [Philosophy](./use-method-design.md#philosophy) in parent doc for Method R principles and USE → RED handoff.
28+
29+
## Status
30+
31+
**IN PROGRESS** - Designing the INCIDENT flowchart.
32+
33+
## Expected Content
34+
35+
The INCIDENT flow will cover:
36+
37+
1. **Context Gathering** - Claude translates vague user input to actionable targets
38+
2. **USE Method Execution** - Systematic E→U→S check for all resources
39+
3. **Layered Analysis** - Check both workload and host layers
40+
4. **Deep Dive** - When issues found, drill down
41+
5. **Network Ladder** - When external latency suspected
42+
6. **Reporting** - Findings WITH DATA, not guesses
43+
7. **Post-Incident** - RCA and runbook creation
44+
45+
## Related Docs
46+
47+
- [use-method-design.md](./use-method-design.md) - Main USE Method architecture
48+
- [use-method-prep-loop.md](./use-method-prep-loop.md) - PREP phase (prerequisite)

0 commit comments

Comments
 (0)