PRDs & Project Context — Quick Reference
Create product requirements and project context that humans and coding assistants can execute effectively. This skill combines PRD/spec templates with project context generation so implementation work is faster and less ambiguous.
Two complementary capabilities:
- PRDs & Specs - Requirements, specs, stories, and acceptance criteria for delivery
- Project Context - Document architecture, conventions, and tribal knowledge for onboarding
Modern Best Practices (Dec 2025):
- Decision-first: document the decision, owner, and due date (not just background).
- Testability: every requirement has acceptance criteria and explicit non-goals.
- Metrics: define formula + timeframe + data source; add guardrails for side effects.
- Change control: version docs and keep updates diff-friendly (small deltas, dated changes).
- Safety: privacy, security, and accessibility are requirements, not “later”.
Do / Avoid (Dec 2025)
Do
- Start with a short executive summary (decision, users, scope, success, risks).
- Define acceptance criteria in testable language (Gherkin or equivalent).
- Keep requirements unambiguous (“must/should/may”) and tie each to evidence.
- Link to supporting docs instead of pasting long appendices into the PRD.
Avoid
- Vague requirements (“fast”, “easy”, “intuitive”) without measurable definitions.
- Mixing draft notes, open questions, and final requirements without labels.
- Metrics without a measurement plan (who measures, where, and when).
- Docs with no owner or review cadence (guaranteed staleness).
What Good Looks Like
- Coverage: every requirement is testable and traceable to a user/job or risk.
- Clarity: scope, non-goals, and constraints are explicit and consistent across docs.
- Measurement: success metrics include baselines, targets, and guardrails.
- Execution: milestones, owners, and “how we verify” steps are written before build starts.
- Hygiene: links are valid, sources are dated, and the document is versioned.
When to Use This Skill
Use this skill when a user requests:
- A PRD/spec/story map/acceptance criteria
- Defined metrics, constraints, risks, and non-goals for delivery
- Project context docs for onboarding (architecture, conventions, key files)
- A plan to execute a non-trivial change (>3 files)
Quick Reference
Core PRDs & Specs (Default)
| Task |
Template |
When to Use |
| PRD creation |
templates/prd/prd-template.md |
Writing product requirements |
| Tech spec |
templates/spec/tech-spec-template.md |
Engineering design doc |
| Planning checklist |
templates/planning/planning-checklist.md |
Before complex feature |
| Story mapping |
templates/stories/story-mapping-template.md |
User journey visualization |
| Gherkin/BDD |
templates/stories/gherkin-example-template.md |
Acceptance criteria |
Optional: AI / Automation
Use only when explicitly requested and policy-compliant.
Optional Quick Reference
| Task |
Template |
When to Use |
| AI PRD |
templates/prd/ai-prd-template.md |
AI feature/system (eval + risk + monitoring) |
| Agentic session |
templates/planning/agentic-session-template.md |
AI coding session (>3 files) |
| Prompt playbook |
templates/prompting/prompt-playbook.md |
Repeatable prompts for complex work |
| Metrics tracking |
templates/metrics/agentic-coding-metrics-template.md |
AI coding effectiveness and ROI |
Project Context (CLAUDE.md)
| Context Type |
Template |
Priority |
| Architecture |
templates/architecture-context.md |
Critical |
| Conventions |
templates/conventions-context.md |
High |
| Tribal Knowledge |
templates/tribal-knowledge-context.md |
High |
| Key Files |
templates/key-files-context.md |
Critical |
| Dependencies |
templates/dependencies-context.md |
Medium |
| Web App |
templates/web-app-context.md |
By project type |
| CLI Tool |
templates/cli-context.md |
By project type |
| Library |
templates/library-context.md |
By project type |
| Minimal Quick Start |
templates/minimal-claudemd.md |
5-minute start |
AI PRD Essentials (Dec 2025)
- Data: sources, rights, retention, PII classification, and access controls.
- Evaluation: baseline, offline/human/online eval plan, acceptance criteria, stop rules.
- Failure modes: user harm, injection/tool misuse, leakage, bias; mitigations and residual risk.
- Monitoring: drift, quality regression, incidents, rollback/kill switch.
Decision Tree
User needs: [Documentation Task]
AI-Assisted Coding?
Non-trivial feature (>3 files)? Planning checklist + agentic session
Prompt engineering? Prompt playbook
Measuring ROI? Metrics tracking template
Simple task (<3 files)? Direct implementation
Project Onboarding?
New to codebase? Generate CLAUDE.md (architecture + conventions)
Team knowledge transfer? Tribal knowledge template
Quick context? Minimal CLAUDE.md template
Traditional PRD?
Product requirements? PRD template
AI feature/system? AI PRD template
Technical design? Tech spec template
Acceptance criteria? Gherkin/BDD template
Cross-Domain Needs?
API design? Use dev-api-design skill
Architecture? Use software-architecture-design skill
Codebase docs? Use docs-codebase skill
Context Extraction Workflow (CLAUDE.md)
User needs: [CLAUDE.md for project]
Step 1: Scan codebase structure
Identify language/framework
Map directory organization
Find configuration files
Step 2: Extract architecture
Component relationships
Data flow patterns
Key abstractions
Step 3: Identify conventions
Naming patterns (files, functions, variables)
Import/export patterns
Testing conventions
Step 4: Mine tribal knowledge
Git history for "why" commits
README/docs for context
Comments explaining decisions
Step 5: Document key files
Entry points (main.*, index.*, app.*)
Configuration (config.*, .env.example)
Core business logic locations
Step 6: Generate CLAUDE.md
Assemble sections
Verify accuracy
Add usage guidance
CLAUDE.md Structure
Optimal project memory file includes:
1. Project Overview (Required)
# Project Name
Brief description of purpose.
## Tech Stack
- Language: [e.g., TypeScript 5.x]
- Framework: [e.g., Next.js 16]
- Database: [e.g., PostgreSQL 15]
2. Architecture (Required)
## Architecture
### Key Components
- `src/api/` - REST API handlers
- `src/services/` - Business logic
- `src/models/` - Database models
### Data Flow
1. Request API handler
2. Handler Service Database
3. Response Service Handler
3. Conventions (Required)
## Conventions
### Naming
- Files: kebab-case (`user-service.ts`)
- Functions: camelCase (`getUserById`)
- Classes: PascalCase (`UserService`)
### Patterns
- Repository pattern for data access
- DTOs for API input/output
4. Key Files (Required)
## Key Files
| Purpose | Location | Notes |
|---------|----------|-------|
| Entry point | `src/index.ts` | Server bootstrap |
| Config | `src/config/index.ts` | Environment loading |
| Auth | `src/middleware/auth.ts` | JWT validation |
5. Tribal Knowledge (Recommended)
## Important Context
### Why PostgreSQL over MongoDB
Chose PostgreSQL for ACID requirements. Decision date: 2024-03.
### Known Gotchas
- `UserService.create()` triggers async email - don't await in tests
- Cache invalidation requires manual trigger after DB updates
6. AI-Specific Guidance (Optional)
## For AI Assistants
### When modifying:
- Follow existing patterns in similar files
- Add tests for new functionality
- Run `npm run lint` before committing
### Avoid:
- Direct database queries (use repositories)
- Console.log in production (use logger)
Navigation
Resources - PRDs & Agentic Coding
- resources/agentic-coding-best-practices.md
- resources/vibe-coding-patterns.md
- resources/prompt-engineering-patterns.md
- resources/requirements-checklists.md
- resources/traditional-prd-writing.md
- resources/pm-team-collaboration.md
- resources/security-review-checklist.md
- resources/tool-comparison-matrix.md
- resources/operational-guide.md
Resources - Context Extraction
- resources/architecture-extraction.md
- resources/convention-mining.md
- resources/tribal-knowledge-recovery.md
Templates - PRDs & Planning
- templates/prd/prd-template.md
- templates/prd/ai-prd-template.md
- templates/spec/tech-spec-template.md
- templates/planning/planning-checklist.md
- templates/planning/agentic-session-template.md
- templates/prompting/prompt-playbook.md
- templates/stories/story-mapping-template.md
- templates/stories/gherkin-example-template.md
- templates/metrics/agentic-coding-metrics-template.md
Templates - Project Context
- templates/architecture-context.md
- templates/conventions-context.md
- templates/tribal-knowledge-context.md
- templates/key-files-context.md
- templates/dependencies-context.md
- templates/web-app-context.md
- templates/cli-context.md
- templates/library-context.md
- templates/minimal-claudemd.md
- templates/nodejs-context.md
- templates/python-context.md
- templates/react-context.md
- templates/go-context.md
- templates/api-service-context.md
Extraction Commands
Quick commands to gather project context:
# Directory structure
tree -L 3 -I 'node_modules|.git|dist|build' > structure.txt
# Package dependencies
cat package.json | jq '.dependencies, .devDependencies'
# Recent significant commits
git log --oneline --since="6 months ago" --grep="refactor\|migrate\|breaking\|major"
# Find entry points
find . -name "index.*" -o -name "main.*" -o -name "app.*" | head -20
# Mining "why" comments
grep -r "TODO\|FIXME\|HACK\|NOTE\|because\|workaround" --include="*.ts" --include="*.js"
Quality Checklist
PRD Quality
CLAUDE.md Quality
External Resources
See data/sources.json for curated links.
Related Skills
Usage Notes
For Claude: When user needs AI-friendly documentation:
- Identify need - PRD/spec or project context (CLAUDE.md)?
- Reference template - Use appropriate template from templates/
- Follow extraction - For CLAUDE.md, run extraction commands
- Verify accuracy - Check files exist, commands work
- Provide actionable output - AI should execute without clarification
Success criteria:
- AI can navigate codebase without asking "where is X?"
- AI follows project conventions without being told
- PRDs have clear acceptance criteria AI can verify
- After reading docs, AI is productive in <5 minutes
Success Metric: After reading CLAUDE.md + PRD, AI should produce production-quality code that matches team patterns on first attempt.
1---2name: docs-ai-prd3description: Write PRDs, specs, and project context optimized for coding assistants (Claude Code, Cursor, Copilot, Custom GPTs). Includes CLAUDE.md generation, session planning, and templates for creating documentation that tools can execute effectively.4---5
6# PRDs & Project Context — Quick Reference
7
8Create product requirements and project context that humans and coding assistants can execute effectively. This skill combines **PRD/spec templates** with **project context generation** so implementation work is faster and less ambiguous.
9
10**Two complementary capabilities:**
111. **PRDs & Specs** - Requirements, specs, stories, and acceptance criteria for delivery
122. **Project Context** - Document architecture, conventions, and tribal knowledge for onboarding
13
14---
15
16**Modern Best Practices (Dec 2025)**:
17- Decision-first: document the decision, owner, and due date (not just background).
18- Testability: every requirement has acceptance criteria and explicit non-goals.
19- Metrics: define formula + timeframe + data source; add guardrails for side effects.
20- Change control: version docs and keep updates diff-friendly (small deltas, dated changes).
21- Safety: privacy, security, and accessibility are requirements, not “later”.
22
23## Do / Avoid (Dec 2025)
24
25### Do
26
27- Start with a short executive summary (decision, users, scope, success, risks).
28- Define acceptance criteria in testable language (Gherkin or equivalent).
29- Keep requirements unambiguous (“must/should/may”) and tie each to evidence.
30- Link to supporting docs instead of pasting long appendices into the PRD.
31
32### Avoid
33
34- Vague requirements (“fast”, “easy”, “intuitive”) without measurable definitions.
35- Mixing draft notes, open questions, and final requirements without labels.
36- Metrics without a measurement plan (who measures, where, and when).
37- Docs with no owner or review cadence (guaranteed staleness).
38
39## What Good Looks Like
40
41- Coverage: every requirement is testable and traceable to a user/job or risk.
42- Clarity: scope, non-goals, and constraints are explicit and consistent across docs.
43- Measurement: success metrics include baselines, targets, and guardrails.
44- Execution: milestones, owners, and “how we verify” steps are written before build starts.
45- Hygiene: links are valid, sources are dated, and the document is versioned.
46
47## When to Use This Skill
48
49Use this skill when a user requests:
50- A PRD/spec/story map/acceptance criteria
51- Defined metrics, constraints, risks, and non-goals for delivery
52- Project context docs for onboarding (architecture, conventions, key files)
53- A plan to execute a non-trivial change (>3 files)
54
55---
56
57## Quick Reference
58
59### Core PRDs & Specs (Default)
60
61| Task | Template | When to Use |
62|------|----------|-------------|
63| PRD creation | `templates/prd/prd-template.md` | Writing product requirements |
64| Tech spec | `templates/spec/tech-spec-template.md` | Engineering design doc |
65| Planning checklist | `templates/planning/planning-checklist.md` | Before complex feature |
66| Story mapping | `templates/stories/story-mapping-template.md` | User journey visualization |
67| Gherkin/BDD | `templates/stories/gherkin-example-template.md` | Acceptance criteria |
68
69---
70
71## Optional: AI / Automation
72
73Use only when explicitly requested and policy-compliant.
74
75### Optional Quick Reference
76
77| Task | Template | When to Use |
78|------|----------|-------------|
79| AI PRD | `templates/prd/ai-prd-template.md` | AI feature/system (eval + risk + monitoring) |
80| Agentic session | `templates/planning/agentic-session-template.md` | AI coding session (>3 files) |
81| Prompt playbook | `templates/prompting/prompt-playbook.md` | Repeatable prompts for complex work |
82| Metrics tracking | `templates/metrics/agentic-coding-metrics-template.md` | AI coding effectiveness and ROI |
83
84### Project Context (CLAUDE.md)
85
86| Context Type | Template | Priority |
87|--------------|----------|----------|
88| **Architecture** | `templates/architecture-context.md` | Critical |
89| **Conventions** | `templates/conventions-context.md` | High |
90| **Tribal Knowledge** | `templates/tribal-knowledge-context.md` | High |
91| **Key Files** | `templates/key-files-context.md` | Critical |
92| **Dependencies** | `templates/dependencies-context.md` | Medium |
93| **Web App** | `templates/web-app-context.md` | By project type |
94| **CLI Tool** | `templates/cli-context.md` | By project type |
95| **Library** | `templates/library-context.md` | By project type |
96| **Minimal Quick Start** | `templates/minimal-claudemd.md` | 5-minute start |
97
98### AI PRD Essentials (Dec 2025)
99
100- Data: sources, rights, retention, PII classification, and access controls.
101- Evaluation: baseline, offline/human/online eval plan, acceptance criteria, stop rules.
102- Failure modes: user harm, injection/tool misuse, leakage, bias; mitigations and residual risk.
103- Monitoring: drift, quality regression, incidents, rollback/kill switch.
104
105## Decision Tree
106
107```text
108User needs: [Documentation Task]
109 AI-Assisted Coding?
110 Non-trivial feature (>3 files)? Planning checklist + agentic session
111 Prompt engineering? Prompt playbook
112 Measuring ROI? Metrics tracking template
113 Simple task (<3 files)? Direct implementation
114
115 Project Onboarding?
116 New to codebase? Generate CLAUDE.md (architecture + conventions)
117 Team knowledge transfer? Tribal knowledge template
118 Quick context? Minimal CLAUDE.md template
119
120 Traditional PRD?
121 Product requirements? PRD template
122 AI feature/system? AI PRD template
123 Technical design? Tech spec template
124 Acceptance criteria? Gherkin/BDD template
125
126 Cross-Domain Needs?
127 API design? Use dev-api-design skill
128 Architecture? Use software-architecture-design skill
129 Codebase docs? Use docs-codebase skill
130```
131
132---
133
134## Context Extraction Workflow (CLAUDE.md)
135
136```text
137User needs: [CLAUDE.md for project]
138
139 Step 1: Scan codebase structure
140 Identify language/framework
141 Map directory organization
142 Find configuration files
143
144 Step 2: Extract architecture
145 Component relationships
146 Data flow patterns
147 Key abstractions
148
149 Step 3: Identify conventions
150 Naming patterns (files, functions, variables)
151 Import/export patterns
152 Testing conventions
153
154 Step 4: Mine tribal knowledge
155 Git history for "why" commits
156 README/docs for context
157 Comments explaining decisions
158
159 Step 5: Document key files
160 Entry points (main.*, index.*, app.*)
161 Configuration (config.*, .env.example)
162 Core business logic locations
163
164 Step 6: Generate CLAUDE.md
165 Assemble sections
166 Verify accuracy
167 Add usage guidance
168```
169
170---
171
172## CLAUDE.md Structure
173
174Optimal project memory file includes:
175
176### 1. Project Overview (Required)
177
178```markdown
179# Project Name
180
181Brief description of purpose.
182
183## Tech Stack
184- Language: [e.g., TypeScript 5.x]
185- Framework: [e.g., Next.js 16]
186- Database: [e.g., PostgreSQL 15]
187```
188
189### 2. Architecture (Required)
190
191```markdown
192## Architecture
193
194### Key Components
195- `src/api/` - REST API handlers
196- `src/services/` - Business logic
197- `src/models/` - Database models
198
199### Data Flow
2001. Request API handler
2012. Handler Service Database
2023. Response Service Handler
203```
204
205### 3. Conventions (Required)
206
207```markdown
208## Conventions
209
210### Naming
211- Files: kebab-case (`user-service.ts`)
212- Functions: camelCase (`getUserById`)
213- Classes: PascalCase (`UserService`)
214
215### Patterns
216- Repository pattern for data access
217- DTOs for API input/output
218```
219
220### 4. Key Files (Required)
221
222```markdown
223## Key Files
224
225| Purpose | Location | Notes |
226|---------|----------|-------|
227| Entry point | `src/index.ts` | Server bootstrap |
228| Config | `src/config/index.ts` | Environment loading |
229| Auth | `src/middleware/auth.ts` | JWT validation |
230```
231
232### 5. Tribal Knowledge (Recommended)
233
234```markdown
235## Important Context
236
237### Why PostgreSQL over MongoDB
238Chose PostgreSQL for ACID requirements. Decision date: 2024-03.
239
240### Known Gotchas
241- `UserService.create()` triggers async email - don't await in tests
242- Cache invalidation requires manual trigger after DB updates
243```
244
245### 6. AI-Specific Guidance (Optional)
246
247```markdown
248## For AI Assistants
249
250### When modifying:
251- Follow existing patterns in similar files
252- Add tests for new functionality
253- Run `npm run lint` before committing
254
255### Avoid:
256- Direct database queries (use repositories)
257- Console.log in production (use logger)
258```
259
260---
261
262## Navigation
263
264### Resources - PRDs & Agentic Coding
265
266- [resources/agentic-coding-best-practices.md](resources/agentic-coding-best-practices.md)
267- [resources/vibe-coding-patterns.md](resources/vibe-coding-patterns.md)
268- [resources/prompt-engineering-patterns.md](resources/prompt-engineering-patterns.md)
269- [resources/requirements-checklists.md](resources/requirements-checklists.md)
270- [resources/traditional-prd-writing.md](resources/traditional-prd-writing.md)
271- [resources/pm-team-collaboration.md](resources/pm-team-collaboration.md)
272- [resources/security-review-checklist.md](resources/security-review-checklist.md)
273- [resources/tool-comparison-matrix.md](resources/tool-comparison-matrix.md)
274- [resources/operational-guide.md](resources/operational-guide.md)
275
276### Resources - Context Extraction
277
278- [resources/architecture-extraction.md](resources/architecture-extraction.md)
279- [resources/convention-mining.md](resources/convention-mining.md)
280- [resources/tribal-knowledge-recovery.md](resources/tribal-knowledge-recovery.md)
281
282### Templates - PRDs & Planning
283
284- [templates/prd/prd-template.md](templates/prd/prd-template.md)
285- [templates/prd/ai-prd-template.md](templates/prd/ai-prd-template.md)
286- [templates/spec/tech-spec-template.md](templates/spec/tech-spec-template.md)
287- [templates/planning/planning-checklist.md](templates/planning/planning-checklist.md)
288- [templates/planning/agentic-session-template.md](templates/planning/agentic-session-template.md)
289- [templates/prompting/prompt-playbook.md](templates/prompting/prompt-playbook.md)
290- [templates/stories/story-mapping-template.md](templates/stories/story-mapping-template.md)
291- [templates/stories/gherkin-example-template.md](templates/stories/gherkin-example-template.md)
292- [templates/metrics/agentic-coding-metrics-template.md](templates/metrics/agentic-coding-metrics-template.md)
293
294### Templates - Project Context
295
296- [templates/architecture-context.md](templates/architecture-context.md)
297- [templates/conventions-context.md](templates/conventions-context.md)
298- [templates/tribal-knowledge-context.md](templates/tribal-knowledge-context.md)
299- [templates/key-files-context.md](templates/key-files-context.md)
300- [templates/dependencies-context.md](templates/dependencies-context.md)
301- [templates/web-app-context.md](templates/web-app-context.md)
302- [templates/cli-context.md](templates/cli-context.md)
303- [templates/library-context.md](templates/library-context.md)
304- [templates/minimal-claudemd.md](templates/minimal-claudemd.md)
305- [templates/nodejs-context.md](templates/nodejs-context.md)
306- [templates/python-context.md](templates/python-context.md)
307- [templates/react-context.md](templates/react-context.md)
308- [templates/go-context.md](templates/go-context.md)
309- [templates/api-service-context.md](templates/api-service-context.md)
310
311---
312
313## Extraction Commands
314
315Quick commands to gather project context:
316
317```bash
318# Directory structure
319tree -L 3 -I 'node_modules|.git|dist|build' > structure.txt
320
321# Package dependencies
322cat package.json | jq '.dependencies, .devDependencies'
323
324# Recent significant commits
325git log --oneline --since="6 months ago" --grep="refactor\|migrate\|breaking\|major"
326
327# Find entry points
328find . -name "index.*" -o -name "main.*" -o -name "app.*" | head -20
329
330# Mining "why" comments
331grep -r "TODO\|FIXME\|HACK\|NOTE\|because\|workaround" --include="*.ts" --include="*.js"
332```
333
334---
335
336## Quality Checklist
337
338### PRD Quality
339
340- [ ] Clear problem statement
341- [ ] Measurable success criteria
342- [ ] Unambiguous acceptance criteria
343- [ ] Edge cases documented
344- [ ] Dependencies identified
345- [ ] AI can execute without clarification
346
347### CLAUDE.md Quality
348
349- [ ] Project overview is accurate and current
350- [ ] Architecture reflects actual structure
351- [ ] Key files exist and locations are correct
352- [ ] Conventions match actual code patterns
353- [ ] Commands actually work
354- [ ] No sensitive information (secrets, internal URLs)
355
356---
357
358## External Resources
359
360See [data/sources.json](data/sources.json) for curated links.
361
362---
363
364## Related Skills
365
366- **Codebase Documentation**: [../docs-codebase/SKILL.md](../docs-codebase/SKILL.md) - README, API docs, ADRs, changelogs
367- **Documentation Coverage**: [../qa-docs-coverage/SKILL.md](../qa-docs-coverage/SKILL.md) - Audit for documentation gaps
368- **Product Management**: [../product-management/SKILL.md](../product-management/SKILL.md) - Product strategy, positioning
369- **Architecture Design**: [../software-architecture-design/SKILL.md](../software-architecture-design/SKILL.md) - System design patterns
370- **API Design**: [../dev-api-design/SKILL.md](../dev-api-design/SKILL.md) - REST/GraphQL patterns
371- **Testing**: [../qa-testing-strategy/SKILL.md](../qa-testing-strategy/SKILL.md) - Test strategy for AI code
372- **Git Workflow**: [../git-workflow/SKILL.md](../git-workflow/SKILL.md) - Git history analysis
373
374---
375
376## Usage Notes
377
378**For Claude**: When user needs AI-friendly documentation:
379
3801. **Identify need** - PRD/spec or project context (CLAUDE.md)?
3812. **Reference template** - Use appropriate template from templates/
3823. **Follow extraction** - For CLAUDE.md, run extraction commands
3834. **Verify accuracy** - Check files exist, commands work
3845. **Provide actionable output** - AI should execute without clarification
385
386**Success criteria**:
387- AI can navigate codebase without asking "where is X?"
388- AI follows project conventions without being told
389- PRDs have clear acceptance criteria AI can verify
390- After reading docs, AI is productive in <5 minutes
391
392---
393
394> **Success Metric**: After reading CLAUDE.md + PRD, AI should produce production-quality code that matches team patterns on first attempt.