Expand description
Prompt Runtime System
A dynamic prompt management system with:
- Section-based composition (static/dynamic)
- Cache management with boundary markers
- Runtime context injection
- Pre-processing hooks for Skills/Workflows triggering
- Prompt export for observability
§Migration Status
This module provides both:
- New dynamic system (PromptOrchestrator, PromptBuilder)
- Legacy compatibility functions (build_system_prompt, etc.)
The legacy functions are gradually being migrated to the new system.
Re-exports§
pub use section::PromptSection;pub use section::SectionContent;pub use section::SectionBuilder;pub use cache::SectionCache;pub use cache::CacheKey;pub use cache::CachedEntry;pub use cache::CacheStats;pub use cache::global_cache;pub use cache::clear_global_cache;pub use cache::estimate_tokens;pub use context::ContextInjector;pub use context::UserContext;pub use context::SystemContext;pub use context::ProjectType;pub use orchestrator::PromptOrchestrator;pub use orchestrator::PromptProfile;pub use orchestrator::PromptBuilder;pub use orchestrator::AssembledPrompt;pub use orchestrator::CACHE_BOUNDARY;pub use preprocess::PreProcessHook;pub use preprocess::ProcessResult;pub use preprocess::SkillPattern;pub use preprocess::WorkflowTrigger;pub use preprocess::preprocess;pub use dump::PromptDumper;pub use dump::DumpEntry;pub use dump::PromptAnalysis;pub use dump::DumpFileAnalysis;pub use dump::read_dump_file;pub use dump::analyze_dump_file;pub use orchestrator::PromptProfile as LegacyPromptProfile;pub use constants::*;
Modules§
- cache
- Section Cache System
- constants
- Prompt constants migrated from original prompt.rs
- context
- Runtime Context Injection
- dump
- Prompt Export and Observability
- orchestrator
- Prompt Orchestrator
- preprocess
- Pre-processing Hook for Skills/Workflows Trigger Detection
- section
- Section-based prompt composition
Structs§
- Overview
Context - Legacy OverviewContext for project overview generation Used by overview.rs to generate MATRIX.md content
Functions§
- build_
overview_ prompt - Build overview prompt from context (legacy compatibility) This function generates the AI prompt for MATRIX.md generation
- build_
system_ prompt - Build system prompt using the new orchestrator system
- build_
system_ prompt_ with_ workflows - Build system prompt with workflow support and LSP injection