How johannesdam/hal works
HAL is a Claude Code character mod: the user invokes commands or interacts with Claude, while hooks preserve the requested work and add character behavior, voice, and visual effects. The central runtime is hooks/register.tsx; it coordinates persona and mood, per-machine notes, listening and learning, webcam facts, and display behavior. README statements support the Windows voice, listening, sight, and farewell integrations; sampled excerpts do not expose every dispatch or host protocol, so those relationships are shown only where documented.
Main entry points: register.tsx Hook coordinator · learn.ts Voice learning · gaze.ts Gaze behavior · hal-ears.py Audio listener
Components 19
Hook runtime
- Hook coordinator
hooks/register.tsx - Settings store
Character and memory
- Persona and commands
hooks/persona.ts - Conversation rules
hooks/conversation.ts - Mood model
hooks/mood.ts - Visit dossier
hooks/dossier.ts - Initiative moments
hooks/moments.ts
Senses and attention
- Listening logic
hooks/ears.ts - Voice learning
hooks/learn.ts - Sight facts
hooks/sight.ts - Gaze behavior
hooks/gaze.ts
Voice and presence
- Eye renderer
hooks/eye.ts - Audio listener
assets/hal-ears.py - Webcam measurer
assets/hal-sight.py - Windows voice host
assets/hal-host.ps1 - Piper voice
assets/hal_piper.py - Farewell process
assets/hal-farewell.ps1
Other components
- Guest
- Claude Code
Connections 20
- Guest → Claude Code: invokes commands
README.md - Claude Code → Hook coordinator: runs hooks
README.md - Hook coordinator → Persona and commands: uses persona and commands
hooks/register.tsx - Hook coordinator → Conversation rules: uses conversation rules
hooks/register.tsx - Hook coordinator → Mood model: updates mood
hooks/register.tsx - Hook coordinator → Visit dossier: records visit facts
hooks/register.tsx - Hook coordinator → Initiative moments: selects moments
hooks/register.tsx - Hook coordinator → Listening logic: uses listening rules
hooks/register.tsx - Hook coordinator → Voice learning: runs learning flow
hooks/register.tsx - Hook coordinator → Sight facts: uses sight facts
hooks/register.tsx - Hook coordinator → Gaze behavior: updates gaze
hooks/register.tsx - Hook coordinator → Eye renderer: renders eye
README.md - Hook coordinator → Settings store: reads and writes
hooks/register.tsx - Audio listener → Listening logic: provides recognized speech
README.md - Voice learning → Audio listener: trains speech phrases
hooks/learn.ts - Webcam measurer → Sight facts: provides measurements
hooks/sight.ts - Hook coordinator → Windows voice host: sends spoken lines
README.md - Windows voice host → Piper voice: uses neural voice
README.md - Hook coordinator → Farewell process: starts farewell playback
README.md - Gaze behavior → Eye renderer: supplies look state
hooks/gaze.ts