How Codmir converts events into compounding intelligence through observe, interpret, act, evaluate, distill, and reapply.

Intelligence Loop

The intelligence loop is Codmir's mechanism for turning execution events into reusable knowledge.

The Six Stages

  1. Observe: capture high-signal events from project workflows.
  2. Interpret: infer intent, action, urgency, confidence, and outcome.
  3. Act: apply promotion rules to decide what deserves memory.
  4. Evaluate: classify outcome quality (success, failure, partial, unknown).
  5. Distill: extract reusable patterns from terminal events.
  6. Reapply: publish recommendations for future work.

Why It Matters

Without a loop, context resets after every task.

With a loop, every major event can contribute to:

  • explicit intent memory
  • outcome memory
  • reusable pattern memory
  • verified project-level (or global) knowledge promotions

Persistence Targets

  • ProjectMemory with source intelligence_loop
  • KnowledgePromotion for promoted patterns
  • DistillationJob and DistillationMetrics for loop telemetry

Event Integration

The loop is integrated into the canonical emit() pipeline and emits lifecycle signals:

  • intelligence.loop.observed
  • intelligence.loop.interpreted
  • intelligence.loop.evaluated
  • intelligence.pattern.promoted
  • intelligence.reapply.recommended
  • intelligence.loop.completed
  • intelligence.loop.failed

Promotion Philosophy

Codmir does not store everything.

Promotion rules deliberately prefer meaning over raw activity, so memory quality stays high and reapplication remains useful.