Skip to main content

Module section

Module section 

Source
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§

PromptSectionId
Section identity, "stage/section".
PromptSectionVersion
Monotone section version.
RenderedSection
A rendered section carrying its provenance-relevant identity.
SectionProvenance
Ledger-facing provenance of one composed section.
SectionSchema
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).
SectionTemplate
A section template: schema plus the reviewed body text.
VarSpec
One declared variable in a section’s front matter.

Enums§

OverrideOrigin
Where a resolved section came from (Definition 4’s override chain).
PromptMessageRole
The message slot a section renders into.

Constants§

PROMPT_DIGEST_TAG
Domain tag for every prompt-plane digest.

Traits§

PromptSection
The compile-time contract every generated section struct satisfies (system 23’s generated API).