"The template is the whole behavior. Rendering just drops your words into the hole marked {input}."
The Template Is the Behavior
A macro's behavior is entirely its prompt template — a short instruction with a slot. 'Fix the spelling and grammar; return only the corrected text.' 'Translate to Korean.' 'Rewrite this in a warmer tone.' The difference between a typo-fixer and a translator is one string. That's the beauty of the model: to make a new transformation, you write a new instruction, not new code. The macro is the prompt, and the prompt is text.
Dropping In the Selection
Rendering is the simplest possible operation: find {input} in the template and substitute the captured selection for it. A template like Fix the grammar:\n\n{input} becomes the instruction followed by your actual text. There's no parsing, no logic, no conditionals — just a string with a hole and the selection going into the hole. Keeping rendering this dumb is what keeps the macro a pure description: all the intelligence is downstream, in the brain, not in how the prompt gets assembled.
When the Template Has No {input}
Some macros don't put the selection in the middle — they're a standing instruction that the input should follow. The general-purpose 'Prompt' macro is like this: its template is an open instruction, and whatever you selected (or typed) is appended after a blank line rather than substituted into a slot. So the rule has two branches: if the template contains {input}, substitute there; if it doesn't, append the input after a blank line. Both produce a finished prompt; neither requires the template author to think about mechanics.
TEMPLATE WITH {input}:
"Fix the grammar:\n\n{input}" + sel="teh cat"
-> "Fix the grammar:\n\nteh cat"
TEMPLATE WITHOUT {input}:
"Summarize the following." + sel="long text..."
-> "Summarize the following.\n\nlong text..." (appended)