prd

prd is a command for coding agents from dhslegen/digital-delivery-team. It costs 26 tokens per session (2,115 once invoked), scanned B, original, MIT.

A product-planning command that creates or refreshes a product requirements document (PRD), including user stories and Given/When/Then acceptance criteria.

In plain words
What is it for?
Use it to create or update `docs/prd.md` before breaking the work into a work breakdown structure.
Why use it?
It turns a project brief into a shared description of what should be built and how completion will be checked.

Command

Part of the digital-delivery-team plugin — 13 skills, 21 commands, 9 agents, 8 hooks 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/dhslegen/digital-delivery-team/prd
Clone the repo
git clone --depth 1 https://github.com/dhslegen/digital-delivery-team

Or install digital-delivery-team, the plugin that ships this one along with the rest of its 13 skills, 21 commands, 9 agents, 8 hooks.

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 prd

README.md
[![agentmods](https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/prd.svg)](https://agentmods.dev/commands/dhslegen/digital-delivery-team/prd)
Your own site
<a href="https://agentmods.dev/commands/dhslegen/digital-delivery-team/prd"><img src="https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/prd.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,115 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00026 $0.02115
Opus 5 $0.00013 $0.01058
Sonnet 5 $0.00005 $0.00423
Haiku 4.5 $0.00003 $0.00212

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

Security

Grade B, and why

prd scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)
commands/prd.md · 186 lines

How it starts

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

/prd

输入:$ARGUMENTS


Phase 1 — 前置校验

git rev-parse --is-inside-work-tree 2>/dev/null || { echo "❌ 非 git 仓库"; exit 1; }
# v0.9.3 D19+D20:plugin root 解析提前,让 cp 模板等所有引用都能用 $DDT_PLUGIN_ROOT
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT="${HOME}/.claude/plugins/marketplaces/digital-delivery-team"
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || { echo "❌ DDT plugin root 未解析。可能原因:(1) 插件未安装;(2) shell 中 DDT_PLUGIN_ROOT 指向无效路径,请 unset DDT_PLUGIN_ROOT 后重启会话;(3) 运行 /digital-delivery-team:doctor 自检"; exit 1; }
export DDT_PLUGIN_ROOT

project-brief.md 不存在:

cp "$DDT_PLUGIN_ROOT/templates/project-brief.template.md" project-brief.md
echo "⚠️ 已创建 project-brief.md 骨架,请填写后重跑 /prd"
exit 1

Phase 2 — 项目 ID 自检

SessionStart hook 已在新会话首次进入项目时自动 bootstrap。命令本身只读取已有 ID:


# v0.9 A2: --dry-run 预览(不读不写、不发事件)
if printf '%s' "$ARGUMENTS" | grep -q -- '--dry-run'; then
  node "$DDT_PLUGIN_ROOT/bin/print-dry-run.mjs" --phase prd --inputs "project-brief.md,docs/prd.md(if exists)" --outputs "docs/prd.md" --next "/wbs"
  exit 0
fi

node "$DDT_PLUGIN_ROOT/bin/emit-phase.mjs" --phase prd --action start
export DDT_PROJECT_ID=$(cat .ddt/project-id 2>/dev/null || echo "$DDT_PROJECT_ID")
test -n "$DDT_PROJECT_ID" || { node "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" --bootstrap --name "$(basename "$(pwd)")"; export DDT_PROJECT_ID=$(cat .ddt/project-id); }

Phase 3 — 增量 / refresh 选择

docs/prd.md 已存在且未传 --refresh,进入增量修订模式(默认)。

若传入 --refresh,重新读取 project-brief.md$ARGUMENTS,刷新受影响章节;仍必须保留已验证内容与变更记录,禁止无差别全量覆盖。

Phase 4 — 派发 product-agent

使用 Task 工具派发 product-agent,传入:

  • project-brief.md(项目简报)
  • docs/prd.md(已有 PRD,若存在)
  • $DDT_PLUGIN_ROOT/templates/prd.template.md(PRD 模板,绝对路径在插件根——v0.9.3 D19)
  • brief §11 集成依赖中标注的契约文档路径(v0.9.8 D25):派发前 grep brief 抽出 §11 提到的 契约文档 \`行(典型形态如项目资料/无人车开放平台API/`),在派发 prompt 里追加:"第三方接口契约:< 列出 §11 标注的路径 >;用户故事提到的 endpoint 必须引用契约里的具体路径,禁止编造或写'未确认'作 BLK";若 brief 无 §11 或 §11 留空,跳过本步。
  • $ARGUMENTS(补充说明)

Read the full file on GitHub · 186 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 · 186 lines · 26 tokens per session scan B 48238899acb1

Subscribe to this mod's changes

prd is a command published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 2,115 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.