119 lines
4.4 KiB
Markdown
119 lines
4.4 KiB
Markdown
---
|
|
name: analyze-prd
|
|
description: "Extract architectural requirements from a PRD, identify relevant knowledge domains, and flag ambiguities before architecture design. This is the Architect pipeline's first step. Produces internal analysis only — no file artifacts."
|
|
---
|
|
|
|
This skill extracts architectural requirements from the PRD before designing architecture.
|
|
|
|
**Announce at start:** "I'm using the analyze-prd skill to extract architectural requirements from the PRD."
|
|
|
|
## Purpose
|
|
|
|
Read the PRD and extract the architectural dimensions that must be addressed during design. Identify which knowledge domains are relevant, flag ambiguities that block architectural decisions, and produce structured internal analysis that feeds into `design-architecture`.
|
|
|
|
## Important
|
|
|
|
This skill produces **internal analysis only**. It MUST NOT write any file artifacts. The strict pipeline output is `docs/architecture/{date}-{feature}.md` only.
|
|
|
|
## Hard Gate
|
|
|
|
Do NOT start designing architecture in this skill. This skill only extracts and organizes requirements. Design happens in `design-architecture`.
|
|
|
|
## Process
|
|
|
|
You MUST complete these steps in order:
|
|
|
|
1. **Read the PRD** at `docs/prd/{date}-{feature}.md` end-to-end
|
|
2. **Inspect existing codebase** for current architecture, service boundaries, and technology stack (if applicable)
|
|
3. **Extract functional requirements** - List each functional requirement and its architectural implications
|
|
4. **Extract non-functional requirements** - List each NFR and its architectural implications
|
|
5. **Identify relevant knowledge domains** - Determine which of the 9 knowledge domains are relevant:
|
|
- System Decomposition
|
|
- API & Contract Design
|
|
- Data Modeling
|
|
- Distributed System Basics
|
|
- Architecture Patterns
|
|
- Storage Knowledge
|
|
- Async & Queue Design
|
|
- Error Model Design
|
|
- Idempotency Design
|
|
6. **Flag ambiguities** - Identify any PRD requirements that are unclear for architectural purposes
|
|
7. **Map requirements to architecture sections** - Show which PRD requirements map to which architecture output sections
|
|
|
|
## Analysis Format
|
|
|
|
Retain this analysis internally. Do not write it to a file.
|
|
|
|
```markdown
|
|
## PRD Source
|
|
Reference to the PRD file being analyzed.
|
|
|
|
## Functional Requirements Extraction
|
|
| # | Requirement | Architectural Implications | Relevant Domains |
|
|
|---|-------------|---------------------------|-----------------|
|
|
| FR-1 | ... | ... | system-decomposition, api-contract-design |
|
|
|
|
## Non-Functional Requirements Extraction
|
|
| # | Requirement | Architectural Implications | Relevant Domains |
|
|
|---|-------------|---------------------------|-----------------|
|
|
| NFR-1 | ... | ... | storage-knowledge, async-queue-design |
|
|
|
|
## Knowledge Domain Relevance
|
|
| Domain | Relevant? | Reason |
|
|
|--------|-----------|--------|
|
|
| System Decomposition | Yes/No | ... |
|
|
| API & Contract Design | Yes/No | ... |
|
|
| Data Modeling | Yes/No | ... |
|
|
| Distributed System Basics | Yes/No | ... |
|
|
| Architecture Patterns | Yes/No | ... |
|
|
| Storage Knowledge | Yes/No | ... |
|
|
| Async & Queue Design | Yes/No | ... |
|
|
| Error Model Design | Yes/No | ... |
|
|
| Idempotency Design | Yes/No | ... |
|
|
|
|
## Requirement-to-Section Mapping
|
|
| Architecture Section | PRD Requirements Served |
|
|
|---------------------|------------------------|
|
|
| System Overview | ... |
|
|
| Frontend Architecture | ... |
|
|
| Backend Architecture | ... |
|
|
| API Definitions | ... |
|
|
| DB Schema | ... |
|
|
| Service Boundaries | ... |
|
|
| Async Model | ... |
|
|
| Error Model | ... |
|
|
| Idempotency Design | ... |
|
|
|
|
## Ambiguities And Gaps
|
|
List any PRD requirements that are unclear for architectural purposes and need PM clarification before design can proceed. If none, write "None identified."
|
|
```
|
|
|
|
## Primary Input
|
|
|
|
- `docs/prd/{date}-{feature}.md` (required)
|
|
|
|
## Output
|
|
|
|
Internal analysis only. No file artifact. Findings are carried forward in memory to inform `design-architecture`.
|
|
|
|
## Transition
|
|
|
|
After completing this internal analysis, proceed to `design-architecture` with the PRD and analysis findings in memory.
|
|
|
|
## Guardrails
|
|
|
|
This is a pure analysis skill.
|
|
|
|
Do:
|
|
- Extract architectural implications from PRD requirements
|
|
- Identify relevant knowledge domains
|
|
- Flag ambiguities that block design decisions
|
|
- Map requirements to architecture output sections
|
|
|
|
Do not:
|
|
- Design architecture
|
|
- Make technology selections
|
|
- Define API contracts, schemas, or service boundaries
|
|
- Write architecture decisions
|
|
- Produce any file artifacts
|
|
- Write any file to disk |