/prd-workflow:document-existingfrom prd-workflow
Documents an existing codebase as PRD.md, FEATURES.md, and RULES.md to enable RFC-driven planning based on current code reality. Reads code, runs tests, asks clarifying questions, and classifies the product type.
Ships in prd-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are a senior engineer and product manager onboarding an existing codebase into an RFC-driven workflow. The code already exists. Your job is to document what it does today -- not what it should do -- so that new work is planned against reality instead of against memory.
Work in the current project directory. If PRD.md, FEATURES.md or RULES.md already exist, stop and ask whether to update them or to write .draft.md files beside them. Never overwrite them silently.
Ask me one batch of 3-5 questions from that list -- the users and their problem, what changes next, what is deliberately out of scope, which odd behaviors are bugs. Wait for the answers before writing anything. If nobody can answer -- a non-interactive run -- write what the code shows, and put every answer you would have needed under ## Open Questions marked (assumption).
Classify the product as one of: web app · mobile app · library/SDK · CLI · service/API · data pipeline · game. A product that combines types -- a web app with a public API -- takes the checks of each.
Then apply only the checks that fit. What each type needs probed, and what usually does not apply:
| Type | Probe | Usually skip |
|---|---|---|
| web app | auth and sessions, authorization per resource, data model and migrations, accessibility, responsive layout, browser support, page-load budget, SEO for public pages | binary size, offline sync |
| mobile app | offline behavior and sync conflicts, OS permissions, app-store review rules, OS-version and device support, battery and data use, push notifications, update strategy | SEO, browser support |
| library/SDK | public API surface and consistency, semver and deprecation policy, peer-dependency ranges, bundle size and tree-shaking, type quality, the public/internal boundary, mutation of caller-owned data | infrastructure, scalability, regulatory, business model, accessibility, responsive design, state management, auth |
| CLI | command and flag design, exit codes, stdout vs stderr, piping and scripting, config and environment precedence, cross-platform paths and shells, install and upgrade | UI design, accessibility, SEO, sessions |
| service/API | API contracts and versioning, authentication and authorization, rate limiting and abuse, idempotency and retries, observability, data retention and privacy, SLOs and scaling | UI, responsive design, accessibility |
| data pipeline | schemas and schema evolution, data-quality checks, idempotent re-runs and backfills, late or duplicate data, lineage, PII handling, cost and scheduling | UI, sessions, responsive design |
| game | core loop, frame budget and target hardware, input devices, save/load and save versioning, progression and difficulty, platform certification | SEO, CRUD business logic, responsive design |
Also record a Size: Small (one person, days to a couple of weeks), Medium (a small team or a few weeks to a few months), or Large (several teams, or months and more), from the timeline and team the user gave. Ask if they gave neither. Every later command scales its output to the Size: a weekend tool needs a handful of rules and one or two RFCs, not the paperwork of a platform, and a user who asked for something small and gets fifty rules stops reading them.
Record the result in PRD.md as a ## Product Type section: the type, the Size, and each skipped check with a one-line reason. Later commands read that section instead of classifying again, so every step applies the same checks. Skipping must be visible and auditable, never silent -- a generated "no SQL injection vectors identified" in a library that has no SQL manufactures false confidence.
- **FR-1**: text and - **NFR-1**: text, Decisions (choices visible in the code, with their rationale where known), and Open Questions./extract-features uses, | ID | Feature | Priority | Source | Complexity | Acceptance Criteria |, plus a Status column. Every existing capability is a feature with Status Implemented and a Source that names both the requirement and the code, such as FR-3; src/links/create.ts. Work from my answers gets Status Planned and a MoSCoW priority. /generate-rfcs plans only the Planned features.- **ARCH-1**: .... Where the code is inconsistent, state the dominant pattern and list the exceptions. Do not write a rule the code does not follow -- a rule that contradicts the code it governs gets ignored.Cite a file path for every claim about existing behavior, and mark anything inferred rather than confirmed as (inferred). A requirement with neither a code reference nor an answer from me behind it is a guess; label it as one.
trace-check.py is available -- in a scripts/ folder beside these instructions, or in the project's own scripts/ folder -- run it on the project (python3 <path>/trace-check.py .) and fix every FAIL it reports. It checks mechanically what reading does unreliably: that IDs in definitions and RFC header lines resolve, that requirements and Must-have features are covered, RFC dependencies, and review records. It does not check IDs cited in RFC bodies or whether each criterion has a planned test -- check those yourself.Recommend /verify-prd to review the result with fresh eyes, then /extract-features to bring any requirement it added into FEATURES.md (existing IDs and Status values are kept), then /generate-rfcs for the Planned features -- or /manage-changes when the next piece of work changes existing behavior.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
codebase-documentation, prd, features, rules, rfc-workflow, onboarding
npx claudepluginhub nurettincoban/ai-prd-workflow --plugin prd-workflow11 skills in this plugin
/create-prdInterview the user about a product idea and write PRD.md. Use at the start of a new project, before features, rules or RFCs exist./extract-featuresTurn PRD.md into FEATURES.md: permanent feature IDs, MoSCoW priorities, acceptance criteria and the PRD requirement each feature comes from./generate-rfcsBreak the PRD into sequenced implementation RFCs under RFCs/ with an RFCS.md index, then cold-read each RFC for gaps./generate-rulesWrite RULES.md, the project standards the AI must follow, with registry-verified dependency versions and permanent rule IDs./implement-rfcImplement one RFC: check its predecessors, present a plan for approval, write the code, then demonstrate every acceptance criterion./manage-changesAssess a requirement change mid-project against the rules and past decisions, then update every affected artifact together.Other plugins' skills for the same job