mirror of
https://github.com/coleam00/context-engineering-intro.git
synced 2025-12-29 16:14:56 +00:00
Initial commit for Claude Code full guide
This commit is contained in:
27
claude-code-full-guide/.claude/commands/execute-parallel.md
Normal file
27
claude-code-full-guide/.claude/commands/execute-parallel.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Parallel Task Version Execution
|
||||
|
||||
## Variables
|
||||
FEATURE_NAME: $ARGUMENTS
|
||||
PLAN_TO_EXECUTE: $ARGUMENTS
|
||||
NUMBER_OF_PARALLEL_WORKTREES: $ARGUMENTS
|
||||
|
||||
## Instructions
|
||||
|
||||
We're going to create NUMBER_OF_PARALLEL_WORKTREES new subagents that use the Task tool to create N versions of the same feature in parallel.
|
||||
|
||||
Be sure to read PLAN_TO_EXECUTE.
|
||||
|
||||
This enables use to concurrently build the same feature in parallel so we can test and validate each subagent's changes in isolation then pick the best changes.
|
||||
|
||||
The first agent will run in trees/<FEATURE_NAME>-1/
|
||||
The second agent will run in trees/<FEATURE_NAME>-2/
|
||||
...
|
||||
The last agent will run in trees/<FEATURE_NAME>-<NUMBER_OF_PARALLEL_WORKTREES>/
|
||||
|
||||
The code in trees/<FEATURE_NAME>-<i>/ will be identical to the code in the current branch. It will be setup and ready for you to build the feature end to end.
|
||||
|
||||
Each agent will independently implement the engineering plan detailed in PLAN_TO_EXECUTE in their respective workspace.
|
||||
|
||||
When the subagent completes it's work, have the subagent to report their final changes made in a comprehensive `RESULTS.md` file at the root of their respective workspace.
|
||||
|
||||
Make sure agents don't run any tests or other code - focus on the code changes only.
|
||||
40
claude-code-full-guide/.claude/commands/execute-prp.md
Normal file
40
claude-code-full-guide/.claude/commands/execute-prp.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.
|
||||
14
claude-code-full-guide/.claude/commands/fix-github-issue.md
Normal file
14
claude-code-full-guide/.claude/commands/fix-github-issue.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Please analyze and fix the GitHub issue: $ARGUMENTS.
|
||||
|
||||
Follow these steps:
|
||||
|
||||
1. Use `gh issue view` to get the issue details
|
||||
2. Understand the problem described in the issue
|
||||
3. Search the codebase for relevant files
|
||||
4. Implement the necessary changes to fix the issue
|
||||
5. Write and run tests to verify the fix
|
||||
6. Ensure code passes linting and type checking
|
||||
7. Create a descriptive commit message
|
||||
8. Push and create a PR
|
||||
|
||||
Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks.
|
||||
69
claude-code-full-guide/.claude/commands/generate-prp.md
Normal file
69
claude-code-full-guide/.claude/commands/generate-prp.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# 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.
|
||||
14
claude-code-full-guide/.claude/commands/prep-parallel.md
Normal file
14
claude-code-full-guide/.claude/commands/prep-parallel.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Initialize parallel git worktree directories for parallel Claude Code agents
|
||||
|
||||
## Variables
|
||||
FEATURE_NAME: $ARGUMENTS
|
||||
NUMBER_OF_PARALLEL_WORKTREES: $ARGUMENTS
|
||||
|
||||
## Execute these commands
|
||||
> Execute the loop in parallel with the Batch and Task tool
|
||||
|
||||
- create a new dir `trees/`
|
||||
- for i in NUMBER_OF_PARALLEL_WORKTREES
|
||||
- RUN `git worktree add -b FEATURE_NAME-i ./trees/FEATURE_NAME-i`
|
||||
- RUN `cd trees/FEATURE_NAME-i`, `git ls-files` to validate
|
||||
- RUN `git worktree list` to verify all trees were created properly
|
||||
Reference in New Issue
Block a user