一键导入
prd
PRD generation rules and unified template enforced by a Python script. Single 14-section structure for Web, Backend, Mobile, and multi-platform projects.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
PRD generation rules and unified template enforced by a Python script. Single 14-section structure for Web, Backend, Mobile, and multi-platform projects.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | prd |
| description | PRD generation rules and unified template enforced by a Python script. Single 14-section structure for Web, Backend, Mobile, and multi-platform projects. |
| user-invocable | false |
The PRD is rendered by a deterministic Python script from a structured input
JSON. The agent's job is to interview the user and write a complete
docs/.harness/prd-input.json; the script does all markdown formatting, section
ordering, placeholder insertion, and schema enforcement.
Pre-flight check (Python)
python3 --version
If python3 is not on PATH or the command fails, STOP. Report the
blocker to the main agent verbatim and do not attempt any workaround.
Platform detection — derive meta.platforms (subset of
{"web","mobile","backend"}) from the user's request. See table below.
Workspace detection — for monorepos, identify the target sub-package
via turbo.json / pnpm-workspace.yaml / root package.json#workspaces,
then read versions from that sub-package's package.json. See "Version
Resolution" below.
Interview — fill every required field of the JSON schema (see
## JSON Input Schema below). Use interview-protocol discipline:
ambiguity = 0 before writing.
Write input file
Write tool → docs/.harness/prd-input.json
This file is committed (PR diff = structured review surface). Use the Write tool, not Bash heredoc — JSON formatting must be clean.
Invoke Python
python3 "${CLAUDE_PLUGIN_ROOT}/skills/prd/scripts/generate_prd.py" \
--input docs/.harness/prd-input.json \
--output docs/PRD.md
Handle REJECT — if the script exits non-zero, stderr will contain a
single [REJECT] <reason> line. Read the reason, fix the JSON, re-run.
Maximum 2 retry attempts; after that, surface the issue to the user and
ask for guidance instead of guessing.
Output location is fixed: always
docs/PRD.md. The script automatically backs up any existing file todocs/PRD.md.bak.<timestamp>before overwriting.
| Signal | meta.platforms entry |
|---|---|
| "web app", "website", "React Router", "Next.js", "SPA", page/menu mentions | "web" |
| "API", "backend", "server", "REST", "GraphQL", "NestJS", "microservice", endpoint mentions | "backend" |
| "mobile app", "iOS", "Android", "Expo", "React Native", screen/tab mentions | "mobile" |
Multiple signals → multiple entries (e.g., ["backend", "mobile"]). If the
user does not specify, ask before defaulting — do not infer silently.
Before populating tech_stack.*.items[].version:
Workspace detection — check in order:
turbo.json exists at project root → Turborepopnpm-workspace.yaml exists at project root → pnpm workspacespackage.json contains workspaces field → npm/yarn/bun workspacesIf monorepo: identify the target sub-package per platform:
react-router.config.ts or next.config.*app.config.ts/.js or
app.json with an expo key) AND expo in package.json dependenciesnest-cli.jsonpackage.json for versions; fall back to root
only for shared dependencies.Single project: read root package.json.
Override: if the user (or main agent) explicitly specifies a stack, prioritize their choice. Defaults apply only when no preference is given.
Authoritative source: scripts/generate_prd.py dataclasses. Field-by-field outline lives in references/input-schema.md. Top-level keys: meta / overview / roles / user_journeys / features / deferred_features / surface_map / surface_details / endpoint_specs / data_model / backend_specifics / mobile_specifics / security / nfr / tech_stack / assumptions_open_questions / appendix.
The Python validator enforces, per feature:
kind: "happy"kind: "edge" or kind: "error"Violations exit with [REJECT] feature ...: needs ≥1 edge|error AC (coverage rule).
These items are excluded from every section of every PRD:
Business metrics / success targets — excluded entirely. Do NOT generate any of the following, in any section, in any wording:
Technical specifications remain allowed when they define the system
contract: response-time targets on a specific endpoint, page-size limits,
timeouts, max upload size, rate-limit thresholds, pagination defaults. These
describe how the system behaves, not what business outcome it commits to.
The prd-validator flags violations as [SCOPE_VIOLATION].
The Python script enforces:
meta.platforms ↔ presence of backend_specifics/mobile_specificsmeta.platforms includes backend ↔ endpoint_specs non-emptyweb/mobile) ↔ at least one matching surface_details entryfeatures[].dependencies resolve to known feature namesThe agent is responsible for the rest:
features[] is implemented by at least one
surface_details[] entry (UI platforms) or endpoint_specs[] entry (backend)surface_details[].implements reference exists in features[]roles.definitions appear consistently in permission_matrix,
surface_details[].access, data_access_scopingdata_model.entities are referenced by at least one feature
or endpointThe prd-validator agent verifies these post-generation.
tech_stack.*.items[].version must be extracted from package.json (or the relevant sub-package's package.json in a monorepo). Do not invent or stale-cache versions.ADR (Architecture Decision Record) generation + supersession rules. Immutable per-file under docs/adr/ (Status line is the only mutable surface). Bootstrap enumerates from PRD; standalone `/blueprint adr` adds or supersedes. Python-backed renderer.
Shared memory-management guidance for subagents. Preload via the subagent's skills frontmatter field so every agent follows the same rules about what to save, when to save, and when to retrieve.
Generate or update docs/ARCHITECTURE.md via a Python-backed, single unified template. Supports React Router Framework, Expo Router, NestJS, and Tauri 2 across single-package and monorepo layouts. The renderer enforces scope discipline — data model, features, code snippets, and tech-stack recommendations are rejected as PRD-territory.
Orchestrate creation/update of PRD, ADR, ARCHITECTURE, and ROADMAP via a guided 5-mode flow (Bootstrap / PRD / ADR / ARCHITECTURE / ROADMAP). Wraps the six doc subagents with phase-state enforcement so steps cannot be skipped. Use when the user invokes `/blueprint`, asks to "PRD/ROADMAP을 만들자", or wants to initialize/refresh project documentation.
Clean Architecture 4-layer dependency rules, TDD-exempt layer list, and test policy per layer. Reference-only skill preloaded by pipeline, tdd, code-reviewer, and other architecture-aware consumers.
Generate a production-ready GitHub Actions workflow that deploys a project to Cloudflare Workers via the official cloudflare/wrangler-action. Auto-detects the package manager (bun/pnpm/yarn/npm), reads the project's package.json scripts to assemble the right quality gates (lint/typecheck/test) and build step, parameterizes branches from .claude/config.json, and writes the rendered YAML to .github/workflows/deploy-cloudflare-workers.yml. Use whenever the user asks to "set up Cloudflare Workers deployment", "add a Cloudflare deploy workflow", "create a wrangler GitHub Action", "deploy this project to Workers from GitHub", or any phrasing about a CI/CD pipeline targeting Cloudflare Workers — even when they don't say the word "skill". Do not use this skill for Cloudflare Pages, Vercel, Netlify, or other platforms.