بنقرة واحدة
generate-requirements
Transform a raw feature idea into a structured requirements document ready for PRP generation.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Transform a raw feature idea into a structured requirements document ready for PRP generation.
التثبيت باستخدام 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-requirements |
| description | Transform a raw feature idea into a structured requirements document ready for PRP generation. |
| argument-hint | <feature-input-file> |
| disable-model-invocation | true |
Transform a user's feature input into a complete, structured requirements document that is compatible with /generate-prp, /execute-prp, /continue-prp, and /ensure-tracking.
Input: User's raw feature ideas (from feature_input_template.md)
Output: Structured requirements document ready for /generate-prp
$ARGUMENTS completelyThe user should have filled the "Knowledge Base Context" section. Read it:
If user listed specific topics:
knowledge-base/If user wrote "Not sure - agent should search":
Why this matters:
For each documentation URL provided:
For each file path provided:
For pasted documentation:
For codebase examples:
ALWAYS search the knowledge base, even if the user listed topics:
knowledge-base/INDEX.md to see all available topics_SUMMARY.md for each relevant sectionWhat you're looking for:
Document your findings: Create a comprehensive list of relevant KB topics with why each matters for this feature. This will go into the requirements document.
Based on what the user wants AND what you learned from the knowledge base, search the codebase for:
Create a map of:
For each major component:
For each question the user listed:
Based on your research, identify:
If there are CRITICAL ambiguities that would block implementation:
Do NOT ask about:
Based on requirements and codebase patterns:
Map out how each user type will interact:
For each major decision point:
If the feature is complex:
Based on user flows and edge cases, identify high-level test scenarios that will become the basis for TEST-CASES.md during /generate-prp:
Document these in the requirements output under a "Test Scenarios" section.
Create a structured requirements document at:
context-engineering/feature-inputs/pending/{FEATURE-NAME}.md
(The file will be moved to in-progress/ when you start working on it, and then to archive/feature-inputs/ when complete)
**FEATURE:** [{Feature Name}]
---
## HOW TO USE THIS DOCUMENT
This is a **requirements document**. To generate an implementation-ready PRP:
\`\`\`
/generate-prp context-engineering/feature-inputs/pending/{FEATURE-NAME}.md
\`\`\`
This will:
1. Validate all requirements
2. Research the codebase for patterns
3. Create implementation-ready PRP with phases
4. Move this file from `pending/` to `in-progress/`
**Commands:**
\`\`\`bash
# Step 1: Generate the PRP
/generate-prp context-engineering/feature-inputs/pending/{FEATURE-NAME}.md
# Step 2: Execute Phase 0
/execute-prp context-engineering/PRPs/{FEATURE-NAME}
# Step 3+: Continue subsequent phases
/continue-prp context-engineering/PRPs/{FEATURE-NAME}
# Before closing: Verify documentation
/ensure-tracking context-engineering/PRPs/{FEATURE-NAME}
# After completion: Move to archive
mv context-engineering/feature-inputs/in-progress/{FEATURE-NAME}.md context-engineering/archive/feature-inputs/
\`\`\`
---
## TECHNICAL CONSTRAINTS
{List all technical constraints discovered}
---
## QUICK REFERENCE: Key Decisions Summary
### Data Model Changes Required
| Model/Table | Change | Purpose |
|-------------|--------|---------|
{Fill from your analysis}
### Core Logic Decisions
| Decision | Value |
|----------|-------|
{Fill from your analysis}
---
## KNOWLEDGE BASE REFERENCES
{List all KB topics relevant to this feature - from user input AND your research}
\`\`\`yaml
concepts:
- [topic-name.md] # Brief explanation of relevance
flows:
- [flow-name.md] # Brief explanation of relevance
implementations:
- [topic-name.md] # Brief explanation of relevance
gotchas:
- [gotcha-name.md] # Brief explanation of relevance (CRITICAL - these prevent bugs)
decisions:
- [NNN-decision-name.md] # Brief explanation of relevance
\`\`\`
---
## PLANNING AGENT: Required Reading Before Implementation
{List all files the implementing agent must read, with why}
---
# {Feature Name} - Requirements Document
## User Decisions (Confirmed)
{Document decisions made by user or derived from their input}
---
## Deep Code Analysis - Critical Findings
{Document your codebase research findings with file paths and current state}
---
## Critical Edge Cases
{Document edge cases - both from user input and discovered during research}
---
## Files That Need Modification
{Categorized list of all files that will be changed}
---
## Implementation Phases
{Break down into phases if complex, otherwise note it's a simple feature}
---
## Overall Success Criteria
{What must be true for this feature to be complete}
---
## Test Scenarios (High-Level)
{These become the basis for TEST-CASES.md during /generate-prp. Include enough detail for the PRP generator to write concrete test cases.}
### Happy Path
- {Scenario 1: e.g., "Create a new record — verify data is saved correctly"}
- {Scenario 2: e.g., "Toggle status — verify state updates"}
### Edge Cases
- {Scenario 1: e.g., "Submit with maximum input length — should be handled"}
- {Scenario 2: e.g., "Empty state — no records exist yet"}
### Protection / Validation
- {Scenario 1: e.g., "Submit invalid data — should show error"}
- {Scenario 2: e.g., "Unauthorized action — should be blocked"}
### Regression
- {Scenario 1: e.g., "Existing CRUD operations still work unchanged"}
- {Scenario 2: e.g., "Related UI components not broken by new changes"}
---
## Data Flows / User Flows
{Document key user journeys}
---
## Data Model Schema (Detailed)
{Complete schema details for new models and modifications}
---
## Answers to User Questions
{Answer each question the user asked in their input}
---
## Additional Considerations
{Things you discovered during research that the user should know}
Before finishing, verify:
/generate-prpAfter creating the requirements document:
========================================
REQUIREMENTS DOCUMENT GENERATED
========================================
Source: {input file path}
Output: context-engineering/{FEATURE-NAME}.md
Summary:
- Feature: {Brief description}
- Complexity: {Simple | Complex/Phased}
- Phases: {N} (if complex)
- Data Model Changes: {New models: N, Modified: M}
- Files Affected: {count}
Research Completed:
- External docs read: {count}
- Codebase files analyzed: {count}
- Patterns identified: {count}
User Questions Answered: {count}/{total}
========================================
Next: /generate-prp context-engineering/{FEATURE-NAME}.md
========================================
/generate-prp to workThe Goal: Transform the user's raw ideas into a structured requirements document that an agent can use with /generate-prp to create an implementation-ready PRP.