Skip to main content

perspt_sdk/prompt/
mod.rs

1//! The model-conditioned prompt plane (PSP-10 systems 23–25).
2//!
3//! Prompt text is authored as small markdown section files with typed front
4//! matter, compiled at build time (`perspt-prompt-macros`) into typed
5//! structs. There is no template engine and no prompt database: dynamism is
6//! typed inclusion predicates, typed variables, and injected turn blocks;
7//! git reviews the text and the ledger records the exact program of every
8//! model call.
9
10pub mod accountant;
11pub mod budget;
12pub mod compose;
13pub mod context;
14pub mod dialect;
15pub mod digest;
16pub mod manifest;
17pub mod plan;
18pub mod route;
19pub mod section;
20pub mod stage;
21pub mod vars;
22
23pub use accountant::{AccountingMode, TokenAccountantRef};
24pub use budget::{fit_budget, BudgetFit};
25pub use compose::StageComposition;
26pub use context::{
27    assemble_resident, mandatory_closure, resident_page_digest, select_working_set, ContextBudget,
28    ContextPage, DependencyEnv, ResidentContext, ResidentOutcome, StateDependency,
29};
30pub use dialect::{
31    DialectRef, ModelDialect, ReasoningTracePolicy, SystemSlotPolicy, ToolCallConvention,
32};
33pub use digest::{
34    tool_surface_hash, CompiledPromptInvocation, CompiledPromptMessage, CompiledPromptProgram,
35};
36pub use manifest::{
37    ActivationBounds, ActivationState, ManifestEntry, PromptChangeRecord, PromptManifest,
38    ACTIVATION_BOOTSTRAP_RESAMPLES,
39};
40pub use plan::{ContextRequest, CounterexampleRef, IssuePromptPlan};
41pub use route::{PromptRoute, SectionOverride, SectionVariants};
42pub use section::{
43    OverrideOrigin, PromptMessageRole, PromptSection, PromptSectionId, PromptSectionVersion,
44    RenderedSection, SectionProvenance, SectionSchema, SectionTemplate, VarSpec, PROMPT_DIGEST_TAG,
45};
46pub use stage::PromptStage;
47pub use vars::{BoundedList, BoundedText, ListStyle, ObservationText, VarValue};