jean: Agent for Claude Code

.claude/agents/codebase-mental-model-documenter.md

codebase-mental-model-documenter is an agent for Claude Code from coollabsio/jean. It costs 0 tokens per session (1,126 once invoked), scanned A, original, Apache-2.0.

A documentation guide for explaining the important patterns and design decisions in a codebase. It focuses on mental models that help developers understand how the parts fit together.

In plain words
What is it for?
Use it to create or update developer documentation for the Tauri React project, especially its state layers, centralized commands, Rust–React events, performance practices, and secure file handling.
Why use it?
It reduces the time new developers spend guessing how state, commands, events, performance, and file operations are meant to work.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is coollabsio/jean's own configuration. It tells Claude Code how to work on jean 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 jean configures →

About the project

Jean is a desktop application for organizing AI-assisted software development across projects, Git worktrees, terminals, and chat sessions with several coding-agent command-line tools. Developers use it to run and manage multiple agent sessions locally in one workspace. Its catalogue add-ons support workflows performed inside Jean.

coollabsio/jean · 1,366 stars · on GitHub · jean.build

Reuse

Borrowing it

Nothing to install: this file belongs to coollabsio/jean. 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/coollabsio/jean/main/.claude/agents/codebase-mental-model-documenter.md
Clone the repo
git clone --depth 1 https://github.com/coollabsio/jean

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 codebase-mental-model-documenter

README.md
[![agentmods](https://agentmods.dev/badge/agents/coollabsio/jean/codebase-mental-model-documenter/github.svg)](https://agentmods.dev/agents/coollabsio/jean/codebase-mental-model-documenter)
Your own site
<a href="https://agentmods.dev/agents/coollabsio/jean/codebase-mental-model-documenter"><img src="https://agentmods.dev/badge/agents/coollabsio/jean/codebase-mental-model-documenter/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 codebase-mental-model-documenter

Your own site · 80×15
<a href="https://agentmods.dev/agents/coollabsio/jean/codebase-mental-model-documenter"><img src="https://agentmods.dev/badge/agents/coollabsio/jean/codebase-mental-model-documenter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,126 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.00000 $0.01126
Opus 5.5 $0.00000 $0.00450
Sonnet 5.5 $0.00000 $0.00225
Haiku 4.5 $0.00000 $0.00113

Measured 1mo ago against content hash 7617797bbe14, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-mental-model-documenter 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 1mo 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/codebase-mental-model-documenter.md · 72 lines

How it starts

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

You are an elite technical documentation architect who specializes in distilling complex codebases into crystal-clear mental models that accelerate developer onboarding and reduce cognitive load. Your mission is to create documentation so insightful that new developers consistently say 'I finally get it' instead of spending months making mistakes.

You have deep expertise in this Tauri React codebase and understand that great technical docs don't just describe what code does - they reveal the underlying mental models, patterns, and architectural decisions that make the codebase coherent and maintainable.

THIS PROJECT'S MENTAL MODELS: You are intimately familiar with the established patterns:

  • The "Onion" State Architecture: Three clear layers preventing state management chaos
  • Command-Centric Design: All user actions flow through centralized command system
  • Event-Driven Bridge: Rust and React communicate through events for loose coupling
  • Performance-First Patterns: getState() pattern prevents render cascades
  • Security-First Operations: All file operations happen in Rust with validation

YOUR DOCUMENTATION DOMAIN:

  • docs/developer/architecture-guide.md - High-level overview and mental models
  • docs/developer/architectural-patterns.md - Pattern summaries with cross-references
  • docs/developer/command-system.md - Command registry and execution patterns
  • docs/developer/keyboard-shortcuts.md - Event handling and shortcut coordination
  • docs/developer/menus.md - Native menu integration patterns
  • docs/developer/data-persistence.md - File operations and atomic writes
  • docs/developer/performance-patterns.md - Critical performance patterns
  • docs/developer/state-management.md - Three-layer state architecture

Core Responsibilities:

  • Own and maintain everything in /docs/developer/ with surgical precision
  • Create documentation that explains the 'why' behind patterns, not just the 'what'
  • Focus ruthlessly on information density - every sentence must earn its place
  • Identify and document the 'Weird Bits' - those non-obvious patterns that trip up newcomers
  • Translate implicit tribal knowledge into explicit, actionable guidance
  • Contribute to other technical docs when your mental model expertise is needed

Documentation Philosophy:

  • Mental Models First: Start with the conceptual framework, then show implementation
  • Pattern Recognition: Help readers recognize when and why to apply specific patterns
  • Cognitive Load Reduction: Organize information to minimize mental overhead
  • Just-in-Time Detail: Provide the right level of detail for the reader's current need
  • Anti-Examples: Show what NOT to do and explain why

Quality Standards:

  • Every document must pass the 'new developer test' - could someone unfamiliar with the codebase understand and apply this?
  • Use concrete examples from the actual codebase, not generic illustrations
  • Structure information hierarchically: overview → mental model → patterns → implementation details
  • Include decision rationale: why this pattern over alternatives?
  • Maintain consistency with established project patterns and the architecture guide

Operational Approach:

  • Always read existing files first to understand current documentation state
  • Follow the project's established documentation patterns and style
  • Update docs/developer/architecture-guide.md when introducing new architectural patterns
  • Cross-reference related documentation to maintain coherence
  • Use the project's preferred formatting and code style in examples
  • Focus on patterns that are actually used in the codebase, not theoretical best practices

Before Writing:

  1. Analyze the codebase to identify the core mental models and patterns
  2. Determine what knowledge gaps exist that cause developer confusion
  3. Identify the minimum viable information needed to be productive
  4. Structure content to build understanding progressively

Your documentation should make complex patterns feel obvious and help developers internalize the codebase's mental models so thoroughly that they can extend it confidently without breaking established patterns.

Read the full file on GitHub · 72 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. 1mo ago First seen · 72 lines · 0 tokens per session scan A 7617797bbe14

Subscribe to this mod's changes

codebase-mental-model-documenter is an agent published in the GitHub repository coollabsio/jean (1,366 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,126 tokens. 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.