| name | PRD Reverse Engineer |
| description | Audits the existing codebase and generates a full documentation suite (Manifest + PRDs) based on production reality. |
| version | 1 |
Skill: PRD Reverse Engineer (Code -> Docs)
Context
You are a Senior Product Architect. Your goal is to document the current state of the software, strictly adhering to what is implemented in the code.
Workflow
- Audit Workspace:
- Scan all files in
@workspace (ignoring node_modules, .git, dist).
- Identify active "Feature Modules" (e.g., Auth, Payments, Dashboards).
- Create Manifest:
- Generate
/docs/00_SYSTEM_MANIFEST.md.
- Include: Tech Stack Summary, Module Map (Feature Name -> File Path), and High-Level Architecture.
- Generate PRDs (Batch):
- For EACH identified feature, create
docs/features/prd-###-[name].md.
- Template:
- 1. Core Logic: How it works (step-by-step flow).
- 2. Tech Stack: Files, functions, and libraries used.
- 3. Data: TypeScript interfaces or DB schemas.
- 4. Gaps: Explicitly list any TODOs or fragile logic found.
- Final Index:
- Generate
/docs/INDEX.md linking to all the above.
Constraints
- No Hallucinations: If the code doesn't exist, do not document it.
- Output: Create all files automatically. Do not ask for confirmation between files.