Persistent institutional memory system. Discovers, stores, retrieves, and manages operational learnings with dual-write to Paperclip documents API and local .context/learnings.json cache.
Persistent institutional memory system forked from gstack. Discovers, stores, retrieves, and manages operational learnings across the agent organization. Modified from gstack to dual-write to both Paperclip's document API (source of truth) and a local JSON cache (fast reads).
Manages the lifecycle of operational learnings — facts, patterns, and insights that agents discover during work. Each learning has a confidence level that can be promoted through repeated confirmation or pruned when evidence becomes stale.
{
"id": "learn-<ulid>",
"agent_id": "staff-engineer",
"skill": "review",
"type": "pattern|anti-pattern|process|tool|domain",
"key": "short identifier",
"insight": "the actual learning content",
"confidence": "VERIFIED|UNVERIFIED|TENTATIVE",
"confidence_score": 0.85,
"source": "commit|issue|heartbeat|retro|manual",
"confirmations": 3,
"first_seen": "2026-03-15T10:00:00Z",
"last_confirmed": "2026-03-28T14:30:00Z",
"paperclip_document_id": "doc-<id>",
"tags": ["testing", "performance"]
}
document_id is stored in the learning record. Append to .context/learnings.json for local fast reads..context/learnings.json. If local cache is missing or corrupt, rebuild from GET /api/documents.confirmations and update last_confirmed. At 3 confirmations, promote UNVERIFIED → TENTATIVE. At 5 confirmations, promote TENTATIVE → VERIFIED.| Scenario | Classification | Rationale |
|---|---|---|
| Recording a new learning | MECHANICAL | Schema-driven, deterministic |
| Promoting confidence on confirmation | MECHANICAL | Threshold-based, no judgment |
| Resolving conflicting learnings | TASTE | Agent picks which insight holds, surfaces at gate |
| Pruning VERIFIED learning | USER_CHALLENGE | Requires human confirmation before deleting high-confidence data |
learning, source of truth).context/learnings.json (append-only during heartbeat, rebuilt from API on inconsistency)/learn # Show recent learnings for current agent
/learn add # Manually record a new learning
/learn search <query> # Full-text search across all learnings
/learn prune # Detect and flag stale or conflicting learnings
/learn export # Format learnings for inclusion in CLAUDE.md
/learn stats # Counts by confidence level, type, and agent