"""Persistent, machine-wide memory for OpenProgram agents.

This is the **v1** memory layer (the linear ``journal → wiki → core``
chain described below). The *target* architecture is the two-tier
entity/virtual design in ``docs/design/memory/memory-v2.md``: the git-backed
entity layer (Session-Git + Project-Git, in ``openprogram/store/``) is
already built (Phase 0+1), but the v2 virtual layer (timeline +
knowledge graph with provenance) is not yet — so v1 is what actually
runs today.

Three layers:

1. **Short-term** (``journal/YYYY-MM-DD.md``)
       Raw, append-only daily notes — agent observations, end-of-session
       summaries, candidate facts. Never edited. Source of truth for
       what was actually said / observed in conversations.

2. **Wiki** (``wiki/<type>/<page>.md``)
       Curated, structured knowledge with frontmatter (claims, evidence,
       confidence, sources). Maintained by the sleep process; the agent
       reads but does not directly edit. Karpathy's LLM Wiki pattern.

3. **Core** (``core.md``)
       <2KB always-on block injected into every session's system
       prompt. Regenerated by the sleep process from the highest-signal
       wiki entries. Hermes-style frozen system-prompt block.

Sleep (background consolidation) runs nightly via the worker cron and
promotes journal → wiki, regenerates core, surfaces reflections.

The agent interacts via lifecycle hooks (``MemoryProvider``) and the
``memory_*`` tool family (note / recall / browse / get / reflect /
ingest / lint / status / backlinks / rename / relink / delete / review).

Storage location: ``<state>/memory/`` (profile-global by default —
shared across every agent and conversation on the machine).
"""
from . import store

__all__ = ["store"]
