Expand description
Context engineering for OpenDev.
This crate provides:
- Compaction: Staged context optimization (70%/80%/85%/90%/99% thresholds)
- ValidatedMessageList: Write-time enforcement of message pair invariants
- MessagePairValidator: Structural integrity validation and repair
- ContextPicker: Dynamic context selection for LLM calls
Re-exports§
pub use compaction::ArtifactIndex;pub use compaction::CompactionPreview;pub use compaction::ContextCompactor;pub use compaction::OptimizationLevel;pub use compaction::StagePreview;pub use compaction::compact_preview;pub use compaction::count_tokens;pub use context_picker::AssembledContext;pub use context_picker::ContextCategory;pub use context_picker::ContextPiece;pub use context_picker::ContextReason;pub use environment::EnvironmentContext;pub use environment::InstructionFile;pub use environment::discover_instruction_files;pub use environment::resolve_instruction_paths;pub use pair_validator::MessagePairValidator;pub use pair_validator::ValidationResult;pub use pair_validator::ViolationType;pub use retrieval::CodebaseIndexer;pub use retrieval::ContextRetriever;pub use retrieval::ContextTokenMonitor;pub use retrieval::Entities;pub use retrieval::EntityExtractor;pub use retrieval::FileMatch;pub use retrieval::RetrievalContext;pub use subdir_instructions::SubdirInstruction;pub use subdir_instructions::SubdirInstructionTracker;pub use validated_list::ValidatedMessageList;pub use worktree::WorktreeInfo;pub use worktree::WorktreeManager;
Modules§
- compaction
- Auto-compaction of conversation history when approaching context limits.
- context_
picker - Dynamic context selection for LLM calls.
- environment
- Environment context collector for system prompt injection.
- pair_
validator - Message pair integrity validator for API message lists.
- retrieval
- subdir_
instructions - Lazy per-subdirectory instruction injection.
- validated_
list - ValidatedMessageList — write-time enforcement of message pair invariants.
- worktree
- Git worktree manager — create and manage isolated workspaces.