refactor: split pilot architecture
Remove the obsolete dashboard now that Langfuse is the analytics surface.\nIntroduce focused transport, model, and configuration modules while preserving the ai_review facade, and document the current runtime architecture.
This commit is contained in:
@@ -35,9 +35,9 @@ code never has to leave your network.
|
||||
|
||||
## Status
|
||||
|
||||
A **pilot** is live and reviewing real PRs. The full framework (`pragent init`,
|
||||
tiering as code, analyzer fan-out, `explain` / `replay`) is designed but not
|
||||
built — see [`docs/plans/`](docs/plans/).
|
||||
A **pilot** is live and reviewing real PRs. The current runtime architecture is
|
||||
documented in [`docs/architecture.md`](docs/architecture.md); older framework
|
||||
plans remain in [`docs/plans/`](docs/plans/) as historical design material.
|
||||
|
||||
What works today:
|
||||
|
||||
@@ -51,10 +51,12 @@ What works today:
|
||||
- `.pr-review.json` for per-repo focus and house rules (also the opt-in flag)
|
||||
- token-usage reporting on every review, measured from opencode `step_finish`
|
||||
events
|
||||
- Langfuse traces, equivalent-cost reporting, evaluation scores, and feedback
|
||||
harvesting
|
||||
- containment against hostile PR content (see [Security](#security))
|
||||
|
||||
Not yet: status checks, fail-close, attention tiering enforced in code (it is
|
||||
currently a skill the agent follows), multi-model routing.
|
||||
currently a skill the agent follows), multi-model routing, and a CLI framework.
|
||||
|
||||
## How a review runs
|
||||
|
||||
@@ -94,9 +96,8 @@ path is in [`pilot/README.md`](pilot/README.md).
|
||||
The model endpoint is supplied at runtime via `PRAGENT_MODEL_BASE_URL`; the
|
||||
committed `opencode.json` carries a placeholder.
|
||||
|
||||
Per-review token spend, latency and equivalent cost are shipped to a
|
||||
self-hosted Langfuse, split into `ollama` and `claude` environments so the two
|
||||
spend stories stay separate: [`pilot/README-langfuse.md`](pilot/README-langfuse.md).
|
||||
Per-review token spend, latency, equivalent cost, and evaluation scores are
|
||||
shipped to a self-hosted Langfuse: [`pilot/README-langfuse.md`](pilot/README-langfuse.md).
|
||||
Emission is a silent no-op unless `LANGFUSE_HOST` and the key pair are set.
|
||||
|
||||
## Extending it
|
||||
@@ -175,7 +176,7 @@ python3 pilot/cost_model.py --help # other mixes, volumes, models
|
||||
## Development
|
||||
|
||||
```bash
|
||||
python3 -m pytest tests -q # 137 tests, stdlib only, no network
|
||||
python3 -m pytest tests -q # stdlib-only tests, no network
|
||||
```
|
||||
|
||||
The pilot is stdlib-only Python by design — it runs from a bare `python:slim`
|
||||
|
||||
Reference in New Issue
Block a user