Skip to content

Context Engine Harness

Component id: context_engine

Source contract: BlockContract for context_engine.

Overview

Stateful context tracker that maintains an 8-dimensional context vector encoding confidence, observation density, domain stability, constraint pressure, energy level, novelty, change rate, and recency. Updates are persisted to SQLite when a db_path is provided, enabling durable situation awareness across process restarts. The block auto-classifies each context snapshot as stable, unstable, novel, or fatigued using threshold rules on the vector components.

When to use:

  • Tracking the current operational context in a physical AI or agent loop
  • Detecting when a situation has changed significantly enough to require a plan revision
  • Enforcing runtime constraints and querying which are currently active
  • Building up a history of context snapshots for downstream novelty detection or audit

Pilot-ready, not standalone regulated assurance

context_engine is suitable for MVP launch, local MCP use, and design-partner pilots where durable context, snapshot restore, constraint tracking, and audit-friendly history are useful. Its situation labels, novelty scores, and change detection are heuristic signals, not calibrated risk or compliance decisions. Before relying on it for regulated, safety-critical, or high-volume production workflows, add domain-specific observation validation, database retention/backup policy, representative evaluation sets, human-review breakpoints, and external legal/compliance review where applicable.

Good at

  • tracking the current operational context in an agent or physical-AI loop
  • detecting when a situation has changed enough to need a plan revision
  • querying which runtime constraints are currently active

Not suited for

  • calibrated risk or compliance decisions (its situation labels are heuristic signals)
  • regulated or safety-critical workflows without added validation and human review

Mitigates

Known Failure Modes

  • review_pending: operator_review

State Surface

  • Persistence: project
  • Queryable via: snapshot_export
  • Retention: 90d

Extension Points

  • training_signal_inputs: ('context_packets', 'reliability_incidents')
  • validation_gate: unit_tests_only
  • allowed_mutation_surfaces: ('context_policy', 'retrieval_thresholds')

Verification

  • Method: tier1_review_pending
  • Human review gate: False
  • Fallback block: none