ruchydbg 0.1.0

ML-powered debugger for Ruchy with SBFL fault localization
Documentation
# ruchydbg

ML-powered debugger for Ruchy with SBFL fault localization, Oracle classification, and Toyota Way visualization.

## Features

- **SBFL (Spectrum-Based Fault Localization)**: 5 academic formulas (Tarantula, Ochiai, Jaccard, WongII, DStar)
- **Oracle Classifier**: 8 error categories with suggested fixes
- **MoE (Mixture of Experts)**: Domain-specific expert classifiers for improved accuracy
- **Drift Detection**: ADWIN-based concept drift monitoring
- **Delta Debugging**: Input minimization for fault isolation
- **Hansei Analysis**: Toyota Way reflection for continuous improvement
- **Export Formats**: ASCII, JSON, SARIF 2.1.0, Markdown

## Installation

```bash
cargo install --path .
```

## Usage

### Analyze with SBFL

```bash
ruchydbg analyze ./src -f ochiai -o ascii
ruchydbg analyze ./src -f tarantula -o json
```

### Classify Errors

```bash
ruchydbg classify "error[E0308]: mismatched types"
ruchydbg classify "borrow of moved value" -o json
```

### Generate Reports

```bash
ruchydbg report ./src -f ascii
ruchydbg report ./src -f json
```

### Show Capabilities

```bash
ruchydbg info
```

## Examples

```bash
cargo run --example basic_sbfl
cargo run --example oracle_classify
cargo run --example export_formats
```

## Academic Citations

| # | Citation | Contribution |
|---|----------|--------------|
| 1 | Jones et al. (2005) | Tarantula SBFL |
| 2 | Abreu et al. (2007) | Ochiai formula (75% improvement) |
| 3 | Breiman (2001) | Random Forests |
| 4 | Bifet & Gavaldà (2007) | ADWIN drift detection |
| 6 | Ohno (1988) | Toyota Production System |
| 7 | Liker (2004) | Hansei principle |
| 8 | Zeller (2002) | Delta debugging |
| 10 | Jacobs et al. (1991) | Mixture of Experts |
| 15 | Wong et al. (2016) | SBFL survey |

## Library Usage

```rust
use ruchydbg::{
    CoverageStats, DebugReport, SbflFormula,
    OracleClassifier, MoEOracle,
    MarkdownExporter, SarifReport,
};

// SBFL Analysis
let stats = CoverageStats::new(8, 2, 10, 10);
let score = SbflFormula::Ochiai.suspiciousness(&stats);

// Oracle Classification
let oracle = OracleClassifier::new();
let result = oracle.classify("error[E0308]: mismatched types");
println!("Category: {:?}, Confidence: {:.0}%",
    result.category, result.confidence * 100.0);

// Export to SARIF
let sarif = SarifReport::from_debug_report(&report);
println!("{}", sarif.to_json());
```

## Test Coverage

- 140 tests (unit + property-based + doctests)
- Property tests using proptest
- All modules have >80% coverage

## License

MIT