3. Context phase
Agents, Rules and Skills: the operating system of the AI project.
This is the operational guide for executing Context Phase — the phase where the team translates human understanding into a system that AI can process faithfully. While the methodology section explains the why and the conceptual foundations (what Agents, Rules, and Skills are and why they matter), this guide covers the how: the concrete process to follow, the artifacts to produce, the criteria to meet before moving forward, and the failure patterns to watch for.
The Context Phase workflow
Context Phase translates human understanding into a system that AI can process faithfully, through five steps in strict sequence. Rules come first because everything else depends on them. Agents are designed before Skills because Skills need to know who will execute them. Strategic documents come before decomposition because Skills are derived from them. Validation is last because it tests the complete system, not individual pieces.
1. Establish Rules
Define the project constitution: tech stack, conventions, constraints, Agent limits, and gap protocol. All globally-applicable decisions.
project-context.md2. Design the Agent Chain
Define which Agents exist, what each one does, and how they pass work. Each with identity, responsibilities, limits, and gap protocol.
Agent Definitions3. Generate Strategic Documents
PM Agent produces the PRD from the Solution Brief. Architect Agent produces the Architecture Document and promotes new Rules.
PRD + Architecture Document4. Decompose into Skills
SM Agent breaks the solution into self-contained tasks with all the context an Agent needs to complete them.
Story Files5. Validate through Outputs
Agents execute sample Skills under Rules. Stakeholders verify the output is a faithful expression of what was agreed.
Validated context systemThe six artifacts
This phase produces six artifacts that together form the operating system for Phase 4. Unlike previous phases, here artifacts are produced by both humans and AI Agents, and each has defined producers and consumers within the chain.
project-context.md (Rules)
Agent Definitions
PRD (Product Requirements Document)
Architecture Document
Story Files (Skills)
Decision LogContext system quality
A well-designed context system scores high across all five quality dimensions. Gaps in any dimension produce outputs that look correct but aren't faithful to what stakeholders agreed.
- Fidelity — Outputs match the Problem Statement and Solution Brief. No invention, no reinterpretation.
- Completeness — Every Rule, Agent, and Skill has all mandatory elements. No implicit context.
- Self-containment — An Agent with a Skill + project-context.md can complete the task without asking anything.
- Traceability — Problem Statement → Solution Brief → PRD → Rules + Skills. Every element traces back.
- Consistency — Rules don't contradict each other. Skills inherit Rules faithfully. Agents respect their limits.
What this guide covers
Step by Step
A five-step process from Rules to validated context system. Each step builds on the previous: Rules, Agents, Documents, Skills, Validation.
Anatomy
The architecture of a well-designed context system. How Rules, Agents, Skills, and strategic documents interconnect.
Artifacts
project-context.md, Agent Definitions, PRD, Architecture Document, Story Files, and Decision Log. Templates and quality criteria.
Gate Review
Nine criteria that must all pass before advancing to Phase 4. Validates fidelity, completeness, and self-containment of the context system.
Anti-patterns
Common failure modes in context design. From over-specified Rules to under-contained Skills and implicit dependencies.
Effort
Time investment ranges calibrated to construction time. The optimal proportion is 30-50% of the build phase duration.
If Context Phase consumes more time than the construction phase itself, you're likely over-specifying Rules or atomizing Skills excessively. If it consumes less than a third of construction time, there are implicit Rules and incomplete Skills. The optimal proportion is 30-50% of construction time. For a project that will take 4 weeks to build, invest 1-2 weeks in Context Phase. The payoff: construction becomes the phase of least friction.