Skip to main content

Prompt Contracts

Choose the Output Structure Early

Structure organizes information and directs attention. Markdown, JSON, and XML work well because they're information-dense formats heavily represented in training data. Pick the shape before details compete for attention.

# Task: Draft an architecture decision record for moving report generation from synchronous requests to asynchronous jobs.
## Context- Enterprise reports time out during peak usage.- Customers expect downloadable reports and email notifications.- Support needs explainable status for delayed jobs.
## Constraints- Preserve the existing API contract during rollout.- Keep audit logs for every generated report.- Support rollback without losing in-progress work.
## Options1. Queue-backed async jobs2. Scheduled batch generation3. Keep synchronous flow and optimize queries
## Return- Recommendation with trade-offs- Rollout and rollback plan- Observability gaps and validation criteria

The structure makes the decision reviewable: why this matters, what cannot break, which options were considered, and how success will be verified.

Add Constraints as Guardrails

Without constraints, the model fills gaps with assumptions. Define boundaries explicitly.

Unconstrained
Move file processing to background jobs.
Constrained
Design a migration plan for moving file processing from synchronous API requests to asynchronous jobs.

Constraints:
- Preserve the current API response contract during rollout.
- No user-visible regression for upload progress or error recovery.
- Preserve audit logs and idempotency guarantees.
- No schema change without a backfill and rollback plan.

Return affected systems, migration phases, risks, evidence needed, and decisions that require human approval.

The unconstrained version invites the agent to jump into implementation. The constrained version defines the operational envelope before code exists.


Next: Prompting by Example