DD-469: standalone Attention provider — implementation epic #1
Labels
No labels
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/attention-mind-mcp#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Accepted product plan — 2026-11-15
This is the non-dispatchable epic for the standalone Attention provider. Product decisions are accepted and recorded in ADR 0002: Python, single-writer SQLite, Compose first, loopback behind existing ingress, encrypted S3-compatible backups, fail-closed recovery-sensitive writes and product-operated expiry/version cleanup. ADR 0001 preserves the portable capability and native Stallari boundary.
Implementation input is mind-spec
3da6a263e6aeb3f37d25590d6ab755045ff53786: attention/1.0, binding 1.1, schemas and common conformance. The earliermind-spec-v0.1.0is the Mail release and remains unchanged. The contract grill is complete; these product decisions do not reopen it.Implementation slices
The accepted decomposition records bounded scope and acceptance. Live progress and dispatch belong on these issues:
Foundation → durable commands → queries/recovery/delivery → packaged acceptance. Foundation #3 and durable queue/commands #4 are complete: PR #10 landed as
9b5a7c0b6e4c, and PR #11 landed as04b0704842deon 2026-11-15, completing 2 of 6 slices. The next unblocked implementation issues are #5 and #6; neither is dispatched by this merge. Delivery #7 still depends on #6 for complete acceptance. The implemented provider subset exposes info, admit, submit, replace, withdraw and dispose; clean local queues are ready, and unresolved prepared work remains quarantined. Reviewed completion evidence covers 295 passing tests, quality/build, integration and Linux CI. Public queries, Forget, delivery, backup/restore and deployment remain later scope.Epic acceptance and boundaries
Close only when all six slices have linked implementation and evidence, including actual authenticated provider conformance, writer termination/retry, logical retained-data inspection, complete recovery evidence, isolated S3 object/version custody and expiry drills, fake-host effect counts, Compose recovery exercises and measured resource budgets. Reference-model traces do not certify those properties. No running provider, native integration, deployment or image has been certified by publishing this plan.
One queue has one authority; Stallari may implement the compatible contract natively without this service, with Signals owning interruption policy. First input is explicitly authorised submission. Automatic source ingestion, People enrichment, real notifications, a public feed, native Stallari implementation, Kubernetes/launchd packaging, Tailcat/Ratatoskr integration and shared runtime extraction remain separate work. No Nexus or broker is required. The historical brief below is preserved and superseded wherever it conflicts with the accepted decisions.
Historical brief — 2026-11-01 (preserved)
Original title: Spec: attention-mind-mcp 0.1.0 — wake fan-in mind with one ranked queue over MCP.
Spec synthesised 2026-11-01 from the mind theory session. Source notes (vault, private): the capture "Attention-mind design: service and MCP surface", the capture "Blade and mind portfolio theory", and the draft directive
mind-mcp-class. Class rules follow that directive; vocabulary follows mailmind ADR 0001 to 0008 and peoplemind ADR 0001 to 0006 (Consumer, Source, evidence token, outbox, wake).Problem Statement
A person who runs several minds (mail today, people now, calendar and messages next) has no single place that says what deserves their attention. Each mind raises its own wakes on its own feed. A hosted agent such as a Grok Bot Automation therefore needs one routine per mind, pays tokens on every run to re-rank and re-recognise items it saw before, reads the same person's mail, invite and message three times, and has no memory of what the owner already handled, snoozed or muted. Noise control is reinvented inside every mind or left to the model. Switching the agent host loses whatever attention policy the model had learned.
Solution
attention-mind-mcp is a mind whose Sources are other minds. A
syncworker is the only client of the upstream wake and change feeds. It stores each wake as an attention item that holds references only, never content, joins the item to a Person through person-mind's evidence surface, coalesces signals about the same Person, and ranks items in code. Anapiprocess serves one merged, ranked queue over Streamable HTTP with bearer tokens and named Consumer cursors, so one routine on any MCP host callsattention_next, handles a few rows, and acks once. The owner's dispositions (handled, snooze, mute) are the only policy writes, reversible through an outbox with undo and audit. The mind never calls an upstream write tool and never dispatches anything.User Stories
attention_ackto never move backwards and to refuse a seq past the end, so that a confused client cannot lose or skip items.attention_statusto show each upstream's Consumer position, lag, last error code and counts, so that I can tell a quiet day from a broken sync.attention_sourcesto list the configured upstreams, so that I know what feeds the queue.attention_changesandattention_changes_ack, so that Stallari or a household view can fan in from this mind in turn./healthzand/healthz/syncto behave as mailmind's do, so that one probe shape covers every mind.api,sync --once,check --offlineandtoken, so that operations match the sibling minds.Implementation Decisions
syncas the only Source client and only writer of the item tables,apireading the store and writing only the outbox and Consumer positions. Python 3.12, uv, mypy strict, ruff with S, MIT, as the sibling minds.seq | ref | class | score | atwithack_seqandmore).people_findwith an exact Handle resolves a sender handle to aperson_id;people_relatedor the card supplies the relation type;people_changesmerge events invalidate the join cache. The handle comes from mailmind'smail_evidenceon the evidence token. A deployment without person-mind runs withwhoempty and relation weight at the unknown value.items(seq, source, upstream_seq, ref, who, klass, score, raised_at, state, escalation, offered_count, last_offered_at, snoozed_until),signals(item seq, source, ref, at) for coalesced members,join_cache(handle, person_id, relation, expires_at),consumers(name, position) for downstream clients,actionsoutbox and audit for settlements and undo,mutes(scope kind, scope value, until, action id),changesfor the class-standard feed. One writer, WAL, Litestream.atstays the earliest. Without a Person, coalescing falls back to the upstream thread reference when the Source exposes one, otherwise no coalescing.[rank],[budget]and[quiet]. No model runs in the hot path. A later ADR may add an advisory Jev second opinion under the same data-boundary rule as mailmind ADR 0003; it is not in 1.0.attention_next) → acked by cursor → settled (handled, snoozed, muted) or re-offered after the interval with escalation incremented. Snoozed items return atsnoozed_until. Muted scopes filter at query time and apply to future items. Quiet hours suppress offering, not ingestion.attention_next(consumer, limit)rowsseq | source | ref | who | class | score | signals | agewith footerack_seqandmore, and the literalno new itemsline on an empty page;attention_ack(consumer, seq);attention_statusone row per Sourcename | kind | position | lag | last_error | pending | snoozed | muted;attention_sourcesname | kind | url_host | last_sync | last_error;attention_policythe active config as rows;attention_changes(consumer, limit)andattention_changes_ack(consumer, seq)with kindsadd,update,settle,del.attention_settle(seqs, disposition)with disposition one ofhandled,snooze:<duration>,mute:person:<id>:<duration>,mute:ref:<source>:<ref>:<duration>,mute:source:<name>:<duration>, returning an action id per item;attention_undo(action_id);attention_actions(limit)listing the audit. Settlements go through the outbox and are applied bysync, as mailmind ADR 0004 does, soapiwrites only the outbox and positions.attention_nextrow under 30 tokens, an empty page under 15, aattention_statusrow under 40./healthzfromapi,/healthz/syncfrom the sync worker, same semantics as mailmind.sync,apiand abackupprofile, kustomize base with an example overlay, one PVC ReadWriteOnce, Recreate strategy. Secrets are files mounted per container.Testing Decisions
test_feedandtest_server(served fixture,callhelper, exact tool-list count, token-budget tests, untrusted-data docstring check).FakeMailintest_mailmind. Tests assert that attention-mind calls only the wake, change, ack, evidence and find tools, and that a fake that offers a write tool is never called.test_feed.test_find_default_row_under_150_tokens.Out of Scope
Further Notes
mail_wakesandmail_wakes_ackon the evidence scope, so attention-mind never needs a mailmind read token.attention-mind-mcp, tools prefixedattention_, decisions as repo ADRs under CONV-34, with the vault holding the birth record only.Spec: attention-mind-mcp 0.1.0 — wake fan-in mind with one ranked queue over MCPto DD-469: reconcile standalone attention implementation with the portable contractDD-469: reconcile standalone attention implementation with the portable contractto DD-469: standalone Attention provider — implementation epic