10 / AI

AI Instructions

How should the AI agent behave while implementing it?

AI Instructions define the operating rules an AI coding agent follows while implementing a documented product. They explain how the agent should interpret the specifications, follow the Development Roadmap, handle ambiguity, protect documented decisions, verify its work, and communicate blockers or changes.

Layer
Implementation
Primary purpose
Define how the AI agent should behave while implementing the documented system.
Used by
Product / Design / Engineering / AI
On this page
01

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?

02

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

Documentation
AI interprets everything independently
Silent assumptions
Uncontrolled changes
Unclear verification

With AI Instructions

Documentation
Defined agent behavior
Controlled implementation
Explicit gaps and conflicts
Verification
Clear reporting

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.

03

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.

PRD
FSD
BRD
UFD
DSD
DDD
ASD
TAD
DR
AI Instructions
Implementation

AI Instructions sit at the boundary between specification and execution. They are not a replacement for the documents above them.

04

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.

05

What does it contain?

These are the fields AI Instructions can define.

  1. 01

    Documentation Hierarchy

    Which documents the agent must consult and how they relate.

  2. 02

    Source of Truth

    How the agent should treat documented decisions.

  3. 03

    Implementation Behavior

    How the agent should approach tasks.

  4. 04

    Decision Boundaries

    What the agent may decide independently and what requires human input.

  5. 05

    Specification Gap Handling

    What happens when required information is missing.

  6. 06

    Conflict Handling

    What happens when documented decisions disagree.

  7. 07

    Scope Control

    How the agent prevents unrelated changes.

  8. 08

    Verification

    How the agent checks its work.

  9. 09

    Change Reporting

    How the agent communicates modifications.

  10. 10

    Progress Reporting

    How the agent communicates completed and remaining work.

  11. 11

    Human Escalation

    When the agent must stop and request a decision.

  12. 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.

06

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.

07

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:

  1. 1Identify the missing decision.
  2. 2Identify the affected feature or task.
  3. 3Identify the relevant documentation.
  4. 4Mark the issue as a Specification Gap.
  5. 5Pause the affected implementation.
  6. 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.

08

Agent operating rules

  1. 01

    Read before implementing.

    The agent must inspect the relevant documentation before beginning a task.

  2. 02

    Follow the Development Roadmap.

    The agent should implement the defined task sequence rather than choosing a new sequence without justification.

  3. 03

    Preserve documented decisions.

    The agent must not silently change approved product, design, data, API, or architectural decisions.

  4. 04

    Stay within task scope.

    The agent should not introduce unrelated features, refactors, or architectural changes.

  5. 05

    Surface Specification Gaps.

    Missing decisions must be reported rather than invented.

  6. 06

    Surface conflicts.

    Contradictory documentation must be reported rather than silently resolved.

  7. 07

    Verify before reporting completion.

    The agent must perform the relevant tests and checks defined by the task.

  8. 08

    Report meaningful changes.

    The agent should clearly communicate what was implemented, what was verified, and what remains blocked.

  9. 09

    Prefer explicitness over assumption.

    When an important decision is unclear, do not infer silently.

  10. 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.

09

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

Task
DR
TAD
ASD
DDD
DSD
UFD
BRD
FSD
PRD

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.

10

How does it handle Specification Gaps?

A Specification Gap exists when implementation requires a decision that the documentation does not define.

Implementation task
Required decision missing
Specification gap
Implementation paused
Human decision
Documentation updated
Implementation resumes

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.

11

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

  1. 1Identify the conflicting statements.
  2. 2Identify the affected task.
  3. 3Identify the affected documents.
  4. 4Do not silently choose a winner.
  5. 5Request clarification.
  6. 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

Human decisions
Documentation
Implementation Roadmap
AI Agent
Verification
Human Review

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.

12

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

Read
Trace
Check
Implement
Verify
Report
13

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
14

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.