A human-readable, hierarchical standard for providing context to AI coding assistants
You spend time explaining the same project context to every AI coding assistant:
- "This is a React TypeScript project using Next.js..."
- "Follow these coding standards..."
- "The architecture works like this..."
- "Don't touch the legacy auth code..."
Then you switch tools and start over. There has to be a better way.
AI Context Standard provides a simple .aicontext
file format that any AI tool can understand:
---
version: "1.0"
---
# My React App
## Overview
A React TypeScript project using Next.js 14 with App Router.
## Architecture
- `/app` - Next.js pages and layouts
- `/components` - Reusable UI components
- `/lib` - Utilities and business logic
## Coding Standards
- Use functional components with hooks
- Always include TypeScript interfaces for props
- Prefer composition over inheritance
## Context Hints
When working on authentication, reference `/lib/auth.ts` patterns.
Place .aicontext
files anywhere in your project. AI tools merge them hierarchically, giving you precise control over context at every level.
- Create a
.aicontext
file in your project root - Write your project context in simple Markdown
- Use with any compatible AI tool
my-project/
├── .aicontext # Project-wide context
├── src/
│ ├── components/
│ │ └── .aicontext # Component-specific rules
│ └── api/
│ └── .aicontext # API-specific guidelines
└── docs/
└── .aicontext # Documentation context
🧠 Tool Agnostic - Works with any AI coding assistant
📝 Human Readable - Just Markdown with optional YAML frontmatter
🏗️ Hierarchical - Context inherits and overrides naturally
🎯 File Specific - Target rules to specific file types
🔗 Composable - Share and extend contexts across projects
⚡ No Dependencies - Simple files, no special tooling required
---
version: "1.0"
applies_to: ["*.tsx", "*.ts"]
---
# E-commerce Frontend
## Tech Stack
React 18, TypeScript, Tailwind CSS, React Query
## Component Patterns
- Use compound components for complex UI
- Colocate types with components
- Export both component and props interface
### `*.tsx` files
Always use `forwardRef` for components that might need refs.
---
version: "1.0"
extends: ["../shared-backend.aicontext"]
---
# User Service API
## Architecture
Clean architecture with domain-driven design principles.
## Standards
- Validate all inputs with Zod
- Return consistent error responses
- Log all requests with correlation IDs
### `*.route.ts` files
Include rate limiting and auth middleware on all public endpoints.
The specification covers:
- Complete file format definition
- Context hierarchy and inheritance rules
- Implementation guidelines for tools
- Migration paths from existing formats
- None
For now, only for vCode-IDE
Want to add support to your tool? Let's chat!
# Your existing .cursorrules content becomes the main content
# Add version frontmatter and organize into sections
mv .cursorrules .aicontext
# Edit to add frontmatter and structure
Extract AI-relevant sections from your README into dedicated .aicontext
files while keeping human documentation separate.
This is a community-driven standard. We need your input to make it work for everyone.
🗣️ Join the Discussion - Share your use cases in Discussions
🐛 Report Issues - Found a problem? Open an issue
💡 Suggest Features - Have ideas? We'd love to hear them
🔧 Build Tools - Create parsers, extensions, or integrations
📝 Improve Docs - Help make the spec clearer and more complete
Q: How is this different from .cursorrules
?
A: AI Context is tool-agnostic, hierarchical, and designed as an open standard. While Cursor Rules work great in Cursor, AI Context files should work everywhere.
Q: What about existing project documentation?
A: AI Context complements your existing docs. Keep your README for humans, use .aicontext
for AI tools.
Q: How do I validate my .aicontext
files?
A: Actively being worked on
Q: Can I include sensitive information?
A: Be mindful of what you include. Context files may contain architectural details you don't want to share publicly.
This specification is released under CC0 1.0 Universal - dedicated to the public domain.
Ready to give your AI tools better context? Star this repo and create your first .aicontext
file today!