ast-outline 0.2.0

Fast, AST-based structural outline for source files. Built for LLM coding agents and humans.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod event;
pub mod decide;
pub mod claude_code;
pub mod gemini;

use decide::DecideOpts;

pub fn run(protocol: &str, min_lines: usize, always: bool) -> i32 {
    let opts = DecideOpts { min_lines, always };
    match protocol {
        "claude-code" => claude_code::run(opts),
        "gemini" => gemini::run(opts),
        other => {
            eprintln!("ast-outline hook: unknown --protocol '{}'", other);
            2
        }
    }
}