Skip to main content

Module prompt

Module prompt 

Source

Modules§

templates
Prompt templates are embedded at compile time from prompts/.

Functions§

all_examples
Return all embedded example files as (filename, content) pairs.
example_for_pattern
Return the embedded example .zwf content for a given pattern name.
examples_reference_block
Render a reference block listing the example .zwf files that live in ~/.zig/examples/. Used as the {{examples_reference}} variable in the create and update system prompts so the agent knows canonical pattern examples are available on disk to read from.
render
Render a prompt template by replacing {{variable}} placeholders with values from the provided map.
strip_front_matter
Strip YAML front matter from a prompt template.
write_examples_to_global_dir
Write all embedded example .zwf files to ~/.zig/examples/ so the agent can read them while designing or revising a workflow.