specmanager-prd

A command for drafting a product requirements document, or PRD—a written plan for a software feature—inside SpecManager. It finds an existing feature or creates one, then asks a separate writing agent to prepare the draft.

In plain words
What is it for?
Starting a PRD for a new or existing feature, creating the feature structure when needed, checking for existing drafts, and launching the PRD-writing workflow.
Why use it?
It keeps feature records and their documents organized and avoids creating a duplicate PRD when one already exists. It also treats interview notes separately from an actual PRD.

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/joanseg/specmanager/specmanager-prd
Clone the repo
git clone --depth 1 https://github.com/joanseg/specmanager
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 540 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.00027 $0.00540
Opus 5 $0.00014 $0.00270
Sonnet 5 $0.00005 $0.00108
Haiku 4.5 $0.00003 $0.00054

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

Security

Grade A, and why

specmanager-prd 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/commands/specmanager-prd.md · 42 lines

What it actually says

Draft a PRD for: $ARGUMENTS.

This is the entry point for a new feature. The argument is normally a short feature title (e.g. "Checkout corridor"). If the argument already matches an existing feature, the PRD is drafted for that feature instead.

Steps

  1. Resolve or create the feature. Call list_features.
    • If a feature's id or slug matches the argument, use it.
    • Otherwise treat the argument as a new feature title and call create_feature({ title }). It generates a kebab-case slug, scaffolds the per-stage folders, writes feature.json, and refreshes manifest.json. Report the new id, slug, and folder path.
    • If no argument was given, ask the user for one short title and stop.
  2. Check for an existing draft. Call list_documents({ featureId, stage: "prd" }). Ignore docs with kind: "interview" — an interview is pre-PRD material, not a PRD; an interview-first flow must not be reported as "a PRD already exists". If a non-interview PRD already exists, ask whether to (a) iterate on it via the panel UI or (b) start over (the user must delete it manually). Do not create a duplicate.
  3. Invoke the subagent. Use the Task tool with subagent_type: "prd-writer" and a prompt that includes:
    • The feature id and title.
    • Any extra context the user gave alongside the slash command.
  4. Sync CLAUDE.md. When the subagent reports success, call sync_claude_md so the managed block reflects the new feature and draft.
  5. Report. Tell the user the new document id and file path. Suggest opening it in the board (/specmanager-board) to review, then approve.

Don't

  • Don't approve the PRD — only the user does that.
  • Don't approve the new feature; features start in draft.
  • Don't write the PRD inline in this conversation. Always go through the subagent so the system prompt + tool boundaries apply.
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 · 42 lines · 27 tokens per session scan A 69b28e719c7a

Subscribe to this mod's changes

specmanager-prd is a command published in the GitHub repository joanseg/specmanager (19 stars, last pushed 18d ago), licensed MIT. It adds 27 tokens to every session and 540 once invoked, about $0.0001 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.