# Project Context Management (PCM) Project Context Management is the practice of curating, structuring, and maintaining the AI context specific to a single project or codebase. It ensures that AI agents working on a project understand its goals, architecture, conventions, constraints, and history without requiring repeated explanation. All levels of context management use the same principles and techniques of [[Context Engineering]], just applied at different scales. Project context sits between [[Personal Context Management (PCM)|Personal Context Management]] and [[Team Context Management (TCM)|Team Context Management]] in granularity. Personal context is about you; team context is about how a group collaborates; project context is about what a specific body of work needs AI to know. Specifically: **architecture, design, implementation details, and important business rules**. ## What PCM includes - **Project rules and conventions**: coding standards, naming conventions, architectural patterns (e.g., CLAUDE.md, .cursorrules, AGENTS.md) - **Architecture context**: how the codebase is structured, key abstractions, data flow, and design decisions - **Technical constraints**: tech stack, framework versions, deployment targets, performance requirements - **Decision history**: architecture decision records, why things are built the way they are - **Agent configurations**: project-specific skills, tools, and [[Model Context Protocol (MCP)|MCP]] server setups - **Domain knowledge**: business rules, terminology, and domain-specific logic embedded in the project ## Why PCM matters Without project context, AI starts every interaction from zero on the project. It guesses at conventions, misunderstands architecture, and produces code that doesn't fit. Good PCM means: - AI follows existing patterns instead of inventing new ones - Onboarding new contributors (human or AI) is faster - Consistency across the codebase improves - Less time spent correcting AI output ## PCM as [[Context-as-Code]] Project context management is where [[Context-as-Code]] is most naturally applied. Project context lives in the repository alongside the code it describes. Files like CLAUDE.md, AGENTS.md, and .cursorrules are project context committed to version control; they evolve with the codebase, get reviewed in PRs, and benefit from the same collaboration workflows as code. ## Relationship to the context hierarchy The full [[Context Layering|context hierarchy]]: - **[[Enterprise Context Management (ECM)|ECM]]**: organization-wide policies and standards (strategy, focus, culture) - **[[Team Context Management (TCM)|TCM]]**: team conventions and shared workflows (members, processes, priorities) - **PCM**: project-specific context (architecture, design, implementation details, business rules) - **[[Personal Context Management (PCM)|Personal Context Management]]**: individual preferences, style, and personal knowledge [[Context Inheritance]] flows down: project context takes into account the enterprise context and team/service/department context. A team's coding standards apply across all their projects; PCM adds the specifics of this particular codebase. ## The form project context takes The ideal form for project context is currently a set of Markdown files: - An **[[AI Master Prompt]]** that gives the ground rules and base context (e.g., project name, stakeholders, team, architecture and design, goals, rules, priorities) - **AGENTS.md/CLAUDE.md files** at different levels of the project source code, describing more about the technical architecture, design, rules - **[[AI Agent Skills|AI Skills]]** describing how to perform certain tasks, workflows, and processes - **[[AI Agents]]** taking on specific roles and leveraging different combinations of skills ## PCM lifecycle 1. **Bootstrap**: establish initial project context when starting a new project or adopting AI tooling 2. **Maintain**: update context as architecture evolves, decisions are made, and conventions change 3. **Prune**: remove outdated context that no longer reflects the project's reality (see [[Context Drift]], [[Context Hygiene]]) 4. **Review**: periodically audit whether project context is still accurate and complete ## References - ## Related - [[Personal Context Management (PCM)]] - [[Team Context Management (TCM)]] - [[Enterprise Context Management (ECM)]] - [[Context Engineering]] - [[Context-as-Code]] - [[Context Layering]] - [[Context Inheritance]] - [[Context Lifecycle]] - [[Context Drift]] - [[Context Hygiene]] - [[Context Budget]] - [[AI Master Prompt]] - [[AI Agents]] - [[AI Agent Skills]] - [[Harness Engineering]] - [[Levels of AI Context Management]] - [[Model Context Protocol (MCP)]]