feat: add Deacon role context template

Creates deacon.md.tmpl for the health-check orchestrator role:
- Architecture position (between daemon and Mayor/Witnesses)
- Wake cycle instructions (heartbeat, mail check, health scan)
- Session patterns for all agent types
- Lifecycle request handling (cycle, restart, shutdown)
- Responsibilities and escalation protocols

Updates templates package to include deacon in role list.

Closes: gt-5af.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 17:30:21 -08:00
parent b69520b911
commit 9ac76f9b3f
4 changed files with 566 additions and 346 deletions

View File

@@ -75,6 +75,38 @@ func TestRenderRole_Polecat(t *testing.T) {
}
}
func TestRenderRole_Deacon(t *testing.T) {
tmpl, err := New()
if err != nil {
t.Fatalf("New() error = %v", err)
}
data := RoleData{
Role: "deacon",
TownRoot: "/test/town",
WorkDir: "/test/town",
}
output, err := tmpl.RenderRole("deacon", data)
if err != nil {
t.Fatalf("RenderRole() error = %v", err)
}
// Check for key content
if !strings.Contains(output, "Deacon Context") {
t.Error("output missing 'Deacon Context'")
}
if !strings.Contains(output, "/test/town") {
t.Error("output missing town root")
}
if !strings.Contains(output, "Health-Check Orchestrator") {
t.Error("output missing role description")
}
if !strings.Contains(output, "Wake Cycle") {
t.Error("output missing wake cycle section")
}
}
func TestRenderMessage_Spawn(t *testing.T) {
tmpl, err := New()
if err != nil {
@@ -141,7 +173,7 @@ func TestRoleNames(t *testing.T) {
}
names := tmpl.RoleNames()
expected := []string{"mayor", "witness", "refinery", "polecat", "crew"}
expected := []string{"mayor", "witness", "refinery", "polecat", "crew", "deacon"}
if len(names) != len(expected) {
t.Errorf("RoleNames() = %v, want %v", names, expected)