home/productivity/prompt-as-contract

Prompt as Contract

GPTClaudeDeepSeek··1,300 copies·updated 2026-07-14
prompt-as-contract.prompt
# The Prompt as a Contract

*A prompt is not a conversation. It is a contract handed to an agent — and every section closes a door.*

## A prompt is a contract

When you talk to an agent casually, you are negotiating. Negotiation invites
interpretation, and an agent asked to interpret will fill every gap with a
guess. A prompt written as a *contract* removes the negotiation: it states the
operation, the constraints, the prohibitions, and the checklist the agent
verifies against itself.

Every section of a well-formed prompt **closes a door** through which the
agent could otherwise wander off. That is the lens for this whole chapter:
read each section as a door, and ask what walks through if it stays open.

## Anatomy of a prompt

A complete generation prompt has seven sections.

| Section | What it states | Door it closes |
|---|---|---|
| **Operation type** | Create, or surgical modification, or full rebuild | The agent guessing the *scope* of the work |
| **Passes** | How many internal passes, and what each does | The agent stopping at a rough first draft |
| **Context** | Where the screen lives, who uses it | The agent inventing a purpose |
| **Specifications** | Structure, states, content — with numeric values | The agent reinterpreting vague adjectives |
| **Design-system recall** | Colours, type, radii, spacing — always restated | The agent assuming it remembers the design system |
| **Prohibitions** | What it must not do | The agent "improving" things unasked |
| **Validation checklist** | Observable criteria the agent ticks itself | The agent declaring done without checking |

Two sections deserve emphasis.

**Design-system recall — always, never assumed known.** Even if the design
system is in the vault, restate the tokens the screen uses. An agent that has
to *recall* the design system will approximate it; an agent that *reads* it in
the prompt cannot.

**Numeric values, not adjectives.** "Compact" is interpretable. "1px
separator, 600/14px title, 13px description, 70/30 split" is not. Every value
you can quantify, you must — each number is a door the agent cannot reopen.

## Two modes

A prompt operates in one of two modes, and stating which is the first door
closed.

### Surgical modification

A *surgical modification* corrects one precise point. Its defining feature is
the final, capital prohibition: **"No change other than this one."** That line
prevents the agent from rebuilding, in its own taste, things that already
worked.

Use it when the current screen is mostly right and one thing is wrong.

### Full rebuild

A *full rebuild* starts from zero and **forbids reusing the existing code**.
Use it when an accumulation of patches has made the existing code incoherent —
when the cheapest path forward is a clean slate, not another patch on a patch.

when to use it

Community prompt sourced from the open-source GitHub repo gabrielchinarro-pro/mainstay (MIT). A "Prompt as Contract" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

gabrielchinarro-pro/mainstay · MIT