On this page
- 01What is it?
- 02Why do we need it?
- 03When do we create it?
- 04Who benefits from it?
- 05What does it contain?
- 06What does it NOT contain?
- 07What does an AI instruction look like?
- 08Agent operating rules
- 09How does AI use the documentation system?
- 10How does it handle Specification Gaps?
- 11How does it handle conflicts?
- 12Example
- 13Template
- 14Common mistakes
What is it?
AI Instructions define the operating behavior of the AI coding agent. They establish how the agent reads the documentation, follows the implementation roadmap, preserves documented decisions, handles ambiguity, verifies implementation, and communicates its work.
Documentation
What should exist?
AI Instructions
How should the agent behave?
Why do we need it?
Even complete product documentation does not automatically define how an AI coding agent should behave when implementing it.
Without AI Instructions
With AI Instructions
The problem is not simply that AI can make mistakes. The problem is that without explicit operating rules, the agent may make decisions that were never approved.
When do we create it?
AI Instructions are created once the product documentation and implementation roadmap provide enough context to define how an AI coding agent should operate against them.
AI Instructions sit at the boundary between specification and execution. They are not a replacement for the documents above them.
Who benefits from it?
Product
Uses it to protect documented product decisions during AI implementation.
Design
Uses it to ensure documented experience decisions are not silently changed.
Engineering
Uses it to keep implementation within the defined technical architecture and roadmap.
AI agent
Uses it as the operating contract for implementation behavior.
What does it contain?
These are the fields AI Instructions can define.
- 01
Documentation Hierarchy
Which documents the agent must consult and how they relate.
- 02
Source of Truth
How the agent should treat documented decisions.
- 03
Implementation Behavior
How the agent should approach tasks.
- 04
Decision Boundaries
What the agent may decide independently and what requires human input.
- 05
Specification Gap Handling
What happens when required information is missing.
- 06
Conflict Handling
What happens when documented decisions disagree.
- 07
Scope Control
How the agent prevents unrelated changes.
- 08
Verification
How the agent checks its work.
- 09
Change Reporting
How the agent communicates modifications.
- 10
Progress Reporting
How the agent communicates completed and remaining work.
- 11
Human Escalation
When the agent must stop and request a decision.
- 12
Completion Criteria
What must be true before an implementation task is considered complete.
This document defines behavior, not an exhaustive list of prompt-engineering techniques.
What does it NOT contain?
- Product vision
- Feature requirements
- Business rules
- User flows
- UI design
- Database structure
- API contracts
- Technical architecture
- Implementation order
- Application source code
- Project management processes
Documents
Define the product and technical decisions.
DR
Defines implementation order.
AI Instructions
Defines agent behavior.
Implementation
Produces the software.
What does an AI instruction look like?
AI instruction
- Instruction ID
- AI-001
Instruction
Do not make undocumented product, business-rule, UX, data, API, or architectural decisions.
Behavior
When implementation requires a decision that is not defined in the documentation:
- 1Identify the missing decision.
- 2Identify the affected feature or task.
- 3Identify the relevant documentation.
- 4Mark the issue as a Specification Gap.
- 5Pause the affected implementation.
- 6Request the required human decision.
Do not
- Invent a product requirement.
- Invent a business rule.
- Invent a user-flow behavior.
- Invent a design decision.
- Invent a data relationship.
- Invent an API contract.
- Invent an architectural boundary.
This is a methodology example. It illustrates instruction structure, not a specific AI tool's configuration format.
Agent operating rules
- 01
Read before implementing.
The agent must inspect the relevant documentation before beginning a task.
- 02
Follow the Development Roadmap.
The agent should implement the defined task sequence rather than choosing a new sequence without justification.
- 03
Preserve documented decisions.
The agent must not silently change approved product, design, data, API, or architectural decisions.
- 04
Stay within task scope.
The agent should not introduce unrelated features, refactors, or architectural changes.
- 05
Surface Specification Gaps.
Missing decisions must be reported rather than invented.
- 06
Surface conflicts.
Contradictory documentation must be reported rather than silently resolved.
- 07
Verify before reporting completion.
The agent must perform the relevant tests and checks defined by the task.
- 08
Report meaningful changes.
The agent should clearly communicate what was implemented, what was verified, and what remains blocked.
- 09
Prefer explicitness over assumption.
When an important decision is unclear, do not infer silently.
- 10
Do not rewrite the specification through implementation.
If implementation reveals that a documented decision needs to change, surface the change rather than silently modifying the source documentation.
How does AI use the documentation system?
01 — Read the task
DR — What should be implemented?
02 — Trace the references
PRD, FSD, BRD, UFD, DSD, DDD, ASD, TAD
03 — Check dependencies
Are all prerequisites satisfied?
04 — Check for gaps
Is any required decision missing?
05 — Implement
Follow the documented scope and architecture.
06 — Verify
Run the required checks.
07 — Report
Communicate implementation, verification, changes, and blockers.
AI should not treat the documentation as a collection of unrelated files. It should use the documents as a connected specification system.
Document reading order
The agent starts from the implementation task and traces backward through the relevant specifications to understand the decision context.
This is a practical implementation reading order. It does NOT replace the conceptual order of the documentation system. The agent should consult only the documents relevant to the task when appropriate, rather than unnecessarily reading the entire documentation set every time.
How does it handle Specification Gaps?
A Specification Gap exists when implementation requires a decision that the documentation does not define.
Specification gap
Task
TASK-021 — Implement Project Creation
Missing decision
The documentation does not define what should happen when the project creation request is made without a valid organization relationship.
Affected documents
BRD, DDD, ASD
Implementation paused.
Decision required
Define the expected behavior before implementation continues.
The exact missing decision should remain the focus. The agent does not invent the solution.
How does it handle conflicts?
Sometimes two documents may contain contradictory decisions. The AI agent must not silently choose one.
Document A
Project name must be unique.
Document B
Duplicate project names are allowed.
Conflict detected
Implementation paused
Human decision required
- 1Identify the conflicting statements.
- 2Identify the affected task.
- 3Identify the affected documents.
- 4Do not silently choose a winner.
- 5Request clarification.
- 6Resume only after the decision is resolved.
Do not define a universal document precedence hierarchy such as “PRD always overrides BRD” unless the methodology has explicitly established one. The agent should identify the conflict rather than inventing a precedence rule.
Decision boundaries
AI may decide
- Variable names when not product-significant.
- Internal helper structure when it does not affect documented architecture.
- Boilerplate implementation details.
- Routine refactoring within the defined boundaries.
- Test structure when it does not change expected behavior.
- Minor implementation details required to realize an explicit specification.
AI must not silently decide
- Product requirements.
- Feature scope.
- Business rules.
- User-flow behavior.
- Important UX decisions.
- Data relationships.
- API contracts.
- Architectural boundaries.
- Technology choices that materially affect the documented architecture.
- Changes to implementation order that affect dependencies.
The AI can make implementation-level decisions. It cannot silently make important product or system decisions.
The system
The goal is not to remove humans from implementation. The goal is to remove unnecessary ambiguity from implementation.
Don't make AI figure out what to build while it's figuring out how to build it.
Example
Feature concept
Create a Project
AI Instructions perspective
The agent reads the relevant specifications, follows TASK-021, checks dependencies, implements within scope, verifies the result, and reports completion or any unresolved gap.
PRD
Why
Users need a way to organize their work into projects.
FSD
What
Users can create a project.
BRD
Rules
Project creation follows defined business rules.
UFD
Behavior
The user moves through the project creation journey and reaches a defined outcome.
DSD
Experience
The interface represents the journey through defined screens, states, interactions, responsive behavior, and feedback.
DDD
Data
The system stores the project information and its relationship to the relevant organization.
ASD
Communication
The project creation operation defines how the client communicates the required information and receives the result.
TAD
Structure
The technical component responsible for project creation is defined together with its responsibilities, boundaries, and dependencies.
DR
Order
The project creation capability is broken into dependent implementation tasks and placed in the appropriate execution sequence.
AI Instructions
Implementation
The agent reads the relevant specifications, follows TASK-021, checks dependencies, implements within scope, verifies the result, and reports completion or any unresolved gap.
The operating loop
AI Instructions Template
ai-instructions-template.md
# AI Instructions
## 01. Operating Principle
## 02. Documentation System
### Documents
### Source of Truth
### Reference Behavior
## 03. Implementation Behavior
### Read Before Implementing
### Follow the Roadmap
### Preserve Decisions
### Stay Within Scope
## 04. Decision Boundaries
### AI May Decide
### Human Decision Required
## 05. Specification Gap Handling
### Detection
### Reporting
### Pause Condition
### Resume Condition
## 06. Conflict Handling
### Detection
### Reporting
### Resolution
## 07. Verification
### Required Checks
### Acceptance Criteria
### Completion Criteria
## 08. Reporting
### Progress
### Changes
### Verification
### Blockers
## 09. Change Management
### When Documentation Changes
### When Implementation Changes
## 10. Open Agent Decisions
Common mistakes
- Writing vague instructions such as "build it correctly."
- Repeating the entire PRD, FSD, or architecture document inside the AI Instructions.
- Giving AI permission to make product decisions silently.
- Telling AI to "use its best judgment" for unspecified business behavior.
- Failing to define what happens when documentation is incomplete.
- Failing to define what happens when documents conflict.
- Letting AI change documented decisions during implementation without reporting the change.
- Allowing AI to expand task scope because related improvements appear useful.
- Treating verification as optional.
- Giving AI a roadmap without task-level acceptance criteria.
- Letting AI implement the entire product in one uncontrolled pass.
- Writing instructions that depend on one specific AI coding tool.
- Confusing implementation-level decisions with product-level decisions.