{{define "content"}} {{$m := .Data.Mind}}

{{$m.DisplayName}} memory

{{.Data.Stats.Total}} active memories · {{range $k, $v := .Data.Stats.ByKind}}{{$k}} {{$v}} {{end}}{{if .Data.Semantic}}semantic search on{{else}}text + graph retrieval{{end}}

{{template "mind_tabs" (dict "M" $m "Active" "memory")}}
Reset
{{if .Data.Hits}}

Recall for “{{index .Data.Q "q"}}” fused score: text, {{if .Data.Semantic}}vector, {{end}}recency, activation, importance, credibility

{{range .Data.Hits}}{{$mm := .Memory}}{{end}}
ScoreMemoryWhy
{{conf .Score}} {{trunc $mm.Content 140}}
{{$mm.Kind}} {{$mm.Epistemic}} {{date $mm.OccurredAt}} · conf {{conf $mm.Confidence}} · imp {{conf $mm.Importance}}
{{range $k, $v := .Components}}{{if gt $v 0.0}}{{$k}} {{conf $v}} {{end}}{{end}}
{{else if .Data.Memories}}

Timeline newest first

{{$day := ""}} {{range .Data.Memories}}{{$d := date .OccurredAt | printf "%.10s"}}{{if ne $d $day}}{{$day = $d}}{{end}}{{end}}
{{$d}}
{{.OccurredAt.Local.Format "15:04"}} {{.Kind}} {{.Epistemic}}{{if ne .Status "active"}} {{.Status}}{{end}} {{trunc .Content 160}}
{{.Source}} · trust {{.Trust}}
{{conf .Confidence}}
imp {{conf .Importance}} · act {{conf .Activation}} · ×{{.RetrievalCount}}
{{with .Data.NextBefore}}

Older

{{end}} {{else}}

No memories{{if index .Data.Q "q"}} match{{end}}. Memories form when the mind attends to observations and conversations.

{{end}}
{{if .Principal.User.Role.AtLeast "operator"}}

Add knowledge as operator

{{end}}

How retrieval works

A cue (observation, message) is matched against memories by full-text rank{{if .Data.Semantic}}, embedding similarity{{end}}, recency, activation, importance and source credibility. The fused score competes for attention like any thought; admitted recalls are reinforced. Decay lowers activation of unused memories but never deletes them.

{{end}}