Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Execute BASE PRP

Implement a feature using using the PRP file.
Implement a feature using the PRP file.

## PRP File: $ARGUMENTS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## 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.
Generate a complete PRP for general feature implementation with thorough research. Ensure context is passed to Amazon Q 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.
Amazon Q only gets the context you are appending to the PRP and training data. Assume Amazon Q 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. Amazon Q has web search capabilities, so pass URLs to documentation and examples.

## Research Process

Expand All @@ -28,7 +28,7 @@ The AI agent only gets the context you are appending to the PRP and training dat

Using PRPs/templates/prp_base.md as template:

### Critical Context to Include and pass to the AI agent as part of the PRP
### Critical Context to Include and pass to Amazon Q as part of the PRP
- **Documentation**: URLs with specific sections
- **Code Examples**: Real snippets from codebase
- **Gotchas**: Library quirks, version issues
Expand All @@ -38,7 +38,7 @@ Using PRPs/templates/prp_base.md as template:
- 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
- list tasks to be completed to fulfill the PRP in the order they should be completed

### Validation Gates (Must be Executable) eg for python
```bash
Expand All @@ -59,11 +59,11 @@ Save as: `PRPs/{feature-name}.md`

## Quality Checklist
- [ ] All necessary context included
- [ ] Validation gates are executable by AI
- [ ] Validation gates are executable by Amazon Q
- [ ] 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)
Score the PRP on a scale of 1-10 (confidence level to succeed in one-pass implementation using Amazon Q)

Remember: The goal is one-pass implementation success through comprehensive context.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Bash(python:*)",
"Bash(python -m pytest:*)",
"Bash(python3 -m pytest:*)",
"WebFetch(domain:docs.anthropic.com)",
"WebFetch(domain:docs.aws.amazon.com)",
"WebFetch(domain:github.com)"
],
"deny": []
Expand Down
60 changes: 60 additions & 0 deletions AMAZONQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Amazon Q Developer - Project Guidelines

### 🔄 Project Awareness & Context
- **Always read `PLANNING.md`** at the start of a new conversation to understand the project's architecture, goals, style, and constraints.
- **Check `TASK.md`** before starting a new task. If the task isn't listed, add it with a brief description and today's date.
- **Use consistent naming conventions, file structure, and architecture patterns** as described in `PLANNING.md`.
- **Use venv_linux** (the virtual environment) whenever executing Python commands, including for unit tests.

### 🧱 Code Structure & Modularity
- **Never create a file longer than 500 lines of code.** If a file approaches this limit, refactor by splitting it into modules or helper files.
- **Organize code into clearly separated modules**, grouped by feature or responsibility.
For agents this looks like:
- `agent.py` - Main agent definition and execution logic
- `tools.py` - Tool functions used by the agent
- `prompts.py` - System prompts
- **Use clear, consistent imports** (prefer relative imports within packages).
- **Use python_dotenv and load_env()** for environment variables.

### 🧪 Testing & Reliability
- **Always create Pytest unit tests for new features** (functions, classes, routes, etc).
- **After updating any logic**, check whether existing unit tests need to be updated. If so, do it.
- **Tests should live in a `/tests` folder** mirroring the main app structure.
- Include at least:
- 1 test for expected use
- 1 edge case
- 1 failure case

### ✅ Task Completion
- **Mark completed tasks in `TASK.md`** immediately after finishing them.
- Add new sub-tasks or TODOs discovered during development to `TASK.md` under a "Discovered During Work" section.

### 📎 Style & Conventions
- **Use Python** as the primary language.
- **Follow PEP8**, use type hints, and format with `black`.
- **Use `pydantic` for data validation**.
- Use `FastAPI` for APIs and `SQLAlchemy` or `SQLModel` for ORM if applicable.
- Write **docstrings for every function** using the Google style:
```python
def example():
"""
Brief summary.

Args:
param1 (type): Description.

Returns:
type: Description.
"""
```

### 📚 Documentation & Explainability
- **Update `README.md`** when new features are added, dependencies change, or setup steps are modified.
- **Comment non-obvious code** and ensure everything is understandable to a mid-level developer.
- When writing complex logic, **add an inline `# Reason:` comment** explaining the why, not just the what.

### 🧠 AI Assistant Behavior Rules
- **Never assume missing context. Ask questions if uncertain.**
- **Never hallucinate libraries or functions** – only use known, verified Python packages.
- **Always confirm file paths and module names** exist before referencing them in code or tests.
- **Never delete or overwrite existing code** unless explicitly instructed to or if part of a task from `TASK.md`.
128 changes: 128 additions & 0 deletions CONVERSION_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Context Engineering Template - Amazon Q Conversion Summary

## Overview
This workspace has been successfully converted from Claude Code to Amazon Q Developer. All references, paths, and configurations have been updated to work with Amazon Q.

## Changes Made

### Directory Structure Changes
- `.claude/` → `.amazonq/` (all instances)
- `claude-code-full-guide/` → `amazonq-full-guide/`
- `CLAUDE.md` → `AMAZONQ.md` (all instances)

### File Updates

#### Root Level
- ✅ Created `.amazonq/` directory with commands and settings
- ✅ Updated `README.md` - replaced all Claude references with Amazon Q
- ✅ Created `AMAZONQ.md` - project guidelines for Amazon Q
- ✅ Renamed installation guide: `install_claude_code_windows.md` → `install_amazonq_windows.md`

#### Amazon Q Commands (`.amazonq/commands/`)
- ✅ `generate-prp.md` - Updated to reference Amazon Q instead of Claude
- ✅ `execute-prp.md` - Updated execution instructions for Amazon Q
- ✅ `primer.md` - Updated context priming for Amazon Q

#### Settings Files
- ✅ Updated `settings.local.json` files to use AWS documentation domains
- ✅ Replaced `docs.anthropic.com` with `docs.aws.amazon.com`

#### Use Cases Converted
- ✅ `agent-factory-with-subagents/` - Directory structure and files updated
- ✅ `mcp-server/` - Directory structure and files updated
- ✅ `pydantic-ai/` - Directory structure and files updated
- ✅ `template-generator/` - Directory structure and files updated

#### Full Guide Directory
- ✅ `amazonq-full-guide/` - Complete conversion with all commands and agents
- ✅ Updated all command files to reference Amazon Q
- ✅ Updated settings to use AWS documentation

## Key Configuration Changes

### Amazon Q Settings
```json
{
"permissions": {
"allow": [
"Bash(grep:*)",
"Bash(ls:*)",
"Bash(source:*)",
"Bash(find:*)",
"Bash(mv:*)",
"Bash(mkdir:*)",
"Bash(tree:*)",
"Bash(ruff:*)",
"Bash(touch:*)",
"Bash(cat:*)",
"Bash(ruff check:*)",
"Bash(pytest:*)",
"Bash(python:*)",
"Bash(python -m pytest:*)",
"Bash(python3 -m pytest:*)",
"WebFetch(domain:docs.aws.amazon.com)",
"WebFetch(domain:github.com)"
],
"deny": []
}
}
```

### Updated Commands
- `/generate-prp` - Now optimized for Amazon Q's capabilities
- `/execute-prp` - Updated execution flow for Amazon Q
- `/primer` - Context priming specifically for Amazon Q

## Usage Instructions

### Quick Start with Amazon Q
```bash
# 1. Clone this template
git clone https://github.com/coleam00/Context-Engineering-Intro.git
cd Context-Engineering-Intro

# 2. Set up your project rules
# Edit AMAZONQ.md to add your project-specific guidelines

# 3. Add examples
# Place relevant code examples in the examples/ folder

# 4. Create your initial feature request
# Edit INITIAL.md with your feature requirements

# 5. Generate a comprehensive PRP
# In Amazon Q, run:
/generate-prp INITIAL.md

# 6. Execute the PRP to implement your feature
# In Amazon Q, run:
/execute-prp PRPs/your-feature-name.md
```

### Amazon Q Integration
- All commands now reference Amazon Q's capabilities
- Documentation links point to AWS resources
- Settings configured for Amazon Q Developer CLI
- Project guidelines tailored for Amazon Q workflow

## Benefits of Amazon Q Integration
- **AWS Native**: Seamless integration with AWS services and documentation
- **Enterprise Ready**: Built for enterprise development workflows
- **Security Focused**: AWS security best practices built-in
- **Scalable**: Designed for large-scale development projects

## Next Steps
1. Install Amazon Q Developer CLI
2. Configure your AWS credentials
3. Start using the `/generate-prp` and `/execute-prp` commands
4. Customize `AMAZONQ.md` for your specific project needs

## Compatibility
- All existing PRPs and templates remain compatible
- Examples and patterns work unchanged
- Validation gates and testing patterns preserved
- Context engineering principles maintained

---

**The Context Engineering methodology remains the same - only the AI assistant has changed from Claude to Amazon Q Developer.**
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git clone https://github.com/coleam00/Context-Engineering-Intro.git
cd Context-Engineering-Intro

# 2. Set up your project rules (optional - template provided)
# Edit CLAUDE.md to add your project-specific guidelines
# Edit AMAZONQ.md to add your project-specific guidelines

# 3. Add examples (highly recommended)
# Place relevant code examples in the examples/ folder
Expand All @@ -21,11 +21,11 @@ cd Context-Engineering-Intro
# Edit INITIAL.md with your feature requirements

# 5. Generate a comprehensive PRP (Product Requirements Prompt)
# In Claude Code, run:
# In Amazon Q, run:
/generate-prp INITIAL.md

# 6. Execute the PRP to implement your feature
# In Claude Code, run:
# In Amazon Q, run:
/execute-prp PRPs/your-feature-name.md
```

Expand Down Expand Up @@ -66,17 +66,17 @@ Context Engineering represents a paradigm shift from traditional prompt engineer

```
context-engineering-intro/
├── .claude/
├── .amazonq/
│ ├── commands/
│ │ ├── generate-prp.md # Generates comprehensive PRPs
│ │ └── execute-prp.md # Executes PRPs to implement features
│ └── settings.local.json # Claude Code permissions
│ └── settings.local.json # Amazon Q permissions
├── PRPs/
│ ├── templates/
│ │ └── prp_base.md # Base template for PRPs
│ └── EXAMPLE_multi_agent_prp.md # Example of a complete PRP
├── examples/ # Your code examples (critical!)
├── CLAUDE.md # Global rules for AI assistant
├── AMAZONQ.md # Global rules for AI assistant
├── INITIAL.md # Template for feature requests
├── INITIAL_EXAMPLE.md # Example feature request
└── README.md # This file
Expand All @@ -86,9 +86,9 @@ This template doesn't focus on RAG and tools with context engineering because I

## Step-by-Step Guide

### 1. Set Up Global Rules (CLAUDE.md)
### 1. Set Up Global Rules (AMAZONQ.md)

The `CLAUDE.md` file contains project-wide rules that the AI assistant will follow in every conversation. The template includes:
The `AMAZONQ.md` file contains project-wide rules that Amazon Q will follow in every conversation. The template includes:

- **Project awareness**: Reading planning docs, checking tasks
- **Code structure**: File size limits, module organization
Expand Down Expand Up @@ -129,14 +129,14 @@ PRPs (Product Requirements Prompts) are comprehensive implementation blueprints

They are similar to PRDs (Product Requirements Documents) but are crafted more specifically to instruct an AI coding assistant.

Run in Claude Code:
Run in Amazon Q:
```bash
/generate-prp INITIAL.md
```

**Note:** The slash commands are custom commands defined in `.claude/commands/`. You can view their implementation:
- `.claude/commands/generate-prp.md` - See how it researches and creates PRPs
- `.claude/commands/execute-prp.md` - See how it implements features from PRPs
**Note:** The slash commands are custom commands defined in `.amazonq/commands/`. You can view their implementation:
- `.amazonq/commands/generate-prp.md` - See how it researches and creates PRPs
- `.amazonq/commands/execute-prp.md` - See how it implements features from PRPs

The `$ARGUMENTS` variable in these commands receives whatever you pass after the command name (e.g., `INITIAL.md` or `PRPs/your-feature.md`).

Expand All @@ -154,7 +154,7 @@ Once generated, execute the PRP to implement your feature:
/execute-prp PRPs/your-feature-name.md
```

The AI coding assistant will:
Amazon Q will:
1. Read all context from the PRP
2. Create a detailed implementation plan
3. Execute each step with validation
Expand Down Expand Up @@ -224,7 +224,7 @@ See `PRPs/EXAMPLE_multi_agent_prp.md` for a complete example of what gets genera

## Using Examples Effectively

The `examples/` folder is **critical** for success. AI coding assistants perform much better when they can see patterns to follow.
The `examples/` folder is **critical** for success. Amazon Q performs much better when it can see patterns to follow.

### What to Include in Examples

Expand Down Expand Up @@ -277,20 +277,20 @@ examples/

### 3. Use Validation Gates
- PRPs include test commands that must pass
- AI will iterate until all validations succeed
- Amazon Q will iterate until all validations succeed
- This ensures working code on first try

### 4. Leverage Documentation
- Include official API docs
- Add MCP server resources
- Reference specific documentation sections

### 5. Customize CLAUDE.md
### 5. Customize AMAZONQ.md
- Add your conventions
- Include project-specific rules
- Define coding standards

## Resources

- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)
- [Amazon Q Developer Documentation](https://docs.aws.amazon.com/amazonq/)
- [Context Engineering Best Practices](https://www.philschmid.de/context-engineering)
Loading