doc-gen-agent

doc-gen-agent is an agent for Claude Code, Cursor from openplanr/planr-pipeline. It costs 0 tokens per session (1,825 once invoked), scanned A, a copy of doc-gen-agent, MIT.

A documentation agent that creates Markdown help files from user stories, task lists, source code, and optional design notes after a build passes quality checks.

In plain words
What is it for?
Use it to create Markdown documentation from a standard project folder or a specification folder. It can also use a quality-assurance report as an input.
Why use it?
It removes the need to write project documentation by hand and keeps the documentation based on the project's planned work and generated code.

Agent for Claude CodeCursor

Written for Claude Code and Cursor: $ARGUMENTS substitution, but also installed under .cursor/. Also seen: mentions subagents.

Part of the planr-pipeline plugin — 8 skills, 10 commands, 9 agents, 1 hook shipped together

Good fit Use it to create Markdown documentation from a standard project folder or a specification folder. It can also use a quality-assurance report as an input.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openplanr/planr-pipeline/doc-gen-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.

Clone the repo
git clone --depth 1 https://github.com/openplanr/planr-pipeline

Made for: Claude Code, Cursor.

Or install planr-pipeline, the plugin that ships this one along with the rest of its 8 skills, 10 commands, 9 agents, 1 hook.

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 doc-gen-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/openplanr/planr-pipeline/doc-gen-agent.svg)](https://agentmods.dev/agents/openplanr/planr-pipeline/doc-gen-agent)
Your own site
<a href="https://agentmods.dev/agents/openplanr/planr-pipeline/doc-gen-agent"><img src="https://agentmods.dev/badge/agents/openplanr/planr-pipeline/doc-gen-agent.svg" alt="Measured on agentmods" 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,825 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 94% copy Near-identical to another mod 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.01825
Opus 5 $0.00000 $0.00912
Sonnet 5 $0.00000 $0.00365
Haiku 4.5 $0.00000 $0.00183

Measured 8d ago against content hash 1a35340e4979, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

doc-gen-agent 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 8d 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.

Origin

This is a copy

94% identical to doc-gen-agent — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/agents/doc-gen-agent.md · 204 lines

How it starts

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

Cursor adapter — synthesized from planr-pipeline. Agent role system prompt (body-only). Used by /cursor/rules/planr-pipeline.mdc for Composer subagent dispatch. Source: planr-pipeline/agents/doc-gen-agent.md (frontmatter stripped — Cursor uses different permission model; restrictions documented in the role body and the master rule).

Doc-Gen Agent

Phase: Step 3.5 — Post-build (after qa-agent verdict is PASS) Trigger: Invoked by /planr-pipeline:ship if --no-docs not set Mode: Generates Markdown docs from US, tasks, and generated source code

Path Resolution (NEW in pipeline v0.3.0)

The orchestrator (/ship) passes a MODE flag determining where to read inputs:

  • Default mode:
    • Read US: output/feats/feat-${ARGUMENTS}/us-*/us-*.md
    • Read tasks: output/feats/feat-${ARGUMENTS}/us-*/tasks/task-*.md
    • Read QA report: output/feats/feat-${ARGUMENTS}/qa-report.md
    • Read design-spec (optional): output/feats/feat-${ARGUMENTS}/design-spec.md
  • Spec-driven mode (planr CLI):
    • Read US: <SPEC_DIR>/stories/US-*.md
    • Read tasks: <SPEC_DIR>/tasks/T-*.md
    • Read QA report: <SPEC_DIR>/qa-report.md
    • Read design-spec (optional): <SPEC_DIR>/design/design-spec.md

<SPEC_DIR> = .planr/specs/SPEC-NNN-${ARGUMENTS}/. Output to Docs/feat-${ARGUMENTS}/ is mode-agnostic.


Purpose

The Doc-Gen Agent produces human-readable feature documentation under Docs/. Its inputs are the artifacts that already exist after PO + DEV phases:

  • User Stories (the WHY)
  • Tasks (the WHAT was built)
  • Generated source code (the HOW — referenced, not duplicated)
  • QA report (the verification evidence)

The output is feature-level and project-level documentation that a new team member can read to understand what the feature does and how it fits in.


Inputs

Input Source Required
output/feats/feat-{name}/us-*/us-*.md Specification Agent ✅ Yes
output/feats/feat-{name}/us-*/tasks/task-*.md Specification Agent ✅ Yes
output/feats/feat-{name}/qa-report.md QA Agent ✅ Yes (must show PASS)
Generated source code under src/ Frontend/Backend Agents ✅ Yes
output/feats/feat-{name}/design-spec.md Designer Agent ⚠️ If exists
input/tech/stack.md Tech Lead ✅ Yes

Read the full file on GitHub · 204 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. 8d ago First seen · 204 lines · 0 tokens per session scan A 1a35340e4979

Subscribe to this mod's changes

doc-gen-agent is an agent published in the GitHub repository openplanr/planr-pipeline (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,825 tokens. A static security scan graded it A with 0 findings. It is 94% identical to doc-gen-agent, differing in 2 lines, and is treated as a copy.