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 ast_parser::EntityLocation;pub use ast_parser::EntityQuery;pub use ast_parser::EntityType;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 covering_set::CoveringSetComputer;pub use covering_set::CoveringSetFile;pub use covering_set::CoveringSetOptions;pub use covering_set::CoveringSetResult;pub use covering_set::CoveringSetStatistics;pub use covering_set::InclusionReason;pub use simple_router::ProjectSize;pub use simple_router::RoutingDecision;pub use simple_router::SelectionStrategy;pub use simple_router::SimpleRouter;pub use simple_router::TimeConstraint;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
- 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.
- covering_
set - Covering set computation for targeted code selection.
- demotion
- Multi-Fidelity Demotion System for V4 variant
- quota
- selector
- Code selector module that wraps the token budget selection pipeline.
The selector consumes
FileInforecords produced by the scanner and applies the multi-tier token budget logic from the legacy CLI. - simple_
router - Simple rule-based router for file selection strategy selection.
- 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