Skip to content

Hhhpraise/curator-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curator — Context Intelligence Layer for AI Agents

License Stars Platform Type Status

Your AI agent's context is being silently destroyed. Curator stops it.

Every context compressor — Headroom, Hermes, Claude Compaction, TokMan — treats all context as equally compressible. So your "don't touch the database schema" constraint from turn 5? Gone by turn 40. The exact port number? Rounded to "the port." The reason you chose Postgres over Redis? Summarized into nothing.

Curator is not another compressor. It's the intelligence layer that classifies context before compression decides what to destroy.

The Problem (With Receipts)

  • 73% to 33% compliance drop in omission constraints from turn 5 to turn 16 across 4,416 trials. Commission constraints hold at 100%, masking the failure entirely — this is the "safe turn depth" exploit zone (Gamage, 2026)
  • 65% of enterprise AI failures traced to context degradation during multi-step reasoning, not raw token exhaustion (Zylos Research, 2026)
  • Validity Mirage: naive compression preserves surface answer correctness while silently substituting the governing hypothesis — validated across 5 model architectures and 11,400+ boundary instances (University of Michigan, 2026)

How Curator Works

Context enters, Curator classifies, then the compressor gets routing instructions:

  • RED / PINNED — Never compress. Anchor at position 0 on every request.
  • BLUE / PRESERVED — Structured compression only. Exact values survive.
  • GREEN / SUMMARIZABLE — Safe for LLM compression. Archive original by UUID.
  • GREY / DISCARDABLE — Remove entirely. Re-derivable from disk.

Every piece of context is scored on three axes of irreplaceability:

Axis Question
Recoverability Can this be re-derived from disk or re-running a tool?
Constraint Criticality Would violating this produce an unrecoverable error?
Dependency Risk Does this link to a decision 30 turns from now?

Score HIGH on any axis and the context is pinned or preserved. All LOW: safe to discard.

Quick Start

Install in Claude Code / Cowork

  1. Clone this repo: git clone https://github.com/Hhhpraise/curator-context.git
  2. Copy SKILL.md into your Claude skills directory
  3. Start a session — Curator activates automatically when you mention constraints, context protection, or compression

First Session

You: I need to refactor auth. Don't touch the DB,
    keep API contracts stable, port is 8443.

Curator: Got it.
  - C001: "Don't touch the database layer"
  - C002: "Don't change any API contracts"
  - P001: "auth service port = 8443"
  Anchored at position 0. Validating all future actions.

Commands

Command What it does
/curator classify [text] Classify a piece of context into pinned/preserved/summarizable/discardable
/curator audit Scan for unprotected context. Report top 5 risks.
/curator constraint add [rule] Pin a constraint. Anchors at position 0 forever.
/curator constraint list Show all active constraints with IDs and age.
/curator constraint remove [ID] Remove a constraint.
/curator pre-compress Triage report before compression fires.
/curator dependency map Visual dependency graph (Mermaid) of the session.
/curator dashboard Session health: category counts, decay risk, token breakdown.

Why Not Just Use Headroom / TokMan / LLMLingua?

They compress. Curator triages. Use them together.

                        +------------+
Context  ----------->   |  Curator   |   RED: PINNED --> Bypass compressor
                        |  (triage)  |   BLUE: PRESERVED --> Structured only
                        +-----+------+   GREEN: SUMMARIZABLE --> Headroom / TokMan
                              |          GREY: DISCARDABLE --> Remove
                              |
                       Compression Layer

Curator isn't a replacement — it's a routing layer that tells your existing compressor what to protect and what's safe to crush.

Research Behind This

This skill is grounded directly in peer-reviewed 2026 research:

Comparison vs Alternatives

Tool What it does Curator + it
Headroom Token-level compression (60-95% savings) Curator classifies first; Headroom only compresses green and grey content
TokMan 31-layer CLI proxy pipeline Curator routes red and blue around TokMan entirely
LLMLingua Small-LM importance scoring (up to 20x compression) Curator pre-flags what LLMLingua should score LOW (never drop)
Hermes Agent Dual-threshold agent-native compression Curator replaces blind thresholds with semantic boundaries
Claude Compaction API Server-side auto-compression Curator protects constraints before the API ever sees them

Project Structure

curator-context/
  SKILL.md              The Claude Skill (all logic lives here)
  README.md             This file
  LICENSE               MIT
  CONTRIBUTING.md       How to contribute
  PUBLISHING.md         Launch checklist and strategy

Contributing

We welcome contributions that improve context classification, add preservation patterns, or integrate new research. Here's how:

  1. Fork the repository
  2. Create a branch: feature/your-idea or fix/classification-edge-case
  3. Keep SKILL.md under 500 lines. If adding substantial content, consider a reference file
  4. Test your changes — run at least one 50+ turn agent session with the modified skill and verify that constraints survive and classification is accurate
  5. Open a PR with a description of what you changed and why, the test scenario you ran, and any edge cases discovered

See CONTRIBUTING.md for the full contribution guide, design principles, and classification rules.

License

MIT © 2026 Praise O. A.

About

Semantic context triage for AI agents — classify before compression so constraints, exact values, and decision reasoning survive long sessions

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors