What is an "output contract" in a prompt?

The contract pins down the shape of the response so you can verify it programmatically. Example for a Magento scaffold prompt: "Output exactly these files in this order: 1) etc/module.xml, 2) etc/di.xml, 3) Api/<Entity>RepositoryInterface.php, 4) Model/<Entity>Repository.php. Each file in its own <file> block with the absolute path as the first line. No prose between files." This lets a downstream script extract files with regex and write them straight to disk, no copy-paste, no hallucinated filenames. Combine with a hook that runs php -l on each extracted PHP file as the eval loop.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude, prompt engineering

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.