// This skill should be used when creating, validating, or converting Product Requirements Documents (PRDs) to LLM-native format. Use this skill when the user asks to write a PRD, review a PRD for compliance, convert an existing PRD to machine-readable format, or ensure PRD quality for AI agent consumption. This skill is optimized for users working with agentic coding frameworks who need strict requirement specifications to prevent context poisoning, hallucination, and mesa-optimization.
| name | prd-creator |
| description | This skill should be used when creating, validating, or converting Product Requirements Documents (PRDs) to LLM-native format. Use this skill when the user asks to write a PRD, review a PRD for compliance, convert an existing PRD to machine-readable format, or ensure PRD quality for AI agent consumption. This skill is optimized for users working with agentic coding frameworks who need strict requirement specifications to prevent context poisoning, hallucination, and mesa-optimization. |
| license | Complete terms in LICENSE.txt |
Create LLM-native Product Requirements Documents that serve as machine-interpretable, safety-focused specifications for AI agent development workflows. This skill implements a hybrid Markdown+YAML format optimized for token efficiency, human readability, and strict structural compliance.
Key Principle: The PRD is not documentationโit is a control surface that prevents AI agents from going rogue. Structured requirements protect non-technical users from context poisoning, hallucination, and constraint violations.
Use this skill when the user requests:
Context indicators: User mentions PRD, product requirements, specification, feature definition, or expresses concerns about AI agent behavior, hallucination, or code safety.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User wants PRD-related help โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโดโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ New PRD โ โ Existing PRDโ
โโโโโโฌโโโโโ โโโโโโโโฌโโโโโโโ
โ โ
โผ โผ
Create from โโโโโโโโโโโ
template โ Convert โ
(Step 1) โ OR โ
โ Validateโ
โโโโโโฌโโโโโ
โ
โโโโโโดโโโโโโ
โผ โผ
Convert Validate
(Step 2) (Step 3)
โ โ
โโโโโโฌโโโโโโ
โผ
Review &
Iterate
(Step 4)
User needs to create a PRD from scratch for a new feature or product.
Understand the Feature
Initialize the PRD
Run the initialization script:
scripts/init_prd.py <output-path>
Example:
scripts/init_prd.py ./prds/user-authentication.md
The script will prompt for:
Load assets/prd-template.md for reference structure. Use the following order (forward-chaining principle):
Section Order:
Critical Safety Elements:
In YAML frontmatter:
llm_directives:
temperature: 0.2 # Low temperature reduces hallucination
persona: >
You MUST NOT deviate from technical constraints or functional
requirements without explicit approval.
In Technical Constraints:
## 2. Technical Constraints & Environment
**CRITICAL**: These constraints are immutable.
* **Forbidden Libraries/Patterns**: pickle, eval(), exec()
In Out of Scope:
## 6. Out of Scope (Non-Goals)
**CRITICAL**: Explicitly define what will NOT be built to prevent
scope creep and agent hallucination.
* [Feature X]
* [Feature Y]
Every requirement MUST have a machine-readable ID:
LAW-31, LAW-32, LAW-33 (3-digit format)AC-001-A, AC-001-B (matches parent US)NFR-Perf-001, NFR-Sec-001 (category prefix)Persona-Admin, Persona-User (PascalCase)Example:
### **LAW-31**: User Registration
* **As a**: Persona-NewUser
* **I want to**: Create an account
* **So that**: I can access platform features
**Acceptance Criteria**:
* **AC-001-A**: System MUST validate email format
* **AC-001-B**: System MUST require password minimum 12 characters
* **AC-001-C**: System MUST hash passwords using bcrypt cost factor 12
Each acceptance criterion = one test case.
Bad (too vague):
* **AC-001-A**: The login should work and be secure
Good (testable, specific):
* **AC-001-A**: System MUST authenticate user with valid email and password
* **AC-001-B**: System MUST return 401 Unauthorized for invalid credentials
* **AC-001-C**: System MUST use constant-time comparison to prevent timing attacks
Run validation before considering the PRD complete:
scripts/validate_prd.py <path-to-prd.md>
Address all errors. Review warnings.
User has an existing PRD (any format) that needs to be converted to LLM-native format.
Run the conversion assistant:
scripts/convert_prd.py <path-to-existing-prd.md>
The tool provides:
Use an LLM agent to perform the conversion:
Prompt Template:
Load the following files into context:
1. [Path to existing PRD]
2. assets/prd-template.md
3. references/validation-rules.md
Task: Convert the existing PRD to LLM-native format following the
template structure. Ensure:
- YAML frontmatter with llm_directives
- Forward-chaining section order (constraints before requirements)
- Unique IDs for all user stories (US-XXX)
- Unique IDs for all acceptance criteria (AC-XXX-Y)
- Technical Constraints section with security requirements
- Out of Scope section with explicitly excluded features
Validate output against validation-rules.md before returning.
Manually review the converted PRD for:
scripts/validate_prd.py <converted-prd.md>
Address all errors before use.
User has a PRD and wants to verify it meets LLM-native compliance standards.
scripts/validate_prd.py <path-to-prd.md>
The validator checks:
Errors (MUST fix):
Warnings (SHOULD review):
Address errors in order of priority:
YAML frontmatter issues (breaks machine parsing)
Missing required sections (incomplete specification)
Section ordering (affects LLM reasoning)
ID format and duplication (breaks traceability)
Re-validate
Run validation again until all errors are resolved:
scripts/validate_prd.py <path-to-prd.md> && echo "โ
PRD is compliant"
After creating, converting, or validating a PRD, review for safety and completeness.
Reference references/safety-principles.md for detailed guidance.
YAML Frontmatter:
status: approved (only approved PRDs for autonomous agents)llm_directives.temperature: 0.2 or lower (reduces hallucination)llm_directives.persona includes "MUST NOT deviate without approval"Technical Constraints (Section 2):
**CRITICAL** keywordFunctional Requirements (Section 4):
Out of Scope (Section 6):
**CRITICAL** keywordValidation:
validate_prd.py passes with zero errorsGranularity:
Traceability:
Completeness:
For users working with custom agentic coding frameworks (like traycer-enforcement-framework):
/project-root/
โโโ PRD.md # LLM-native PRD
โโโ src/
โโโ tests/
Ensure agents load the PRD at the beginning of each session:
# Agent initialization
context = load_prd("./PRD.md")
agent.set_constraints(context.technical_constraints)
agent.set_personas(context.user_personas)
agent.set_requirements(context.functional_requirements)
Add validation as a pre-commit hook:
#!/bin/bash
# .git/hooks/pre-commit
scripts/validate_prd.py PRD.md || {
echo "โ PRD validation failed. Fix errors before committing."
exit 1
}
When agents need implementation guidance:
# Query: "How to implement US-042?"
# RAG retrieves:
# - US-042 chunk
# - All AC-042-X chunks
# - Referenced Technical Constraints
# - Related Persona definitions
# Agent receives complete, coherent context
Customize the llm_directives block based on use case:
Strict Production Code:
llm_directives:
model: "gpt-4-turbo"
temperature: 0.1 # Very low for deterministic output
persona: >
You are a senior engineer generating production code. You MUST NOT
deviate from technical constraints. All code MUST be tested. Reject
any request to implement Out of Scope features.
Exploratory Prototyping:
llm_directives:
model: "gpt-4-turbo"
temperature: 0.5 # Higher for creative solutions
persona: >
You are building a prototype. Follow technical constraints but
propose alternative approaches when beneficial. Flag any Out of
Scope features for discussion.
Test Generation:
llm_directives:
model: "gpt-4-turbo"
temperature: 0.2
persona: >
You are a QA engineer generating comprehensive test cases. For each
acceptance criterion (AC-XXX-Y), generate positive, negative, and
edge case tests. Ensure 100% coverage of all ACs.
For detailed information, load these files into context as needed:
Comprehensive framework documentation including:
Load when: Need deep understanding of why the framework works this way, or designing custom workflows.
Detailed explanation of how LLM-native PRDs prevent agent misbehavior:
Load when: User expresses concerns about AI safety, agent control, or non-coder protection.
Complete validation rule reference:
Load when: Debugging validation errors or authoring custom validation logic.
Blank template ready to copy and fill in. Use as starting point for new PRDs or reference for structure.
JSON Schema for teams requiring pure JSON format or programmatic validation. Can be used with JSON Schema validators in CI/CD pipelines.
Complete, realistic example PRD for a user authentication system. Demonstrates:
Load when: User needs concrete example to understand format or best practices.
Scenario: PM needs first draft of PRD quickly.
Workflow:
assets/prd-template.mdscripts/validate_prd.pyScenario: Adding new user stories to existing PRD.
Workflow:
Scenario: User finished draft, wants to ensure it's safe for agents.
Workflow:
scripts/validate_prd.py <prd.md>references/safety-principles.mdstatus: approved in YAML frontmatterScenario: User has old requirements doc (Word, Google Docs, etc.).
Workflow:
scripts/convert_prd.py <old-doc.md>scripts/validate_prd.pyCause: YAML frontmatter missing required field.
Fix: Add to frontmatter:
version: 1.0.0
owner: your-name
status: draft
last_updated: 2025-01-15
Cause: Sections out of forward-chaining order.
Fix: Reorder sections to match Step 1 section order. Technical Constraints MUST come before Functional Requirements.
Cause: Acceptance criterion under wrong user story.
Fix: Move AC-042-X criteria under their matching US-042 parent, or renumber if intentional.
Cause: Same US-XXX ID used twice in document.
Fix: Find duplicate IDs and renumber one of them. Update all references.
Cause: Out of Scope section missing or too vague.
Fix: Add explicit Out of Scope section with **CRITICAL** keyword. List exact features that should NOT be built.
Cause: Constraints not explicit enough or placed after requirements.
Fix:
**CRITICAL** and **MUST** keywordstemperature in llm_directives to 0.1validate_prd.py after every major edittemperature: 0.2 or lower for production code generationstatus: approved after thorough reviewCreate new PRD:
scripts/init_prd.py ./prds/my-feature.md
# Edit the file
scripts/validate_prd.py ./prds/my-feature.md
Convert existing PRD:
scripts/convert_prd.py ./old-prd.md
# Review recommendations
# Use LLM to convert with template
scripts/validate_prd.py ./new-prd.md
Validate PRD:
scripts/validate_prd.py ./PRD.md
Key ID Formats:
LAW-31, US-042, US-150AC-001-A, AC-042-BNFR-Perf-001, NFR-Sec-002Persona-Admin, Persona-UserSafety Keywords:
**CRITICAL** in Technical Constraints and Out of Scope headersMUST / SHOULD / MAY in acceptance criteria (RFC 2119)temperature: 0.2 or lower in llm_directives