feat(dnd): Add notification level control (gt-xmsme)

Implements Do Not Disturb mode for Gas Town agents:

- Add notification_level to agent bead schema (verbose, normal, muted)
- gt dnd [on|off|status] - quick toggle for DND mode
- gt notify [verbose|normal|muted] - fine-grained control
- gt nudge checks target DND status, skips if muted
- --force flag on nudge to override DND

This allows agents (especially Mayor) to mute notifications
during focused work like swarm coordination.

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dementus
2026-01-01 18:45:22 -08:00
committed by Steve Yegge
parent f883a09317
commit b5ac9a2e55
5 changed files with 446 additions and 7 deletions

33
internal/cmd/dnd_test.go Normal file
View File

@@ -0,0 +1,33 @@
package cmd
import (
"testing"
)
func TestAddressToAgentBeadID(t *testing.T) {
tests := []struct {
address string
expected string
}{
{"mayor", "gt-mayor"},
{"deacon", "gt-deacon"},
{"gastown/witness", "gt-gastown-witness"},
{"gastown/refinery", "gt-gastown-refinery"},
{"gastown/alpha", "gt-gastown-polecat-alpha"},
{"gastown/crew/max", "gt-gastown-crew-max"},
{"beads/witness", "gt-beads-witness"},
{"beads/beta", "gt-beads-polecat-beta"},
// Invalid addresses should return empty string
{"invalid", ""},
{"", ""},
}
for _, tt := range tests {
t.Run(tt.address, func(t *testing.T) {
got := addressToAgentBeadID(tt.address)
if got != tt.expected {
t.Errorf("addressToAgentBeadID(%q) = %q, want %q", tt.address, got, tt.expected)
}
})
}
}