Redis-specific data-access package for Medicine Wheel. This package remains a real persistence implementation with connection management, relational CRUD, session/ceremony linking, and discovery helpers, but it is not the canonical cross-backend storage abstraction.
Version: 0.6.3
Package: @medicine-wheel/data-store
Document ID: rispec-data-store-v3
Parity Baseline: 2026-08-19
Users who deliberately choose Redis create a network-accessible Medicine Wheel data store with shared relational records and session/ceremony linkage, without confusing that Redis implementation with the suite-wide provider contract.
Earlier revisions of this specification described JSONL and Redis together as two implementations of one shared architecture. That is no longer the repository boundary.
The current architecture separates them:
@medicine-wheel/data-store is the Redis-specific package;@medicine-wheel/storage-provider owns the canonical asynchronous provider interface and currently implements JSONL and Neon/Postgres;RedisProvider is not yet implemented there.This spec therefore describes what data-store is, not what storage-provider has become.
Desired state: Redis remains usable for callers that intentionally depend on its networked data-access behavior.
Current pressure: historical documentation can make a specialized package look like the canonical architecture, creating two competing definitions of persistence.
Natural resolution: keep the Redis package explicit and bounded. Cross-backend semantics belong to storage-provider; Redis-specific capabilities remain here until a deliberate convergence step implements them behind the canonical provider contract.
The package owns Redis connection lifecycle and configuration.
Conceptually:
interface RedisConnectionConfig {
url?: string;
prefix?: string;
autoConnect?: boolean;
retryAttempts?: number;
retryDelay?: number;
}
The package supports creating, retrieving, closing, and checking the connection used by its data-access operations.
The Redis dependency is an implementation fact of this package, not a requirement imposed on the wider Medicine Wheel system.
The Redis store works with ontology-core records.
The package also exposes discovery helpers around these records.
The package preserves bidirectional relationships between external session identifiers and Medicine Wheel ceremony identifiers.
Conceptual operations:
linkSessionToCeremony(sessionId, ceremonyId)
getCeremoniesForSession(sessionId)
getSessionsForCeremony(ceremonyId)
The linkage is a real capability of this Redis package; it should not be projected onto storage-provider unless that capability is deliberately added to the provider contract.
The following behaviors belong to storage-provider, not to this package’s normative contract:
MW_STORAGE_PROVIDER;countNodes() / countCeremonies() parity;A caller needing those semantics should depend on storage-provider.
A future canonical Redis backend should implement StorageProvider semantics explicitly.
It must not be declared complete merely because this Redis package already stores nodes, edges, and ceremonies. Provider parity includes mutation meaning, paging versus totals, registry families, error/refusal semantics, filtering, and compatibility behavior.
Until that work exists, selecting Redis through the canonical provider factory should fail visibly rather than silently route into a partial adapter.
Desired Outcome: A deployment already using the Redis data-access package continues to store and retrieve its relational records.
Current Reality: The suite’s canonical persistence architecture has moved to storage-provider.
Natural Progression: Keep the Redis dependency explicit and continue using this package’s own API.
Resolution: Existing Redis work remains valid without redefining the suite-wide provider contract.
Desired Outcome: Select Redis anywhere JSONL or Neon can currently be selected.
Current Reality: A Redis-specific store exists, but full provider parity has not been implemented.
Natural Progression: Build a StorageProvider adapter, prove behavioral parity across the provider contract and record families, then enable provider selection.
Resolution: Redis becomes a canonical backend by demonstrated equivalence rather than by name reuse.
data-store as the owner of JSONL persistence.src/data-store/package.jsonsrc/data-store/src/connection.tssrc/data-store/src/store.tssrc/data-store/src/session-link.tssrc/storage-provider/src/interface.tssrc/storage-provider/src/factory.ts