Loading...
Comece a usar Context Mesh em 2 minutos. Sem configuração. Sem teoria. Apenas copie, cole e deixe a IA criar sua estrutura de contexto.
Funciona com Cursor, Copilot, Claude, ChatGPT e qualquer assistente de IA
Context Mesh inverte o desenvolvimento tradicional. Planeje primeiro, depois construa.
Código primeiro, documentar depois (geralmente incompleto ou esquecido)
Contexto primeiro, código segue (sempre completo e atualizado)
Comece simples. Você só precisa de intenção + decisão para começar.
12345678seu-projeto/├── context/│ ├── intent/│ │ ├── project-intent.md # O quê + Por quê do projeto│ │ └── feature-user-auth.md # O quê + Por quê da funcionalidade│ └── decisions/│ └── 002-auth.md # Como (abordagem técnica)└── src/ # Seu código aquiConforme seu projeto cresce, você pode adicionar mais estrutura para capturar padrões, agentes reutilizáveis e evolução do projeto. Estes são opcionais e podem ser adicionados incrementalmente com base em suas necessidades.
Saiba mais sobre a estrutura completa:
Selecione a opção que melhor corresponde à sua situação
Perfeito para quando você está começando um novo projeto do zero. A IA ajudará você a definir a intenção do projeto, identificar funcionalidades e tomar decisões técnicas iniciais. Você começará com uma base limpa e construirá sua estrutura de contexto conforme avança.
Prompt para: Novo Projeto
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)Este prompt inclui todos os templates. A IA fará perguntas e criará tudo automaticamente.
Abra seu assistente de IA e cole o prompt. A IA fará perguntas sobre seu projeto. Apenas responda!
Aqui estão respostas de exemplo que você pode copiar e colar quando a IA perguntar. Baseadas em um exemplo de Rastreador de Despesas Pessoais.
SQLite com better-sqlite3 é extremamente simples - apenas instale via npm/pnpm. Sem ferramentas CLI, sem servidor de banco de dados, sem configuração.
Respondemos NÃO aqui porque Context Mesh incentiva começar simples. Você pode adicionar funcionalidades depois usando add-feature.md. Isso mantém a configuração inicial focada e gerenciável.
Context Mesh criará esta estrutura no seu projeto:
Antes de construir, adicione pelo menos uma funcionalidade para que a IA saiba o que construir. Isso mostra como adicionar funcionalidades passo a passo.
💡 Recomendado: Adicione pelo menos uma funcionalidade antes de construir. A IA pode criar a estrutura do projeto sem funcionalidades, mas não saberá qual funcionalidade específica implementar.
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.Aqui estão respostas de exemplo para adicionar a funcionalidade expense-tracking. Copie e cole quando a IA perguntar.
Após a IA criar seu contexto, use este prompt simples para começar a construir:
⚠️ Nenhuma Funcionalidade Definida Ainda
Você ainda não adicionou nenhuma funcionalidade. A IA criará a estrutura do projeto e configuração básica (package.json, arquivos de config, estrutura de pastas), mas não implementará funcionalidades específicas.
💡 Recomendação: Use o Passo 3.5 acima para adicionar sua primeira funcionalidade antes de construir, para que a IA saiba qual funcionalidade implementar.
Load @context/intent/ and @context/decisions/ files and build the project following the documented intents and technical decisions.A IA segue um processo estruturado para garantir que seu código corresponda às suas decisões documentadas:
IA Lê Seu Contexto
Carrega arquivos de intenção (o que construir) e arquivos de decisão (como construir)
IA Planeja a Implementação
Explica o que vai criar e como segue suas decisões documentadas
Você Revisa e Aprova
Verifica se o plano corresponde às suas decisões documentadas, depois aprova
IA Gera o Código
Cria código seguindo suas decisões técnicas documentadas e padrões
Para construir uma funcionalidade específica, você pode referenciar os arquivos da funcionalidade diretamente:
Implement expense tracking following @context/intent/feature-expense-tracking.md and @context/decisions/002-expense-tracking.md💡 Dica: Referenciar arquivos específicos ajuda a IA a focar exatamente no que você quer construir.
Após a configuração, use estes prompts para seu trabalho diário:
3 meses depois: "Por que fizemos isso?"
Documentação fica desatualizada ou esquecida
3 meses depois: O contexto explica tudo
O contexto sempre é preservado e atualizado
Quer entender como o Context Mesh organiza arquivos? Esta seção explica a estrutura de diretórios e templates de arquivos.
Context Mesh funciona com qualquer assistente de IA. A sintaxe @context/ é específica do Cursor.
No Cursor: Use @context/intent/feature-auth.md
Em outras ferramentas (Copilot, Claude, ChatGPT): Use o caminho completo context/intent/feature-auth.md ou copie o conteúdo do arquivo no chat
Passo 1: Declarações de intenção (o quê e por quê)
Decisões técnicas (qualquer passo)
Padrões e anti-padrões
Padrões de execução reutilizáveis (opcional)
Passo 3: Histórico e aprendizados
Não é necessário para começar, mas útil se você quiser entender melhor o framework.