Loading...
Start using Context Mesh in 2 minutes. No setup. No theory. Just copy, paste, and let AI create your context structure.
Works with Cursor, Copilot, Claude, ChatGPT, and any AI assistant
Context Mesh flips traditional development. Plan first, then build.
Code first, document later (often incomplete or forgotten)
Context first, code follows (always complete and up-to-date)
Start simple. You only need intent + decision to get started.
12345678your-project/├── context/│ ├── intent/│ │ ├── project-intent.md # What + Why do projeto│ │ └── feature-user-auth.md # What + Why da feature│ └── decisions/│ └── 002-auth.md # How (technical approach)└── src/ # Seu código aquiAs your project grows, you can add more structure to capture patterns, reusable agents, and project evolution. These are optional and can be added incrementally based on your needs.
Learn more about the full structure:
Select the option that best matches your situation
Perfect for when you're beginning a new project from scratch. AI will help you define the project intent, identify features, and make initial technical decisions. You'll start with a clean slate and build your context structure as you go.
Prompt for: New Project
I'm starting a new project with Context Mesh.
Ask me:
1. Project name?
2. Project type? (web app, API, mobile, CLI, library, etc.)
3. What problem does it solve?
4. Why is this important? (business value)
5. Project acceptance criteria? (overall project criteria)
6. Tech stack? (if known)
- If tech stack provided, also ask:
- Why this tech stack? (Rationale)
- What alternatives did you consider?
7. Do you want to add features now? (y/n)
- If YES: For each feature, ask:
- Feature name?
- What does this feature do and why do we need it?
- Acceptance criteria for this feature?
- Technical approach for this feature? (What technical solution will be used?)
- Why this approach? (Rationale)
- What alternatives did you consider?
- If NO: Skip feature creation (user can use add-feature.md later)
8. Do you have any initial patterns or conventions? (y/n) (optional)
- If YES: For each pattern, ask:
- Pattern name?
- What is this pattern? (description)
- When to use this pattern?
- Example or code structure?
- If NO: Skip pattern creation (patterns can be added later via learn-update.md)
Then create this structure:
context/
├── .context-mesh-framework.md (ALWAYS create - framework rules and patterns)
├── intent/
│ ├── project-intent.md
│ └── feature-[name].md (only if user answered YES to question 7, one per feature with complete information)
├── decisions/
│ ├── 001-tech-stack.md (if tech stack provided)
│ └── [002+]-[feature-name].md (only if features were created, one per feature, starting from 002 if tech-stack exists, or 001 if not)
├── knowledge/
│ ├── patterns/
│ │ └── [pattern-name].md (only if user answered YES to question 8)
│ └── anti-patterns/
├── agents/
│ └── (empty for now)
└── evolution/
└── changelog.md
Also create AGENTS.md at project root.
**Note**:
- If user answered NO to question 7, inform them: "Project structure created. Use add-feature.md to add features when ready."
- If user answered NO to question 8, inform them: "Patterns can be added later via learn-update.md when you discover reusable patterns during implementation."
---
TEMPLATES:
---
.CONTEXT-MESH-FRAMEWORK.MD (ALWAYS create this file):
---
**IMPORTANT**: This file should contain the complete Context Mesh framework reference.
If you have access to the Context Mesh framework repository, copy the content from `context/.context-mesh-framework.md`.
If you don't have access, create a file that includes:
- Framework overview (3 steps: Intent → Build → Learn)
- File type separation rules (Feature, Decision, Knowledge, Agent files)
- Plan, Approve, Execute pattern (MANDATORY)
- When to create vs not create files
- Context structure
- Definition of Done
- Bidirectional links rules
- Status section requirements
This file is critical for AI agents to understand and follow Context Mesh rules correctly.
---
PROJECT-INTENT.MD:
---
# Project Intent: [PROJECT_NAME]
## What
[Project description]
## Why
[Business value, problem it solves]
## Acceptance Criteria
- [Criterion 1]
- [Criterion 2]
## Scope
- [Feature 1]
- [Feature 2]
## Status
- **Created**: [TODAY'S DATE] (Phase: Intent)
- **Status**: Draft
---
FEATURE-[NAME].MD:
---
# Feature: [FEATURE_NAME]
## What
[What this feature does]
## Why
[Why we need it]
## Acceptance Criteria
- [Criterion 1]
- [Criterion 2]
## Related
- [Project Intent](project-intent.md)
- [Decision: [Feature Name]](../decisions/[number]-[feature-name].md)
## Status
- **Created**: [TODAY'S DATE] (Phase: Intent)
- **Status**: Draft
---
DECISIONS/[NUMBER]-[FEATURE-NAME].MD (one per feature, starting from 002 if tech-stack exists, or 001 if not):
---
# Decision: [FEATURE_NAME] Technical Approach
## Context
Implementing [FEATURE_NAME] feature for [PROJECT_NAME]. Need to choose technical approach.
## Decision
[Technical solution that will be used for this feature]
## Rationale
[Why this approach - reasons for choosing this solution]
## Alternatives Considered
- [Alternative 1] - [Why not chosen]
- [Alternative 2] - [Why not chosen]
## Outcomes
[To be updated after implementation in Step 3: Learn]
## Related
- [Project Intent](../intent/project-intent.md)
- [Feature: [Feature Name]](../intent/feature-[name].md)
- [Decision: Tech Stack](001-tech-stack.md) (if applicable)
## Status
- **Created**: [TODAY'S DATE] (Phase: Intent)
- **Status**: Accepted
---
DECISIONS/001-TECH-STACK.MD (if tech stack provided):
---
# Decision: Tech Stack
## Context
Starting [PROJECT_TYPE] project, choosing technologies.
## Decision
- Frontend: [if applicable]
- Backend: [if applicable]
- Database: [if applicable]
- Key Dependencies: [if applicable]
## Rationale
[Why these technologies - reasons for choosing this stack]
## Alternatives Considered
- [Alternative 1] - [Why not chosen]
- [Alternative 2] - [Why not chosen]
## Outcomes
[To be updated after implementation in Step 3: Learn]
## Related
- [Project Intent](../intent/project-intent.md)
## Status
- **Created**: [TODAY'S DATE] (Phase: Intent)
- **Status**: Accepted
---
PATTERNS/[PATTERN-NAME].MD (only if user answered YES to question 8):
---
# Pattern: [PATTERN_NAME]
## Description
[What this pattern is - clear description of the pattern]
## When to Use
[When to apply this pattern - specific scenarios or contexts]
## Pattern
[The pattern itself - structure, approach, or convention]
## Example
[Code example or usage example showing the pattern]
## Related
- [Project Intent](../intent/project-intent.md)
- [Decision: Tech Stack](../decisions/001-tech-stack.md) (if applicable)
- [Feature: [Feature Name]](../intent/feature-[name].md) (if applicable)
## Status
- **Created**: [TODAY'S DATE]
- **Status**: Active
---
CHANGELOG.MD:
---
# Changelog
## [Unreleased]
### Added
- Project initialized with Context Mesh
- Created project intent
- Created feature intents: [list if features were created, otherwise omit]
- Created feature decisions: [list if features were created, otherwise omit]
- Created patterns: [list if patterns were created, otherwise omit]
### Changed
### Fixed
---
*Last Updated: [TODAY'S DATE]*
---
AGENTS.MD (at project root):
---
# AGENTS.md
## Setup Commands
- Install: `[package manager] install`
- Dev: `[package manager] run dev`
- Test: `[package manager] test`
- Build: `[package manager] run build`
## Code Style
- [Based on tech stack]
- Follow patterns from `@context/knowledge/patterns/`
## Context Files to Load
Before starting work, load:
- @context/intent/project-intent.md (always)
- @context/intent/feature-*.md (for specific feature)
- @context/decisions/*.md (relevant decisions)
- @context/knowledge/patterns/*.md (patterns to follow)
## Project Structure
root/
├── AGENTS.md
├── context/
│ ├── intent/
│ ├── decisions/
│ ├── knowledge/
│ ├── agents/
│ └── evolution/
└── [code]
## AI Agent Rules
### Always
- Load context before implementing
- Follow decisions from @context/decisions/
- Use patterns from @context/knowledge/patterns/
- Update context after implementation
### Never
- Ignore documented decisions
- Use anti-patterns from @context/knowledge/anti-patterns/
- Leave context stale
### After Implementation (Critical)
AI must update Context Mesh after changes:
- Mark feature/bug as completed in intent file
- Add outcomes to decision files
- Update changelog.md
- Create learning-*.md if significant insights
## Definition of Done (Build Phase)
Before completing implementation:
- [ ] ADR exists before implementation
- [ ] Code follows Context Mesh patterns
- [ ] Decisions respected
- [ ] Tests passing
- [ ] Context updated
- [ ] Changelog updated
- [ ] Acceptance Criteria met
---
**Note**: This is a basic AGENTS.md template. For a complete template with advanced features (File Creation Rules, Execution Agents, etc.), see `examples/AGENTS.md.example`.
---
Create all files based on my answers.
**Important**:
- Always create project-intent.md, structure folders, and AGENTS.md
- Only create feature files and feature decisions if user answered YES to question 7
- Only create pattern files if user answered YES to question 8
- If user answered NO to question 7, inform them they can use add-feature.md to add features later
- If user answered NO to question 8, inform them patterns can be added later via learn-update.md
**Bidirectional Links**: Create proper links between features and decisions:
- Feature files must link to their decision files using format: `- [Decision: Name](../decisions/[number]-[name].md)`
- Decision files must link back to their feature files using format: `- [Feature: Name](../intent/feature-[name].md)`
- Use markdown link format: `- [Type: Name](path/to/file.md)`
- Links should be bidirectional (feature ↔ decision)This prompt includes all templates. AI will ask you questions and create everything automatically.
Open your AI assistant and paste the prompt. The AI will ask you about your project. Just answer the questions!
Here are example answers you can copy and paste when the AI asks. These are based on a Personal Expense Tracker example.
SQLite with better-sqlite3 is extremely simple - just install it via npm/pnpm. No CLI tools, no database server, no configuration.
We answer NO here because Context Mesh encourages starting simple. You can add features later using add-feature.md. This keeps the initial setup focused and manageable.
Context Mesh will create this structure in your project:
Before building, add at least one feature so the AI knows what to build. This shows how to add features step by step.
💡 Recommended: Add at least one feature before building. The AI can create the project structure without features, but won't know what specific functionality to implement.
Add a new feature to this Context Mesh project.
**FIRST: Load framework context:**
- Load @context/.context-mesh-framework.md (if exists) to understand Context Mesh framework rules and file type separation
- Understand Plan, Approve, Execute pattern
- Understand when to create vs not create files
Then, analyze the existing @context/ to check if this feature already exists:
- Check if feature-[name].md already exists in context/intent/
- If feature exists, inform me: "This feature already exists. Use update-feature.md to modify it, or choose a different name."
- If feature does NOT exist, proceed with the questions below.
Then ask me:
**Feature Information:**
1. Feature name
2. What it does and why we need it
3. Acceptance criteria
**Technical Decision (ADR):**
4. Technical approach - What technical solution will be used?
5. Why this approach? (Rationale) - What are the reasons for choosing this approach?
6. What alternatives did you consider? - What other options were evaluated and why weren't they chosen?
7. Technical context - Any constraints, existing patterns, or dependencies that influence this decision?
Then create:
- context/intent/feature-[name].md
- Include "Related" section with bidirectional links:
- [Project Intent](project-intent.md)
- [Decision: [Feature Name]](../decisions/[next-number]-[name].md)
- context/decisions/[next-number]-[name].md (ADR required BEFORE implementing)
- Include: Context, Decision, Rationale, Alternatives Considered, Related links, Status
- Include "Related" section with bidirectional links:
- [Project Intent](../intent/project-intent.md)
- [Feature: [Feature Name]](../intent/feature-[name].md)
- [Decision: Tech Stack](001-tech-stack.md) (if applicable and exists)
- Update context/intent/project-intent.md
- Add new feature to "Related" section: [Feature: [Feature Name]](feature-[name].md)
- Update changelog.md
- Update AGENTS.md (Feature-Specific Context section)
Follow the pattern of existing files in @context/.
Remember: ADR must exist before implementation starts. The decision file should be complete with all sections.
**Important**: Create bidirectional links between feature and decision files:
- Feature files must link to their decision files using format: `- [Decision: Name](../decisions/[number]-[name].md)`
- Decision files must link back to their feature files using format: `- [Feature: Name](../intent/feature-[name].md)`
- Use markdown link format: `- [Type: Name](path/to/file.md)`
**Note**: After files are created, use the execution prompt with Plan, Approve, Execute pattern to implement.Here are example answers for adding the expense-tracking feature. Copy and paste when the AI asks.
After AI creates your context, use this simple prompt to start building:
⚠️ No Features Defined Yet
You haven't added any features yet. The AI will create the project structure and basic setup (package.json, config files, folder structure), but won't implement specific features.
💡 Recommendation: Use Step 3.5 above to add your first feature before building, so the AI knows what functionality to implement.
Load @context/intent/ and @context/decisions/ files and build the project following the documented intents and technical decisions.The AI follows a structured process to ensure your code matches your documented decisions:
AI Reads Your Context
Loads intent files (what to build) and decision files (how to build it)
AI Plans the Implementation
Explains what it will create and how it follows your documented decisions
You Review and Approve
Check if the plan matches your documented decisions, then approve
AI Generates Code
Creates code following your documented technical decisions and patterns
For building a specific feature, you can reference the feature files directly:
Implement expense tracking following @context/intent/feature-expense-tracking.md and @context/decisions/002-expense-tracking.md💡 Tip: Referencing specific files helps the AI focus on exactly what you want to build.
After setup, use these prompts for your daily work:
3 months later: "Why did we do this?"
Documentation gets outdated or forgotten
3 months later: Context explains everything
Context is always preserved and up-to-date
Want to understand how Context Mesh organizes files? This section explains the directory structure and file templates.
Context Mesh works with any AI assistant. The @context/ syntax is specific to Cursor.
In Cursor: Use @context/intent/feature-auth.md
In other tools (Copilot, Claude, ChatGPT): Use full path context/intent/feature-auth.md or copy file content into chat
Step 1: Intent statements (what & why)
Technical decisions (any step)
Patterns & anti-patterns
Reusable execution patterns (optional)
Step 3: History & learnings
Not required to start, but helpful if you want to understand the framework better.