一键导入
generate-prp
Generate a complete, implementation-ready PRP from a requirements document.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate a complete, implementation-ready PRP from a requirements document.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Safely upgrade this Cortex repo to the latest template: detects on-disk state, reconciles infrastructure, and applies idempotent migrations — preserving your customizations and never overwriting your edits without asking.
Safely upgrade this Cortex workspace to the latest template: detects on-disk state, reconciles infrastructure, and applies idempotent migrations — preserving your customizations and never overwriting your edits without asking.
Maintainer auto-check for the Cortex source repo. Invoke this PROACTIVELY and automatically WHENEVER files under templates/ have been added, edited, deleted, renamed, or restructured — and before committing template changes — to classify the change as ADDITIVE (handled by the runner's reconciliation) or MIGRATION-NEEDED (breaking/structural), and scaffold a migrations/NNN-*.md if one is required. Do not wait to be asked. For use INSIDE the template source repo only; it is never shipped to user projects.
Run a full project health check across context-engineering, the knowledge base, and docs to surface gaps, drift, and inconsistencies.
Validate implementation progress of a PRP against its original requirements, auditing completed, current, and remaining phases.
Validate a generated PRP structure against its source requirements to catch gaps and misalignments before execution begins.
| name | generate-prp |
| description | Generate a complete, implementation-ready PRP from a requirements document. |
| argument-hint | <requirements-file> |
| disable-model-invocation | true |
Generate a complete, implementation-ready PRP from a requirements document.
CRITICAL ORDER: You MUST complete all research and validation BEFORE creating any PRP files. The requirements document may contain discussions, decisions, and planning notes that need thorough analysis first.
$ARGUMENTS completely from start to finishIf the feature input is in context-engineering/feature-inputs/pending/, move it to in-progress/:
mv context-engineering/feature-inputs/pending/{FEATURE-NAME}.md context-engineering/feature-inputs/in-progress/
While reading, identify:
STOP and ask the user for clarification before proceeding. Do NOT create the PRP with ambiguous or conflicting requirements.
For each component mentioned in requirements:
Before diving deeper into raw codebase files, check the knowledge base for existing context:
knowledge-base/INDEX.md to find relevant topics for this feature_SUMMARY.md for each relevant section (concepts, flows, implementations, gotchas, decisions)What you're looking for:
CRITICAL: Fill the "Knowledge Base References" section in the PRP
Both PRP templates now have a "Knowledge Base References" section. You MUST fill it with relevant topics:
# Knowledge Base References
concepts:
- [entity-name.md] # Feature creates/modifies this entity
flows:
- [process-name.md] # Feature affects this process flow
implementations:
- [{project-name}/patterns.md] # Feature follows these patterns
gotchas:
- [known-issue.md] # Feature must avoid this pitfall
decisions:
- [005-architecture-choice.md] # Feature follows this decision
How to fill it:
This ensures implementing agents have instant access to relevant historical context and don't repeat past mistakes.
Note down:
If requirements mention libraries or APIs:
The agent has Websearch capabilities - include URLs to documentation and examples.
Before creating any files, think deeply:
What type of PRP is needed?
Simple Feature → Use context-engineering/PRPs/templates/prp_base.md
context-engineering/PRPs/{feature-name}.mdComplex/Phased Feature → Use context-engineering/PRPs/templates/prp_complex.md
context-engineering/PRPs/{FEATURE-NAME}/What context does the implementing agent need?
context-engineering/PRPs/templates/prp_base.md**Status:** Not Started
**Feature Input:** context-engineering/feature-inputs/in-progress/{feature-name}.md
**Last Updated:** {today's date}
---
# PRP: {Feature Title}
...
This status header enables /audit-context to track simple PRPs alongside phased PRPs.AGENTS.md (root) - Agent instructions: navigation, architecture, coding standardscontext-engineering/_STATUS.md - Current workspace status and in-progress workactive-projects/{PROJECT}/AGENTS.mdprp_base.md template
c. Generate concrete test cases with validation steps
d. Same coverage rules as phased PRPs: happy path, edge cases, protection, regressioncontext-engineering/PRPs/{feature-name}.mdcontext-engineering/PRPs/templates/prp_complex.mdcontext-engineering/PRPs/{FEATURE-NAME}/
├── _STATUS.md
├── OVERVIEW.md
├── phase-0-{name}/
│ ├── PLAN.md
│ ├── TEST-CASES.md
│ ├── COMPLETED.md
│ ├── FIXES.md
│ └── HANDOFF.md
├── phase-1-{name}/
│ └── ... (same 5 files)
└── phase-N-{name}/
└── ... (same 5 files)
_STATUS.md - pointing to Phase 0OVERVIEW.md - complete feature summary from requirementsPLAN.md with:
COMPLETED.md, FIXES.md, HANDOFF.md (as shown in prp_complex.md)/generate-requirements)
c. Read the target project's AGENTS.md for the validation method:
context-engineering/PRPs/templates/test_cases_template.md:Before finishing, verify:
After creating the PRP, update context-engineering/_STATUS.md:
_STATUS.mdExample update:
## In Progress
### {Feature Name}
**PRP:** `context-engineering/PRPs/{feature-name}.md` (or folder path)
- PRP created, ready for implementation
After completion, provide:
========================================
PRP GENERATED SUCCESSFULLY
========================================
Source: {requirements file path}
Type: {Simple | Complex/Phased}
Output: {output path}
{For phased PRPs:}
Total Phases: {N}
Phase Overview:
- Phase 0: {name} - {risk level}
- Phase 1: {name} - {risk level}
...
Research Summary:
- Files analyzed: {count}
- Patterns identified: {count}
- External docs referenced: {count}
- Test cases generated: {total across all phases}
Confidence Score: {1-10}/10
(confidence for one-pass implementation success)
========================================
To execute: /execute-prp {output path}
========================================
The Goal: An agent with ONLY the generated PRP can implement the feature successfully, without access to the original requirements document.
When generating PRPs, ALWAYS include these safety rules in the OVERVIEW.md (for phased PRPs) or in the main PRP file (for simple PRPs):
## CRITICAL SAFETY RULES
### 1. Follow Project Safety Rules
- Read the target project's `AGENTS.md` for project-specific safety rules
- Follow all environment-specific constraints (local vs production, etc.)
### 2. NO GIT COMMITS
- **NEVER** commit code to GitHub during implementation
- The user will handle all git operations manually
### 3. NO PRODUCTION DEPLOYMENTS
- Do NOT run any deployment commands