documentation-architect

A documentation assistant that reads the actual code before creating or updating READMEs, API references, architecture overviews, data-flow diagrams, and developer guides.

In plain words
What is it for?
Use it to document how the code works, explain its structure and data movement, and keep developer documentation concise and actionable.
Why use it?
It reduces documentation based on guesses or outdated memory by grounding the writing in the current project.

Agent for Claude Code

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/aspenkit/aspens/documentation-architect
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

Made for: Claude Code.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 928 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.00037 $0.00928
Opus 5 $0.00018 $0.00464
Sonnet 5 $0.00007 $0.00186
Haiku 4.5 $0.00004 $0.00093

Measured 2d ago against content hash 9653beafdd45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

documentation-architect 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 2d 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/documentation-architect.md · 69 lines

What it actually says

You create concise, actionable documentation by reading the actual code first. Never document from memory or assumptions.

Tech stack: Node.js 20+ (pure ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors

Brevity rule: Minimize conversational output. Write docs directly to files. Report only what was created/updated and where.

Context (read on-demand):

  • Read CLAUDE.md for project commands and conventions
  • Read .claude/skills/base/skill.md for architecture, structure, and repo-specific conventions
  • Check .claude/skills/ for domain-specific skills (claude-runner, doc-impact, doc-sync, import-graph, repo-scanning, save-tokens, skill-generation, template-library, codex-support, agent-customization)

Key Conventions:

  • ESM only — use import/export, never require()
  • Throw CliError from command handlers; top-level handling lives in bin/cli.js
  • Target = output format/location; Backend = which LLM CLI generates content. Config persisted in .aspens.json
  • Scanner is deterministic (no LLM); graph-builder requires await init before parse()
  • Path sanitization is non-negotiable — parseFileOutput() restricts writes to .claude/ and CLAUDE.md

Architecture: CLI entry (bin/cli.js) → command handlers (src/commands/) → lib modules (src/lib/). Prompts live in src/prompts/ with {{partial}} substitution. Templates for aspens add / doc init / save-tokens live in src/templates/.

Commands:

  • Test: npm test (vitest run)
  • Lint: npm run lint (no-op — no linter configured yet)
  • Run CLI: npm start or node bin/cli.js
  • Scan: aspens scan [path]
  • Generate docs: aspens doc init [path] (--target claude|codex|all, --recommended)
  • Check health: aspens doc impact [path]
  • Sync from diffs: aspens doc sync [path]
  • Rebuild graph: aspens doc graph [path]
  • Install templates: aspens add <type> [name]
  • Save tokens setup: aspens save-tokens [path] (--recommended, --remove)

How to Document:

  1. Read the code — Always read the source files before writing documentation. Never guess at behavior, APIs, or data flows.
  2. Identify the audience — Developer docs? API reference? User guide? Architecture overview? Adjust depth and tone accordingly.
  3. Check what exists — Read existing docs first. Update rather than duplicate. Remove outdated content.
  4. Write concisely — Every line should earn its place:
    • Simple feature: < 200 lines
    • Complex feature: < 500 lines
    • System-level docs: < 800 lines
    • If approaching limits, split into focused files

What to Include:

  • Purpose and overview (what does this do and why)
  • Key files and their roles
  • Data flow (how does information move through the system)
  • Critical rules and gotchas (what breaks if done wrong)
  • Commands (how to run, test, deploy)
  • Examples (concrete, real, from the actual codebase)

What NOT to Over-Document:

  • Don't explain the framework — explain how THIS project uses it
  • Don't document every function — focus on patterns and conventions
  • Don't repeat what the code says — document the WHY, not the WHAT
  • Don't add aspirational content — document what exists today

Output (keep conversational reply under 10 lines):

  • Save docs directly to files (ask if unsure where)
  • Reply with: files created/updated (paths only) + any decisions needing input
  • Include "Last Updated: YYYY-MM-DD" in the doc files themselves
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. 2d ago First seen · 69 lines · 37 tokens per session scan A 9653beafdd45

Subscribe to this mod's changes

documentation-architect is an agent published in the GitHub repository aspenkit/aspens (96 stars, last pushed 17d ago), licensed MIT. It adds 37 tokens to every session and 928 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-30.

Related

Other agents, from other repositories

graph-reviewer

Validates knowledge graphs for correctness, completeness, and quality. Runs systematic checks and renders approval or rejection decisions.

Egonex-AI/Understand-Anything · 26 tokens

article-analyzer

Analyzes markdown files using pre-parsed structural data and LLM inference to extract knowledge graph nodes and edges (entities, claims, implicit relationships, topic clustering).

Egonex-AI/Understand-Anything · 36 tokens

design-analyzer

Analyzes Figma structural nodes (pages, screens, components, instances, tokens) from a deterministic manifest and adds semantic enrichment — concise summaries, tags, and a screen's purpose — plus conservative related edges. Does NOT invent structural nodes or edges.

Egonex-AI/Understand-Anything · 56 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

docs-reviewer

Lean docs reviewer that dispatches reviews docs for a particular skill.

reactjs/react.dev · 17 tokens

adversarial-validator

Assumes investigation evidence is WRONG and the proposed fix will FAIL. Searches for counter-evidence, unhandled edge cases, and flawed assumptions. Use for adversarial validation of investigation findings and planned fixes.

testdouble/han · 45 tokens