A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
ContextX: Context-driven AI development framework powered by Claude Code. Transform documents into complete projects wit
From Documents to Code - Let AI Understand Your Complete Intent
Context engineering framework based on Claude Code that intelligently analyzes project complexity and automatically selects the most suitable development workflow.
Core Advantages: One-Click Project Generation • Context-Aware • Zero-Config Startup
English | 简体中文
ContextX is a context engineering framework powered by Claude Code that automatically generates complete code projects from your documents and requirement descriptions.
Step 1: Get the Framework
git clone https://github.com/yzfly/ContextX.git
cd ContextX
Step 2: Prepare Project Context
# Prepare your project materials in the .contextx directory
.contextx/
├── TASK_PROMPT.md # Project requirements description
├── data/ # Related documentation
└── examples/ # Reference code (optional)
Step 3: Generate Project
# Claude Code will automatically analyze complexity and choose the right workflow
claude "/create Your project requirements description"
Create a simple Todo application:
# 1. Prepare requirements description
echo "Create a React Todo app with add, delete, and mark complete functionality" > .contextx/TASK_PROMPT.md
# 2. Run generation command
claude "/create React-based Todo application"
# 3. View generated results
ls -la # Check generated project files
AI programming paradigm driven by Markdown documents, where documents serve as the project's knowledge base and context source.
Philosophy: We used to program with code, now we program with documents
System automatically analyzes task complexity and selects the most suitable agent workflow:
Simple Tasks → Builder Agent (Direct Build)
Medium Tasks → Designer → Builder (Design then Build)
Complex Tasks → Learner → Designer → Builder (Learn-Design-Build)
| Agent | Responsibility | Trigger Condition |
|---|---|---|
| Learner | Learn and organize external docs, analyze technical specs | Need to understand complex docs or new technologies |
| Designer | Requirements analysis, architecture design, solution planning | Need system design and technology selection |
| Builder | Code implementation, documentation, deployment config | Required for all projects |
.contextx/
├── TASK_PROMPT.md # [Required] Project requirements description
├── data/ # [Optional] Related documentation
│ ├── api_docs.md # API documentation
│ ├── business_rules.md # Business rules
│ └── web_docs.md # Web links (auto-fetch)
├── examples/ # [Optional] Reference code
│ ├── template.js # Code templates
│ └── reference.py # Reference implementations
├── knowledge/ # [Auto-generated] Structured knowledge base
└── PRC.md # [Auto-generated] Project requirements document
Basic Template:
# Project Requirements
## Project Overview
[One-sentence description of project goal]
## Functional Requirements
- [ ] Feature 1
- [ ] Feature 2
## Technical Requirements
- Programming Language:
- Framework Choice:
- Database: (if needed)
## Special Requirements
[Any special implementation requirements or constraints]
Advanced Template (Complex Projects):
# Project Requirements
## Background
[Project background and business value]
## User Stories
- As a [user role], I want [feature description], so that [business value]
## Functional Requirements
### Core Features
- [ ] Detailed feature description 1
- [ ] Detailed feature description 2
### Extended Features
- [ ] Optional feature 1
## Non-Functional Requirements
- Performance Requirements:
- Security Requirements:
- Maintainability:
## Technical Architecture
- Frontend Tech Stack:
- Backend Tech Stack:
- Data Storage:
- Deployment Method:
## Constraints
[Technical constraints, time constraints, etc.]
To enhance network search capabilities, install:
# 1. Install context-mcp-server
claude mcp add context-mcp-server -e CONTEXT_DIR=$(pwd)/context/knowledge -- uvx context-mcp-server
# 2. Verify installation
claude mcp list
Add web links to fetch in data/web_docs.md:
# Web Document Links
## API Documentation
- https://docs.example.com/api/v1
- https://developer.example.com/guides
## Technical References
- https://framework.example.com/docs
┌───────────────────────────────┐
│ /create Entry │
│ Intelligent Complexity │
│ Analysis │
└──────────────┬────────────────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Simple Tasks │ │ Medium Tasks │ │ Complex Tasks │
│ │ │ │ │ │
│ Builder │ │ Designer │ │ Learner │
│ │ │ ↓ │ │ ↓ │
│ │ │ Builder │ │ Designer │
│ │ │ │ │ ↓ │
│ │ │ │ │ Builder │
└───────┬───────┘ └───────┬───────┘ └───────┬───────┘
│ │ │
└──────────────────────┼──────────────────────┘
│
▼
┌───────────────────────────────┐
│ Complete Project Delivery │
│ • Fully functional source code│
│ • Detailed project docs │
│ • Deployment configuration │
│ • Usage instructions │
└───────────────────────────────┘
Responsibility: Knowledge organization and learning
Input: Raw documents, web links, technical materials
Output: Structured documents in .contextx/knowledge/ directory
Responsibility: Requirements analysis and architecture design
Input: Task requirements, knowledge base, technical constraints
Output: .contextx/PRC.md project requirements document
Responsibility: Code implementation and project delivery
Input: Project requirements document, design plan, code examples Output: Complete project code and documentation
User Input Requirements
│
▼
┌─────────────────┐
│ Requirements │ ── Generate/optimize TASK_PROMPT.md
│ Preprocessing │
└─────┬───────────┘
│
▼
┌─────────────────┐
│ Context Resource│ ── Check data/, examples/ directories
│ Scanning │
└─────┬───────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ Intelligent │ ──→ │ Simple: Direct │
│ Complexity │ │ Build │
│ Assessment │ └─────────────────┘
│ │ ┌─────────────────┐
│ Assessment │ ──→ │ Medium: Design │
│ Dimensions: │ │ + Build │
│ • Requirement │ └─────────────────┘
│ Clarity │ ┌─────────────────┐
│ • Technical │ ──→ │ Complex: Full │
│ Difficulty │ │ Process │
│ • External │ └─────────────────┘
│ Dependencies │
│ • Material │
│ Completeness │
└─────────────────┘
Create custom agents in the .claude/agents/ directory:
# custom_agent.md
## Role Definition
[Description of agent's responsibilities and capabilities]
## Workflow
[Detailed work steps]
## Input/Output
- Input: [Expected input format]
- Output: [Output format and content]
Add custom commands in the .claude/commands/ directory:
# custom_command.md
## Command Description
/custom - Custom functionality description
## Usage
[Specific usage of the command]
## Parameter Description
[Detailed parameter explanations]
Edit .claude/settings.local.json for personalized configuration:
{
"default_model": "claude-3-5-sonnet-20241022",
"context_window": 200000,
"temperature": 0.7,
"custom_settings": {
"preferred_language": "en-US",
"code_style": "standard",
"documentation_level": "detailed"
}
}
# 1. Prepare requirements
cat > .contextx/TASK_PROMPT.md << EOF
# Blog Management System
## Project Overview
Create a simple blog management system supporting CRUD operations for articles.
## Functional Requirements
- [ ] User registration and login
- [ ] Article list display
- [ ] Article detail view
- [ ] Article editing and publishing
- [ ] Article deletion
## Technical Requirements
- Frontend: React + TypeScript
- Backend: Node.js + Express
- Database: SQLite
- Styling: Tailwind CSS
EOF
# 2. Run generation
claude "/create Blog management system development"
# 1. Prepare API documentation
mkdir -p .contextx/data
cat > .contextx/data/api_docs.md << EOF
# Third-party API Documentation
## User API
- GET /api/users - Get user list
- POST /api/users - Create user
- PUT /api/users/:id - Update user
- DELETE /api/users/:id - Delete user
## Authentication
Bearer Token authentication
EOF
# 2. Prepare requirements
cat > .contextx/TASK_PROMPT.md << EOF
# User Management Client
Based on the provided API documentation, create a user management frontend application.
Need to implement complete CRUD operations with user-friendly interface.
EOF
# 3. Run generation
claude "/create User management client development"
A:
A:
.contextx/TASK_PROMPT.md is clearly describeddata/ directoryPRC.md to see if the system understands correctlyA:
We welcome all forms of contributions!
# 1. Clone your fork
git clone https://github.com/your-username/ContextX.git
cd ContextX
# 2. Create feature branch
git checkout -b feature/your-feature-name
# 3. Develop
# ... your code changes
# 4. Commit changes
git add .
git commit -m "feat: add your feature description"
# 5. Push branch
git push origin feature/your-feature-name
# 6. Create Pull Request
This project is open source under the Apache 2.0 License.
Thanks to all developers and users who contributed to the project!
Core Contributors:
Special Thanks:
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live
npx CLI installing 100+ agents, commands, hooks, and integrations in one command
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
Pocket Flow: Codebase to Tutorial