hotpromptThe framework

Code & engineering

6 decisions a prompt of this kind should make on purpose, and 7 things worth leaving out.

Asks that land here

write a function, write a script, component, query, api endpoint, class, method, refactor, parse, cli, code, implement, react component, hook, endpoint, bash script, python, javascript, typescript, algorithm

The moves
  1. +Language / stack & versionInfer from filename/snippet/framework; else pick the modern mainstream default (Python 3.11+, TS+React 18, PostgreSQL) and state the assumption.
  2. +Inputs, outputs & signatureState an explicit typed signature, name it descriptively, and show one example input and its expected output.
  3. +Edge cases & error handlingHandle empty/null/malformed input; choose and state an explicit failure mode (raise vs sentinel).
  4. +Constraints & dependenciesPrefer stdlib / no new deps unless clearly needed; call out any dependency and note complexity if it matters.
  5. +Surrounding code / integration pointWrite self-contained idiomatic code as one pasteable unit; note where it's meant to be called from.
  6. +Output shape (code / explained / tests)Return the complete code first as one block, a brief note on key decisions below, and a couple of usage/test examples.

Left out for this type: role prompting ('senior 10x engineer'); tone/voice instructions ('friendly','professional'); vague 'make it clean, efficient, well-structured'; 'add comments' as a blanket ask; 'use best practices' (name the specific one); over-long company/product backstory; asking for maximal generality on one concrete use

Try it on one of these