Skip to content

Feature: AI Harness Foundations — Scoped Knowledge, Reproducible Context, and Retrieval Observability #119

Done

Description

@gosha70

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

Planning Instructions for AI Harness

When this issue enters planning:

  1. Analyze the existing MemKernel implementation and related issues.
  2. Identify missing capabilities and overlapping functionality.
  3. Research implementation alternatives and trade-offs.
  4. Choose the smallest coherent architecture.
  5. Define tests, measurement criteria, and implementation boundaries.
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions