Skip to content

User story: memory-to-docs promotion pipeline

As a rig operator

I want the rig to automatically surface high-value memories for promotion into the brain — a weekly lint that proposes docs PRs when a memory has crossed importance + hit-count thresholds

So that durable learnings compound over time: what rig-dev discovered last month becomes what every agent knows next week, without a human having to catch it.

The brain/memory whitepaper §1 argues the promotion pipeline is what makes the architecture compound. Without it, memory grows noisy + brain stays static; both degrade.

Design already exists in research/2026-04-18-docs-memory-drift-lint. What’s missing is the runtime.

  1. Scheduled lint runs weekly — new agent variant (or shared rig-reviewer-like role) reads Memory MCP, applies promotion rules.
  2. Promotion rule (starting point): importance >= 4 AND hit_count >= 5 AND NOT docs_cover_already(content). Last clause via semantic similarity against current docs.
  3. Output is a docs PR in the relevant repo (rig-docs or a project brain) — not a silent memory edit. Human reviews + merges.
  4. Archival rule runs in the same pass: memories with hit_count = 0 AND age > 30d are compacted/archived. Brain stays lean.
  5. Metrics exposed via rig-conductor: memories written/week, promoted/week, archived/week, time-to-promotion for high-value ones.
  6. Memory pollution guard: promotions require at least 3 distinct agents have hit-used the memory. Single-agent echo chambers don’t qualify.
  • Docs-to-memory embedding pipeline (so similarity check has something to compare against)
  • LiteLLM proxy (so the lint agent is budgeted separately from work agents)
  • Decision on which role runs the lint (dedicated rig-lint? rig-reviewer variant? cron + stateless script?)
  • Auto-merging promoted docs without human review (promotion always via PR)
  • Retroactive promotion of pre-implementation memories (start fresh after rollout)
  • Memory scope other than repo and rig (session scope never gets promoted)

Medium. Not blocking current operation, but directly addresses the “memory vs docs” design gap that was a founding concern of the rig (see the LLM Wiki analysis).