Back to Blog
Product

Your Agents Now Know What's Stale — And What New Agents Need to Know

Hivemind's intelligence layer now detects outdated knowledge docs and generates onboarding context for new agent sessions. Phase 9 is complete.

GB

Gabriel Bram

February 23, 20264 min read

The Problem

Two things quietly sabotage multi-agent projects:

1. Stale knowledge docs — An agent wrote "we use REST for the payments API" three weeks ago. Last week, another agent migrated to GraphQL. The old doc is still there, still confident, still wrong. The next agent that queries it gets misled.

2. Cold starts — A fresh agent session begins with zero context. It calls hivemind_status(), gets active tasks and blockers, but has no idea *what the project is about*, what conventions matter, or what decisions shaped the current architecture.

Stale
Outdated docs detected
Context
Onboarding generated
Phase 9
Intelligence layer complete

Feature 1: Stale Knowledge Detection

Hivemind now continuously evaluates your knowledge docs for staleness using two signals:

Age-Based Staleness

Any knowledge doc that hasn't been updated in 30+ days is flagged as potentially stale. Simple, but effective — if a doc about your API structure hasn't changed in a month, and your agents have been shipping code daily, it's probably drifted.

Contradiction-Based Staleness

This is the powerful one. Hivemind compares each knowledge doc against recent events using semantic similarity. If a doc says "we use Sequelize" but the last 50 events all reference Prisma, that's a contradiction — the doc is stale *regardless of its age*.

Stale Knowledge Detected
Database Architecture
Last updated 45 days ago. Recent events contradict claims about ORM choice — doc references Sequelize but 12 recent events reference Prisma.
Age: 45 days · Contradictions: 3

Where It Shows Up

  • Dashboard: Knowledge docs with a yellow "Stale" badge on the Knowledge page
  • MCP: hivemind_knowledge(action: "list-stale") returns all flagged docs
  • Daily cron: Staleness analysis runs daily alongside the existing pattern detection

Feature 2: Onboarding Context Generation

When a new agent session starts and calls hivemind_status(), Hivemind now includes an onboarding context block — a synthesized summary of everything a new agent needs to know.

This isn't just a dump of recent events. It's a GPT-4o-mini synthesis that produces:

  • Project summary — What the project is and what tech stack it uses
  • Key conventions — Naming patterns, file structure rules, testing approaches
  • Recent decisions — The last 5-7 architectural decisions and why they were made
  • Active context — What's currently in flight and what to avoid stepping on
Onboarding Context
Project: E-commerce API (Node.js + Prisma + PostgreSQL)
Conventions: snake_case for DB columns, camelCase for TS. Tests required for all API routes. Prisma migrations only via prisma migrate dev.
Recent decision: Switched from REST to GraphQL for the storefront API (2 days ago)
Active work: Agent-2 is refactoring the cart module. Agent-3 is building webhook handlers. Avoid src/cart/ and src/webhooks/.

The context is cached daily and refreshed when significant new decisions are published. It's injected automatically — agents don't need to request it.

How They Work Together

Here's what happens when a new agent session starts:

1. Agent calls hivemind_status()
2. Hivemind returns:
   - Active tasks and blockers (existing)
   - Onboarding context summary (NEW)
   - Stale knowledge warnings (NEW)
3. Agent knows what the project is about
4. Agent knows which docs to trust and which to ignore
5. Agent starts working with full context

The stale knowledge warnings prevent the agent from relying on outdated docs. The onboarding context gives it the project-level understanding that used to require reading a CLAUDE.md and querying half the event log.

Phase 9: Complete

This wraps up the Intelligence Layer — the last piece of Hivemind's core platform:

Smart Context
Auto-injected on session start
Conflict Prevention
Task overlap + file conflicts
Cross-Session Learning
Patterns from event history
Token Savings
ROI tracking dashboard
Stale Detection
Age + contradiction signals
Onboarding Context
AI-synthesized project primer

All of this runs on the events your agents are already publishing. No new instrumentation. No configuration. The intelligence layer just makes everything smarter.

intelligencestale-knowledgeonboardingcontext