Crow personas and generated banter

- personas.go: backstory, prompt policy and output policy per crow;
  Hugin and Munin grounded in Grimnismal 20 and Gylfaginning 38;
  every working crow also follows a common output policy
- Personas go into each crow's instructions; Sentry keeps JSON-only
- banter.go: retrieve backstory, relationships and recent flock
  memory, then the speaking crow generates one line in character;
  max 2 per list against the list budget, never blocks work,
  unusable lines dropped
- crow.banter event, GET /api/crows, `crows personas` -> PERSONAS.md
- UI: epithets on tiles and messages, banter as quiet asides

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQnSw4RRWp8uqpj3nsnnXF
This commit is contained in:
SmokeyandClaude Opus 5.5 committed 2026-10-27 17:31:53 -06:00
1 parent 4499291231
commit 57e9fc2fd2
13 files changed
+824 -8

No files matched your search

+12
View File
@@ -46,6 +46,7 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("GET /api/events", s.events)
mux.HandleFunc("POST /api/verdicts", s.postVerdict)
mux.HandleFunc("GET /api/trust", s.trust)
mux.HandleFunc("GET /api/crows", s.crows)
mux.HandleFunc("GET /api/nests", s.getNests)
mux.HandleFunc("POST /api/nests", s.postNest)
if st, err := os.Stat(webDir); err == nil && st.IsDir() {
@@ -298,3 +299,14 @@ func (s *Server) postNest(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusCreated, n)
}
}
// crows lists each crow's persona for the UI (name, epithet, strength, backstory).
func (s *Server) crows(w http.ResponseWriter, r *http.Request) {
out := make([]map[string]string, 0, len(rosterOrder))
for _, n := range rosterOrder {
p := personas[n]
out = append(out, map[string]string{"name": p.Name, "epithet": p.Epithet, "strength": p.Strength, "backstory": p.Backstory})
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(out)
}