Repository-local memory infrastructure

Memory that preserves context—never authority.

Palimnex gives coding agents fast source discovery, durable historical memory, a replicable audit graph, encrypted portability, and explicit retention controls without making a cloud database or model provider part of the trust boundary.

Package / API
2.9.0 / v1
Frozen gate
20 / 20
Recall@5
1.0
Local trust boundary
</>
Repository sourceCurrent authority
◇
Privacy admissionFail-closed scanning
Redis cacheDisposable discovery
SQLite ledgerDurable history
Historical context ≠ permission to act
01Source authoritativeResults reopen verified checkout bytes.
02Local by defaultOwner-only Redis socket and repository state.
03Explicit lifecycleNo automatic durable deletion or hidden execution.
04Portable safelyAuthenticated encryption and quarantined imports.

Architecture

Two memory planes. One clear authority model.

Redis accelerates discovery. SQLite preserves accepted historical events. Repository files remain the current source of truth.

Pipeline flows

Evidence enters through controlled, inspectable paths.

A

Verified source retrieval

Fast candidates, current bytes.

  1. 1Privacy scanReject credential-shaped content before derivation.
  2. 2Build postingsStore digests, vectors, graph metadata—never source bodies.
  3. 3Bound candidatesBM25-style lookup touches at most 512 chunks.
  4. 4Reopen sourceVerify file and chunk digests against the checkout.
  5. 5Return evidenceRanked text with score components and source pointers.
B

Durable memory

Commit before projection.

  1. Validate event + evidenceTyped schema, current source locator, privacy policy.
  2. SQLite transactionEvent and outbox row commit atomically.
  3. Redis hot projectionBounded metadata only; retries are idempotent.
  4. Recall with trust filtersTime, sensitivity, retention, history, and verification.
C

Authorized erasure

Explicit, local, verifiable.

  1. Authorize + bind planShort-lived authority, reason code, current ledger digest.
  2. Enforce holds + dependenciesProtected anchors and unresolved stores fail closed.
  3. Rewrite + recomputeRemove content and derivatives; withdraw unsupported facts.
  4. Verify + tombstoneCompact locally and preserve non-reconstructive audit residue.
D

Replicable audit graph

Portable evidence, optional projection.

  1. 1Export graphEligible sessions, events, evidence, and tombstones. Secrets stay out.
  2. 2Content digestStable graph_digest; optional Ed25519 signature.
  3. 3Keep pack v2Sibling JSON only; encrypted pack field set is unchanged.
  4. 4Optional Semantica copyUntrusted history, TTL off, local semantica: locators.
  5. 5Fail-closed forgetMandatory store gaps fail; receipt hashes, no forensic claim.

Data stores

Each store has one job—and explicit limits.

R

Redis

Discovery cache

Durability
Disposable
Contains
Digests, postings, vectors, graph metadata
Transport
Owner-only Unix socket when configured; writes refuse unauthenticated TCP
Loss behavior
Rebuild from repository and ledger
S

SQLite

Historical ledger

Durability
Authoritative for accepted memory
Contains
Events, evidence, workflows, outbox, controls
Mode
WAL · foreign keys · synchronous FULL
Boundary
Private repository-local runtime file
P

Encrypted pack

Portable history

Format
project-memory:pack:v2
Cipher
ChaCha20-Poly1305
Import state
Quarantined, untrusted history
Authority
Never restores permission to act
Erasure
Exported copies are out of band unless registered
G

Audit graph

Replicable evidence

Format
palimnex:audit-graph:v1
Contains
Nodes, edges, tombstones, control residue
Projection
Optional Semantica copy, TTL disabled
Authority
Historical only; never permission to act

Prerequisites & third parties

Small dependency surface. No mandatory cloud service.

Core source discovery and ledger operations are Python-standard-library code. External components are isolated by capability.

ComponentRequirementPurposeOperational boundary
Python 3.11+RuntimeRequiredCLI, cache engine, ledger, schemas, testsStandard library for core paths
Redis server + CLIDatabase / cacheCache-backed featuresSource discovery cache and hot metadataDisposable; owner-only Unix socket via the guarded launcher
SQLiteEmbedded databasePython bundledDurable historical-memory ledgerLocal file; no database server
cryptographyPython distributionPacks + identityChaCha20-Poly1305 encryption and Ed25519 signaturesOptional crypto extra for packs and signed checkpoints
jsonschemaPython distributionTest gateDraft 2020-12 schema-conformance validationDevelopment and CI only; not a runtime dependency
mcpOfficial Python SDKOptional transportLocal stdio tools over public SDK v1Read-only by default; no HTTP listener
SemanticaOptional extraOptional projectionDuck-typed audit-graph copy and fail-closed eraseNever imported by core; retention_days must be None
GitSource controlRecommendedRepository provenance and rollback workflowNever authorized by recalled memory
GitHub ActionsHosted CIOptionalRuns the standalone local gate on push and PRNo live ledger and no model call
×No vector database
×No model API
×No HNSW service
×No hosted SQL database

Quick start

From checkout to verified retrieval.

Run from the repository root. The guarded launcher creates a private Redis instance under ignored local state. ledger-init is a one-time local write that creates the durable ledger.

palimnex — bash
$ ./scripts/palimnex_redis.sh start
$ python3 palimnex.py status
$ python3 palimnex.py index --incremental
$ python3 palimnex.py validate --deep
$ python3 palimnex.py evaluate --limit 5
$ python3 palimnex.py ledger-init
$ python3 palimnex.py ledger-status
$ python3 palimnex.py audit-graph

✓ fresh cache · deep validation passed

Safety boundary

Recall informs. It never authorizes.

Cache hits, durable records, imported packs, and remembered workflows cannot grant permission to commit, push, deploy, spend, erase, contact a provider, or change an external system. Current authorization always comes from the current operator and repository context.

Maintainer contract