mirror of
https://github.com/coleam00/Archon.git
synced 2026-01-07 23:28:10 -05:00
The New Archon (Beta) - The Operating System for AI Coding Assistants!
This commit is contained in:
74
.claude/commands/prp-commands/prp-any-cli-create.md
Normal file
74
.claude/commands/prp-commands/prp-any-cli-create.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Create PRP
|
||||
|
||||
## Feature file: $ARGUMENTS
|
||||
|
||||
Generate a complete PRP for general feature implementation with thorough research. Ensure context is passed to the AI agent to enable self-validation and iterative refinement. Read the feature file first to understand what needs to be created, how the examples provided help, and any other considerations.
|
||||
|
||||
The AI agent only gets the context you are appending to the PRP and training data. Assuma the AI agent has access to the codebase and the same knowledge cutoff as you, so its important that your research findings are included or referenced in the PRP. The Agent has Websearch capabilities, so pass urls to documentation and examples.
|
||||
|
||||
## Research Process
|
||||
|
||||
1. **Codebase Analysis**
|
||||
- Search for similar features/patterns in the codebase
|
||||
- Identify files to reference in PRP
|
||||
- Note existing conventions to follow
|
||||
- Check test patterns for validation approach
|
||||
|
||||
2. **External Research**
|
||||
- Search for similar features/patterns online
|
||||
- Library documentation (include specific URLs)
|
||||
- Implementation examples (GitHub/StackOverflow/blogs)
|
||||
- Best practices and common pitfalls
|
||||
|
||||
3. **User Clarification** (if needed)
|
||||
- Specific patterns to mirror and where to find them?
|
||||
- Integration requirements and where to find them?
|
||||
|
||||
## PRP Generation
|
||||
|
||||
Using PRPs/templates/prp_base.md as template:
|
||||
|
||||
### Critical Context to Include and pass to the AI agent as part of the PRP
|
||||
|
||||
- **Documentation**: URLs with specific sections
|
||||
- **Code Examples**: Real snippets from codebase
|
||||
- **Gotchas**: Library quirks, version issues
|
||||
- **Patterns**: Existing approaches to follow
|
||||
|
||||
### Implementation Blueprint
|
||||
|
||||
- Start with pseudocode showing approach
|
||||
- Reference real files for patterns
|
||||
- Include error handling strategy
|
||||
- list tasks to be completed to fullfill the PRP in the order they should be completed
|
||||
|
||||
### Validation Gates (Must be Executable) eg for python
|
||||
|
||||
```bash
|
||||
# Syntax/Style
|
||||
ruff check --fix && mypy .
|
||||
|
||||
# Unit Tests
|
||||
uv run pytest tests/ -v
|
||||
|
||||
```
|
||||
|
||||
**_ CRITICAL AFTER YOU ARE DONE RESEARCHING AND EXPLORING THE CODEBASE BEFORE YOU START WRITING THE PRP _**
|
||||
|
||||
**_ ULTRATHINK ABOUT THE PRP AND PLAN YOUR APPROACH THEN START WRITING THE PRP _**
|
||||
|
||||
## Output
|
||||
|
||||
Save as: `PRPs/{feature-name}.md`
|
||||
|
||||
## Quality Checklist
|
||||
|
||||
- [ ] All necessary context included
|
||||
- [ ] Validation gates are executable by AI
|
||||
- [ ] References existing patterns
|
||||
- [ ] Clear implementation path
|
||||
- [ ] Error handling documented
|
||||
|
||||
Score the PRP on a scale of 1-10 (confidence level to succeed in one-pass implementation using claude codes)
|
||||
|
||||
Remember: The goal is one-pass implementation success through comprehensive context.
|
||||
40
.claude/commands/prp-commands/prp-any-cli-execute.md
Normal file
40
.claude/commands/prp-commands/prp-any-cli-execute.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Execute BASE PRP
|
||||
|
||||
Implement a feature using using the PRP file.
|
||||
|
||||
## PRP File: $ARGUMENTS
|
||||
|
||||
## Execution Process
|
||||
|
||||
1. **Load PRP**
|
||||
- Read the specified PRP file
|
||||
- Understand all context and requirements
|
||||
- Follow all instructions in the PRP and extend the research if needed
|
||||
- Ensure you have all needed context to implement the PRP fully
|
||||
- Do more web searches and codebase exploration as needed
|
||||
|
||||
2. **ULTRATHINK**
|
||||
- Think hard before you execute the plan. Create a comprehensive plan addressing all requirements.
|
||||
- Break down complex tasks into smaller, manageable steps using your todos tools.
|
||||
- Use the TodoWrite tool to create and track your implementation plan.
|
||||
- Identify implementation patterns from existing code to follow.
|
||||
|
||||
3. **Execute the plan**
|
||||
- Execute the PRP
|
||||
- Implement all the code
|
||||
|
||||
4. **Validate**
|
||||
- Run each validation command
|
||||
- Fix any failures
|
||||
- Re-run until all pass
|
||||
|
||||
5. **Complete**
|
||||
- Ensure all checklist items done
|
||||
- Run final validation suite
|
||||
- Report completion status
|
||||
- Read the PRP again to ensure you have implemented everything
|
||||
|
||||
6. **Reference the PRP**
|
||||
- You can always reference the PRP again if needed
|
||||
|
||||
Note: If validation fails, use error patterns in PRP to fix and retry.
|
||||
108
.claude/commands/prp-commands/prp-claude-code-create.md
Normal file
108
.claude/commands/prp-commands/prp-claude-code-create.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Create BASE PRP
|
||||
|
||||
## Feature: $ARGUMENTS
|
||||
|
||||
## PRP Creation Mission
|
||||
|
||||
Create a comprehensive PRP that enables **one-pass implementation success** through systematic research and context curation.
|
||||
|
||||
**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)
|
||||
|
||||
**Therefore**: Your research and context curation directly determines implementation success. Incomplete context = implementation failure.
|
||||
|
||||
## Research Process
|
||||
|
||||
> During the research process, create clear tasks and spawn as many agents and subagents as needed using the batch tools. The deeper research we do here the better the PRP will be. we optminize for chance of success and not for speed.
|
||||
|
||||
1. **Codebase Analysis in depth**
|
||||
- Create clear todos and spawn subagents to search the codebase for similar features/patterns Think hard and plan your approach
|
||||
- Identify all the necessary files to reference in the PRP
|
||||
- Note all existing conventions to follow
|
||||
- Check existing test patterns for validation approach
|
||||
- Use the batch tools to spawn subagents to search the codebase for similar features/patterns
|
||||
|
||||
2. **External Research at scale**
|
||||
- Create clear todos and spawn with instructions subagents to do deep research for similar features/patterns online and include urls to documentation and examples
|
||||
- Library documentation (include specific URLs)
|
||||
- For critical pieces of documentation add a .md file to PRPs/ai_docs and reference it in the PRP with clear reasoning and instructions
|
||||
- Implementation examples (GitHub/StackOverflow/blogs)
|
||||
- Best practices and common pitfalls found during research
|
||||
- Use the batch tools to spawn subagents to search for similar features/patterns online and include urls to documentation and examples
|
||||
|
||||
3. **User Clarification**
|
||||
- Ask for clarification if you need it
|
||||
|
||||
## PRP Generation Process
|
||||
|
||||
### Step 1: Choose Template
|
||||
|
||||
Use `PRPs/templates/prp_base.md` as your template structure - it contains all necessary sections and formatting.
|
||||
|
||||
### Step 2: Context Completeness Validation
|
||||
|
||||
Before writing, apply the **"No Prior Knowledge" test** from the template:
|
||||
_"If someone knew nothing about this codebase, would they have everything needed to implement this successfully?"_
|
||||
|
||||
### Step 3: Research Integration
|
||||
|
||||
Transform your research findings into the template sections:
|
||||
|
||||
**Goal Section**: Use research to define specific, measurable Feature Goal and concrete Deliverable
|
||||
**Context Section**: Populate YAML structure with your research findings - specific URLs, file patterns, gotchas
|
||||
**Implementation Tasks**: Create dependency-ordered tasks using information-dense keywords from codebase analysis
|
||||
**Validation Gates**: Use project-specific validation commands that you've verified work in this codebase
|
||||
|
||||
### Step 4: Information Density Standards
|
||||
|
||||
Ensure every reference is **specific and actionable**:
|
||||
|
||||
- URLs include section anchors, not just domain names
|
||||
- File references include specific patterns to follow, not generic mentions
|
||||
- Task specifications include exact naming conventions and placement
|
||||
- Validation commands are project-specific and executable
|
||||
|
||||
### Step 5: ULTRATHINK Before Writing
|
||||
|
||||
After research completion, create comprehensive PRP writing plan using TodoWrite tool:
|
||||
|
||||
- Plan how to structure each template section with your research findings
|
||||
- Identify gaps that need additional research
|
||||
- Create systematic approach to filling template with actionable context
|
||||
|
||||
## Output
|
||||
|
||||
Save as: `PRPs/{feature-name}.md`
|
||||
|
||||
## PRP Quality Gates
|
||||
|
||||
### Context Completeness Check
|
||||
|
||||
- [ ] Passes "No Prior Knowledge" test from template
|
||||
- [ ] All YAML references are specific and accessible
|
||||
- [ ] Implementation tasks include exact naming and placement guidance
|
||||
- [ ] Validation commands are project-specific and verified working
|
||||
|
||||
### Template Structure Compliance
|
||||
|
||||
- [ ] All required template sections completed
|
||||
- [ ] Goal section has specific Feature Goal, Deliverable, Success Definition
|
||||
- [ ] Implementation Tasks follow dependency ordering
|
||||
- [ ] Final Validation Checklist is comprehensive
|
||||
|
||||
### Information Density Standards
|
||||
|
||||
- [ ] No generic references - all are specific and actionable
|
||||
- [ ] File patterns point at specific examples to follow
|
||||
- [ ] URLs include section anchors for exact guidance
|
||||
- [ ] Task specifications use information-dense keywords from codebase
|
||||
|
||||
## Success Metrics
|
||||
|
||||
**Confidence Score**: Rate 1-10 for one-pass implementation success likelihood
|
||||
|
||||
**Validation**: The completed PRP should enable an AI agent unfamiliar with the codebase to implement the feature successfully using only the PRP content and codebase access.
|
||||
55
.claude/commands/prp-commands/prp-claude-code-execute.md
Normal file
55
.claude/commands/prp-commands/prp-claude-code-execute.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Execute BASE PRP
|
||||
|
||||
## PRP File: $ARGUMENTS
|
||||
|
||||
## Mission: One-Pass Implementation Success
|
||||
|
||||
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.
|
||||
|
||||
## Execution Process
|
||||
|
||||
1. **Load PRP**
|
||||
- Read the specified PRP file completely
|
||||
- Absorb all context, patterns, requirements and gather codebase intelligence
|
||||
- Use the provided documentation references and file patterns, consume the right documentation before the appropriate todo/task
|
||||
- Trust the PRP's context and guidance - it's designed for one-pass success
|
||||
- If needed do additional codebase exploration and research as needed
|
||||
|
||||
2. **ULTRATHINK & Plan**
|
||||
- Create comprehensive implementation plan following the PRP's task order
|
||||
- Break down into clear todos using TodoWrite tool
|
||||
- Use subagents for parallel work when beneficial (always create prp inspired prompts for subagents when used)
|
||||
- Follow the patterns referenced in the PRP
|
||||
- Use specific file paths, class names, and method signatures from PRP context
|
||||
- Never guess - always verify the codebase patterns and examples referenced in the PRP yourself
|
||||
|
||||
3. **Execute Implementation**
|
||||
- Follow the PRP's Implementation Tasks sequence, add more detail as needed, especially when using subagents
|
||||
- Use the patterns and examples referenced in the PRP
|
||||
- Create files in locations specified by the desired codebase tree
|
||||
- Apply naming conventions from the task specifications and CLAUDE.md
|
||||
|
||||
4. **Progressive Validation**
|
||||
|
||||
**Execute the level validation system from the PRP:**
|
||||
- **Level 1**: Run syntax & style validation commands from PRP
|
||||
- **Level 2**: Execute unit test validation from PRP
|
||||
- **Level 3**: Run integration testing commands from PRP
|
||||
- **Level 4**: Execute specified validation from PRP
|
||||
|
||||
**Each level must pass before proceeding to the next.**
|
||||
|
||||
5. **Completion Verification**
|
||||
- Work through the Final Validation Checklist in the PRP
|
||||
- Verify all Success Criteria from the "What" section are met
|
||||
- Confirm all Anti-Patterns were avoided
|
||||
- Implementation is ready and working
|
||||
|
||||
**Failure Protocol**: When validation fails, use the patterns and gotchas from the PRP to fix issues, then re-run validation until passing.
|
||||
Reference in New Issue
Block a user