Skip to content

Research/spike: dream mode — scheduled local-AI memory-maintenance daemon #122

@skakri

Description

@skakri

Research / spike. A scheduled local-AI ("dream mode") daemon that audits/refreshes the memory layer — freshness audits, issue→memory gap mining, contradiction detection, coverage maps, rejected-alternative mining — emitting findings, not facts into a separate dream_findings table, promoted only by deterministic verifier / human / strong-agent confirmation.

Five refinements that decide differentiation vs week-two-disable:

  1. "Idle" is the WRONG trigger. rag-rat fought hard to make idle cheap (the self-sustaining watcher loop bug; the no-op-pass / GC_EVERY_PASSES / 2-worker-tokio idle-load work). LLM inference on "stopped typing" = fan/battery/heat → disabled. Make it an explicit rag-rat dream batch command for CI / cron / server / manual; if local, gate on AC + thermal-headroom + long-idle. (First generative-LLM dependency — keep Ollama out-of-process, never in the binary.)
  2. Deterministic layer GATES the model. Anchor validity is already self-healed for free; wake the model only on the semantic residue (stale/relocated anchor, touched bound symbols, a fired heuristic). The model never auto-closes — the deterministic checker does.
  3. Contradiction detection needs TWO signals (model's semantic flag + an effect/contract confirmation), or it floods the scarcest resource — attention.
  4. Identity-key findings (kind, subject, claim-hash) so re-runs supersede not stack; unreviewed low-confidence findings auto-decay. Otherwise the pile rots and erodes trust in fresh memories.
  5. Measure it on commit-replay (Spike: commit-replay retrieval eval harness (measure-first foundation) #120) — recall (does it surface rationale a later commit had to rediscover) + finding-acceptance-rate (precision) — or it's faith-based.

Build first inside dream mode (not the freshness audit, which is mostly deterministic): (a) rejected-alternative mining — highest-value/lowest-supply memory kind; v1 from PR review threads (GitHub API already pulled, no new plumbing), v2 from agent sessions (new capture pipeline). (b) memory-coverage map — high-risk × low-memory-density (risk score × memory count); no model needed.

Framing: a cheap overnight triage producing a ranked, evidence-anchored worklist for the strong agent — NOT an autonomous closer.

Depends on #120, #121. Ref: docs/plans/2026-06-14-agent-value-strategy.md §4e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchInvestigation / landscape / design studyspikeTime-boxed exploratory/proof-of-concept work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions