Repository navigation
Description
Objective
Enhance MemKernel to become a dependable memory and knowledge foundation for dynamically assembled AI engineering harnesses.
This is one feature request with three related capability areas, not three independent implementation tasks.
Planning responsibility: When development begins, AI Harness (HB) will analyze the requirements, inspect current functionality, research alternatives, select the architecture, determine implementation boundaries, and propose the work plan.
This issue defines what capabilities are needed, not how they must be built.
Part 1 — Task-Scoped Knowledge
AI agents working on different features, tickets, or roles should retrieve relevant knowledge without receiving unrelated or unauthorized memories.
Expected capabilities:
- Task-, feature-, and agent-aware knowledge retrieval.
- Controlled sharing of approved project knowledge.
- Isolation of private or temporary agent memory.
- Exclusion of irrelevant, superseded, or unapproved information.
- Explicit abstention when no eligible knowledge exists.
- Compatibility with existing MemKernel consumers.
Success scenario: Two agents working on different features share approved architectural decisions while keeping private task notes separate.
Part 2 — Reproducible Knowledge Context
AI Harness should be able to identify and reconstruct the knowledge context used during a particular engineering task.
Expected capabilities:
- Versioned, inspectable knowledge selections or snapshots.
- Traceability to original sources and source revisions.
- Awareness of changed, stale, missing, or superseded knowledge.
- Separation of approved wiki content, decisions, code references, and provisional memory.
- An explainable record of why particular knowledge was selected.
Success scenario: After source code or architectural decisions change, the system can identify differences from the context used by an earlier harness run.
Part 3 — Memory Observability and Effectiveness
AI Harness should be able to measure whether MemKernel's retrieval improves engineering outcomes.
Expected capabilities:
- Correlation of retrieval activity with harness runs, tickets, and agents.
- Visibility into selected, excluded, stale, and missing memories.
- Retrieval latency and context-size measurements.
- Distinction between missing knowledge, inaccessible knowledge, retrieval misses, and knowledge retrieved but not used, where supported by evidence.
- Integration with external harness telemetry without duplicating orchestration responsibilities.
- Reproducible evaluations against simpler approaches.
Success scenario: AI Harness can explain which memories were supplied during a task and correlate retrieval behavior with subsequent results and repeated mistakes.
Acceptance Criteria
- AI Harness produces a design and implementation plan before coding.
- The three capability areas are evaluated together.
- Existing MemKernel functionality remains compatible unless migration is explicitly justified.
- Feature and agent isolation is demonstrated through tests.
- Knowledge provenance and change detection are demonstrated.
- Retrieval behavior can be correlated with external harness execution.
- Benefits and overhead are measured against appropriate baselines.
- Documentation explains capabilities, limitations, and failure cases.
Architectural Boundaries
MemKernel owns memory lifecycle, retrieval, provenance, and memory-related instrumentation.
Wiki-Studio remains responsible for governed wiki content and approval.
AI Harness owns orchestration, agent and skill composition, implementation decisions, end-to-end tracing, and evaluation.
This issue does not mandate a particular MemoryView API, Knowledge Pack format, graph database, MCP interface, or telemetry framework.
Related Issues
- One memkernel store across several coding tools (Claude Code, Codex, Cursor, Antigravity) #107 — Shared MemKernel store across coding tools
- Preserve and retrieve implementation alternatives for reuse-first coding #57 — Implementation alternatives and decision memory
- Context rescue: fix the compaction hooks, then capture session knowledge before it is lost (0.5.1 → 0.6) #59 — Context rescue and lifecycle capture
- Lifecycle suite: a discriminating lc-wiki task set and a governed-composition arm (design from wiki-studio 0.8.1) #90 — Governed-wiki lifecycle evaluation
- Request: a reproducible agent-level benchmark showing where MemKernel helps (and where it does not) #17 — Reproducible agent-level benchmarks
- Question: has a repeated mistake ever been counted on memkernel sessions, in the lifecycle evaluation or in real use? #112 — Repeated-mistake measurement
Planning Instructions for AI Harness
When this issue enters planning:
- Analyze the existing MemKernel implementation and related issues.
- Identify missing capabilities and overlapping functionality.
- Research implementation alternatives and trade-offs.
- Choose the smallest coherent architecture.
- Define tests, measurement criteria, and implementation boundaries.
- Decide whether the work should be implemented in one or multiple PRs.
Do not prescribe the implementation in this issue. AI Harness should determine the solution based on research, architecture, and measurable evidence.
Activity
spec: #119 after review: scope on every read path and through promoti…
spec: #119 approved by the owner, D1-D6 as written, H1 first
Merge pull request #143 from gosha70/spec/119-harness-foundations
spec: harness foundations, scoped knowledge, context receipts, retrie…
Log an MCP recall's whole response length as returned_chars
Merge pull request #154 from gosha70/feat/119-h1-receipts
spec: H2 amendment, review round 1 (#119)
spec: H2 amendment approved; B4 revised by the owner (#119)
spec: H2 B4, state that recovery never falls back to project (#119)
spec: H2 B4 consequences: ids in the hooks' environment, stable task …
Merge pull request #155 from gosha70/spec/119-h2-scope-abstention
Show revalidation's newly flagged items only to callers who can see t…
Merge pull request #156 from gosha70/feat/119-h2-scope
spec: H3 amendment, the owner's fixes (#119)
Merge pull request #157 from gosha70/spec/119-h3-context-diff
Context diff: check sources only for decisions and code; open the sto…
Merge pull request #158 from gosha70/feat/119-h3-context-diff