Files
yvgude--lean-ctx/docs/contracts/autonomy-drivers-v1.md
T
wehub-resource-sync 26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:30 +08:00

40 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Autonomy Drivers v1 (AutonomyDriversV1)
GitLab: `#2313`
LeanCTX enthält deterministische Helper-Driver, die Workflows schneller und zuverlässiger machen, ohne “full autonomy” zu sein. Autonomy Drivers v1 standardisiert **Trigger**, **Guards** (Budget/SLO/Boundary) und **Proof/Reports**.
## Ziele
- Deterministisch: gleiche Inputs + Policy → gleicher DriverPlan.
- Guarded: Budget/SLO/Boundary verhindern overfetch / token burn.
- Auditierbar: DriverReport speichert **welche Driver liefen** + **warum** (bounded, redactionsafe).
- Kompatibel: Default bleibt konservativ; OptIn per Profile möglich.
## Driver Set (v1)
- `preload`: Session-start context bootstrap (`ctx_preload` / fallback `ctx_overview`)
- `prefetch`: bounded related reads (kleine BlastRadius, capped)
- `dedup`: cache dedup (`ctx_dedup`)
- `response`: response shaping (`ctx_response`) — niemals auf JSONOutputs
## Guards
- **Budget**: skip unter Budget-Stress (warn/throttle/block snapshots).
- **SLO**: skip wenn SLO-Throttle/Block (reduziert IO/CPU).
- **Boundary**: alle file reads durch `io_boundary::jail_and_check_path` (PathJail + secret-like checks).
## Report / Proof
- Store: `~/.lean-ctx/autonomy_drivers_v1.json` (bounded)
- Proof export: `project/.lean-ctx/proofs/autonomy-drivers-v1_<timestamp>.json` via `ctx_proof`
- Evidence: `lean-ctx proof` schreibt Artefakt, kann als Evidence Key referenziert werden (siehe Evidence Ledger).
## Relevanter Code
- Contract + Store: `rust/src/core/autonomy_drivers.rs`
- Driver hooks + execution: `rust/src/tools/autonomy.rs`
- Proof export: `rust/src/tools/ctx_proof.rs`
- Boundary: `rust/src/core/io_boundary.rs`, `rust/src/core/pathjail.rs`