documentation

A command for auditing and updating a project’s code and documentation while following its repository constitution, meaning its local rules. It can also refresh architecture diagrams and synchronize a knowledge graph or memory bank when those are present.

In plain words
What is it for?
Finding missing documentation, regenerating project documents, correcting outdated examples, updating diagrams, refreshing a knowledge graph, and syncing project memory.
Why use it?
It brings documentation closer to the current code and makes the project’s structure easier to understand and maintain.

Command

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 commands/jjmartres/ai-coding-agents/documentation
Clone the repo
git clone --depth 1 https://github.com/jjmartres/ai-coding-agents
Per session 2 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 305 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.00002 $0.00305
Opus 5 $0.00001 $0.00152
Sonnet 5 $0.00000 $0.00061
Haiku 4.5 $0.00000 $0.00030

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

Security

Grade A, and why

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

shared/.ai-agents/commands/documentation.md · 46 lines

What it actually says

Strictly follow the project constitution.

Apply the following skills where relevant:

  • document-code
  • document-project
  • humanizer
  • mermaid-diagrams
  • writing-clearly-and-concisely

Steps

1. Load project context

  • Read .specify/memory/constitution.md if it exists
  • Let the constitution override any defaults below

2. Audit code documentation

  • Identify undocumented or poorly documented public interfaces, functions, and modules
  • Apply document-code skill to fill gaps
  • Flag anything that requires human input (ambiguous intent, missing domain context)

3. Regenerate project documentation

  • Apply document-project skill to update or generate the full documentation structure
  • Refresh architecture diagrams with mermaid-diagrams skill where relevant
  • Ensure prose is clear and concise per writing-clearly-and-concisely skill
  • Fix any outdated examples or incorrect information against current code implementation

4. Update Graphify knowledge graph (if applicable)

  • Check whether a graphify-out/ directory exists at the project root
  • If it exists, run: graphify update . --out ./graphify-out
  • If not, skip silently

5. Sync memory bank

  • Check whether a .ai-agents/memory-bank directory exists at the project root
  • If it exists, run: /memory-bank
  • If not, skip silently
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 · 46 lines · 2 tokens per session scan A d1c808d528dc

Subscribe to this mod's changes

documentation is a command published in the GitHub repository jjmartres/ai-coding-agents (43 stars, last pushed 2mo ago), licensed MIT. It adds 2 tokens to every session and 305 once invoked, about $0.0000 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.