prd

A command for turning a confirmed plan package into a PRD, or product requirements document: a structured description of what software should do. It can also make narrowly targeted corrections based on a list of failures or decisions.

In plain words
What is it for?
Use it to create or revise docs/PRD.md from docs/prd-plan-pack.yaml and then check that the document is complete.
Why use it?
It keeps the requirements tied to an approved source and stops when the information is too incomplete to check. This prevents unsupported details, missing required sections, and unrelated edits.

Command for Claude Code

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/snakeying/textum/prd
Clone the repo
git clone --depth 1 https://github.com/snakeying/Textum

Made for: Claude Code.

Per session 0 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,063 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.00000 $0.02063
Opus 5 $0.00000 $0.01032
Sonnet 5 $0.00000 $0.00413
Haiku 4.5 $0.00000 $0.00206

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

Security

Grade A, and why

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.

outdated/.claude_outdated/commands/prd.md · 98 lines

How it starts

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

阶段1b: PRD 生成/修正

只做一件事:把 plan-pack 落盘为 PRD(按模板)。

约束:本命令不做需求对话。若信息不足以生成“可检查的 PRD”,输出 PRD_PLAN_CLARIFY_PACK 并停止(不修改任何文件)。

读取:docs/prd-plan-pack.yaml +(如存在)docs/PRD.md | 写入:docs/PRD.md(信息不足则不写) | 模板:.claude/textum/PRD-framework.md | 可选输入:FAIL/DECISION 清单

输入

  • plan-pack(唯一事实来源;不得向用户索要整包粘贴)
  • (可选)FAIL/DECISION 清单(用于精准修正)

修正模式(当提供 FAIL/DECISION 清单时必须遵守)

  • 以现有 docs/PRD.md 为基线:只修改清单命中的位置,其余内容不做无关改动(最小 diff)
  • 稳定 ID/锚点禁止漂移:不得重排/重编号;若必须新增,只能在末尾新增并按序递增
  • 若清单需要补充事实且 plan-pack 不足以支撑:输出 PRD_PLAN_CLARIFY_PACK 并停止(不写文件)

输出

二选一(必须遵守):

  1. 成功:创建/更新 docs/PRD.md(不含任何模板占位符),并输出:
    • PASS
    • 已写入:docs/PRD.md
    • 下一步:/prd-check
  2. 信息不足:输出 PRD_PLAN_CLARIFY_PACK 代码块后,追加两行纯文本指引(不修改任何文件):
    • 下一步:复制 PRD_PLAN_CLARIFY_PACK 粘贴给 /prd-plan
    • 重跑:/prd

PACK 完备性校验(必须)

  • docs/prd-plan-pack.yaml 是唯一事实来源:PRD 只能从已确认字段映射出来(不得脑补)
  • 必须满足最小可用性:
    • modules 至少 1 个,且至少 1 个模块 priority = P0
    • business_rules 至少 1 条且每条非空
  • 对照 .claude/textum/PRD-framework.md 的必填章/表逐项校验:必须能完整填满且不残留任何占位符(如 TBD[...][field][METHOD][PATH][table]PRD#API-###PRD#TBL-###
  • PRD 7.3 命名规范
    • 仅当 plan-pack assumptions_constraints[].assumption_or_constraint 中存在以 命名规范: 开头的已确认约定时才写表格
    • 否则该小节正文仅一行 N/A(不追问、不阻断)
  • 必须可闭合“功能点→落点映射”(PRD 8.0):
    • pack 来源:modules[].feature_points[].landing(不可为空;不明确就回 PRD_PLAN_CLARIFY_PACK
    • pack 中每条 landing 允许值:N/A 或逗号分隔多项集合(不改写 token 本体):
      • DB:<table>:数据库表(<table> 必须能在 data_model.tables[].table 中找到)
      • FILE:<path/glob>:文件/目录/生成产物(允许包含如 /posts/[slug] 等路由/通配片段)
      • CFG:<key>:配置项/开关/参数
      • EXT:<system>:外部依赖
    • PRD 输出规范:DB:<table> 必须映射为 DB:TBL-###TBL-001 起连续)并能在 PRD 8.2 用锚点 <!-- PRD#TBL-### --> 唯一定位
    • data_model.tables 为空:PRD 8.1/8.2/8.3 均写 N/A,且 PRD 8.0 不得出现任何 DB: 落点
  • 仅当无法生成“可检查的 PRD”时才输出 PRD_PLAN_CLARIFY_PACK 并停止(不写文件);阻断条件包括:
    • plan-pack 不满足最小可用门禁(例如:api.has_api=null、缺模块/缺功能点/缺落点、缺规则、缺权限矩阵等)
    • 任何必填表格/章节只能靠猜测才能补齐
    • 无法闭合 8.0 功能点→落点映射(含落点 token 不合法、或 DB:<table> 找不到 data_model.tables[].table
    • api.has_api=trueapi.endpoints 无法提供最小清单(method/path/permission/summary)
    • 需要新增 API/TBL 但缺少最小可定位信息,无法保证 ID/锚点稳定
  • 其余“非阻断缺失”(例如:第 2.3/7.1/7.2/10 细节不足、表字段不全、错误码不全):用 N/A/None 明确落盘,不追问、不阻断

Read the full file on GitHub · 98 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 · 98 lines · 0 tokens per session scan A 74ea5123453d

Subscribe to this mod's changes

prd is a command published in the GitHub repository snakeying/Textum (41 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,063 tokens. 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.