10. Prompt Structure in AI Studio

Overview and links for this section of the guide.

What this section is for

Prompting becomes predictable when you separate:

  • stable rules (how you want the model to behave across the entire project), from
  • task instructions (what you want done right now).

This section teaches practical prompt structure in AI Studio so you can:

  • keep constraints from getting lost over time,
  • reduce conflicting instructions,
  • make outputs more repeatable and easier to review,
  • move faster without sacrificing correctness.
Prompt structure is an engineering tool

It’s not about clever wording. It’s about placing instructions where they remain stable and take priority.

The core principle: stable rules, flexible tasks

Most “model ignored me” problems are really “instruction placement” problems.

  • If a rule should apply to every output (e.g., “diff-only changes”), it must live in a stable place.
  • If a rule is only for one task (e.g., “add a REPL mode”), it should live in the task prompt.

When you mix these, you create drift: the model treats stable rules as optional suggestions.

A practical instruction stack

A useful mental model is a stack, from most stable to most specific:

  1. System instructions: non-negotiable global rules (tone, safety, format rules).
  2. Developer/project instructions: project-specific constraints (language, deps, style, file boundaries).
  3. User/task instructions: the change you want right now + acceptance criteria.

Section 10.1 covers how these layers work and how to use them practically.

How structure prevents drift

In long iterative sessions, you will inevitably say something that conflicts with an earlier rule. Structured prompts prevent chaos by:

  • making the “house rules” explicit and stable,
  • separating spec from conversation,
  • using checklists to make steps explicit,
  • forcing plan checkpoints before implementation.

Section 10 map (10.1–10.4)

Where to go next