Skip to content

PurposeStore: purpose-indexed memory, stage 0 (#6, part 2) - #14

Merged
thorwhalen merged 3 commits into
mainfrom
purpose-store
Oct 20, 2026
Merged

thorwhalen merged 3 commits into
mainfrom
purpose-store

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

Part 2 of #6 (part 1, the run-log, is #13). Stage 0 of the issue.

  • raglab.memory: ExtractionUnit (purpose, SearchHit.to_dict() with raw magnitude + provenance, recorded_at, importance, confidence, level, supersedes), purpose_id (content hash of the normalized statement), WriteStrategy / ReadStrategy Protocols with upsert_write and make_relevance_recency_reader (relevance^alpha x importance x half-life recency, alpha=1).
  • PurposeStore: MutableMapping[purpose, units] over an injected JSON-clean backend (dict or dol store); store[purpose] recalls from related purposes (same normalized text, or cosine >= min_relevance with an injected embedder). Calling it with a RoundRecord journals the round (it is a RunLog sink).
  • Agent: opt-in memory (Memory Protocol). Before sweeping a sub-task, recalled hits go to the evaluator (round -1); sufficient means no sweep, else the loop runs with them kept. memory=None leaves the loop unchanged.

Acceptance: same purpose twice reuses prior extractions (retriever called once); related purpose via a fake embedder; import raglab imports neither oa nor vd; JSON-clean raw records.

Deferred to follow-up issues: CONSOLIDATE, SUPERSEDE/bi-temporal staleness, purpose DAG transfer, cross-run benchmark (the issue's staged follow-ups).

🤖 Generated with Claude Code

…lls from (#6, stage 0)

ExtractionUnits keyed by purpose (content-hash id, optional embedding), injected
write/read strategies (upsert; relevance x importance x recency), a dol-able backend.
The agent's opt-in memory is offered to the evaluator before sweeping: the same
purpose run twice reuses its prior extractions instead of re-sweeping.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
thorwhalen and others added 2 commits October 20, 2026 11:55
…s, embedding backfill, exact membership

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thorwhalen
thorwhalen merged commit 21babcc into main Oct 20, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the purpose-store branch October 20, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant