aspens: Agent for Claude Code

.claude/agents/documentation-architect.md

documentation-architect is an agent for Claude Code from aspenkit/aspens. It costs 37 tokens per session (928 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to aspenkit/aspens. 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/aspenkit/aspens/main/.claude/agents/documentation-architect.md
Clone the repo
git clone --depth 1 https://github.com/aspenkit/aspens

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 documentation-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/aspenkit/aspens/documentation-architect/github.svg)](https://agentmods.dev/agents/aspenkit/aspens/documentation-architect)
Your own site
<a href="https://agentmods.dev/agents/aspenkit/aspens/documentation-architect"><img src="https://agentmods.dev/badge/agents/aspenkit/aspens/documentation-architect/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 documentation-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/aspenkit/aspens/documentation-architect"><img src="https://agentmods.dev/badge/agents/aspenkit/aspens/documentation-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00037 $0.00928
Opus 5.5 $0.00015 $0.00371
Sonnet 5.5 $0.00007 $0.00186
Haiku 4.5 $0.00004 $0.00093

Measured 1mo ago against content hash 9653beafdd45, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/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. 1mo 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 (103 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 928 once invoked, about $0.0001 per session on Opus 5.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

sw-closer

Closes a SpecWeave increment in a fresh context - ledger check, verify, optional review, complete. Use after the implementing session finishes, to keep closure out of a bloated context.

anton-abyzov/specweave · 44 tokens

adversarial-reviewer

Independent adversarial reviewer for a code change. Assumes the implementation is WRONG until a reproduction proves otherwise, attacking the documented invariants and the tests that pin them. Produces a findings JSON the gate records and enforces. Never fixes the implementation and never sees the author's reasoning …

jakubsuplicki/codument · 67 tokens

code-reviewer

Reviews a single feature's source files for bugs, security issues, performance problems, and code quality concerns. Reports findings by severity. Does NOT make breaking changes — only safe, non-breaking fixes.

jakubsuplicki/codument · 43 tokens

doc-scanner

Scans a codebase to identify features, modules, and documentation gaps. Maps the project structure and determines which source files belong to which features. Use for bootstrap scanning of undocumented projects.

jakubsuplicki/codument · 41 tokens

adversarial-planner

Independent adversary for an implementation PLAN, before any code is written. Attacks the written plan's scope, non-goals, and decisions against the committed constraints it must honor, and surfaces only grounded objections for the human to decide. Never rewrites the plan and never sees the author's reasoning …

jakubsuplicki/codument · 82 tokens

doc-writer

Creates and updates feature documentation by reading source code and writing real documentation content. Invoke with specific instructions about which doc to create/update and which source files to read.

jakubsuplicki/codument · 36 tokens