Memini: implementation plan (draft v0)
Milestones in build order, with acceptance scenarios. For current implementation paths and tests, see the developer guide. Requirements describe the contracts.
Tracking
Tasks live in beads, one epic per milestone plus two tracks that run
alongside: "CI/CD on GitHub" and "Production hardening".
bd ready lists what can start now;
bd show <id> gives the description and the acceptance
check. The release task Release v0.1.0 depends on every
production gate.
M0. Skeleton
- Repository, license, README, CI (lint, tests).
docker compose: service and Postgres with pgvector.- Migrations: workspace, principal, token, source, stream, record, run.
- Config, bearer-token auth, health endpoint.
- MCP endpoint with one tool:
status.
Done when: docker compose up starts, an MCP client
connects with a token and status answers.
M1. Code search
gitconnector: bare mirror, scheduled fetch, pinned commit per tracked ref, changed files from the diff.- tree-sitter chunking and symbol table; line-window fallback.
- Local embeddings, lexical index, trigram index, hybrid search with rank fusion, optional rerank.
- Index fingerprint and rebuild.
- Tools:
search_code,read_source,get_symbol,search. - Retrieval eval harness with a code question set.
Done when: two repositories in two workspaces are indexed; a new commit re-chunks only changed files; a rebuild from the mirrors gives the same chunk ids; the eval runs.
M2. Ingest contract, messages and meetings
- Push API: record batches, window claims, idempotency, tombstones.
- Record kinds
thread,meeting,document; chunking for each. - Persons, aliases, "me"; deterministic resolution; manual merge.
- Filters, redaction, retention.
- Tools:
list_meetings,get_meeting,list_messages,get_thread,add_document;searchcovers all kinds.
Done when: synthetic chat and meeting fixtures ingest twice with no change on the second run; "meetings I attended about X" and "messages to me about X" return the expected records; expired records and their chunks disappear.
M3. MCP recipes
- Recipe format, parser interface, completeness checks, raw response store and replay.
- Agent executor: plan and next-call API, a Claude Code skill and a capture hook that post raw responses.
- Service executor: MCP client, scheduler, encrypted token storage, per-source locks.
- Stream health in
status; run reports. - Intake modes (requirements section 4):
memini pushfrom a file or stdin, and a skill for an agent that pushes what it reads from its own tools.
Done when: one recipe run by both executors yields identical records; an incomplete window leaves the checkpoint in place and lists the missing calls; a parser fix replays from stored raw responses.
M4. Decision journal
- Extraction with structured output;
llm_policyper source; provider config per workspace. - Supersession check against similar active items.
- Tools:
list_decisions,get_decision,record_decision,supersede_decision,close_decision,retract_decision. - Decision eval on labelled synthetic threads.
Done when: on a fixture where thread B reverses thread A, A becomes
superseded, the default list shows only B and the history
shows the chain with evidence links; the eval reports precision, recall
and supersession accuracy for the chosen local model.
M5. Release
- Install guide, configuration reference, recipe authoring guide.
- Backup and restore,
forget, reindex. - Freshness gate: one call that says whether every stream and index is current.
- First tagged release.
Done when: a clean machine goes from the release installation guide to a working search over one repository and one pushed thread.
Order and risks
- M3 comes right after M2 because the agent executor is the only way to reach sources that have no headless token. Without it there is no real message data to test M4 on.
- Biggest risk: quality of decision extraction on local models. M4 starts with the eval, not with the pipeline.
- Second risk: MCP servers change their output shape. Raw responses are stored verbatim so parsers can be fixed and replayed.
- The retrieval and embedding evaluations and the choice of PostgreSQL with pgvector are recorded in the requirements decision history.