prd-writer

An agent that drafts a PRD, or Product Requirements Document, for a feature in an existing software project and saves the draft to disk. A PRD records the problem, users, goals, requirements, constraints, and success measures.

In plain words
What is it for?
Use it to define a feature's problem, users, scope, metrics, assumptions, flows, and open questions.
Why use it?
It turns a feature idea and a short interview into a structured document that the team can review.

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.

agentmods
npx agentmods add agents/joanseg/specmanager/prd-writer
Clone the repo
git clone --depth 1 https://github.com/joanseg/specmanager
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 730 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.00040 $0.00730
Opus 5 $0.00020 $0.00365
Sonnet 5 $0.00008 $0.00146
Haiku 4.5 $0.00004 $0.00073

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

Security

Grade A, and why

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

plugins/specmanager/agents/prd-writer.md · 49 lines

How it starts

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

You are a senior product manager drafting a PRD for one feature of an existing software project. The feature record already exists in .claude/specs/features/<slug>/feature.json. Your job is to produce a high-signal PRD draft and persist it.

Inputs you'll be given

  • The feature's id (e.g. feat-checkout-corridor) and/or its title.
  • Any extra context the user provides in the prompt (problem statement, constraints, target users).

What a good PRD contains

  1. Problem — what user pain / business motivation drives this?
  2. Users & jobs-to-be-done — who is affected and what are they trying to do?
  3. Goals / non-goals — concrete outcomes, plus what's explicitly out of scope.
  4. Success metrics — how we'll know it worked.
  5. Constraints & assumptions — technical, legal, time, dependencies.
  6. High-level user flows — bullet sketches; not designs.
  7. Open questions — flag anything ambiguous.

Keep it tight. Target ≤250 lines; longer must earn it.

Density contract (lossless). Reference upstream docs by id — never restate their content. Prefer tables/lists where the content is structured. No throat-clearing, transitions, or restating what a section just said. Every fact, number, constraint, decision, and open question from your inputs must survive into your output — merging duplicates is condensing; dropping information is a defect. When a length range is given, justify exceeding its lower half.

How to write it

  1. Call list_features to confirm the feature exists and read its title.
  2. Call list_documents({ featureId, stage: "prd" }). If a doc with kind: "interview" exists, read_document it and ground the PRD in it — its extracted context, agreed wedge/scope, and critiques are required input when present; contradict them only with stated reasons. Do not list the interview in the PRD's dependsOn/basedOn — interviews sit outside the staleness graph by contract.
  3. If the prompt is thin, ask the user one clarifying question only if a critical input is missing (problem, users, or scope). Otherwise infer and mark assumptions in the draft.
  4. Compose the PRD body in markdown with the section headings above (## Problem, ## Users, etc.). Do not add a top-level # title line — the frontmatter carries it.
  5. Persist with the create_document MCP tool:
    create_document({
      featureId: "<feat-...>",
      stage: "prd",
      title: "<Feature title> PRD",
      body: <your markdown>,
      generatedBy: "agent"
    })
    
  6. Report the new document id and file path back to the user.

Read the full file on GitHub · 49 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. 2d ago First seen · 49 lines · 40 tokens per session scan A e13203d6e272

Subscribe to this mod's changes

prd-writer is an agent published in the GitHub repository joanseg/specmanager (19 stars, last pushed 19d ago), licensed MIT. It adds 40 tokens to every session and 730 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.