[P0] Define typed domain models and strategy interfaces #5

Closed
opened 2026-07-17 23:58:27 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-07-17 23:58:27 +00:00 (Migrated from github.com)

Goal

Create stable contracts for components so capture, metadata, models, encryption, and storage remain replaceable.

Required interfaces

  • CaptureBackend
  • MetadataSource
  • CapturePolicy
  • RedactionPolicy
  • EncryptionProvider
  • KeyProvider
  • StorageBackend
  • OCRProvider
  • EmbeddingProvider
  • GenerationProvider
  • ModelRoutingPolicy
  • Clock and event/message abstractions for deterministic tests.

Required domain models

  • Capture state and transition events.
  • In-memory frame and redacted frame.
  • Context metadata with source confidence and provenance.
  • Redaction finding and reason.
  • Encrypted record envelope with schema version.
  • Retrieval result and cited answer.

Acceptance criteria

  • Interfaces contain no backend-specific assumptions.
  • Security-sensitive types make invalid stage ordering difficult or impossible.
  • Provider capabilities and privacy classifications are explicit.
  • Contract tests can be reused by concrete implementations.

Depends on

## Goal Create stable contracts for components so capture, metadata, models, encryption, and storage remain replaceable. ## Required interfaces - `CaptureBackend` - `MetadataSource` - `CapturePolicy` - `RedactionPolicy` - `EncryptionProvider` - `KeyProvider` - `StorageBackend` - `OCRProvider` - `EmbeddingProvider` - `GenerationProvider` - `ModelRoutingPolicy` - `Clock` and event/message abstractions for deterministic tests. ## Required domain models - Capture state and transition events. - In-memory frame and redacted frame. - Context metadata with source confidence and provenance. - Redaction finding and reason. - Encrypted record envelope with schema version. - Retrieval result and cited answer. ## Acceptance criteria - Interfaces contain no backend-specific assumptions. - Security-sensitive types make invalid stage ordering difficult or impossible. - Provider capabilities and privacy classifications are explicit. - Contract tests can be reused by concrete implementations. ## Depends on - #3 - #4
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/local-recall#5
No description provided.