Expand description
Prompt sections: identity, schema, and deterministic rendering (PSP-10 system 23, Definition 4).
A section is a small, single-concern unit with typed front matter. Its
body is prose plus {{variable}} placeholders and nothing else — no
conditionals, loops, includes, or filters. perspt-prompt-macros
validates the files at build time and generates one typed struct per
section; SectionTemplate::render here is the single implementation
of the substitution rules both the generated code and the external
bundle scanner use.
Structs§
- Prompt
Section Id - Section identity,
"stage/section". - Prompt
Section Version - Monotone section version.
- Rendered
Section - A rendered section carrying its provenance-relevant identity.
- Section
Provenance - Ledger-facing provenance of one composed section.
- Section
Schema - A compiled section’s schema: what a replacement body must satisfy (system 25 — external bundles may replace a known section only under exactly this schema).
- Section
Template - A section template: schema plus the reviewed body text.
- VarSpec
- One declared variable in a section’s front matter.
Enums§
- Override
Origin - Where a resolved section came from (Definition 4’s override chain).
- Prompt
Message Role - The message slot a section renders into.
Constants§
- PROMPT_
DIGEST_ TAG - Domain tag for every prompt-plane digest.
Traits§
- Prompt
Section - The compile-time contract every generated section struct satisfies (system 23’s generated API).