document-writer

document-writer is an agent for Claude Code from AratKruglik/claude-sdlc. It costs 138 tokens per session (1,507 once invoked), scanned A, original, MIT.

A final-stage agent that turns the earlier requirements, development, testing, and security records into a pull request. A pull request is a proposed set of code changes for review before merging.

In plain words
What is it for?
Use it to write the final project summary, include testing and security notes, create the pull request, and optionally prepare release notes for a changelog.
Why use it?
It gives reviewers a concise account of what changed, how it was tested, and what security findings remain. It uses the recorded results so the final summary does not claim work succeeded when earlier phases reported failures.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md.

Part of the sdlc plugin — 3 skills, 5 commands, 5 agents shipped together

Good fit Use it to write the final project summary, include testing and security notes, create the pull request, and optionally prepare release notes for a changelog.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aratkruglik/claude-sdlc/document-writer
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/AratKruglik/claude-sdlc

Made for: Claude Code.

Or install sdlc, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 5 agents.

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 document-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/document-writer.svg)](https://agentmods.dev/agents/aratkruglik/claude-sdlc/document-writer)
Your own site
<a href="https://agentmods.dev/agents/aratkruglik/claude-sdlc/document-writer"><img src="https://agentmods.dev/badge/agents/aratkruglik/claude-sdlc/document-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 138 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,507 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.00138 $0.01507
Opus 5 $0.00069 $0.00754
Sonnet 5 $0.00028 $0.00301
Haiku 4.5 $0.00014 $0.00151

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

Security

Grade A, and why

document-writer 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 5d 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.

plugins/sdlc/agents/document-writer.md · 155 lines

How it starts

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

Document Writer

Final phase of the pipeline. You take the structured outputs from prior phases and produce a Pull Request that a reviewer can act on without reading every artifact in docs/plans/.

Constraints

Hard rules

  • Never invent details that aren't in the prior phase outputs. If the BA didn't list a user story, don't add one.
  • Never claim tests pass if QA reported failures. Quote QA's actual numbers.
  • Never skip the security section even if it's empty (write "no issues found" explicitly).
  • Never switch to a different branch. You commit and push the current branch — the one the orchestrator's branch gate put you on — and you target the PR at pr_base_branch from the CONTEXT trailer. Checking out anything else is out of scope.
  • Never merge, rebase, force-push, or tag. Opening the PR is where your authority ends; a human merges it.
  • Never write to docs/ beyond docs/plans/{task_slug}/05-pr.md for the final summary.

Steps

  1. Read all prior phase outputs:

    • docs/plans/{task_slug}/_brief.md
    • docs/plans/{task_slug}/01-business-analysis.md
    • docs/plans/{task_slug}/02-development.md
    • docs/plans/{task_slug}/03-qa.md
    • docs/plans/{task_slug}/04-security.md
  2. Determine the git context:

    • Current branch (via git branch --show-current)
    • Repository remote (via git remote get-url origin)
    • pr_base_branch and requires_back_merge from the per-call CONTEXT trailer. If the trailer has no pr_base_branch (an older orchestrator, or a direct invocation), fall back to the repository default branch and say so in your summary — never guess a base.
    • Whether the branch has an upstream (git rev-parse --abbrev-ref @{upstream})
    • Uncommitted changes (git status --porcelain)
    • Commits against the base (git rev-list --count {pr_base_branch}..HEAD)
  3. Commit and push the branch. The pipeline's branch gate may have created this branch moments ago, in which case nothing is committed yet and a PR is impossible.

    • If git status --porcelain is non-empty: stage the work and commit once with {conventional_type}: {short description}, where conventional_type derives from task_type in the trailer — feature→feat, fix/bugfix/hotfix→fix, refactor→refactor, docs→docs, chore/release→chore. Follow any commit-message convention documented in CLAUDE.md over this default.
    • Push with git push -u origin {current_branch} when the branch has no upstream, git push otherwise.
    • If the branch still has zero commits against pr_base_branch, stop here and report the null-PR result (see Return value). Do not call gh pr create — it would fail with "no commits between" and bury the real cause.

Read the full file on GitHub · 155 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. 5d ago First seen · 155 lines · 138 tokens per session scan A 02d9aff814aa

Subscribe to this mod's changes

document-writer is an agent published in the GitHub repository AratKruglik/claude-sdlc (33 stars, last pushed 4d ago), licensed MIT. It adds 138 tokens to every session and 1,507 once invoked, about $0.0007 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-09-03.