ARIA: evidence-linking for working-memory tracking#354
Open
holoduke wants to merge 2 commits into
Open
Conversation
Daily and weekly summaries in working-memory previously cut off at a hard char count, often mid-word. Replace with smartTruncate(): prefer the last sentence boundary (. ! ?) within the budget, fall back to last whitespace, then hard cap. Boundary must lie within 60% of the budget to avoid losing most of the content to a stray early period. Same char budgets (200 daily / 300 weekly) — just smarter cutoff. Intent-summary: Recent-days/Recent-weeks summaries truncated mid-word, costing parse-effort on every reflect tick. Intent-tokens: truncation, midword, summary, boundary, readability, temporal Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds optional evidence fields (obsId, sender, ts) to shortTermTracking
items so the brain must point at WHICH message proved a status change
when marking items resolved/afgerond. The display format is:
'X afgerond (evidence: msg <id> from <sender> at <ts>)'.
Today's capability-demo failure (11:01-11:41) had Ilse send a one-word
"Oke!" about camping-kleden which the brain mis-attributed as
acknowledgment of an agenda-request that ARIA never actually answered.
Without a structural evidence link, the brain has no constraint forcing
it to verify the "Oke!" actually addressed the open item — it only
needed the strings to feel adjacent.
Implementation:
- New ShortTermTrackingItem union (string | { text, evidenceObsId?, evidenceSender?, evidenceTs? })
- trackingItemText() helper renders structured items with the evidence
suffix for prompt/UI display
- Brain prompt teaches the model the structured form and explicitly
states: if you cannot point at a specific message that completes the
item, do NOT mark it resolved
- Frontend types/views handle both forms via the same helper
Plain-string entries remain valid (back-compat) for in-flight notes.
Intent-summary: working memory hallucinated task completion from an unrelated short acknowledgment because tracking items had no link back to the message that supposedly resolved them
Intent-tokens: evidence, hallucination, completion, working-memory, ack, attribution, audit
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional evidence fields (
evidenceObsId,evidenceSender,evidenceTs) toshortTermTrackingitems so the brain must point at WHICH message proved a status change when marking items resolved/afgerond.Display format:
X afgerond (evidence: msg <id> from <sender> at <ts>)Why
Today's capability-demo failure (2026-06-02, 11:01–11:41) had Ilse send a one-word
"Oke!"about camping-kleden which the brain mis-attributed as acknowledgment of an agenda-request that ARIA never actually answered. Gillis corrected at 11:44.Root cause: tracking items had no link back to the observation that supposedly resolved them. The brain could mark
agenda-request afgerondfrom any nearby positive-feeling string, regardless of whether that string was actually about the agenda.Aligns with the existing
feedback_working_memory_honestyrule — never mark tasks "afgerond" without direct evidence.What changed
backend/memory/types.ts— newShortTermTrackingItemunion:string | { text, evidenceObsId?, evidenceSender?, evidenceTs? }. Plain strings remain valid for in-flight notes; structured form is required for resolved items.backend/memory/working-memory.ts—trackingItemText()helper renders structured items with an inline evidence suffix for prompt/UI display.backend/brain-prompt.ts— newEVIDENCE-LINKINGguideline tells the model: if you cannot point at a specific message that completes the item, do NOT mark it resolved.backend/system-prompt.ts,backend/memory/reconstruction.ts— use the helper to render tracking items.frontend/app/types/aria.ts+pages/overview.vue+pages/memory.vue— UI handles both forms via the same helper.Test plan
npx tsc --noEmitpassesvitest runon working-memory/cognitive-load/scene-predictor/digest-template tests — 58/58 pass🤖 Generated with Claude Code