### Interactive Setup Flow for context-forge init
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Details the interactive setup flow when running `context-forge init`. It outlines the sequence of prompts guiding the user through project information, PRD input, tech stack selection, feature selection, configuration, and advanced options.
```markdown
When you run `context-forge init`, you'll be guided through:
1. **Project Information** - Name, type, and description
2. **PRD Input** - Provide or create product requirements
3. **Tech Stack Selection** - Choose frontend, backend, and database
4. **Feature Selection** - Pick core features for your MVP
5. **Configuration** - Timeline, team size, and deployment
6. **Advanced Options** - PRP, validation, AI docs
```
--------------------------------
### Project Setup and Execution Commands
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
This snippet outlines the essential commands for setting up, building, testing, and running the Context Forge project. It includes cloning the repository, installing Node.js dependencies, building the project for production, running in development mode, executing tests, and performing code linting.
```bash
git clone https://github.com/webdevtodayjason/context-forge.git
cd context-forge
npm install
npm run build
npm run dev
npm test
npm run lint
```
--------------------------------
### GEMINI.md Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/gemini/README.md
A comprehensive example of a GEMINI.md file, including project overview, quick start commands, context file references, development mode settings, tech stack rules, key commands, integration points, and best practices.
```markdown
# Gemini CLI Configuration
## Project: E-Commerce Platform
### Overview
A modern e-commerce platform with AI-powered product recommendations and real-time inventory management.
### Quick Start
```bash
# Use Gemini CLI for code generation
gemini generate component ProductCard
# Get AI assistance
gemini assist "How do I implement cart persistence?"
# Analyze code
gemini analyze src/
```
### Context Files
- **Project Context**: .gemini/context/project.md
- **Architecture**: .gemini/context/architecture.md
- **Guidelines**: .gemini/context/guidelines.md
### Development Mode
```yaml
mode: development
context_depth: full
include_tests: true
follow_conventions: strict
```
## Tech Stack Rules
- Use Next.js 15 App Router patterns
- Implement React Server Components where appropriate
- Follow file-based routing conventions
### Key Commands
1. **gemini init** - Initialize Gemini in project
2. **gemini context** - View current context
3. **gemini generate** - Generate code from templates
4. **gemini review** - AI code review
5. **gemini test** - Generate tests
### Integration Points
- VS Code: Gemini Code Assist extension
- CLI: Direct terminal access
- CI/CD: Automated code review
### Best Practices
- Keep context files updated
- Use specific prompts
- Review all generated code
- Maintain consistent patterns
```
--------------------------------
### Example .clinerules/rules.md
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cline/README.md
An example rules.md file outlining development rules, code standards, style guides, tech stack rules, project structure, and testing requirements.
```markdown
# Development Rules
## Code Standards
### General Rules
1. **File Size**: Max 500 lines per file
2. **Function Size**: Max 50 lines per function
3. **Complexity**: Keep cyclomatic complexity < 10
4. **Naming**: Use descriptive, self-documenting names
### Style Guide
- Use functional components
- Props interface for TypeScript
- Hooks for state management
- CSS Modules or Tailwind for styling
## Tech Stack Rules
- Use Next.js 15 App Router patterns
- Implement React Server Components where appropriate
- Follow file-based routing conventions
- Use async/await for all endpoints
- Implement Pydantic v2 models
## Project Structure
```
app/
├── src/
│ ├── app/
│ ├── components/
│ └── lib/
├── public/
└── package.json
api/
├── src/
│ ├── routes/
│ ├── services/
│ └── models/
└── package.json
```
## Testing Requirements
- Minimum 80% code coverage
- Write tests for all new features
- Test user behavior, not implementation details
- Include both unit and integration tests
```
--------------------------------
### Enhanced CLAUDE.md Example Structure
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/claude/README.md
An example of an Enhanced CLAUDE.md file, detailing project overview, current development context, migration intelligence, context engineering setup, migration phases, and core development philosophy.
```markdown
# MyProject - Claude Code Context
## Project Overview
A modern web application migrating from React 17 to React 18 with comprehensive migration intelligence.
## Current Development Context
### Migration Status
- **Source**: React 17 + Create React App
- **Target**: React 18 + Vite
- **Phase**: 2/5 - Breaking Changes Resolution
- **Progress**: 60% complete
- **Next Checkpoint**: Breaking changes validation
### Active Sprint
- Resolving React 18 breaking changes
- Migrating from ReactDOM.render to createRoot
- Updating testing library dependencies
## Migration Intelligence
### Framework Detection
- **Primary**: React 17.0.4 (95% confidence)
- **Variant**: Create React App
- **Dependencies**: 23 total, 4 incompatible
### Breaking Changes
- **Total**: 8 changes detected
- **Critical**: 2 (ReactDOM.render, Enzyme deprecation)
- **Automatable**: 6 changes
- **Manual**: 2 changes requiring code review
### Risk Assessment
- **Level**: Medium
- **Key Risks**: Testing framework migration, build tool changes
- **Mitigation**: Phased approach with rollback points
## Context Engineering Setup
This project uses advanced context engineering with migration intelligence.
### Key Files:
- `/CLAUDE.md` - Main project context (this file)
- `/.claude/project.md` - Active development status
- `/Docs/Implementation.md` - Staged development plan
- `/PRPs/migration-overview.md` - Migration strategy
- `/MIGRATION_PLAN.md` - Comprehensive migration plan
- `/BREAKING_CHANGES.md` - Breaking changes documentation
### Slash Commands Available:
- `/migration-status` - Check current progress
- `/prime-context` - Load migration context
- `/breaking-changes` - Review breaking changes
- `/migration-checkpoint [phase]` - Trigger validation
## Migration Phases
### ✅ Phase 1: Setup and Planning (Completed)
- Environment setup with shared resources
- Migration tooling configured
- Rollback strategies documented
### 🔄 Phase 2: Breaking Changes (In Progress)
- **Current Focus**: ReactDOM.render → createRoot migration
- **Status**: 3/8 changes completed
- **Next**: Enzyme → Testing Library migration
### 📅 Phase 3: Dependency Migration (Planned)
- CRA → Vite migration
- Testing framework updates
- Build configuration changes
### 📅 Phase 4: Feature Migration (Planned)
- Component-by-component migration
- State management updates
- Route configuration changes
### 📅 Phase 5: Validation and Cutover (Planned)
- Full regression testing
- Performance validation
- Production deployment
## Core Development Philosophy
### KISS (Keep It Simple, Stupid)
Simplicity should be a key goal in design.
### YAGNI (You Aren't Gonna Need It)
Avoid building functionality on speculation.
### Migration-First Approach
- All changes consider migration compatibility
- Backward compatibility maintained during transition
- Rollback capability at every step
```
--------------------------------
### Example .clinerules/README.md
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cline/README.md
An example README.md file for Cline configuration, outlining project details, context files, Cline settings, and quick reference guidelines.
```markdown
# Cline Configuration
## Project: E-Commerce Platform
A modern e-commerce platform with AI-powered recommendations
## Context Files
- context.md: Project overview and architecture
- rules.md: Development guidelines and standards
- patterns.md: Code patterns and examples
## Cline Settings
```json
{
"autoApprove": false,
"contextWindow": "full",
"includeTests": true,
"verboseMode": false,
"preserveContext": true
}
```
## Quick Reference
- Always check context.md for project understanding
- Follow rules.md for code standards
- Use patterns.md for implementation examples
- Review all AI suggestions before accepting
```
--------------------------------
### Initialize SaaS Dashboard Project
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Initializes a full-stack SaaS dashboard project with Next.js and FastAPI, including features like authentication and real-time updates. It guides through project setup and suggests next steps for development.
```bash
$ context-forge init
? Project name: Analytics Dashboard
? Project type: fullstack
? Project description: Real-time analytics dashboard with data visualization
? How would you like to provide the PRD? Create new PRD
? Frontend framework: nextjs
? Backend framework: fastapi
? Database: postgresql
? Select features: authentication, dashboard, realtime-updates, data-export
? Project timeline: standard
? Team size: small
? Enable PRP generation? Yes
? Enable validation system? Yes
? Enable Human-in-the-Loop checkpoints? Yes
? Enable Claude Code hooks? Yes
✅ Project initialized successfully!
Generated files:
- CLAUDE.md (Next.js 15 specific configuration)
- Docs/Implementation.md (4 development stages)
- Docs/project_structure.md
- PRPs/base.md (Implementation prompt with validation gates)
- .claude/commands/ (20+ slash commands)
- .claude/hooks/ (4 Claude Code hooks)
- .context-forge/config.json
Next steps:
1. cd analytics-dashboard
2. Review CLAUDE.md for project rules
3. Use /prime-context to load project knowledge and activate architect mode
4. Start with Stage 1 in Docs/Implementation.md
```
--------------------------------
### Install Context Forge
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/orchestration/tutorial.md
Installs the Context Forge command-line interface globally using npm.
```bash
npm install -g context-forge
```
--------------------------------
### Start Dev Server Command
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/task.md
Starts the development server for local testing and development.
```bash
{{devCommand}}
```
--------------------------------
### Install and Execute prd-forge CLI Tool
Source: https://github.com/webdevtodayjason/context-forge/blob/main/prd-forge-plan.md
Commands to globally install the `prd-forge` CLI tool using npm and execute it within a project directory. This initiates the interactive documentation generation process, guiding the user through project setup and configuration.
```Bash
# Install globally
npm install -g prd-forge
# Run in project directory
cd my-new-project
prd-forge init
```
--------------------------------
### IDE Configuration Guides Links
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Provides links to detailed guides for configuring Context Forge with specific AI IDEs, outlining the features and formats supported by each.
```markdown
- **[🤖 Claude Code Guide](./docs/ide-configs/claude/)** - Full PRP support, validation system, tech-stack templates
- **[🔵 Cursor IDE Guide](./docs/ide-configs/cursor/)** - PRP support, MDC format, hierarchical rules
- **[🟩 Windsurf Guide](./docs/ide-configs/windsurf/)** - PRP support, Cascade AI integration, workflows
- **[🟢 Cline Guide](./docs/ide-configs/cline/)** - PRP support, context management, code patterns, advanced commands
- **[🟣 Roo Code Guide](./docs/ide-configs/roo/)** - Workspace rules, YAML configuration, team settings
- **[🟠 Gemini Guide](./docs/ide-configs/gemini/)** - PRP support, hierarchical context, CLI commands, Code Assist integration
- **[⚫ GitHub Copilot Guide](./docs/ide-configs/copilot/)** - Custom instructions, VS Code settings, language-specific rules
```
--------------------------------
### Example .clinerules/context.md
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cline/README.md
An example context.md file detailing project information, tech stack, key features, architecture, and development workflow for an e-commerce platform.
```markdown
# Context Management
## Project: E-Commerce Platform
A modern e-commerce platform with real-time inventory management and AI-powered product recommendations.
## Tech Stack
- **frontend**: nextjs
- **backend**: fastapi
- **database**: postgresql
- **auth**: jwt
## Key Features
- User Authentication: JWT-based auth with social login
- Product Catalog: Dynamic listings with advanced search
- Shopping Cart: Persistent storage with real-time updates
- AI Recommendations: Personalized product suggestions
## Development Info
- Timeline: standard
- Team Size: small
## Architecture Overview
### Full-Stack Architecture
- **Frontend**: Next.js 15 with App Router
- **Backend**: FastAPI with async endpoints
- **Database**: PostgreSQL with Redis cache
- **Authentication**: JWT tokens
### Communication
- REST API for client-server communication
- JSON for data exchange
- JWT for authentication tokens
## Key Features
### User Authentication
**Priority**: must-have
**Complexity**: medium
**Description**: Secure authentication with JWT tokens and social login
**Implementation Notes**:
- Use NextAuth.js for frontend
- FastAPI JWT backend
- Social providers: Google, GitHub
### Product Catalog
**Priority**: must-have
**Complexity**: complex
**Description**: Dynamic product listings with search and filtering
**Implementation Notes**:
- Break down into smaller subtasks
- Consider creating a design document first
- Implement search with Elasticsearch
### Shopping Cart
**Priority**: must-have
**Complexity**: medium
**Description**: Persistent cart with real-time updates
**Implementation Notes**:
- Use Redis for cart storage
- WebSocket for real-time updates
- Handle race conditions
## Development Workflow
1. Read task requirements carefully
2. Check existing code patterns
3. Implement following project conventions
4. Test thoroughly before marking complete
5. Update documentation as needed
## Important Files
- Configuration: next.config.js, app/core/config.py
- Entry Points: src/app/layout.tsx, app/main.py
- Core Logic: components/, services/
## External Dependencies
- next: ^15.0.0
- react: ^19.0.0
- typescript: ^5.0.0
- fastapi: ^0.100.0
- pydantic: ^2.0.0
- uvicorn: ^0.23.0
```
--------------------------------
### Cline PRP Workflow Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cline/README.md
Example conversational prompts for interacting with Cline to manage project stages and validation.
```markdown
# Start with Stage 1
"Help me implement Stage 1 tasks from prp-stage-1.md"
# Validate progress
"Run the validation commands from prp-validation.md"
# Move to next stage
"Let's start Stage 2 from prp-stage-2.md"
```
--------------------------------
### Example prd-forge Configuration File
Source: https://github.com/webdevtodayjason/context-forge/blob/main/prd-forge-plan.md
Illustrates the structure and typical parameters of a `prd-forge.json` configuration file. This file can be used to define project details, tech stack, features, and other settings for automated project setup, allowing for non-interactive initialization.
```json
{
"projectName": "TaskMaster Pro",
"projectType": "fullstack",
"description": "Task management platform",
"techStack": {
"frontend": "nextjs",
"backend": "fastapi",
"database": "postgresql",
"auth": "jwt"
},
"features": [
"authentication",
"dashboard",
"crud-operations",
"real-time-updates"
],
"timeline": "mvp",
"teamSize": "small"
}
```
--------------------------------
### Project Context File Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/gemini/README.md
An example of a project context file (.gemini/context/project.md) detailing the e-commerce platform's tech stack, key features, and implementation strategy.
```markdown
# Project Context: E-Commerce Platform
## Project: E-Commerce Platform
A modern e-commerce platform with real-time inventory management and AI-powered product recommendations.
## Tech Stack
- **frontend**: nextjs
- **backend**: fastapi
- **database**: postgresql
- **auth**: jwt
## Key Features
- User Authentication: Secure JWT-based authentication with social login integration
- Product Catalog: Dynamic product listings with advanced search and filtering
- Shopping Cart: Persistent cart storage with real-time updates
- AI Recommendations: Personalized product suggestions using ML
## Development Info
- Timeline: standard
- Team Size: small
## Project Hierarchy
### Level 1: Core Infrastructure
- Development environment setup
- Base project structure
- Core dependencies
- Configuration management
### Level 2: Foundation Features
- **User Authentication**: JWT auth with social providers
- **Product Catalog**: CRUD operations and search
- **Shopping Cart**: Basic cart functionality
### Level 3: Enhanced Features
- **AI Recommendations**: ML-based suggestions
- **Advanced Search**: Elasticsearch integration
- **Real-time Updates**: WebSocket implementation
### Level 4: Nice-to-Have Features
- **Analytics Dashboard**: Business insights
- **A/B Testing**: Feature experiments
- **Mobile App**: React Native companion
## Implementation Strategy
### Timeline: standard
### Standard Strategy (8-12 weeks)
- Week 1-2: Planning and setup
- Week 3-6: Core feature development
- Week 7-9: Enhanced features
- Week 10-11: Testing and optimization
- Week 12: Deployment and documentation
### Team Structure: small
- 2-5 developers
- Shared code ownership
- Regular sync meetings
## Key Files and Directories
```
src/
├── app/ # Next.js app directory
├── components/ # Reusable components
├── lib/ # Utility functions
├── hooks/ # Custom React hooks
└── types/ # TypeScript definitions
app/
├── api/ # API endpoints
├── core/ # Core configuration
├── models/ # Data models
├── schemas/ # Pydantic schemas
└── services/ # Business logic
```
## External Resources
- Documentation: [Next.js Docs](https://nextjs.org/docs), [FastAPI Docs](https://fastapi.tiangolo.com)
- APIs: Internal APIs only
- Libraries: JWT libraries, PostgreSQL drivers
```
--------------------------------
### Example .cursor/rules/project.md
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cursor/README.md
An example of a project-specific rules file for Cursor IDE, detailing project context, key features, implementation stages, and project-specific guidelines.
```markdown
# Project-Specific Rules: E-Commerce Platform
## Project Context
A scalable e-commerce platform with real-time inventory management
## Key Features to Implement
### User Authentication (must-have)
- JWT-based authentication
- Social login integration
- Complexity: medium
- Subtasks:
- Set up auth middleware
- Implement login/register endpoints
- Add password reset functionality
### Product Catalog (must-have)
- Dynamic product listings
- Advanced search and filtering
- Complexity: complex
### Shopping Cart (must-have)
- Persistent cart storage
- Real-time updates
- Complexity: medium
## Implementation Stages
1. **Foundation** - Set up project structure and core dependencies
2. **Core Features** - Implement must-have functionality
3. **Enhancement** - Add should-have features
4. **Polish** - Optimize and refine
## Project-Specific Guidelines
- Use Server Components by default, Client Components only when needed
- Implement proper loading and error states
- Optimize images with next/image
- Use Pydantic for request/response validation
- Implement async endpoints for better performance
```
--------------------------------
### Install tmux
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/orchestration/tutorial.md
Installs tmux on macOS and Ubuntu/Debian systems, and verifies the installation.
```bash
# macOS
brew install tmux
# Ubuntu/Debian
sudo apt-get install tmux
# Verify installation
tmux -V
```
--------------------------------
### FastAPI API Design Principles and Endpoint Examples
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/copilot/README.md
Outlines API design principles for a FastAPI backend, including RESTful conventions, error handling, and versioning. Provides examples for GET and POST requests to manage resources.
```python
# GET /api/v1/resources
@router.get("/resources", response_model=List[ResourceSchema])
async def get_resources(
skip: int = 0,
limit: int = Query(default=100, le=100),
db: Session = Depends(get_db)
):
return await crud.get_resources(db, skip=skip, limit=limit)
# POST /api/v1/resources
@router.post("/resources", response_model=ResourceSchema)
async def create_resource(
resource: ResourceCreateSchema,
db: Session = Depends(get_db),
current_user: User = Depends(get_current_user)
):
return await crud.create_resource(db, resource, current_user.id)
```
--------------------------------
### Example PRP Overview File (prp-overview.mdc)
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cursor/README.md
An example of a PRP overview file in MDC format, specifying project type and global file application settings.
```mdc
---
type: project
globs: ['**/*']
alwaysApply: true
---
```
--------------------------------
### Context Forge Hooks for Automation
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Examples of pre-initialization and post-initialization shell scripts for automation.
```bash
# pre-init.sh - Run before initialization
#!/bin/bash
echo "Setting up environment..."
# post-init.sh - Run after initialization
#!/bin/bash
echo "Installing dependencies..."
npm install
```
--------------------------------
### Changelog Entry Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/task.md
An example of a changelog entry to be used for documenting changes.
```markdown
{{changelogEntry}}
```
--------------------------------
### Example .cursor/rules/global.md
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cursor/README.md
An example of a global rules file for Cursor IDE, covering general coding standards and guidelines for using AI assistance effectively.
```markdown
# Global Cursor Rules
## General Coding Standards
- Write clean, readable, and maintainable code
- Follow language-specific best practices
- Use meaningful commit messages
- Document complex logic
## AI Assistance Guidelines
- Be specific in your prompts
- Review all generated code
- Test thoroughly before committing
- Don't rely solely on AI for critical logic
## Common Patterns
- Use dependency injection
- Implement proper error handling
- Follow SOLID principles
- Write testable code
```
--------------------------------
### Context Forge CLI Installation
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Provides the command to install the Context Forge CLI globally using npm.
```bash
npm install -g context-forge
```
--------------------------------
### Initialize Project with Context Forge
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/README.md
Installs Context Forge globally and initializes a new project.
```bash
npm install -g context-forge
context-forge init
```
--------------------------------
### Environment Configuration
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/spec.md
Example YAML configuration for different deployment environments.
```yaml
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: app-container
image: my-app-image:latest
```
--------------------------------
### Example .cursorrules Configuration
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/cursor/README.md
A comprehensive example of a .cursorrules file, defining project details, development philosophy, code structure, tech stack, file organization, testing, security, and Cursor-specific guidelines.
```markdown
# Cursor Rules for MyProject
## Project: E-Commerce Platform
A modern e-commerce platform with AI-powered recommendations
## Development Philosophy
- Keep It Simple (KISS) - Choose straightforward solutions
- You Aren't Gonna Need It (YAGNI) - Avoid speculative features
- Don't Repeat Yourself (DRY) - Reuse code effectively
## Code Structure Rules
- Never create files longer than 500 lines
- Functions should be focused and single-purpose
- Components/Classes should have single responsibility
- Use descriptive variable and function names
## Tech Stack Rules
- Use Next.js 15 App Router patterns
- Implement React Server Components where appropriate
- Follow file-based routing conventions
- Use async/await for all endpoints
- Implement Pydantic v2 models
## File Organization
```
frontend/
├── src/
│ ├── app/
│ ├── components/
│ └── lib/
└── package.json
backend/
├── app/
│ ├── api/
│ ├── core/
│ └── models/
└── requirements.txt
```
## Testing Requirements
- Minimum 85% code coverage
- Write tests for all new features
- Test user behavior, not implementation details
- Include both unit and integration tests
## Security Guidelines
- Validate all user inputs
- Use environment variables for sensitive data
- Implement proper authentication and authorization
- Follow OWASP security best practices
- Never commit secrets to version control
## Cursor-Specific Guidelines
- Use Cursor's AI features for code generation
- Follow the project's established patterns
- Always review AI-generated code before committing
- Use Cursor's chat for clarification on complex tasks
## Pre-commit Checklist
- [ ] All tests passing
- [ ] Linting passes
- [ ] Type checking passes
- [ ] Documentation updated
- [ ] No debug statements left
- [ ] Security considerations addressed
```
--------------------------------
### Gemini Command Examples with Context and Review
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/gemini/README.md
Examples of using Gemini commands to generate code with specific context depth, review code against guidelines, and test generation with coverage.
```bash
# Generate with context
gemini generate service PaymentService --context full
# Review with guidelines
gemini review src/ --guidelines strict
# Test generation
gemini test src/components/Cart --coverage 90
```
--------------------------------
### Install Context Forge
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/prp-runner.md
Installs the Context Forge CLI tool globally using npm, which includes the PRP Runner.
```bash
npm install -g context-forge
```
--------------------------------
### Context Forge Checkpoint Commands and Example Flow
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Details the commands for managing checkpoints within Context Forge and provides an example of a human verification checkpoint during AI development.
```APIDOC
Context Forge Checkpoint Commands:
/checkpoint [description]
- Creates a manual checkpoint for human verification.
/should-checkpoint
- Prompts the AI to ask if a checkpoint is needed.
/milestone-gate [milestone]
- Initiates verification for a major development milestone.
Example Checkpoint Flow:
🛑 CHECKPOINT: Human Verification Required
Analytics Dashboard - I've completed database schema setup:
✅ What I've Accomplished:
- Created PostgreSQL schema with 5 tables
- Set up foreign key relationships
- Added indexes for query optimization
🧪 Please Test:
1. Run: npm run db:migrate
2. Check tables exist: psql -c "\dt"
3. Verify foreign keys: psql -c "\d+ users"
📋 Critical Verification Points:
- [ ] All tables created successfully
- [ ] Foreign keys properly linked
- [ ] No data loss from existing tables
Please respond:
- ✅ "Approved" - Continue to next task
- ❌ "Issues: [description]" - Fix before proceeding
```
--------------------------------
### Logging Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/spec.md
Demonstrates how to log messages at different levels.
```python
import logging
logging.basicConfig(level=logging.INFO)
logging.info('This is an informational message.')
```
--------------------------------
### Context Forge Configuration File
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Example JSON configuration file for skipping interactive prompts during project initialization.
```json
{
"projectName": "My App",
"projectType": "fullstack",
"description": "A collaborative platform",
"techStack": {
"frontend": "nextjs",
"backend": "fastapi",
"database": "postgresql",
"auth": "jwt"
},
"features": [
{
"id": "auth",
"name": "Authentication",
"priority": "must-have"
}
],
"extras": {
"prp": true,
"validation": true,
"docker": true
}
}
```
--------------------------------
### Optimization Strategy Implementation
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/spec.md
Code examples for implementing optimization strategies in different areas.
```python
def optimize_query(query):
# Implementation details for query optimization
return optimized_query
```
--------------------------------
### Context Forge Orchestration Commands
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/orchestration/IMPLEMENTATION.md
Provides examples of common commands for deploying, monitoring, and checking the status of the Context Forge orchestration.
```bash
# Deploy orchestration for a project
context-forge orchestrate medium
# Monitor in real-time
tmux attach -t cf-myproject
# Check status via CLI
context-forge orchestrate-status
```
--------------------------------
### Gemini CI/CD Integration Examples
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/gemini/README.md
Configuration snippets for integrating Gemini into CI/CD pipelines for code reviews and test generation.
```yaml
# .github/workflows/gemini.yml
- name: Gemini Code Review
run: gemini review --changed-files --strict
- name: Generate Missing Tests
run: gemini test --missing --min-coverage 80
```
--------------------------------
### Initialize Project with Startup MVP Preset
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Initializes a project with the 'startup-mvp' preset, focusing on rapid development for a Minimum Viable Product. It includes steps for reviewing the implementation plan and validating progress.
```bash
# 1. Initialize with MVP timeline
context-forge init --preset startup-mvp
# 2. Review generated Implementation.md
cat Docs/Implementation.md
# Shows 2-week sprint plan with daily tasks
# 3. Start development with Claude Code
# Open CLAUDE.md in Claude Code
# Follow Stage 1 tasks systematically
# 4. Validate progress daily
context-forge validate --levels syntax,tests
```
--------------------------------
### Initialize Project Using Configuration File
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Initializes a full-stack e-commerce platform project using a JSON configuration file. This demonstrates how to define project name, type, description, PRD details, tech stack, and various features.
```json
# context-forge.json
{
"projectName": "E-Commerce Platform",
"projectType": "fullstack",
"description": "Modern e-commerce platform with AI recommendations",
"prd": {
"content": "# E-Commerce Platform\n\n## Overview\n...",
"features": [
{
"id": "auth",
"name": "User Authentication",
"priority": "must-have",
"complexity": "medium"
},
{
"id": "catalog",
"name": "Product Catalog",
"priority": "must-have",
"complexity": "complex"
},
{
"id": "cart",
"name": "Shopping Cart",
"priority": "must-have",
"complexity": "medium"
},
{
"id": "ai-recommendations",
"name": "AI Product Recommendations",
"priority": "should-have",
"complexity": "complex"
}
]
},
"techStack": {
"frontend": "react",
"backend": "django",
"database": "postgresql",
"cache": "redis",
"search": "elasticsearch"
},
"extras": {
"prp": true,
"validation": true,
"docker": true,
"cicd": true,
"testing": true
}
}
# Run with config
$ context-forge init --config context-forge.json --output ecommerce-platform
```
--------------------------------
### API V1 Users Request Specs
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/claude/tech-stacks/ruby-on-rails.md
RSpec tests for the API V1 users endpoint, covering GET and POST requests. It includes setup for authentication and user data, and assertions for response status and content.
```ruby
require 'rails_helper'
RSpec.describe 'Api::V1::Users', type: :request do
let(:user) { create(:user) }
let(:headers) { { 'Authorization' => "Bearer #{generate_token(user)}" } }
describe 'GET /api/v1/users' do
let!(:users) { create_list(:user, 3) }
it 'returns a list of users' do
get '/api/v1/users', headers: headers
expect(response).to have_http_status(:ok)
expect(json_response.size).to eq(4) # 3 + authenticated user
end
end
describe 'POST /api/v1/users' do
let(:valid_params) do
{
user: {
email: 'new@example.com',
name: 'New User',
password: 'Password123',
password_confirmation: 'Password123'
}
}
end
it 'creates a new user' do
expect {
post '/api/v1/users', params: valid_params, headers: headers
}.to change(User, :count).by(1)
expect(response).to have_http_status(:created)
expect(json_response['email']).to eq('new@example.com')
end
end
end
```
--------------------------------
### Project Initialization
Source: https://github.com/webdevtodayjason/context-forge/blob/main/RELEASE_NOTES_v3.2.0.md
Initializes a new project for use with Context Forge, setting up the necessary configurations for AI agent deployment.
```bash
context-forge init
```
--------------------------------
### JavaScript Object for Pre-defined Tech Stack Configurations
Source: https://github.com/webdevtodayjason/context-forge/blob/main/prd-forge-plan.md
This JavaScript object stores pre-defined configurations for various tech stacks like Next.js and FastAPI. Each entry includes details such as name, type (frontend/backend), documentation links, structure, dependencies, and example files, facilitating consistent project setup.
```javascript
// Pre-defined tech stack combinations with documentation links
const techStacks = {
nextjs: {
name: "Next.js",
type: "frontend",
docs: "https://nextjs.org/docs",
structure: "app-router", // or "pages-router"
dependencies: ["react", "react-dom", "next"],
devDependencies: ["@types/react", "typescript", "eslint"]
},
fastapi: {
name: "FastAPI",
type: "backend",
docs: "https://fastapi.tiangolo.com/",
structure: "modular",
dependencies: ["fastapi", "uvicorn", "sqlalchemy", "pydantic"],
files: ["main.py", "requirements.txt", ".env.example"]
}
// ... more configurations
};
```
--------------------------------
### Component JSDoc Documentation Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/claude/tech-stacks/nextjs-15.md
Provides an example of JSDoc comments for documenting React components, including a description, `@component` tag, and an `@example` tag with a usage snippet.
```typescript
/**
* Component description
*
* @component
* @example
*
*/
```
--------------------------------
### Component JSDoc Documentation Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/src/templates/claude/tech-stacks/nextjs-15.md
Provides an example of JSDoc comments for documenting React components, including a description, `@component` tag, and an `@example` tag with a usage snippet.
```typescript
/**
* Component description
*
* @component
* @example
*
*/
```
--------------------------------
### Initialize prd-forge CLI Project
Source: https://github.com/webdevtodayjason/context-forge/blob/main/prd-forge-plan.md
Demonstrates various ways to initialize a new project using the `prd-forge init` command, including specifying output directories, using preset configurations, and providing a configuration file to skip interactive mode.
```bash
# Initialize in current directory
prd-forge init
# Specify output directory
prd-forge init --output ./my-project
# Use preset configurations
prd-forge init --preset nextjs-fastapi
# Skip interactive mode with config file
prd-forge init --config prd-forge.json
```
--------------------------------
### Unit Test Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/spec.md
An example of a unit test case for a specific component.
```python
import unittest
class TestMyComponent(unittest.TestCase):
def test_addition(self):
self.assertEqual(add(2, 3), 5)
```
--------------------------------
### Scale Context Forge Team Size
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/orchestration/tutorial.md
Demonstrates scaling the AI team size over time, starting small and increasing capacity as needed.
```bash
# Day 1: Small team
context-forge orchestrate small
# Day 3: Scale to medium
context-forge orchestrate medium
# Week 2: Full team if needed
context-forge orchestrate large
```
--------------------------------
### Custom Command Usage Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/slash-commands.md
Example of how to use a custom command with parameters in Claude Code.
```bash
/my-project-command parameters
```
--------------------------------
### Integration Test Execution Commands
Source: https://github.com/webdevtodayjason/context-forge/blob/main/src/templates/prp/base.md
Commands for performing integration tests, including starting the service and executing specific test requests or scenarios to verify interactions between different system components.
```bash
{{validationCommands.start}}
# Test the endpoint
{{#each integrationTests}}
{{this}}
{{/each}}
# Expected: {{expectedResult}}
```
--------------------------------
### Context Forge CLI Initialization and Hooks
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Demonstrates how to initialize a new project with Context Forge, including options for enabling Claude Code hooks and copying hooks from a repository.
```bash
# Generate project with hooks
context-forge init # Select "Enable Claude Code hooks? Yes"
# Or copy hooks from another project
context-forge copy-hooks --source ../claude-hooks-repo/hooks
# Hooks are created in:
# .claude/hooks/
```
--------------------------------
### Deployment and Creative Validation Steps
Source: https://github.com/webdevtodayjason/context-forge/blob/main/src/templates/prp/base.md
Outlines commands or instructions related to deployment and custom validation steps specific to the feature, ensuring the deployed solution meets all requirements and behaves as expected in a production-like environment.
```bash
{{#each validationCommands.deployment}}
# {{this}}
{{/each}}
# Custom validation specific to this feature:
{{#each customValidation}}
# - {{this}}
{{/each}}
```
--------------------------------
### Example Workflow: Performance Optimization
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/slash-commands.md
An example workflow for performance optimization, covering analysis, optimization steps, and verification of improvements.
```bash
# 1. Analyze current performance
/performance-analyze API response times
# 2. Optimize
/performance-optimize database queries
# 3. Verify improvements
/benchmark-compare before after
```
--------------------------------
### Installation Command
Source: https://github.com/webdevtodayjason/context-forge/blob/main/RELEASE_NOTES_v3.2.0.md
Installs the Context Forge CLI globally using npm, enabling access to its project orchestration features.
```javascript
npm install -g context-forge@3.2.0
```
--------------------------------
### Validation Commands - Integration and Deployment
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/prp/base.md
Includes commands for starting the service, executing integration tests against endpoints, and deployment steps.
```bash
# Start the service
{{validationCommands.start}}
# Test the endpoint
{{#each integrationTests}}
{{this}}
{{/each}}
# Expected: {{expectedResult}}
```
```bash
{{#each validationCommands.deployment}}
# {{this}}
{{/each}}
# Custom validation specific to this feature:
{{#each customValidation}}
# - {{this}}
{{/each}}
```
--------------------------------
### Django Custom Middleware Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/templates/claude/tech-stacks/django.md
Provides an example of creating custom middleware in Django for processing requests and responses, such as logging.
```python
from django.utils.deprecation import MiddlewareMixin
from typing import Optional
class RequestLoggingMiddleware(MiddlewareMixin):
def process_request(self, request: HttpRequest) -> Optional[HttpResponse]:
# Log request details
return None
def process_response(
self, request: HttpRequest, response: HttpResponse
) -> HttpResponse:
# Log response details
return response
```
--------------------------------
### Django Custom Middleware Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/src/templates/claude/tech-stacks/django.md
Provides an example of creating custom middleware in Django for processing requests and responses, such as logging.
```python
from django.utils.deprecation import MiddlewareMixin
from typing import Optional
class RequestLoggingMiddleware(MiddlewareMixin):
def process_request(self, request: HttpRequest) -> Optional[HttpResponse]:
# Log request details
return None
def process_response(
self, request: HttpRequest, response: HttpResponse
) -> HttpResponse:
# Log response details
return response
```
--------------------------------
### Example Workflow: Bug Fix
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/slash-commands.md
An example workflow illustrating the steps for fixing a bug, including analysis, fixing with tests, and integration testing.
```bash
# 1. Analyze the issue
/debug-analyze users report login timeout
# 2. Fix with tests
/fix-bug login timeout after 30 seconds
# 3. Verify
/test-integration login flow
```
--------------------------------
### Custom Templates for Context Forge
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Examples of creating custom tech stack and validation command templates in the user's home directory.
```bash
# Custom tech stack template
~/.context-forge/templates/claude/my-stack.md
# Custom validation commands
~/.context-forge/templates/validation/my-validation.json
```
--------------------------------
### Context Forge CLI Basic Usage
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Illustrates fundamental commands for using the Context Forge CLI, including initialization, validation, analysis, and running PRPs.
```bash
# Initialize a new project
context-forge init
# Or use npx without installation
npx context-forge init
# Initialize in current directory
context-forge init
# Specify output directory
context-forge init --output ./my-project
# Use with existing PRD file
context-forge init --prd ./requirements.md
# Skip interactive prompts with config
context-forge init --config ./context-forge.json
# Run validation on existing project
context-forge validate
# Retrofit existing projects with AI-optimized documentation
context-forge analyze
# Execute PRPs with Claude Code for one-pass implementation
context-forge run-prp feature-name
# NEW: Plan technology migration
context-forge migrate --target "Next.js"
# NEW: Copy Claude Code hooks from another project
context-forge copy-hooks --source ../claude-hooks-repo/hooks
```
--------------------------------
### Initialize Project for Hackathon
Source: https://github.com/webdevtodayjason/context-forge/blob/main/README.md
Initializes a project for a 24-hour hackathon, prioritizing speed and skipping non-essential features like detailed PRPs and extensive validation.
```bash
# 1. Quick setup
npx context-forge init --preset hackathon
# 2. Skip optional features
# - Disable PRP (too detailed for hackathon)
# - Basic validation only
# - Focus on core features
# 3. Get building in < 5 minutes
# CLAUDE.md has simplified rules for rapid development
```
--------------------------------
### Context Forge API Rate Limiting Specification Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/enhanced-prp-templates.md
An example of a technical specification context for API Rate Limiting using the 'spec' template.
```markdown
# Technical Specification: API Rate Limiting
```
--------------------------------
### Initialize Context Forge Project
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/orchestration/tutorial.md
Initializes Context Forge within an existing project directory.
```bash
cd your-project
context-forge init
```
--------------------------------
### Example Workflow: Full Feature Implementation
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/slash-commands.md
A comprehensive example workflow demonstrating the sequence of commands for implementing a new feature, from context loading to documentation.
```bash
# 1. Load context
/prime-context
# 2. Create comprehensive PRP
/prp-create user notification system with email and SMS
# 3. Review and execute
/prp-execute user-notification-system
# 4. Generate tests
/test-create notification service
# 5. Document
/doc-api notification endpoints
```
--------------------------------
### File-to-Task Mapping Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/dart-integration.md
Example JSON structure for `.claude/task_mapping.json`, detailing the relationships between code files, tasks, and their inferred categories, along with confidence scores.
```json
{
"mappings": [
{
"file_path": "src/auth/login.ts",
"task_id": "auth_login",
"task_category": "auth",
"confidence": 0.9,
"action": "Edit",
"timestamp": "2024-01-15T10:30:00Z"
}
]
}
```
--------------------------------
### PRP Overview for E-Commerce Platform Implementation
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/ide-configs/copilot/README.md
Provides an overview of Product Requirement Prompts (PRP) as a methodology for implementing features with structured validation gates, aiding GitHub Copilot in understanding project phases.
```markdown
# PRP Implementation Overview: E-Commerce Platform
## What is PRP?
Product Requirement Prompts (PRP) provide a structured approach to implementing features with clear validation gates between stages. This methodology helps GitHub Copilot understand your project's implementation phases and success criteria.
```
--------------------------------
### Validation Gate Example
Source: https://github.com/webdevtodayjason/context-forge/blob/main/docs/claude-features/orchestration-workflow.md
Example of validation gates applied to implementation steps, showing syntax checks, unit tests, integration tests, and security scans.
```markdown
Step 1: Create model ✓
→ Syntax check ✓
→ Unit tests ✓
Step 2: Add endpoints ✓
→ Integration tests ✓
→ Security scan ✓
```