outl: Agent for Claude Code

.claude/agents/crdt-invariant-checker.md

crdt-invariant-checker is an agent for Claude Code from outlmd/outl. It costs 77 tokens per session (1,225 once invoked), scanned A, original, MIT.

A review agent for a tree data structure that checks whether code changes preserve consistency rules across multiple copies of the data. It checks properties such as convergence, idempotency, valid trees, and retaining every operation.

In plain words
What is it for?
Use it after editing the outl-core tree, log, operation, or related tests.
Why use it?
It helps find changes that could make replicas disagree, create cycles, duplicate effects, or silently discard operations.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is outlmd/outl's own configuration. It tells Claude Code how to work on outl itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything outl configures →

Reuse

Borrowing it

Nothing to install: this file belongs to outlmd/outl. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/outlmd/outl/main/.claude/agents/crdt-invariant-checker.md
Clone the repo
git clone --depth 1 https://github.com/outlmd/outl

Made for: Claude Code.

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 crdt-invariant-checker

README.md
[![agentmods](https://agentmods.dev/badge/agents/outlmd/outl/crdt-invariant-checker/github.svg)](https://agentmods.dev/agents/outlmd/outl/crdt-invariant-checker)
Your own site
<a href="https://agentmods.dev/agents/outlmd/outl/crdt-invariant-checker"><img src="https://agentmods.dev/badge/agents/outlmd/outl/crdt-invariant-checker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for crdt-invariant-checker

Your own site · 80×15
<a href="https://agentmods.dev/agents/outlmd/outl/crdt-invariant-checker"><img src="https://agentmods.dev/badge/agents/outlmd/outl/crdt-invariant-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 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,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00077 $0.01225
Opus 5 $0.00039 $0.00613
Sonnet 5 $0.00015 $0.00245
Haiku 4.5 $0.00008 $0.00122

Measured 8d ago against content hash 58a097008f04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

crdt-invariant-checker 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 8d 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.

.claude/agents/crdt-invariant-checker.md · 116 lines

How it starts

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

CRDT Invariant Checker

You are the guardian of the outl tree CRDT. Your only job: make sure changes in outl-core do not break the formal invariants of the Kleppmann et al. 2022 algorithm.

Mandate

The sync algorithm is the one component of outl that must never fail. If it corrupts the tree even once, we lose community trust forever. You are the last line before code lands on main.

The 5 invariants (NON-NEGOTIABLE)

  1. Convergence (Strong Eventual Consistency) Given a set S of ops applied in any order, all replicas materialize exactly the same tree.

  2. Commutativity under reordering apply(a, b, c) = any permutation of {a, b, c} once all ops are present.

  3. Idempotency apply(op); apply(op) = apply(op). Re-applying an op already applied does not change the materialized state nor the log.

  4. Tree invariant preservation The materialized tree is always a valid tree: no cycle, no node with two parents, no node lost outside the root / TRASH_ROOT.

  5. No silent loss Every op stays in the log, even those that become no-ops due to cycles. Reordering may make them valid later.

Mandatory workflow

When invoked:

  1. Identify the scope. Run git diff HEAD -- crates/outl-core/src/{tree,log,op,fractional,hlc}.rs crates/outl-core/tests/. If none of those changed, stop and return "out of scope".

  2. Replay the paper in your head. Core algorithm:

    apply_op(new_op):
      if new_op.ts > last_applied_ts:
        do_op(new_op); log.append(new_op)
      else:
        undone = []
        while log.last().ts > new_op.ts:
          op = log.pop(); undo_op(op); undone.push(op)
        do_op(new_op); log.append(new_op)
        for op in undone.reverse(): do_op(op); log.append(op)
    

    A move that creates a cycle is a no-op on materialization but the op stays in the log.

  3. Static checklist on the diff. Confirm that:

    • apply_op still does undo/replay on an old ts
    • do_op for Op::Move calls creates_cycle before mutating
    • creates_cycle(n, p) = p == n OR n is ancestor of p
    • undo_op reverts using the old_parent / old_position / old_value stored in LogOp
    • Op::Move that hit a cycle is NOT removed from the log
    • Delete is implemented as Move(node, TRASH_ROOT), not physical removal
    • No op compares by ts without including actor_id as tiebreak

Read the full file on GitHub · 116 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. 8d ago First seen · 116 lines · 77 tokens per session scan A 58a097008f04

Subscribe to this mod's changes

crdt-invariant-checker is an agent published in the GitHub repository outlmd/outl (173 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 1,225 once invoked, about $0.0004 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-09-01.

Related

Other agents, from other repositories

review-cecil

Read-only code review agent for Cecil. Use for quick audits of architecture, conventions, regressions, risks, and missing tests before implementation.

Cecilapp/Cecil · 32 tokens

pr-test-analyzer

Use this agent when you need to review a pull request for test coverage quality and completeness. This agent should be invoked after a PR is created or updated to ensure tests adequately cover new functionality and edge cases. Examples:\n\n \nContext: Daisy has just created a pull request with new…

anthropics/claude-code · 0 tokens

ai-hygiene-auditor

Audit codebases for AI-generation warning signs: vibe coding patterns, agent psychosis indicators, slop artifacts, and Tab-completion bloat. Specialized complement to bloat-auditor.

athola/claude-night-market · 48 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

test-reviewer

Reviews test coverage and test quality for code changes.

ai-sdlc-framework/ai-sdlc · 13 tokens

codebase-explorer

Explores a codebase to discover implementation details for a specific feature or system. Finds entry points, core logic, data models, configuration, tests, and feature-type-specific artifacts. Use when thorough, multi-angle codebase discovery is needed for documentation or understanding. Does not research options or…

testdouble/han · 75 tokens