reflection

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package reflection is descriptive statistics over long-term memory.

Where the mirror interprets ("here's a blind spot I notice"), reflection just counts: how much the assistant knows and of what kind, how sure it is, how the store has grown, what it leans on most, and which commitments have lingered longest. It is the plain, numeric floor beneath the interpretive layer — no model runs, every figure traces to a row, so it is instant, offline, and impossible to argue with. Compute the numbers here; narrate them elsewhere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

type Count struct {
	Label string `json:"label"`
	N     int    `json:"n"`
}

Count is a labelled tally (a kind, a project).

type Reflection

type Reflection struct {
	Total          int                    `json:"total"`
	ByKind         []Count                `json:"by_kind"`
	ByProject      []Count                `json:"by_project"`
	AvgConfidence  float64                `json:"avg_confidence"`
	HighConfidence int                    `json:"high_confidence"` // >= 0.8, things it's sure of
	Hypotheses     int                    `json:"hypotheses"`      // < 0.6, hunches to corroborate
	Growth         []WeekCount            `json:"growth"`          // oldest week first
	MostExercised  []memory.Memory        `json:"most_exercised"`  // recalled most
	LingeringLoops []secretary.Commitment `json:"lingering_loops"` // oldest open first
}

Reflection is the computed snapshot.

func Compose

func Compose(db *sql.DB, now time.Time) (Reflection, error)

Compose gathers the reflection as of now.

type WeekCount

type WeekCount struct {
	WeekStart int64 `json:"week_start"`
	Learned   int   `json:"learned"`
}

WeekCount is how many memories were learned in one trailing week.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL