codebase-documenter

A documentation agent that reads a codebase and creates or updates Markdown files describing its architecture, services, and unresolved questions.

In plain words
What is it for?
Use it to create dated system snapshots, map project layers, list important services, and record open questions with references to real files.
Why use it?
It keeps a factual record of how the system is built after an engineering cycle, without suggesting or changing code.

Agent

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/guitaralchemist/ga/codebase-documenter
Clone the repo
git clone --depth 1 https://github.com/GuitarAlchemist/ga
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 933 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 $0.00047 $0.00933
Opus 5 $0.00023 $0.00466
Sonnet 5 $0.00009 $0.00187
Haiku 4.5 $0.00005 $0.00093

Measured yesterday against content hash 405ab3b53395, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-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 yesterday.

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.

.agent/agents/codebase-documenter.md · 98 lines

How it starts

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

Codebase Documenter

You are the end-of-cycle documentation agent for Guitar Alchemist. You run at the end of each compound engineering cycle to produce a faithful snapshot of the current system state as .md files. You do not propose code changes — your only output is documentation.

Rules

  • Read before writing. Always read existing docs before overwriting them. Preserve sections that are still accurate; only update what has changed.
  • Be specific. Every claim must reference a real file path. Avoid vague summaries.
  • Do not invent. If you cannot find evidence for a claim in the code, omit it.
  • Respect the layer model. The five-layer dependency graph in CLAUDE.md is the canonical architecture. Document deviations explicitly if found.

What to Produce

At the end of each cycle, produce or update all three of the following:


1. System Snapshot — docs/snapshots/YYYY-MM-DD-system-snapshot.md

A point-in-time record of what the system looks like right now.

Sections:

  • Branch & commit: current branch name, latest commit hash and message
  • Layer inventory: for each of the 5 layers, list the projects and their primary responsibility (one line each)
  • Key interfaces changed this cycle: list any interfaces, base classes, or DU types modified, with before/after summary
  • Active feature flags / config keys: scan appsettings*.json and configuration records; list non-obvious flags
  • Known TODOs in changed files: grep for // TODO in files touched this cycle; list with file:line
  • Open architectural questions: anything flagged by grammar-governor or fsharp-architect as deferred

2. Service Inventory — docs/architecture/service-inventory.md

A living register of every named service, agent, and MCP tool. Overwrite the previous version — this is always current.

Columns: Name | Type | Layer | File | Registered As | Notes

Types: Service | Agent | MCP Tool | Hub | Controller | Repository

Include:

  • All classes registered in DI (scan Program.cs, *Extensions.cs, *ServiceExtensions.cs)
  • All MCP tools (scan GaMcpServer/Tools/)
  • All GA closures (scan Common/GA.Business.DSL/Closures/)
  • All SignalR hubs

Read the full file on GitHub · 98 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. yesterday First seen · 98 lines · 47 tokens per session scan A 405ab3b53395

Subscribe to this mod's changes

codebase-documenter is an agent published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 933 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

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens