concept-analyzer 0.1.1

A unified pipeline that analyzes code repositories and extracts first-principles instructions for AI agents
Documentation
//! Example showing how to process the output locally before publishing
//!
//! Run with: cargo run --example process_output

use anyhow::Result;
use concept_analyzer::analyze_repository;
use std::path::Path;

#[tokio::main]
async fn main() -> Result<()> {
    env_logger::init();

    // For this example, we'll analyze and then process the output
    // In real usage, you might want to use the pipeline directly
    // to access the FirstPrinciplesOutput before S3 upload

    let repo_path = Path::new(".");
    let s3_url = analyze_repository(
        repo_path,
        "my-bucket",
        "temp/analysis.json",
        std::env::var("LLM_API_KEY")?,
        Some(4),
    )
    .await?;

    println!("Analysis published to: {}", s3_url);

    // In a real scenario, you could:
    // 1. Download the JSON from S3
    // 2. Parse it as FirstPrinciplesOutput
    // 3. Generate additional artifacts (diagrams, docs, etc.)
    // 4. Send to other systems

    // Example of what you'd do with the output:
    show_example_processing();

    Ok(())
}

fn show_example_processing() {
    println!("\nExample of processing the output:");
    println!("1. Generate architecture diagrams from concept relationships");
    println!("2. Create task tickets from rebuild instructions");
    println!("3. Identify security concerns in critical gaps");
    println!("4. Build dependency graphs from the build order");
    println!("5. Generate API documentation from interfaces");
}