product-spec

product-spec is a command for coding agents from MedAdemBHA/docflow. It costs 17 tokens per session (807 once invoked), scanned A, original, MIT.

A command for creating or updating product-specification documents from a feature brief or code path. A product specification describes user behavior, value, and scope rather than implementation details.

In plain words
What is it for?
Use it to document a new feature, update an existing product spec, inspect related source code, and keep implementation notes separate.
Why use it?
It gives feature work a clear written description and marks unclear behavior as undecided instead of treating code as the product definition.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the docflow plugin — 9 skills, 3 commands shipped together

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/medadembha/docflow/product-spec
Clone the repo
git clone --depth 1 https://github.com/MedAdemBHA/docflow

Or install docflow, the plugin that ships this one along with the rest of its 9 skills, 3 commands.

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 product-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/medadembha/docflow/product-spec.svg)](https://agentmods.dev/commands/medadembha/docflow/product-spec)
Your own site
<a href="https://agentmods.dev/commands/medadembha/docflow/product-spec"><img src="https://agentmods.dev/badge/commands/medadembha/docflow/product-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 807 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.00017 $0.00807
Opus 5 $0.00009 $0.00404
Sonnet 5 $0.00003 $0.00161
Haiku 4.5 $0.00002 $0.00081

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

Security

Grade A, and why

product-spec 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 4d 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.

commands/product-spec.md · 73 lines

How it starts

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

Follow this prompt spec to create a docflow product spec from this source:

$ARGUMENTS

Rules

  • If the source is empty, ask for one short feature brief or code path and stop.
  • Product specs are WHAT docs: user behavior, user value, capabilities, scope.
  • Keep HOW details out of product-spec/; put implementation notes in specs/ follow-ups.
  • Treat code as evidence, not product truth. If behavior or user intent is unclear, write TBD.
  • Do not overwrite an existing product spec blindly. If a target file exists, merge new facts into the right sections.
  • Keep output lean: tables and bullets, no filler.

Steps

  1. Find the docs root:
    • Read docflow.json from $CLAUDE_PROJECT_DIR if present and use docsRoot.
    • Otherwise use docs.
  2. Read:
    • <DOCS_ROOT>/README.md
    • <DOCS_ROOT>/NAMING.md
    • ${CLAUDE_PLUGIN_ROOT}/templates/product-spec/00-overview.md
    • ${CLAUDE_PLUGIN_ROOT}/templates/product-spec/NN-topic.md
  3. Inspect the source:
    • If $ARGUMENTS is a real file or directory, read the relevant README, package metadata, route/component filenames, exported names, and nearby tests.
    • If $ARGUMENTS is prose, use it as the source brief.
  4. Choose the target:
    • Use <DOCS_ROOT>/product-spec/00-overview.md when the request describes the whole app, onboarding, project purpose, or missing overview content.
    • Otherwise create/update the next stable module doc: <DOCS_ROOT>/product-spec/NN-<slug>.md.
    • Pick NN as the next unused two-digit number in product-spec/.
  5. Write the product spec:
    • For overview docs, include app name, type, stack if known, users, and core modules.
    • For module docs, include purpose, key actions, business value, links, and known constraints.
    • Use TBD instead of guessing missing users, owner, business value, or behavior.
  6. Add cross-links:
    • Link to related specs/ docs if they already exist.
    • Link to related plans/features/ docs if they already exist.
    • Leave TBD links when follow-up docs do not exist yet.
  7. Update <DOCS_ROOT>/README.md so the new product spec is discoverable.
  8. If implementation details were discovered but no matching spec exists, report the needed specs/(mmm-yy)-<topic>.md follow-up.
  9. Regenerate the docs map:
    bash "$CLAUDE_PROJECT_DIR/scripts/docflow-map.sh" "$CLAUDE_PROJECT_DIR/$DOCS_ROOT"
    
    If the target repo does not have scripts/docflow-map.sh, use:
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/docflow-map.sh" "$CLAUDE_PROJECT_DIR/$DOCS_ROOT"
    
  10. Run link check if available:
bash "$CLAUDE_PROJECT_DIR/scripts/check-links.sh" "$CLAUDE_PROJECT_DIR/$DOCS_ROOT"
  1. Run validation if available:
bash "$CLAUDE_PROJECT_DIR/scripts/docflow-validate.sh" --target "$CLAUDE_PROJECT_DIR"

Read the full file on GitHub · 73 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. 4d ago First seen · 73 lines · 17 tokens per session scan A 318046873be9

Subscribe to this mod's changes

product-spec is a command published in the GitHub repository MedAdemBHA/docflow (41 stars, last pushed 19d ago), licensed MIT. It adds 17 tokens to every session and 807 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.