Repository navigation
Description
Goal
Build Memory as an independently deployable, project-independent FlossWare service shared by Loom, Claude Ensemble (CE), and future consumers. Consumers must not maintain competing memory implementations.
First implementation slice
- Specify language-neutral REST request/response schemas and structured errors.
- Implement append, fetch-by-ID, and bounded search operations.
- Use PostgreSQL as the initial durable backend behind a storage interface.
- Enforce explicit global/project/session-task scopes and project isolation by default.
- Support idempotent writes; conflicting reuse of an idempotency key with different content must fail explicitly.
- Preserve stable identity, source/provenance, timestamps, scope, and correlation metadata.
- Provide distinct liveness and readiness checks; storage failure must not look like an empty successful search.
- Add deterministic contract, isolation, idempotency, ranking/limit, and unavailable-storage tests.
- Expose MCP as a thin adapter over the same domain/service behavior after the REST contract is stable.
Explicit non-goals
- No orchestration, model routing, Learning, Thompson, Graph/Knowledge, alerts, or messaging in this repository.
- No mandatory embeddings/vector database for the baseline. Start with deterministic lexical/full-text retrieval and add hybrid/vector retrieval only behind the same contract and relevance tests.
- No application-specific Claude Code hooks or installer logic.
- No local inference or external model calls.
Acceptance criteria
- REST contract and error model documented.
- Append/get/search operations implemented and tested.
- Idempotent retries are safe; conflicting idempotency-key reuse returns a structured conflict.
- Cross-project reads are denied unless explicitly authorized.
- Query limits, ordering, and empty-result behavior are stable.
- Storage unavailability is visible in readiness and produces an actionable operation error.
- MCP adapter shares the same service logic and contract tests.
- Java and other language clients can use the HTTP contract without requiring a Python SDK.
Architecture context
FlossWare ADR-0032 establishes language-neutral multi-protocol service contracts: REST is the canonical baseline; MCP is first-class but should be a thin adapter over canonical REST/shared service logic; additional transports can be added without duplicating domain behavior.
Implementation note
The GitHub repository currently appears to be empty. Initial source files could not be committed through the contents API because no parent commit exists. Bootstrap the repository with an initial commit, then implement this issue on a feature branch and submit a reviewable PR.
Activity
sfloess commentedon Oct 23, 2026
Implementation is now underway in PR #5: initial PostgreSQL-backed REST service, direct ID retrieval, paginated enumeration/export, lexical search as a separate endpoint, project-bound token isolation, idempotency, readiness, and integration tests against PostgreSQL. Messaging is explicitly deferred. The PR is awaiting CI and review; this does not yet satisfy the full issue.
sfloess commentedon Oct 23, 2026
Update: PR #5 has been squash-merged. The PostgreSQL-backed REST service is now on main. The new PostgreSQL integration workflow passed: 7 tests passed, covering health/readiness, project-token isolation, raw record round-trip, enumeration, idempotency and conflict handling, lexical search separation, and admin-only global writes. The stored-data contract documentation remains in PR #4. This is the initial REST slice; MCP integration and a consistent-snapshot export remain follow-up work.