Expand description
§Scribe Selection
Intelligent code selection and context extraction capabilities for the Scribe library. This crate provides advanced algorithms for selecting relevant code sections based on semantic understanding, dependency analysis, and contextual relevance.
Re-exports§
pub use ast_parser::AstChunk;
pub use ast_parser::AstLanguage;
pub use ast_parser::AstParser;
pub use ast_parser::AstSignature;
pub use bandit_router::BanditConfig;
pub use bandit_router::BanditRouter;
pub use bandit_router::BanditState;
pub use bandit_router::BanditStatistics;
pub use bandit_router::PerformanceFeedback;
pub use bandit_router::RoutingDecision;
pub use bandit_router::SelectionStrategy;
pub use bundler::BundleOptions;
pub use bundler::CodeBundle;
pub use bundler::CodeBundler;
pub use context::CodeContext;
pub use context::ContextExtractor;
pub use context::ContextFile;
pub use context::ContextOptions;
pub use demotion::ChunkInfo;
pub use demotion::CodeChunker;
pub use demotion::DemotionEngine;
pub use demotion::DemotionResult;
pub use demotion::FidelityMode;
pub use demotion::SignatureExtractor;
pub use quota::create_quota_manager;
pub use quota::CategoryQuota;
pub use quota::FileCategory;
pub use quota::QuotaAllocation;
pub use quota::QuotaManager;
pub use quota::QuotaScanResult;
pub use selector::CodeSelector;
pub use selector::SelectionCriteria;
pub use selector::SelectionResult;
pub use token_budget::apply_token_budget_selection;
pub use two_pass::CoverageGap;
pub use two_pass::FileInfo;
pub use two_pass::SelectionContext;
pub use two_pass::SelectionMetrics;
pub use two_pass::SelectionRule;
pub use two_pass::TwoPassConfig;
pub use two_pass::TwoPassResult;
pub use two_pass::TwoPassSelector;
Modules§
- ast_
parser - Tree-sitter based AST parsing for accurate code analysis
- bandit_
router - Bandit Router System for V5 Variant
- bundler
- Code bundler module responsible for turning a selection context into consumable artifacts. The implementation focuses on two lightweight formats (JSON and plain-text) to unblock the web service and CLI.
- context
- Context extraction module that prepares selected files for bundling.
- demotion
- Multi-Fidelity Demotion System for V4 variant
- quota
- selector
- Code selector module that wraps the token budget selection pipeline.
The selector consumes
FileInfo
records produced by the scanner and applies the multi-tier token budget logic from the legacy CLI. - token_
budget - Token budget selection logic previously implemented in the analyzer crate. This module provides a shared implementation that can be reused by both the library pipeline and external consumers without duplicating complex logic.
- two_
pass - Two-Pass Selection System for V5 Variant
Structs§
- Selection
Engine - Main entry point for intelligent code selection