lavern CLAUDE.md

lavern CLAUDE.md is an instructions file for Claude Code from AnttiHero/lavern. It costs 3,358 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Lavern, an open-source system that uses multiple AI agents to analyze and transform legal documents while preserving their legal effect.

In plain words
What is it for?
Use them when working on Lavern’s document-analysis workflow, agent roles, review gates, or audit bundle outputs.
Why use it?
They set rules for evidence, human review, disagreement between agents, and audit records, while making clear that Lavern is not a law firm or legal adviser.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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 instructions/anttihero/lavern/claude-md
Clone the repo
git clone --depth 1 https://github.com/AnttiHero/lavern

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 lavern CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/anttihero/lavern/claude-md.svg)](https://agentmods.dev/instructions/anttihero/lavern/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/anttihero/lavern/claude-md"><img src="https://agentmods.dev/badge/instructions/anttihero/lavern/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,358 This file is loaded in full into every session.
When invoked 3,358 The same file — it is already loaded in full.
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.03358 $0.03358
Opus 5 $0.01679 $0.01679
Sonnet 5 $0.00672 $0.00672
Haiku 4.5 $0.00336 $0.00336

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

Security

Grade A, and why

lavern CLAUDE.md 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 6d 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.md · 195 lines

How it starts

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

System Identity

You are part of Lavern v0.15.0, a multi-agent legal design system that transforms legal documents through collaborative AI analysis and human-centered design. Lavern is an open-source multi-agent legal system. The "law firm" framing used in some docs is an architectural analogy, not a description of what Lavern is. Lavern is not a law firm and does not provide legal advice.

The codebase is called "The Shem" (the name inscribed in the golem's mouth). The product is called "Lavern". These names are interchangeable in internal docs.

Shared Principles

  1. Legal effect must remain identical after transformation
  2. Every finding must cite specific text as evidence
  3. Debate is a feature, not a bug — agents should challenge each other
  4. Human gates are mandatory, never skip them
  5. Every engagement ships with an audit bundle alongside the deliverable: structured findings, debate resolutions, verification results, and cost log. (The synthesis-editor agent is architected to produce a separately polished "review package" output; in practice that lives across the audit bundle files rather than as a single rendered document.)

Non-Negotiable Preservation Categories

  • Monetary amounts, liability caps, penalties
  • Time periods, notice requirements, deadlines, cure periods
  • Jurisdiction, governing law, venue, arbitration
  • Dispute resolution mechanisms, termination triggers
  • Defined terms with specific legal scope
  • Insurance coverage requirements
  • Regulatory compliance language

Disclaimer

This system assists with document design and accessibility. It does not provide legal advice. Always verify redesigned documents with qualified legal professionals.

Project Structure

Core Engine

  • src/agents/ — 67 agent prompts (59 specialists + 7 orchestrators + 1 base), 59 agent definitions
  • src/agents/profiles.ts — 63-agent profile registry (skill ratings, personality, DiceBear avatars)
  • src/mcp/tools/ — 21 MCP tool modules (debate board, scoring, verification, memory, risk pricing, baselines, knowledge base, report cards, quality checks, handoffs, feedback loop, document reader)
  • src/mcp/remote-bridge/ — JSON-RPC 2.0 HTTP bridge exposing 12 Counsel tools for Anthropic Managed Agents; shared-secret auth, per-session dispatch, Zod arg validation (gated by LAVERN_MANAGED_AGENTS_BRIDGE=1)
  • src/hooks/ — Audit logging, human gate enforcement, cost tracking
  • src/router/ — LLM-based request router with deterministic fallback and template mapping
  • src/orchestrator.ts — Core orchestration loop (dispatch agents, manage turns)
  • src/dispatch.ts — Session dispatch (workflow selection, gate resolver, budget)
  • src/permissions/ — Phase-based dynamic tool permissions
  • src/session/ — Session state management + session manager (lifecycle, TTL, eviction)
  • src/events/ — Event bus for real-time streaming
  • src/gates/ — Human gate resolvers (readline CLI, async API, webhook, auto-approve)
  • src/config.ts — Centralized configuration (all settings env-var backed)
  • src/utils/ — Shared utilities (atomic fs writes, message streaming, error recovery)
  • src/types/ — TypeScript type definitions and Zod schemas
  • SOUL.md — Default firm personality (CLI/Claw fallback; browser users set soul in My Page)

Read the full file on GitHub · 195 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. 6d ago First seen · 195 lines · 3,358 tokens per session scan A dd38844dca61

Subscribe to this mod's changes

lavern CLAUDE.md is an instructions file published in the GitHub repository AnttiHero/lavern (301 stars, last pushed today), licensed Apache-2.0. It adds 3,358 tokens to every session, about $0.0168 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-30.

Related

Other instructions, from other repositories