prd

GitHub

根据自然语言描述生成产品需求文档(PRD),支持新建应用和现有功能两种模式。通过澄清问题、参考研究和定义范围,输出结构化文档以指导后续开发。

skills/prd/SKILL.md SethGammon/Citadel

Trigger Scenarios

用户描述要构建的新应用或功能 在 Archon 项目启动前需要明确需求

Install

npx skills add SethGammon/Citadel --skill prd -g -y
More Options

Use without installing

npx skills use SethGammon/Citadel@prd

指定 Agent (Claude Code)

npx skills add SethGammon/Citadel --skill prd -a claude-code -g -y

安装 repo 全部 skill

npx skills add SethGammon/Citadel --all -g -y

预览 repo 内 skill

npx skills add SethGammon/Citadel --list

SKILL.md

Frontmatter
{
    "name": "prd",
    "effort": "high",
    "license": "MIT",
    "description": "Generates a Product Requirements Document from a natural language app description. Asks clarifying questions, researches similar apps, defines scope, stack, architecture, and produces a structured PRD that Archon can decompose into a campaign.",
    "auto-trigger": false,
    "user-invocable": true,
    "trigger_keywords": [
        "prd",
        "requirements",
        "spec",
        "plan an app",
        "design an app"
    ]
}

/prd — Product Requirements Document Generator

When to Use

Don't use when: architecture is already defined and you need implementation (use /architect then /archon); adding a small feature to an existing app (use /marshal directly).

  • User describes an app or feature to build (greenfield or feature mode)
  • Before any Archon campaign for a new project or feature

Mode Detection

Before starting, determine the mode:

Greenfield mode: No existing source files, or user explicitly says "new app" / "from scratch." Produces a full PRD as described below.

Feature mode: The project already has source files (check for src/, app/, lib/, package.json with dependencies, or similar). The user describes a feature to add, not a whole app ("add auth", "add a dashboard", "add payment processing").

In feature mode:

  • Read the existing file tree and package.json/equivalent before asking questions
  • The existing stack is a given — don't recommend alternatives
  • "Architecture" section describes integration points with existing code, not standalone shape
  • End conditions MUST include regression checks: "existing tests still pass", "typecheck has no new errors"
  • "Out of Scope" is relative to the feature, not the whole app
  • Technical Decisions only covers decisions the feature introduces (new dependencies, new patterns)

The PRD template below works for both modes. Feature mode just scopes it tighter.

Protocol

Step 1: UNDERSTAND

Determine mode (greenfield vs feature). Identify core functionality, target user, and success criteria (greenfield) or integration points and existing stack (feature). Ask up to 3 questions — only those that would change the architecture. Do not ask about tech stack in greenfield mode; in feature mode, the stack is already decided.

Step 2: RESEARCH (Optional)

If the concept has well-known implementations, run /research to identify 2-3 reference apps and common expected features. Skip for simple concepts (landing page, personal tool, CRUD).

Step 3: DEFINE

Produce a structured PRD. Write to .planning/prd-{slug}.md:

# PRD: {App Name or Feature Name}

> Description: {One sentence}
> Author: {user}
> Date: {ISO date}
> Status: draft
> Mode: {greenfield | feature}

## Problem
{What problem does this solve? Why does the user want it?}

## Users
{Who uses this? One or two user types max.}

## Core Features
{Numbered list. Maximum 5 for v1. Each feature is one sentence.}
1. {Feature}: {what it does}
2. ...

## Out of Scope (v1)
{Things the user might expect but should NOT be built yet.
Being explicit about what's out prevents scope creep.}

## Technical Decisions
- **Frontend**: {recommendation with reasoning}
- **Backend**: {recommendation with reasoning, or "none" for static apps}
- **Database**: {recommendation with reasoning, or "none"}
- **Auth**: {recommendation, or "none" if no user accounts}
- **Deployment**: {recommendation}

{In feature mode, only list decisions the feature introduces.
Existing stack decisions are inherited, not re-evaluated.}

## Architecture
{High-level description. 3-5 sentences max. How the pieces connect.
NOT a file tree. NOT implementation details. Just the shape.}

{In feature mode: describe integration points with existing code.
"The new auth middleware hooks into the existing Express router at
src/routes/index.ts. User model extends the existing Prisma schema."}

## Integration Points (feature mode only)
{Skip this section in greenfield mode.}
- **Existing files modified**: {list of files the feature will touch}
- **New files created**: {list of new files}
- **Dependencies added**: {new packages, if any}
- **Patterns followed**: {existing patterns in the codebase this feature should match}

## End Conditions (Definition of Done)
{Machine-verifiable conditions that mean the feature/app is complete.}
- [ ] {condition 1: e.g., "Landing page renders at localhost:3000"}
- [ ] {condition 2: e.g., "User can create account and log in"}
- [ ] {condition 3: e.g., "Core feature X works end-to-end"}

{In feature mode, ALWAYS include these regression conditions:}
- [ ] Existing tests pass with 0 new failures
- [ ] Typecheck passes with 0 new errors

## Open Questions
{Anything the PRD author couldn't decide. These become questions
for the user before the campaign starts.}

Step 4: REVIEW

Present: core features, tech stack decisions, out of scope, end conditions. Ask if it matches. On approval: PRD is ready for Archon. On changes: update and re-present changed sections only.

Contextual Gates

Disclosure: "Generating PRD for [description]. Creates .planning/prd-{name}.md." Reversibility: green — creates .planning/prd-{slug}.md only; undo by deleting the file. Trust gates:

  • Any: full PRD generation, clarifying questions, review cycle.

Quality Gates

  • Every Core Feature is one sentence
  • Every technical decision has a reasoning ("because")
  • End conditions are machine-verifiable
  • Out of Scope has at least 2 items
  • No more than 5 core features for v1

Fringe Cases

Vague description: Ask up to 3 clarifying questions. Never produce a PRD with placeholder end conditions.

Feature mode but no existing code: Confirm with the user — switch to greenfield if confirmed.

User says "skip the PRD": Even a minimal PRD is needed. Offer a 1-page express PRD (Tier 4 style).

If .planning/ does not exist: Create it before writing. If not possible, present inline and suggest /do setup.

Exit Protocol

---HANDOFF---
- PRD: {app name}
- Document: .planning/prd-{slug}.md
- Status: {approved | needs-revision}
- Next: Run `/do build {app name}` or `/archon` with the PRD as direction
- Reversibility: green — delete .planning/prd-{slug}.md to undo
---

Stack Selection Principles

Make opinionated recommendations with reasoning. Defaults: Next.js + Tailwind + shadcn/ui for web; Node/Express for JS backends, FastAPI for Python; SQLite for simple, PostgreSQL for multi-user; simplest auth for the stack. Always explain why.

Deployment defaults: static → Vercel/Netlify; full-stack with DB → Railway; API only → Railway or Fly.io; not deploying yet → local only. See .planning/_templates/deploy/ for platform details.

Version History

  • 4bac8cd Current 2026-07-25 08:46

Same Skill Collection

skills/architect/SKILL.md
skills/archon/SKILL.md
skills/ascii-diagram/SKILL.md
skills/autopilot/SKILL.md
skills/cost/SKILL.md
skills/create-app/SKILL.md
skills/create-skill/SKILL.md
skills/daemon/SKILL.md
skills/dashboard/SKILL.md
skills/decision-map/SKILL.md
skills/deploy-steward/SKILL.md
skills/design/SKILL.md
skills/do/SKILL.md
skills/doc-gen/SKILL.md
skills/evolve/SKILL.md
skills/experiment/SKILL.md
skills/fleet/SKILL.md
skills/grill/SKILL.md
skills/houseclean/SKILL.md
skills/improve/SKILL.md
skills/infra-audit/SKILL.md
skills/learn/SKILL.md
skills/live-preview/SKILL.md
skills/loop/SKILL.md
skills/map/SKILL.md
skills/marshal/SKILL.md
skills/merge-review/SKILL.md
skills/organize/SKILL.md
skills/postmortem/SKILL.md
skills/pr-watch/SKILL.md
skills/qa/SKILL.md
skills/refactor/SKILL.md
skills/research-fleet/SKILL.md
skills/research/SKILL.md
skills/review/SKILL.md
skills/scaffold/SKILL.md
skills/schedule/SKILL.md
skills/session-handoff/SKILL.md
skills/setup/SKILL.md
skills/systematic-debugging/SKILL.md
skills/telemetry/SKILL.md
skills/test-gen/SKILL.md
skills/triage/SKILL.md
skills/unharness/SKILL.md
skills/verify/SKILL.md
skills/watch/SKILL.md
skills/wiki/SKILL.md
skills/workspace/SKILL.md
scripts/fixtures/ecosystem/anthropics-template-skill/SKILL.md

Metadata

Files
0
Version
d33c70c
Hash
a83976ae
Indexed
2026-07-25 08:46

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 13:45
浙ICP备14020137号-1 $Гость$