Skip to main content

Module preset

Module preset 

Source
Expand description

The Prompt-Generator Preset DTO.

A Preset is prompt-generator domain data, not part of the parser contract: a plugin produces its set (via LanguagePlugin::presets), but every other consumer — the report snapshot, the recommend console/prompt views — only reads presets and never parses anything. The type therefore lives here, away from plugin, so those reporting consumers do not couple to the parsing contract just to name this struct.

Structs§

Preset
A Prompt-Generator preset (a refactoring principle): a ready-to-paste AI instruction plus how the UI seeds the node selection for it. Each plugin builds its own set from config via LanguagePlugin::presets (the common catalog plus any language-specific presets).
PromptTemplate
The language-neutral prompt scaffolding the Prompt-Generator wraps a Preset in — the framing prose around a principle (intro, the doc-read note, the task protocol, the focus line, and the dependency-cycle note). Data, not code: it lives in the metric catalog (builtin.toml [prompt]) and is carried in the snapshot, so the CLI’s prompt format and the HTML viewer’s Prompt Generator render the same text from one source. {id} in a task line is substituted with the active preset id at render time.