better-prompt
High-capability models need clear intent, causal invariants, and crisp authority boundaries — not micromanaged step scripts or defensive shouting. Every token in a prompt competes for attention: keep instructions that resolve genuine ambiguity or protect non-negotiable boundaries, and strip scaffolding the model already handles better on its own.
Inspect the full call boundary before rewriting prose
Read the prompt alongside its surrounding system: calling code, message-role assembly, tool schemas, structured-output definitions, context injection, and existing evals or failure traces. Many "prompt bugs" are actually layer leaks — untrusted retrieved text concatenated into privileged instructions, ambiguous tool parameters compensated for with paragraphs of prose, or conflicting patches accumulated across incidents. Fix or name the broken layer rather than piling on stronger wording.
Preserve working behavior and settled user intent. Scale the intervention to the defect: a boundary bug may need one precise invariant, whereas a legacy prompt built around forced chain-of-thought scripts and contradictory negative lists warrants a clean structural rebuild. Resolve low-cost formatting or structural details via explicit assumptions; ask the user only when intent, risk tolerance, or authorization is genuinely ambiguous.
Specify invariants and decision criteria, not rituals
Audit every procedural rule by asking what failure it prevents. Lock sequence only when order is required by authorization gates, causal data dependencies, compliance, or reproducibility. Everywhere else, replace rigid step checklists, arbitrary retry counts, and legacy reasoning incantations ("think step by step", ALL-CAPS threats, persona flattery) with the target outcome, the trade-off priority when goals collide, and the observable condition for stopping or escalating. Explaining why a boundary exists lets a capable model generalize accurately to unseen edge cases instead of gaming the literal example.
Keep each rule in one canonical place. Frame expectations positively and concretely; reserve explicit prohibitions for hard authority, safety, or scope guardrails, pairing each with the required fallback action. Keep examples scarce and diagnostic — include one only when prose alone leaves a subtle format, tone, or classification boundary ambiguous, since examples strongly anchor output distribution.
Load domain and runtime guidance selectively
Pull in only the references matching the active task shape so unrelated heuristics do not muddy priorities: