mirror of
https://github.com/coleam00/Archon.git
synced 2026-01-07 07:07:59 -05:00
Add PRP story task template and reorganize PRP commands (#508)
* Reorganize PRP commands and add story task template - Move PRP commands to dedicated subdirectories - Add new agent definitions for codebase analysis and library research - Create story task PRP template for user story implementation - Rename prp-base.md to prp_base.md for consistency * Update .claude/agents/library-researcher.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .claude/commands/prp-claude-code/prp-story-task-create.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .claude/commands/prp-claude-code/prp-story-task-create.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update PRPs/templates/prp_story_task.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update PRPs/templates/prp_story_task.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,6 @@ Create a comprehensive PRP that enables **one-pass implementation success** thro
|
||||
|
||||
**Critical Understanding**: The executing AI agent only receives:
|
||||
|
||||
- Start by reading and understanding the prp concepts PRPs/README.md
|
||||
- The PRP content you create
|
||||
- Its training data knowledge
|
||||
- Access to codebase files (but needs guidance on which ones)
|
||||
@@ -9,7 +9,6 @@ PRPs enable working code on the first attempt through:
|
||||
- **Context Completeness**: Everything needed, nothing guessed
|
||||
- **Progressive Validation**: 4-level gates catch errors early
|
||||
- **Pattern Consistency**: Follow existing codebase approaches
|
||||
- Read PRPs/README.md to understand PRP concepts
|
||||
|
||||
**Your Goal**: Transform the PRP into working code that passes all validation gates.
|
||||
|
||||
142
.claude/commands/prp-claude-code/prp-story-task-create.md
Normal file
142
.claude/commands/prp-claude-code/prp-story-task-create.md
Normal file
@@ -0,0 +1,142 @@
|
||||
---
|
||||
description: "Convert user story/task into executable PRP with deep codebase analysis"
|
||||
---
|
||||
|
||||
# Create Story PRP from User Story/Task
|
||||
|
||||
## Story/Task: $ARGUMENTS
|
||||
|
||||
## Mission
|
||||
|
||||
Transform a user story or task into a **tactical implementation PRP** through systematic codebase analysis and task decomposition.
|
||||
|
||||
We do not write any code in this step, the goal is to create a detailed context engineered implementation plan for the implementation agent.
|
||||
|
||||
**Key Principle**: We must first gather the context about the story/task before proceeding with the analysis.
|
||||
|
||||
When we understand the story/task, we can proceed with the codebase analysis. We systematically dig deep into the codebase to gather intelligence and identify patterns and implementation points. We then use this information to create a PRP that can be executed by a coding agent.
|
||||
|
||||
The contents of the created PRP should encapsulate all the information the agent needs to complete the story/task in one pass.
|
||||
|
||||
Remember that subagents will only receive details from you; the user cannot interact with them directly. Therefore, include all relevant context in the subagent prompt and TODO.
|
||||
|
||||
Create detailed TODOs and spawn parallel subagents to analyze (use specialized subagents when appropriate).
|
||||
|
||||
## Analysis Process
|
||||
|
||||
### Phase 1: Story Decomposition
|
||||
|
||||
Analyze the story to determine:
|
||||
|
||||
- **Story/Task Type**: Feature/Bug/Enhancement/Refactor
|
||||
- **Complexity**: Low, Medium, High
|
||||
- **Affected Systems**: Which components/services need changes
|
||||
|
||||
Get a deep understanding about the story/task before proceeding so that you can effectively guide the rest of the process.
|
||||
|
||||
### Phase 2: Codebase Intelligence Gathering
|
||||
|
||||
**1. Project Structure Analysis**
|
||||
|
||||
- Detect primary language(s) and frameworks
|
||||
- Map directory structure and conventions to identify integration points for the story/task
|
||||
- Identify service/component boundaries
|
||||
- Find configuration files and environment setup
|
||||
|
||||
**2. Pattern Recognition**
|
||||
|
||||
- Search for similar implementations in codebase
|
||||
- Identify coding conventions (naming, structure, error handling) start in CLAUDE.md AGENTS.md or relevant rules files such as .cursorrules
|
||||
- Extract common patterns for the story's domain that should be added to the PRP as context for the implementation agent.
|
||||
- Note anti-patterns to avoid
|
||||
|
||||
**3. Dependency Analysis**
|
||||
|
||||
- Catalog external libraries used if relevant to the story/task (check package.json, pyproject.toml, go.mod, etc.)
|
||||
- Understand how libraries are integrated
|
||||
- Find relevant documentation in PRPs/ai_docs/ if shared, ai_docs directory is used by the user to paste in relevant additional context that may be relevant to our story/task
|
||||
|
||||
**4. Testing Patterns**
|
||||
|
||||
- Identify test framework and structure
|
||||
- Find similar test examples and test setup
|
||||
- Suggest test cases and scenarios
|
||||
|
||||
**5. Integration Points**
|
||||
|
||||
- Identify files that will need updates
|
||||
- Identify if new files needs to be created and where to create them
|
||||
- Find router/API registration patterns
|
||||
- Understand database/model patterns if relevant
|
||||
|
||||
### Phase 3: Think harder about the story and its components.
|
||||
|
||||
Really think hard about everything you just learned during the research phases.
|
||||
|
||||
### Phase 4: PRP Task Generation
|
||||
|
||||
Transform analysis into concrete tasks:
|
||||
|
||||
Read and understand the template @PRPs/templates/prp_story_task.md
|
||||
|
||||
**Task Rules**:
|
||||
|
||||
1. Each task is atomic and independently testable
|
||||
2. Tasks are ordered by dependency
|
||||
3. Use action verbs that are information dense: CREATE, UPDATE, ADD, REMOVE, REFACTOR, MIRROR
|
||||
4. Include specific implementation details from codebase analysis
|
||||
5. Every task has an executable validation command
|
||||
|
||||
**Task Action Types**:
|
||||
|
||||
We use the concept of information dense keywords to describe the action to be taken, below is a guidance.
|
||||
But you can use your own words to describe the action to be taken as long as you follow this same principle.
|
||||
|
||||
Examples:
|
||||
|
||||
- **CREATE**: New files/components
|
||||
- **UPDATE**: Modify existing files
|
||||
- **ADD**: Insert new functionality into existing code
|
||||
- **REMOVE**: Delete deprecated code
|
||||
- **REFACTOR**: Restructure without changing behavior
|
||||
- **MIRROR**: Mirror existing pattern or functionality that exists elsewhere in the codebase
|
||||
|
||||
### Phase 5: Validation Design
|
||||
|
||||
For each task, design validation that:
|
||||
|
||||
- Can run immediately after task completion
|
||||
- Provides clear pass/fail feedback
|
||||
- Uses project-specific commands discovered in analysis
|
||||
|
||||
## Quality Criteria
|
||||
|
||||
### Task Clarity
|
||||
|
||||
- [ ] The PRP is clear and concise and follows KISS principle
|
||||
- [ ] Each task has clear action and target
|
||||
- [ ] Implementation details reference specific patterns
|
||||
- [ ] Validation commands are executable
|
||||
|
||||
### Context Completeness
|
||||
|
||||
- [ ] All necessary patterns identified
|
||||
- [ ] External library usage documented
|
||||
- [ ] Integration points mapped
|
||||
- [ ] External context references populated
|
||||
|
||||
### Story Coverage
|
||||
|
||||
- [ ] All acceptance criteria addressed
|
||||
- [ ] Edge cases considered
|
||||
- [ ] Error handling included where needed
|
||||
|
||||
## Output
|
||||
|
||||
Save as: `PRPs/story_{kebab-case-summary}.md`
|
||||
|
||||
## Success Metrics
|
||||
|
||||
**Implementation Ready**: Another developer could execute these tasks without additional context
|
||||
**Validation Complete**: Every task has at least one working validation command
|
||||
**Pattern Consistent**: Tasks follow existing codebase conventions
|
||||
95
.claude/commands/prp-claude-code/prp-story-task-execute.md
Normal file
95
.claude/commands/prp-claude-code/prp-story-task-execute.md
Normal file
@@ -0,0 +1,95 @@
|
||||
---
|
||||
description: "Execute a Story PRP with focused task implementation"
|
||||
---
|
||||
|
||||
# Execute Story PRP
|
||||
|
||||
## PRP File: $ARGUMENTS
|
||||
|
||||
## Mission
|
||||
|
||||
Execute a story/task PRP through **sequential task completion** with immediate validation.
|
||||
|
||||
**Execution Philosophy**: Complete one task, validate it, then move to the next. No task left behind.
|
||||
|
||||
## Execution Process
|
||||
|
||||
### 1. Load Story PRP
|
||||
|
||||
- Read the specified story PRP file
|
||||
- Understand the original story intent
|
||||
- Review all context references
|
||||
- Note validation commands for each task
|
||||
|
||||
### 2. Pre-Implementation Check
|
||||
|
||||
- Ultrathink about the story intent and task requirements
|
||||
- Verify all referenced files exist
|
||||
- Check that patterns mentioned are accessible
|
||||
- Ensure development environment is ready
|
||||
- Run any pre-requisite setup commands
|
||||
|
||||
### 3. Task-by-Task Implementation
|
||||
|
||||
For each task in the PRP:
|
||||
|
||||
**a) Understand Task**
|
||||
|
||||
- Read task requirements completely
|
||||
- Review referenced patterns
|
||||
- Check gotchas and constraints
|
||||
|
||||
**b) Implement Task**
|
||||
|
||||
- Follow the specified pattern
|
||||
- Use the indicated naming conventions
|
||||
- Apply the documented approach
|
||||
- Handle edge cases mentioned
|
||||
|
||||
**c) Validate Immediately**
|
||||
|
||||
- Run the task's validation command
|
||||
- If validation fails, fix and re-validate
|
||||
- Don't proceed until current task passes
|
||||
|
||||
**d) Mark Complete**
|
||||
|
||||
- Update todo list to track progress
|
||||
- Document any deviations if necessary
|
||||
|
||||
### 4. Full Validation
|
||||
|
||||
After all tasks complete:
|
||||
|
||||
- Run the validation gates from PRP
|
||||
- Execute comprehensive test suite
|
||||
- Verify all acceptance criteria met
|
||||
|
||||
### 5. Completion
|
||||
|
||||
- Work through completion checklist
|
||||
- Ensure story requirements satisfied
|
||||
- Move completed PRP to PRPs/completed/ create the folder if it does not exist
|
||||
|
||||
## Execution Rules
|
||||
|
||||
**Validation Gates**: Each task must pass validation, iterate until passed
|
||||
**Pattern Adherence**: Follow existing patterns, don't create new ones
|
||||
**No Shortcuts**: Complete all validation steps
|
||||
|
||||
## Failure Handling
|
||||
|
||||
When a task fails validation:
|
||||
|
||||
1. Read the error message carefully
|
||||
2. Check the pattern reference again
|
||||
3. Validate it by investigating the codebase
|
||||
4. Fix and re-validate
|
||||
5. If stuck, check similar implementations
|
||||
|
||||
## Success Criteria
|
||||
|
||||
- Every validation command passes
|
||||
- Full test suite green
|
||||
- Story acceptance criteria met
|
||||
- Code follows project conventions
|
||||
Reference in New Issue
Block a user