# car-planner

Proposal scoring and search for [Common Agent Runtime](https://github.com/Parslee-ai/car).

## What it does

Sits between the model and `car-engine`: scores N candidate proposals using static verification + cost estimation, picks the best, and provides fallback ordering for replan scenarios.

Inspired by MARS (budget-aware MCTS) — uses `verify()` + `simulate()` as the evaluation function, **not LLM calls**. Pure Rust, zero inference cost.

## Usage

```rust,ignore
use car_planner::{Planner, PlannerConfig, ScoredProposal};

let planner = Planner::new(PlannerConfig::default());
let candidates = vec![proposal_a, proposal_b, proposal_c];
let ranked = planner.rank(&candidates, Some(&state), Some(&tools));
let best = &ranked[0]; // highest score first
```

## Where it fits

If you already have N candidate proposals, use this directly. If you also need CAR to *generate* the candidates via inference, use `car-active-planner`, which composes inference with this ranker. Exposed to FFI consumers as the standalone `rank_proposals` function.
