1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Core library for bito-lint.
//!
//! This crate provides writing analysis functionality used by the
//! `bito-lint` CLI and MCP server.
//!
//! # Modules
//!
//! - [`config`] — Configuration loading and management
//! - [`error`] — Error types and result aliases
//! - [`markdown`] — Markdown processing (strip to prose, extract headings)
//! - [`tokens`] — Token counting via tiktoken
//! - [`readability`] — Flesch-Kincaid Grade Level scoring
//! - [`completeness`] — Template section validation
//! - [`grammar`] — Grammar checking and passive voice detection
//! - [`analysis`] — Comprehensive writing analysis (18 features)
//!
//! # Quick Start
//!
//! ```no_run
//! use bito_lint_core::tokens;
//!
//! let report = tokens::count_tokens("Hello, world!", Some(100)).unwrap();
//! println!("Tokens: {}, over budget: {}", report.count, report.over_budget);
//! ```
pub use ;
pub use ;
/// Default maximum input size: 5 MiB.
pub const DEFAULT_MAX_INPUT_BYTES: usize = 5_242_880;
/// Validate that input text does not exceed the configured size limit.
///
/// Pass `None` for `max_bytes` to skip validation.
pub const