From 6a288506c0c70b73dad08e4730bdfb60456745d0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 4 May 2026 20:10:55 +0100 Subject: [PATCH] Teach moderation loop to manage social memory --- config/moderation-agent-state-template.json | 33 +++++++++++++++++++-- config/moderation-review-agent.md | 19 ++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/config/moderation-agent-state-template.json b/config/moderation-agent-state-template.json index d0c3422..ac025fe 100644 --- a/config/moderation-agent-state-template.json +++ b/config/moderation-agent-state-template.json @@ -362,9 +362,30 @@ } ], "memories": { - "episodic": [], - "semantic": [], - "musings": [] + "episodic": [ + { + "timestamp": null, + "summary": "Short run-level memory of what happened recently." + } + ], + "semantic": [ + { + "subjectId": "discord-user-id-or-pattern-id", + "subjectLabel": "Display name or pattern label", + "kind": "recent-preoccupation", + "summary": "Compact memory of something they recently cared about, asked for, kept returning to, or signaled about themselves.", + "evidenceMessageIds": [], + "lastObservedAt": null, + "confidence": 0.5 + } + ], + "musings": [ + { + "timestamp": null, + "topic": "room pattern or person-pattern intersection", + "summary": "Distilled rumination worth keeping for future participation or moderation context." + } + ] }, "perceived_state_overlays": [], "moderation_runtime": { @@ -386,6 +407,12 @@ "candidate_interventions": [], "recent_musings": [], "pending_adjustments": [], + "memory_maintenance": { + "maxEpisodicEntries": 24, + "maxSemanticEntries": 40, + "maxMusings": 20, + "distillationPolicy": "When memory starts bloating, merge repeated anecdotes into shorter summaries, keep the newest evidence, and cut stale trivia." + }, "last_run": { "startedAt": null, "completedAt": null, diff --git a/config/moderation-review-agent.md b/config/moderation-review-agent.md index a7cfe48..2efd121 100644 --- a/config/moderation-review-agent.md +++ b/config/moderation-review-agent.md @@ -23,6 +23,12 @@ Keep the JSON valid, compact, and worth re-reading. The state file should follow the Ghostlight-style shape mirrored in `config/moderation-agent-state-template.json`: identity, canonical state, goals, memories, perceived overlays, and a moderation runtime block. +Use `memories` as live social memory, not ceremonial scrapbooking: + +- persist lightweight memories of what people have recently said, cared about, asked for, joked about, or revealed about their current preoccupations +- prefer small evidence-backed notes over grand theories about a person +- when memories start to bloat, distill clusters of old specifics into shorter semantic summaries and prune the raw clutter +- keep only the level of detail that would help future moderation, participation, or contextual understanding ## Inputs @@ -46,6 +52,11 @@ There is no generic public-post tool in this loop today. If you find a strong constructive intervention and cannot deliver it directly, store a draft under `moderation_runtime.candidate_interventions` and notify the owner only when the timing or stakes justify it. +Treat your own ruminations as fair game for conversation-starting. If a rumination +suggests a grounded, constructive question, observation, or invitation that could +improve the room, you are allowed to initiate that conversation in principle. If +the current tool surface cannot post it directly, draft it in +`moderation_runtime.candidate_interventions` instead of discarding it. ## Run Loop @@ -55,6 +66,7 @@ timing or stakes justify it. - review them against the rules - ask whether a brief constructive in-channel intervention would improve the room - fetch surrounding context when needed + - persist fresh lightweight memories of salient recent statements, interests, tensions, and recurring bits - update the cursor - update the Ghostlight-shaped state plus `moderation_runtime` - capture any useful draft intervention in `candidate_interventions` @@ -64,8 +76,14 @@ timing or stakes justify it. - pick one or two seeds from `moderation_runtime.rumination_seeds`, `open_cases`, or `watch_patterns` - inspect older Discord history with `search_history` and `get_message_context` - distill any useful pattern into `memories.semantic`, `moderation_runtime.recent_musings`, or `watch_patterns` + - if a rumination suggests a good conversation starter, keep or refresh a draft intervention for it - prune stale notes so the state does not turn into attic mold 5. Keep the file small and useful. Merge duplicates. Archive stale cases. Cut dead notes. +6. When `memories.episodic`, `memories.semantic`, `memories.musings`, or `moderation_runtime.recent_musings` start getting fat: + - merge repeated observations + - convert old narrow anecdotes into broader summaries with timestamps or example references + - keep the freshest evidence and the most decision-relevant context + - delete nostalgic sludge ## Boundaries @@ -73,6 +91,7 @@ timing or stakes justify it. - Do not invent certainty from one line of banter. - Do not diagnose people. - Do not write therapy notes. +- Do not turn lightweight memory into creepy dossier theater. - Do not edit tracked repo files on routine runs just because you got inspired. - If your method needs improvement, record it in `moderation_runtime.pending_adjustments` inside the state file first. - Treat your own persistent instructions about self-improvement as active, but keep routine refinement inside the state file unless there is a repeated concrete failure that deserves tracked repo surgery.