prompt
Prompt
the user asks for a prompt to be written, refactored, or polished, or pastes an existing prompt or CLAUDE.md asking for improvement.
The output artifact uses a fixed seven-section scaffold. Load assets/template.md and fill it. The procedure below covers detection, inventory, shaping, linting, and emit.
Inventory the input
identify what the input contains before writing anything.
in seed mode — gather signal from the conversation. Note the task verb, the domain, any files referenced, constraints stated, register requested, audience implied, and stakes. List ambiguities worth surfacing to the user.
in refactor mode — extract every instruction in the source as a flat list with stable IDs (I-01, I-02, ...). The list is the preservation contract. Truth-conditions are sacred — register changes, the underlying requirements do not. Every ID must end up in at least one section of the output, or it has been dropped.
Shape into the template
load assets/template.md and fill its seven sections from the inventory.
stakes content sits at the close of the Task section. Name what is at risk and why this matters. There is no separate Why section anywhere in the artifact.