prompt

prompt is a block command used for multiline text definitions. The block starts after prompt and ends at end.

Syntax

@promptVar prompt
Line 1
Line 2
end

Example

@newPrompt prompt
You are an expert web component developer for the WebSkel framework.
Your primary task is to create and modify web components based on user requests.
A component has the following structure: html, css and js.
end

This example is validated in tests/pipelines/basic/promptCommand.mjs. The resulting variable value is the exact multiline prompt text.

Step-by-Step Interaction

The parser reads every line between prompt and end as one block payload, preserving the multiline structure expected by downstream prompting workflows. After parsing finishes, the runtime decodes the block from internal SOP encoding and assigns the decoded text to the output variable. Any later command can consume that variable exactly like a regular string, so assign chains, macro expansions, and jsdef calls can reuse the same prompt artifact without re-escaping or reconstructing the text.

Runtime Behavior Notes

The prompt command always returns plain string content, and this behavior keeps prompt templates predictable when they pass through the dependency graph. The command is particularly valuable for long instruction sets because it avoids noisy quote management and reduces accidental formatting breakage. In practical flows, teams usually combine prompt with assign, macros, or jsdef commands to build final model-facing prompts from reusable text blocks.