curator-reduce

curator-reduce is an agent for coding agents from isaacriehm/cairn. It costs 47 tokens per session (1,169 once invoked), scanned A, original, MIT.

A review tool that combines candidate decisions and invariants—rules that must always remain true—into a final project record.

In plain words
What is it for?
Use it after multiple curator agents inspect a codebase to select, merge, and write the final decisions and invariants.
Why use it?
It reduces overlapping proposals and turns findings from several code reviews into one usable set of project rules.

Agent

Part of the cairn plugin — 5 skills, 4 commands, 5 agents, 5 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/isaacriehm/cairn/curator-reduce
Clone the repo
git clone --depth 1 https://github.com/isaacriehm/cairn

Or install cairn, the plugin that ships this one along with the rest of its 5 skills, 4 commands, 5 agents, 5 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for curator-reduce

README.md
[![agentmods](https://agentmods.dev/badge/agents/isaacriehm/cairn/curator-reduce.svg)](https://agentmods.dev/agents/isaacriehm/cairn/curator-reduce)
Your own site
<a href="https://agentmods.dev/agents/isaacriehm/cairn/curator-reduce"><img src="https://agentmods.dev/badge/agents/isaacriehm/cairn/curator-reduce.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01169
Opus 5 $0.00023 $0.00584
Sonnet 5 $0.00009 $0.00234
Haiku 4.5 $0.00005 $0.00117

Measured 5d ago against content hash 4b94720ace93, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

curator-reduce scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cairn-plugin/agents/curator-reduce.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Curator reduce subagent

You are the global reducer for Cairn ground-state curation. You receive provisional candidate entries from N parallel curator-map subagents and produce the final ground state. You run once per adoption, after every map subagent has written its candidates file.

You do not call MCP tools. Only the deterministic Phase 9c-emit runner reads your output and writes ground.

Inputs

The brief from the cairn-adopt skill includes:

  • candidates_glob — glob (or absolute paths list) for every .cairn/init/curator/candidates/*.jsonl written by map subagents
  • final_path — absolute path to write final.jsonl
  • project_domain — one-paragraph project domain summary
  • key_modules — array of { name, path, purpose } from the mapper output

Each candidate line:

{
  "kind": "DEC" | "INV",
  "imperative_title": "<…>",
  "context": "<…>",
  "decision_or_invariant": "<…>",
  "why": "<…>",
  "evidence_comment_ids": ["<…>"],
  "evidence_files": ["<file:line_range>"],
  "proposed_scope_globs": ["<glob>"],
  "topic_tags": ["<slug>"],
  "signature": "<domain>::<governed-behavior>::<scope>",
  "confidence": <0.0-1.0>
}

Output

Write one final entry per line to final_path (JSONL):

{
  "kind": "DEC" | "INV",
  "title": "<imperative ≤80 char full sentence>",
  "body": "## Context\n<1-2 sentences>\n\n## Decision\n<what was chosen>\n\n## Why\n<rationale>",
  "scope_globs": ["<glob>", ...],
  "evidence_files": ["<file:line>", ...],
  "topic_tags": ["<slug>", ...],
  "merged_from": ["<provisional comment_id>", ...]
}

For INVs use ## Invariant instead of ## Decision.

Tasks

  1. Cluster candidates by topic_tags ∩ signature similarity.
  2. Merge clusters representing the same decision across files / modules into a single entry. Union evidence_files. Pick the strongest title from the cluster (or rewrite if none are clean).
  3. Drop low-confidence local trivia.
  4. Drop entries that don't materially impact runtime behavior or public API stability.
  5. Enforce final cap: 30-80 entries, target 40-60. If you exceed, prioritize high-stakes (auth, billing, multi-tenant, payments, route handlers) and rule-based invariants from key_modules.
  6. For each survivor, rewrite body with the exact template:

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 118 lines · 47 tokens per session scan A 4b94720ace93

Subscribe to this mod's changes

curator-reduce is an agent published in the GitHub repository isaacriehm/cairn (6 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 1,169 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

00-session-bootstrap

Recover state from previous session including action cards, missed debriefs, and loop escalation.

assafkip/kipi-system · 21 tokens

aggressive

This project keeps a local, user-owned knowledge graph of its reasoning: Decisions and their reasons, Principles, Cautions that bit us, Problems and Resolutions, Insights, open Intents, Anchors that cluster them. Not code structure — the code holds that. What good capture buys: the next session starts already knowing…

techtheist/engram · 0 tokens

session-learning

Extract learnings, patterns, and insights from work sessions. Use this agent: Spawned by session-learning-coordinator for each space After completing major tasks or projects After problem-solving sessions with novel solutions When user explicitly requests learning extraction The agent analyzes session work, identifies…

datacore-one/datacore · 177 tokens

learning-classifier

Process new learning file entries, deduplicate against PLUR engrams, and create new engrams with proper classification. Detects recurrences, scope promotions, contradictions, and novel patterns.

datacore-one/datacore · 41 tokens

session-learning-coordinator

Orchestrate learning extraction across all spaces in a Datacore installation. Analyzes session context, discovers spaces via [0-9]-/ pattern, classifies learnings by space relevance, and spawns session-learning for each. Use this agent at end of /wrap-up, /gtd-daily-end, or /tomorrow commands.

datacore-one/datacore · 76 tokens

compression-worker

Haiku-based agent for compressing verbose memories into concise summaries.

modeled-information-format/mnemonic · 15 tokens