Skip to main content

Module prompt

Module prompt 

Source
Expand description

The model-conditioned prompt plane (PSP-10 systems 23–25).

Prompt text is authored as small markdown section files with typed front matter, compiled at build time (perspt-prompt-macros) into typed structs. There is no template engine and no prompt database: dynamism is typed inclusion predicates, typed variables, and injected turn blocks; git reviews the text and the ledger records the exact program of every model call.

Re-exports§

pub use accountant::AccountingMode;
pub use accountant::TokenAccountantRef;
pub use budget::fit_budget;
pub use budget::BudgetFit;
pub use compose::StageComposition;
pub use context::assemble_resident;
pub use context::mandatory_closure;
pub use context::resident_page_digest;
pub use context::select_working_set;
pub use context::ContextBudget;
pub use context::ContextPage;
pub use context::DependencyEnv;
pub use context::ResidentContext;
pub use context::ResidentOutcome;
pub use context::StateDependency;
pub use dialect::DialectRef;
pub use dialect::ModelDialect;
pub use dialect::ReasoningTracePolicy;
pub use dialect::SystemSlotPolicy;
pub use dialect::ToolCallConvention;
pub use digest::tool_surface_hash;
pub use digest::CompiledPromptInvocation;
pub use digest::CompiledPromptMessage;
pub use digest::CompiledPromptProgram;
pub use manifest::ActivationBounds;
pub use manifest::ActivationState;
pub use manifest::ManifestEntry;
pub use manifest::PromptChangeRecord;
pub use manifest::PromptManifest;
pub use manifest::ACTIVATION_BOOTSTRAP_RESAMPLES;
pub use plan::ContextRequest;
pub use plan::CounterexampleRef;
pub use plan::IssuePromptPlan;
pub use route::PromptRoute;
pub use route::SectionOverride;
pub use route::SectionVariants;
pub use section::OverrideOrigin;
pub use section::PromptMessageRole;
pub use section::PromptSection;
pub use section::PromptSectionId;
pub use section::PromptSectionVersion;
pub use section::RenderedSection;
pub use section::SectionProvenance;
pub use section::SectionSchema;
pub use section::SectionTemplate;
pub use section::VarSpec;
pub use section::PROMPT_DIGEST_TAG;
pub use stage::PromptStage;
pub use vars::BoundedList;
pub use vars::BoundedText;
pub use vars::ListStyle;
pub use vars::ObservationText;
pub use vars::VarValue;

Modules§

accountant
Versioned token accounting (Definition 4’s size function; Definition 6’s accountant c).
budget
Deterministic prompt budget fitting (Definition 4, resolved decision 11).
compose
Stage composition (PSP-10 system 24).
context
Resident context as paged memory (PSP-10 Definition 6, system 24).
dialect
Model dialects (PSP-10 system 24).
digest
Compiled prompt programs and their digests (PSP-10 system 23).
manifest
Section manifests and measured prompt activation (PSP-10 system 25, Gate AE).
plan
Issue-conditioned prompt plans (PSP-10 system 23).
route
Prompt routes and per-section override resolution (Definition 4).
section
Prompt sections: identity, schema, and deterministic rendering (PSP-10 system 23, Definition 4).
stage
Prompt stages (PSP-10 system 23’s runtime types).
vars
Typed section variables and their deterministic rendering rules (PSP-10 system 23).