Manage Project Context
Use the project-context.md file to ensure AI agents follow your projectâs technical preferences and implementation rules throughout all workflows.
When to Use This
Section titled âWhen to Use Thisâ- You have strong technical preferences before starting architecture
- Youâve completed architecture and want to capture decisions for implementation
- Youâre working on an existing codebase with established patterns
- You notice agents making inconsistent decisions across stories
Step 1: Choose Your Approach
Section titled âStep 1: Choose Your ApproachâManual creation â Best when you know exactly what rules you want to document
Generate after architecture â Best for capturing decisions made during solutioning
Generate for existing projects â Best for discovering patterns in existing codebases
Step 2: Create the File
Section titled âStep 2: Create the FileâOption A: Manual Creation
Section titled âOption A: Manual CreationâCreate the file at _bmad-output/project-context.md:
mkdir -p _bmad-outputtouch _bmad-output/project-context.mdAdd your technology stack and implementation rules:
---project_name: 'MyProject'user_name: 'YourName'date: '2026-02-15'sections_completed: ['technology_stack', 'critical_rules']---
# Project Context for AI Agents
## Technology Stack & Versions
- Node.js 20.x, TypeScript 5.3, React 18.2- State: Zustand- Testing: Vitest, Playwright- Styling: Tailwind CSS
## Critical Implementation Rules
**TypeScript:**- Strict mode enabled, no `any` types- Use `interface` for public APIs, `type` for unions
**Code Organization:**- Components in `/src/components/` with co-located tests- API calls use `apiClient` singleton â never fetch directly
**Testing:**- Unit tests focus on business logic- Integration tests use MSW for API mockingOption B: Generate After Architecture
Section titled âOption B: Generate After ArchitectureâRun the workflow in a fresh chat:
/bmad-bmm-generate-project-contextThe workflow scans your architecture document and project files to generate a context file capturing the decisions made.
Option C: Generate for Existing Projects
Section titled âOption C: Generate for Existing ProjectsâFor existing projects, run:
/bmad-bmm-generate-project-contextThe workflow analyzes your codebase to identify conventions, then generates a context file you can review and refine.
Step 3: Verify Content
Section titled âStep 3: Verify ContentâReview the generated file and ensure it captures:
- Correct technology versions
- Your actual conventions (not generic best practices)
- Rules that prevent common mistakes
- Framework-specific patterns
Edit manually to add anything missing or remove inaccuracies.
What You Get
Section titled âWhat You GetâA project-context.md file that:
- Ensures all agents follow the same conventions
- Prevents inconsistent decisions across stories
- Captures architecture decisions for implementation
- Serves as a reference for your projectâs patterns and rules
Next Steps
Section titled âNext Stepsâ- Project Context Explanation â Learn more about how it works
- Workflow Map â See which workflows load project context