An open API service indexing awesome lists of open source software.

https://github.com/keyboardcowboy/ai-context-kitchen

A system for organizing AI context window rules and files to create efficient and accurate agents.
https://github.com/keyboardcowboy/ai-context-kitchen

Last synced: 4 months ago
JSON representation

A system for organizing AI context window rules and files to create efficient and accurate agents.

Awesome Lists containing this project

README

          

# AI Agent Context Framework

![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
![Framework](https://img.shields.io/badge/framework-Anthropic%20Claude-purple.svg)
![Status](https://img.shields.io/badge/status-active-brightgreen.svg)

A four-tiered system for maximizing AI agent accuracy and efficiency through structured context window seeding, built on Anthropic's prompt engineering best practices.

## What This Framework Does

Instead of writing one massive prompt, you build AI agents by combining four types of reusable components:

1. **Role** - Who the agent is and what they know (direct prompts)
2. **Rules** - How to accomplish specific tasks (XML structured)
3. **Background** - Essential facts and context (XML structured)
4. **Interaction** - How the agent communicates (direct prompts)

**Key Insight**: Separate expertise (WHAT) from communication style (HOW). This lets you mix and match - same expert knowledge with different personalities.

## Why This Works

Built on Anthropic's proven techniques:
- **Direct prompts** for simple role definitions and communication
- **XML structure** for complex, organized content
- **Role prompting** for domain expertise
- **Optimized** for Claude's capabilities

## Project Structure

```
context-kitchen/
├── 1-roles/ # Who the agent is (direct prompts)
├── 2-background/ # Essential facts (XML structured)
├── 3-rules/ # How to do tasks (XML structured)
└── 4-interaction/ # How to communicate (direct prompts)
```

Each folder contains:
- **Root files**: No prefix (e.g., `seo-expert.md`)
- **Subfolder files**: Use folder name as prefix (e.g., `example-seo-expert.md`)

## Quick Start

```bash
# 1. Choose your components
Role: SEO Expert
Rules: research-analysis, content-optimization
Background: business-context
Interaction: collaborative-learning

# 2. Combine in your prompt
You are a [Role] with expertise in [Background].
Follow these [Rules] and communicate using [Interaction] style.
```

## Installation

This framework works with any AI system that supports:
- Direct system prompts
- XML structured content
- Multi-component context loading

### Prerequisites
- Basic understanding of prompt engineering
- Text editor for managing components

## How to Use

1. **Pick a Role** - Choose one that matches your objective
2. **Add Rules** - Select 2-4 that support the role's tasks
3. **Include Background** - Add relevant facts and context
4. **Set Interaction Style** - Choose how the agent communicates

## Component Guidelines

### Roles (Choose 1)
- **What**: Domain expertise and professional identity
- **Focus**: WHO and WHAT, not HOW (that's for rules)
- **Format**: Direct prompts, no XML

### Rules (Choose 2-4)
- **What**: Complete, standalone processes
- **Focus**: HOW to accomplish specific tasks
- **Format**: XML structured for complex procedures

### Background (Choose relevant ones)
- **What**: Essential facts and context
- **Focus**: Lean, fact-focused content without fluff
- **Format**: XML structured for organized knowledge

### Interaction (Choose 1)
- **What**: Communication style and personality
- **Focus**: HOW the agent behaves, not WHAT it knows
- **Format**: Direct prompts, no XML

## Example Configurations

**Research & Analysis**
- Role: SEO Expert + Research rules + Business background + Interview mode

**Content Creation**
- Role: Content Specialist + Writing rules + Brand background + Quick artifact

**Financial Planning**
- Role: Financial Advisor + Planning rules + Family background + Plan-act mode

## Key Principles

**Separation of Concerns**
- **Roles**: WHO and WHAT (expertise)
- **Rules**: HOW (processes)
- **Background**: Facts and context
- **Interaction**: HOW (communication)

**Conflict Resolution**
- Role takes precedence for decisions
- Background facts override assumptions
- Rules override general guidance
- Interaction style overrides communication

## Quality Checklist

- [ ] One role selected
- [ ] 2-4 relevant rules included
- [ ] Appropriate background knowledge added
- [ ] Compatible interaction style chosen
- [ ] No major conflicts between tiers
- [ ] Complete coverage for intended purpose

## Benefits

- **Modular**: Mix and match components
- **Reusable**: Build a library of configurations
- **Consistent**: Standardized format
- **Efficient**: Optimized context window usage
- **AI-Friendly**: Built for maximum performance

## Contributing

We welcome contributions! Here's how to get started:

1. **Fork the repository**
2. **Create a new component** following our naming conventions
3. **Test your component** with different configurations
4. **Submit a pull request** with clear descriptions

### Component Guidelines
- **Roles**: Focus on WHO and WHAT, not HOW
- **Rules**: Complete, standalone processes
- **Background**: Lean, fact-focused content
- **Interaction**: Communication style only

### Naming Conventions
- **Root files**: No prefix (e.g., `seo-expert.md`)
- **Subfolder files**: Use folder name as prefix (e.g., `example-seo-expert.md`)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

- 📖 [Documentation](docs/)
- 💬 [Discussions](https://github.com/your-org/context-kitchen/discussions)
- 🐛 [Issues](https://github.com/your-org/context-kitchen/issues)
- 📧 [Email](mailto:support@example.com)