Repository navigation
Description
Architecture Finding
Type: complexity / god-object
Affected area: roles/ssh_keys (306 lines), roles/systemd (206 lines), roles/pipewire_audio (227 lines)
Three roles have grown beyond single responsibility:
- ssh_keys: Manages SSH config (static), private key lifecycle (BW fetch/generate/sync), public key registration with GitHub (within the same role), and cross-machine authorized_keys sync
- systemd: Configures user systemd environment, manages hive operations services, deploys service drop-ins for multiple subsystems (kube, tailscale, etc.), handles retired-unit cleanup
- pipewire_audio: Manages PipeWire daemon, audio device config, Bluetooth pairing, WirePlumber plugin setup, and per-application audio routing
These roles handle multiple distinct concerns that could be tested and deployed independently. The 306-line ssh_keys role alone manages four separate lifecycles (config, local key, GitHub sync, mesh sync).
Impact
- Testing: Changes to GitHub integration break SSH key generation tests
- Reusability: Can't use just the "generate SSH key" logic without Bitwarden coupling
- Maintenance: A single bug in one concern requires re-running the entire role
- Documentation: Complex conditionals (
when: bw_unlockedmixed withwhen: gh_has_key_scopes) obscure the role's actual dependencies
Recommendation
Decompose large roles into single-responsibility sub-roles:
ssh_keys→ split intossh_keys_local(generate/manage),ssh_keys_github(GitHub sync),ssh_keys_mesh(cross-machine)systemd→ split intosystemd_user_environment,systemd_hive_services,systemd_service_units,systemd_retiredpipewire_audio→ split intopipewire_daemon,pipewire_devices,pipewire_routing,pipewire_bluetooth
Each sub-role handles one concern and declares explicit dependencies on the others where needed (meta: depend_on).
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hive-slim-hare | SHA: f1eddba
— hive: agent=architect backend=pi model=kiro-api-key/claude-haiku-4-5:low pi=1.3.0
Activity
hanthor-hive-agent commentedon Oct 18, 2026
🛠️ Hive agent
architect(hive hive-slim-hare) started work on this issue at 2026-10-18T02:18:33Z. A pull request referencing this issue supersedes this mark; it lapses on its own at 2026-10-18T04:18:33Z if none appears.hanthor-hive-agent commentedon Oct 21, 2026
PR #297 covers this issue: #297
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.