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::{BudgetFit, fit_budget};
25pub use compose::StageComposition;
26pub use context::{
27    ContextBudget, ContextPage, DependencyEnv, ResidentContext, ResidentOutcome, StateDependency,
28    assemble_resident, mandatory_closure, resident_page_digest, select_working_set,
29};
30pub use dialect::{
31    DialectRef, ModelDialect, ReasoningTracePolicy, SystemSlotPolicy, ToolCallConvention,
32};
33pub use digest::{
34    CompiledPromptInvocation, CompiledPromptMessage, CompiledPromptProgram, tool_surface_hash,
35};
36pub use manifest::{
37    ACTIVATION_BOOTSTRAP_RESAMPLES, ActivationBounds, ActivationState, ManifestEntry,
38    PromptChangeRecord, PromptManifest,
39};
40pub use plan::{ContextRequest, CounterexampleRef, IssuePromptPlan};
41pub use route::{PromptRoute, SectionOverride, SectionVariants};
42pub use section::{
43    OverrideOrigin, PROMPT_DIGEST_TAG, PromptMessageRole, PromptSection, PromptSectionId,
44    PromptSectionVersion, RenderedSection, SectionProvenance, SectionSchema, SectionTemplate,
45    VarSpec,
46};
47pub use stage::PromptStage;
48pub use vars::{BoundedList, BoundedText, ListStyle, ObservationText, VarValue};