Skip to main content

vtcode_core/prompts/
mod.rs

1//! System prompt generation with modular architecture
2//!
3//! This module provides flexible system prompt generation with
4//! template-based composition and context-aware customization.
5
6pub mod cache_aware;
7pub mod context;
8pub mod few_shot;
9pub mod guidelines;
10pub mod harness_limits;
11pub mod output_styles;
12pub mod render;
13pub(crate) mod resource_cache;
14pub mod resources;
15pub mod runtime_contract;
16pub(crate) mod runtime_guidance;
17pub mod sections;
18pub mod static_prompts;
19pub mod system;
20pub mod system_prompt_cache;
21pub mod temporal;
22
23// Re-export main types for backward compatibility
24pub use cache_aware::sort_tool_definitions;
25pub use context::PromptContext;
26pub use few_shot::{
27    DEFAULT_FEW_SHOT_BUDGET_TOKENS, FEW_SHOT_SECTION_HEADER, FewShotExample, FewShotStore, render_few_shot_section,
28};
29pub use guidelines::{
30    append_deferred_tools_prompt_section, append_fresh_deferred_tools_prompt_section,
31    append_fresh_runtime_tool_prompt_sections_for_model, append_runtime_tool_prompt_sections_for_model,
32    append_runtime_tool_prompt_sections_for_profile,
33};
34pub use harness_limits::{append_fresh_harness_limits_section, upsert_harness_limits_section};
35pub use resources::{
36    PromptTemplate, apply_system_prompt_layers, discover_prompt_templates, expand_prompt_template,
37    find_prompt_template, resolve_system_prompt_layers,
38};
39pub use runtime_contract::{RuntimePromptContract, append_runtime_mode_sections};
40pub use static_prompts::{
41    agent_identity_label, default_lightweight_prompt, default_system_prompt, minimal_instruction_text,
42    specialized_instruction_text, specialized_system_prompt,
43};
44pub use system::SystemPromptReport;
45pub use system::{
46    apply_coordinator_role_guidance, apply_output_style, generate_lightweight_instruction,
47    generate_specialized_instruction, generate_system_instruction_with_context_and_report, measure_system_prompt_size,
48};
49pub use system_prompt_cache::{PROMPT_CACHE, SystemPromptCache};
50pub use temporal::generate_temporal_date_context;