Milestone: Knowledge Loop Closed (March 15-16, 2026)

milestone-2026-03-15-knowledge-loop Doc

completed milestone

Knowledge Loop Closed — March 15-16, 2026

Numbers

Metric Before After
Semantic search 503 (dead) Live, 0.72–0.88 similarity scores
MEMORY.md 224 lines, 76% stale 60 lines, behavioral only
Startup context ~4,000 tokens, 45% irrelevant Trimmed + vector-powered Dynamic Briefing
Embedding errors 152 0
PRs merged 6 across 4 repos

What shipped

  • Ollama model persistence — hostPath volume replaced PVC, ensuring embedding model survives pod lifecycle events. PR #90 + #91 (pal-e-platform).
  • Embedding backfill — 152 error blocks reset and re-embedded. All blocks at completed/skipped.
  • Prometheus alerting — ServiceMonitor + embedding error rate alerts. 10-minute detection for future failures.
  • MEMORY.md diet — Audited 44 topic files. Removed 76% stale project state. Memory now carries only behavioral corrections.
  • Vector-powered Dynamic Briefing — Session startup queries semantic search using in-progress board items. Top results injected as enterprise context. Fail-open design. PR #116 (claude-custom).
  • Plan TOC trimming — Only inject TOCs for projects with in-progress board items. ~1,200 tokens saved. PR #114 (claude-custom).
  • convention-memory-scope — Decision gate: behavioral → memory, state → pal-e-docs. Prevents future bloat.
  • template-ticket — Kanban card definition with traceability triangle (User Story ↔ Architecture ↔ Phase).
  • MCP labels fix — SDK + MCP labels type fix. PR #42 (pal-e-docs-mcp), PR #31 (pal-e-docs-sdk).

What we learned

  • Ollama PVC was the root cause, not Ollama itself — Pod was healthy (0 restarts, 6 days running). But the PVC was recreated and only chat models were pulled. The embedding model was missing. hostPath prevents this class of failure entirely.
  • embedding_queue_depth is misleading — Failed blocks get marked error after 3 retries, not pending. Queue depth reads 0 during complete failures. The correct alert is rate(embedding_errors_total[5m]) > 0.
  • MEMORY.md truncation was actively harmful — 200-line limit meant lines 201+ were invisible. Stale state ("262 notes" when there were 500+) created false confidence. The diet isn't just cleanup — it's a correctness fix.
  • 4 concurrent sessions share one Dynamic Briefing — Same cwd = same hook output. Briefing should be enterprise dashboard, not project deep-dive. Project depth comes from targeted queries on demand.

The loop

This milestone marks the point where pal-e-docs became self-reinforcing: docs get written → blocks get embedded → session startup queries vectors → relevant context surfaces → session work updates docs → new blocks get embedded. The knowledge loop closed.
  • phase-pal-e-docs-f12-semantic-search-recovery — Ollama fix + backfill + alerting
  • phase-pal-e-docs-f13-context-intelligence — MEMORY.md diet + Dynamic Briefing
  • convention-memory-scope — behavioral vs state decision gate
  • template-ticket — traceability triangle