"Context engineering is the delicate art and science of filling the context window with just the right information for the next step." — Andrej Karpathy
Thank you for your interest in contributing to the Context Engineering repository! This document outlines the process and guidelines for contributing to this project, which aims to operationalize the latest research on context with first principles and visuals.
Our approach to context engineering follows a biological metaphor of increasing complexity:
atoms → molecules → cells → organs → neural systems → neural fields
│ │ │ │ │ │
single few- memory/ multi- cognitive tools + context = fields +
prompt shot agents agents prompt programs persistence & resonance
All contributions should align with our implementation strategy:
- Layered Approach: Build from foundational concepts to advanced integration
- Practical Focus: Ensure all theory has corresponding practical implementation
- Modular Design: Create composable components that can be recombined
- Progressive Complexity: Start simple, add sophistication incrementally
- Integration Emphasis: Focus on how components work together, not just individually
- Self-Improvement: Build systems that can enhance themselves
- Transparency: Ensure operations remain understandable despite complexity
- Collaboration: Design for effective human-AI partnership
- Modal Flexibility: Support unified understanding across different modalities
We welcome several types of contributions:
- New models for understanding context engineering
- Extensions to existing frameworks
- Integration of research from cognitive science, linguistics, or AI
- Examples demonstrating context engineering principles
- Tools for context management and optimization
- Libraries for context engineering operations
- Guides explaining core concepts
- Step-by-step tutorials
- Case studies showing context engineering in practice
- Diagrams illustrating context engineering concepts
- Visualizations of context dynamics
- Interactive demonstrations
- Summaries of relevant academic papers
- Implementations of research findings
- Bridges between research and practical applications
-
Fork the repository
- Click the "Fork" button at the top right of the repository page
-
Clone your fork locally
git clone https://github.com/YOUR-USERNAME/Context-Engineering.git cd Context-Engineering -
Create a new branch for your contribution
git checkout -b feature/your-feature-name
-
Align with existing structures
- Place new code in appropriate directories based on the repository structure
- Follow the established naming conventions
-
Documentation
- Include docstrings for all functions and classes
- Add comments explaining complex sections
- Update relevant README files
-
Testing
- Add tests for new functionality
- Ensure existing tests pass
-
Examples
- Provide practical examples showing how to use your contribution
- Include expected outputs or behaviors
-
Follow the documentation style
- Use Markdown for all documentation
- Maintain consistent formatting
- Use clear, concise language
-
Progressive disclosure
- Start with basic concepts
- Build up to more complex ideas
- Include both "how" and "why" explanations
-
Visual aids
- Include diagrams when helpful
- Use ASCII art for simple illustrations
- Add mermaid diagrams for complex concepts
-
Commit your changes
git add . git commit -m "Add feature X" -m "Detailed description of changes"
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Select "compare across forks"
- Select your fork and branch
- Fill out the PR template
-
Address feedback
- Respond to reviewer comments
- Make requested changes
- Push additional commits to your branch
- Python: Follow PEP 8 style guide
- JavaScript: Follow Airbnb JavaScript Style Guide
- Jupyter notebooks: Clear outputs before committing
- Dependencies: Minimize external dependencies
- Language: Clear, concise, and accessible
- Structure: Progressive disclosure of concepts
- Examples: Include practical examples for all concepts
- References: Cite relevant research and sources
- Diagrams: Simple, clear, and informative
- Colors: Use a consistent color scheme
- Accessibility: Ensure visuals work for colorblind users
- Format: Prefer vector formats (SVG) when possible
Understand our repository structure to place your contributions appropriately:
context-engineering/
├── 00_foundations/ # First-principles theory
├── 10_guides_zero_to_hero/ # Hands-on tutorials
├── 20_templates/ # Reusable components
├── 30_examples/ # Practical implementations
├── 40_reference/ # Deep-dive documentation
├── 50_contrib/ # Community contributions
├── 60_protocols/ # Protocol shells and frameworks
├── 70_agents/ # Agent demonstrations
├── 80_field_integration/ # Complete field projects
├── 90_meta_recursive/ # Meta-level systems
└── cognitive-tools/ # Advanced cognitive framework
When adding new content, place it in the appropriate directory based on its complexity level and purpose.
- Be respectful and inclusive
- Focus on ideas, not individuals
- Provide constructive feedback
- Ask questions to clarify, not challenge
- Share knowledge generously
- Help others succeed
- Credit original ideas and work
- Seek consensus for major changes
- Break down complex tasks for easier contribution
- Mentor new contributors when possible
All contributions will be reviewed based on:
- Alignment with project philosophy and goals
- Quality of implementation or documentation
- Practicality and usability
- Clarity of explanation
- Integration with existing components
- Progressive complexity appropriate for its section
- Transparency in operation and explanation
- Initial review: Within 7 days
- Subsequent reviews: Within 3 days
- Final decision: Within 30 days of initial submission
Contributors will be recognized in several ways:
- Addition to repo and CONTRIBUTORS.md file
- Mention in release notes
- Acknowledgment in relevant documentation
- Opportunities for deeper involvement based on consistent contributions
- Read the
00_foundations/directory to understand core concepts - Work through
10_guides_zero_to_hero/for hands-on experience - Review the relevant academic papers in CITATIONS.md
-
Environment setup
# Create a virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Install development dependencies pip install -r requirements-dev.txt
-
Editor configuration
- See
.editorconfigfor basic settings - Recommended VS Code extensions are listed in
.vscode/extensions.json
- See
-
Pre-commit hooks
pip install pre-commit pre-commit install
- Open an issue for general questions
- Join our community discussions in GitHub Discussions
- For complex discussions, email the maintainers (see MAINTAINERS.md)
good first issue: Perfect for newcomersdocumentation: Documentation improvementsenhancement: New features or improvementsbug: Something isn't workingresearch: Research-related topicsvisualization: Visual componentstheory: Theoretical conceptsimplementation: Code implementation
We've designed multiple pathways for contributors with different backgrounds:
- Add research summaries
- Implement paper findings
- Create research-based examples
- Develop evaluation metrics
- Implement core functionality
- Create libraries and tools
- Optimize existing code
- Add testing frameworks
- Develop tutorials
- Create explanatory content
- Design interactive examples
- Build visualization tools
- Add real-world case studies
- Share practical insights
- Develop best practices
- Create application templates
Your contributions are vital to advancing the field of context engineering. By following these guidelines, you'll help create a coherent, practical, and impactful resource for the community.
Remember our core principle:
"The convergence of cognitive tools, symbolic mechanisms, quantum semantics, and memory-reasoning synergy represents a paradigm shift in how we engineer intelligent systems—moving from simple prompt engineering to comprehensive context engineering and cognitive architecture design."
Thank you for being part of this journey!
This CONTRIBUTING.md is itself a living document. If you have suggestions for improving it, please open an issue or submit a pull request.