Skip to content

spec: harness foundations, scoped knowledge, receipts, observability (#119) - #143

Merged
gosha70 merged 5 commits into
mainfrom
spec/119-harness-foundations
Nov 19, 2026
Merged

gosha70 merged 5 commits into
mainfrom
spec/119-harness-foundations

Conversation

@gosha70

@gosha70 gosha70 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Approved by the owner, 2026-11-19: D1–D6 as written; H1 (receipts and correlation) is built first. Head: 4f58513.

The design and plan #119 asks for before coding, in specs/memkernel-0-15-harness-foundations/. No code. Written overnight on your instruction; .

Refs #119. Head after the review: 8ada8cc.

What it does

  • A table per Feature: AI Harness Foundations — Scoped Knowledge, Reproducible Context, and Retrieval Observability #119 capability: what memkernel already has, and the gap. memkernel already excludes superseded, flagged and unapproved knowledge, and keeps content_hash and source_hash. It has no notion of an agent or task scope, no record of which memories a run received, and no run, agent or task ids in the recall log.
  • The smallest architecture over those gaps:
    • Part 1: a scope metadata field (project, the default; agent:<id>; task:<id>), plus a reason when recall comes back empty.
    • Part 3: run, agent and task ids per call or per process, written into the recall log.
    • Part 2: context receipts, where each recall-log record lists the returned memories' hashes and states, plus latency, size and exclusion counts. A context-diff tool compares a past run's receipts with the store now.
  • Constraints respected: no new MCP tool (there are 9, pinned below 10), no new store, no new dependency, and older stores load with every record in the project scope.

Changed after the review

  • Scope applies on every read path: recall, get, list_memories, ask, the promotion candidates, wiki export and the hook blocks. A promoted note keeps its source's scope, so promoting can't publish a private note.
  • Scope is a convention between cooperating callers, not security. The caller names its own agent id, and the README will say so.
  • The empty-recall reason goes into the recall log's receipt, so MCP recall still returns its JSON list. A field next to the results would turn the list into an object and break existing clients.

Decisions (the owner's)

  1. D1: scope as a metadata field, not a collection per agent.
  2. D2: correlation ids per call and per process.
  3. D3: receipts in the opt-in recall log.
  4. D4: no OpenTelemetry now (it would need an ADR).
  5. D5: three slices, in order: H1 receipts and correlation, H2 scope and abstention, H3 the diff.
  6. D6: the caller (the harness) decides agent and task ids.

The comparison against simpler approaches is assigned to the lifecycle suite (#90, #17), not a new runner.

Checks: the origin gate passes. DeepSeek didn't run (paused).

…val observability (#119)

The design and plan #119 asks for before coding: what memkernel already has per
capability, the gaps, and the smallest architecture over them (a scope field,
receipts in the recall log, a context-diff tool), in three slices. D1-D6 proposed
for the owner.
…on, abstention in the receipt

The review of #143: a private record must stay private through get, list, ask, the
promotion candidates, wiki export and the hook blocks, and a promoted note keeps its
source's scope; scope is a convention, not security; the empty-recall reason goes
into the recall log's receipt so MCP recall's JSON list is unchanged.
@gosha70
gosha70 merged commit 24efdd5 into main Nov 19, 2026
9 checks passed
@gosha70
gosha70 deleted the spec/119-harness-foundations branch November 19, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant