Releases: waterworkshq/bluei
Release list
v0.2.0-alpha.6 — Economics
v0.2.0-alpha.6 — "Economics"
⚠️ Pre-release software. Ships inert — the Model Governor records recommendations but the live fix path is byte-identical to alpha.5. No live model downgrades until beta.1.
Make the deterministic flywheel's cost advantage measurable and routable.
What's new
Model Governor (ADR-0022)
A tier-selection function (bluei/engine/model_governor.py) that recommends which Routing Ladder tier (tier-0 / tier-1 / tier-2 / escalate) should handle a Finding the deterministic cascade could not resolve. The sole primary signal is rule-family deterministic coverage (seeded Pattern/Recipe/Bundle count). High coverage → cheap model; low/none → frontier (the coverage gap).
- Ships inert. The live call site uses an identity default (returns
tier-2= today's behavior). The selection function is injected viaRunContext.selection_fnso beta.1's swap is a config flip, not a code edit. - No hardcoded model ids. The Governor emits only a tier ordinal — tier→model resolution is the backend's job at invocation via model discovery. Zero vendor model-id literals in the module.
- The
apply_claude_fixcall,model_name, andcost_trackerare byte-identical to alpha.5.
Benchmark Harness (internal dev tool)
bluei/tools/benchmark/ + bluei/engine/corpus_manifest.py + bluei benchmark CLI. Replays the synthetic Seed Library corpus (130 entries across 28 rule families: 38 Golden Bundles + 38 seeded Patterns + 54 Recipes) through the cascade-simulation proxy + the Model Governor, producing:
- Per-rule-family coverage gap analysis — which families resolve deterministically, which reach the Governor, which route to
tier-2(the expensive gap). Drives the flywheel improvement loop. - Flywheel Score —
$ avoided per Findingunder new-vs-old routing via mocked rates (explicit two-rate formula).
Static analysis only — no model invocation. Reproducible across runs.
User-facing "$ avoided" statistic
The report/dashboard now surfaces the aggregate $ avoided = savings_usd + routing_savings_usd. Under alpha.6's identity default the routing contribution is $0.00 (active in beta.1).
Summary
- 1 new ADR (0022 — Model Governor locus + inert default + discovery-based model identity)
- 4 new CONTEXT terms (Model Governor, Routing Ladder, Benchmark Harness, Flywheel Score)
- 6463 → 6552 tests (+89 new, 0 regressions)
- Ships inert — all mechanisms proven synthetically; no live runs before 0.2.0 stable
Deferred to beta.1
Act-on-recommendation (live default flip), real model discovery, validation-stability measurement, validation-history + file-criticality routing signals. See ROADMAP for the full deferral table.
Full release notes: CHANGELOG.md
v0.2.0-alpha.5 — Repo Native
What's new
Repo-aware fixes (Taste Atlas). bluei now considers each repo's preferred conventions when generating fixes. A seed library of framework-specific conventions (Django, pytest, React) is injected into LLM fix prompts — so a Django repo gets fix suggestions that respect Django idioms, not generic Python advice. This is the first step toward bluei understanding how each repo prefers its code.
Campaigns as evidence instruments (Campaign Lab). Campaigns can now declare a learning objective — a target asset to gather evidence for. A campaign targeting an emergent rule will run shadow validation to advance its lifecycle. One targeting a pattern family will collect dry-replay evidence to feed future promotion decisions. Campaigns gather evidence only; they never make governance decisions.
Graduated plugin detectors. Emergent rules that prove themselves through shadow validation can now be promoted into standalone plugin detectors. A build-time generator produces a complete, self-contained plugin pack from any graduated rule. The first worked example ships: an eslint no-console detector that runs without wrapping an external linter.
Structural code matching. Emergent rules can now match code by its AST shape, not just by text or regex. A rule learned from one snippet will catch structurally similar code even when variable names differ. Python-only in this release; TypeScript structural matching is deferred.
Stats
- 6,463 tests (+62 from alpha.4), 0 regressions
- Zero new architecture decisions (integration release — all four features wire existing infrastructure)
- All mechanisms proven by synthetic tests only (no live repo runs until 0.2.0 stable)
v0.2.0-alpha.4 — Deterministic Assets
v0.2.0-alpha.4 — Deterministic Assets
Structural Replay (ADR-0019): AST-aware Pattern application on literal miss
with two-stage confidence gate (confidence ≥ 0.9 AND fuzzy match ≥ threshold
AND binding-map completeness = 1.0). Textual splice preserves comments.
Recipe Foundry (ADR-0020): Build-time LLM-authoring pipeline producing
deterministic Recipe YAML from seeded Patterns. 37 canonical seeded-Recipes
produced via first Foundry run. Policy-driven approval (gate_open default,
gate_closed opt-in with bluei learn inbox loop).
Rule Hatchery (ADR-0021): Regex-based detection extraction replacing the
rule-name stub. Rule-owned negative_examples for FP measurement. Bundle
gate dropped (vacuous — no bundle links to emergent rules).
38 seeded Patterns across 12 rule families. bluei learn governance decision
verbs (approve/reject/pause/resume/retire). eslint autofix wildcard. 6401 tests.
v0.2.0-alpha.3 — Evidence Foundation
Evidence Foundation
Populates the empty alpha.2 substrate with provenance-aware mining infrastructure, authoritative guidelines, envelope field completion, and a synthesize-then-validate Seed Library pipeline shipping 38 validated canonical bundles across Python (ruff) and JavaScript (eslint).
The linter is an oracle, not a source. All fixture content is synthesized as original bluei-owned work and verified: the before must trigger the rule, the after must come back clean.
What's New
Provenance-Aware Mining Infrastructure
open_pattern_store()factory — canonical construction path; loads seeded patterns at all 4 production sitesregister_asset()producer interface — centralized dedup + source stamping for pattern extraction and future alpha.4 producers- Provenance by storage locus — product dirs =
authoritative-seed(ACTIVE bypass), repo-local =mined(governance gate)
Envelope Field Completion (deferred from alpha.2)
imports_touched— new visitor preserves real module names (Python + TS/JS)validation_commands_passed—_run_baseline_validationreturnsTuple[bool, List[str]]; Dry Replay carries real check namesrule_family—derive_rule_familypreserves ruff letter-coded groups (B/E/F/S/C4) for per-family SPRT calibration- GoldenBundle +2 additive fields (
imports_touched,negative_examples)
Authoritative Guidelines (ADR-0017)
- PEP 8 naming, OWASP input validation, TypeScript conventions as prompt-context YAML
- Loaded by rule family + language into LLM fix prompts via Directive Seeding
- NOT governed assets — they do not flow through the Operator Control Plane
SPRT Per-Family Calibration
- Synthetic variation generator + calibration harness
- Per-family
p_healthy/p_brokenoverride fromcalibration.yaml - Degenerate distributions fall back to ADR-0012 hand-picked defaults
Synthesize-then-Validate Seed Library (ADR-0018)
synthesizer.py— LLM generates canonical before/after/negative per topicvalidator.py— linter oracle verifies before triggers + after is cleanpipeline.py— driver with Python (20 topics) + JavaScript (10 topics)- 38 validated bundles shipped: 30 Python + 7 JavaScript + 1 original
- Oracle rejection rate: 5/43 (12%) — quality gate working as designed
What's NOT Included
- No seeded Patterns — all shipped ruff/eslint rules are autofixable (Bundle only). The Pattern replay path activates post-stable when bluei mines real repos and encounters context-specific fixes.
- No seeded Recipes — Recipe generation is a future extension for alpha.4's Recipe Foundry.
- No live repo execution — pre-stable constraint; the system will not run on any live repo before 0.2.0 stable.
Stats
- 2 new ADRs: 0017 (guidelines as prompt-context), 0018 (synthesized, not mined)
- Test suite: 6245 → 6295 (+50 tests, all additive)
- 38 validated bundles: B006, B007, B015, B017, B018, B028, B904, C400, C416, E701, E711, E712, E722, F401, F541, F601, F841, N806, PLR1722, RUF005, RUF013, S105, S324, SIM101, SIM118, SIM201, T201, UP031, UP032, W291 (Python); no-var, no-console, no-unreachable, no-debugger, prefer-const, no-dupe-keys, no-empty (JavaScript)
- Validated against: ruff 0.15.7, eslint v10.6.0
Still pre-release software. Do not use in production.
v0.2.0-alpha.2 — Safe Learning
bluei v0.2.0-alpha.2 — Safe Learning
The safety substrate for learned automation. Governance, evidence collection, fix validation, and statistical demotion — all shipping inert (proven by synthetic tests, unexercised on real data until alpha.3 self-seeding populates the evidence base).
⚠️ Pre-release software. Do not use in production. Use for evaluation, testing, and contributions only.
Operator Control Plane
Governance over auto-acting assets — Patterns, Recipes, AST transforms, and Emergent Rules — through a unified, event-sourced substrate:
- Event-sourced governance trail —
approval_records.jsonlis the single source of truth. Governance State (ACTIVE / PAUSED / RETIRED) is a read-time projection (most-recent-decision-wins). No separate state file. Crash-safe, auditable. No-op with empty trail. - Per-class policy-driven promotion gate —
promote_pattern_to_recipere-routed through an approval gate. Write-producing promotions are gate-closed by default (queue ApprovalRecord, no YAML written). In-place mutations are gate-open-with-audit. Policy file with per-asset-class per-transition mode. - Cascade-stage consultation — all 4 cascade stages consult Governance State. PAUSED/RETIRED assets are skipped. Per-candidate fallthrough for Patterns (PAUSED exact match falls through to structural/fuzzy).
- Safe-mode tri-state flag —
learning.mode(active/audit_only/paused). Ceilings over per-class policy. Paused freezes everything; audit_only forces gate-closed and disables SPRT firing. bluei learnCLI — unified read/inbox surface:inbox(pending approvals),status(governance + native + SPRT evidence),audit(full decision history),bundle(create Golden Validation Bundle from known-good fix). Write-verbs stay native.
Golden Validation Bundles
A validation contract for learned fixes — regression fixtures, not just confidence scores:
- Hybrid storage — product fixtures (
bluei/engine/golden_bundles/) ship curated and public; repo state (repos/<name>/state/golden_bundles/) is operator-private. Privacy enforced by filesystem layout. - Minimal forward-compatible schema — before/after/detector-before/after/validation_command. Additive fields land in alpha.3 without breaking.
- ruff-b904 proof fixture — first product fixture, validating the substrate end-to-end.
- Bundle-gated promotion — Patterns with zero bundle references cannot be promoted to Recipes under gate-closed policy.
Dry Replay
Non-mutating evidence collection — record what a Pattern would have done without affecting the live worktree:
- File-level checkpoint/restore — save original content before fix flow → restore original → apply Pattern → validate → record outcome → restore winner. Worktree state unchanged after Dry Replay.
- Per-cycle cap — 20 attempts per cycle, prioritized oldest-first. Cap limits attempts (outcome unknown until after expensive validation).
dry_replay.jsonl— append-only sink withrun_id,pattern_id,finding_id,would_have_outcome(HIT/MISS/FAILURE). MISS outcomes don't contribute to SPRT.
SPRT Demotion
Two-sided Wald's Sequential Probability Ratio Test replaces hardcoded demotion thresholds:
- Risk-tolerance inputs — operators tune α (false-demotion rate), β (false-keep rate), p₀ (broken success rate), p₁ (healthy success rate). Defaults: 0.01/0.01/0.50/0.90. The "3 in 10 at 40%" emerges as a derived instance, not a magic number.
- Structural hysteresis — LLR ≥ A → auto-promote (healthy); LLR ≤ B → auto_demote (broken). FAIL is ~2.7× more impactful than HIT.
- Recomputed from durable stores — LLR is a pure function of
dry_replay.jsonloutcomes since the most recent reset boundary. No stored accumulator; crash-safe.
Plumbing
run_idcorrelation key — UUID4 per CLI invocation, stamped oncascade_resolutions.jsonl,cost_log.jsonl, anddry_replay.jsonl. Enables cross-cycle joins.- Cascade-internal savings — Pattern/composite replay wins inside the cascade now contribute real $ savings (previously counts-only).
ADRs
| ADR | Decision |
|---|---|
| 0006 | All 4 asset classes governed through unified substrate |
| 0007 | Policy-driven promotion, split default (write-producing gate-closed) |
| 0008 | Governance State = projection of ApprovalRecord trail (event-sourcing) |
| 0009 | Hybrid bundle storage, filesystem-boundaried privacy |
| 0010 | run_id correlation key on ledger sinks |
| 0011 | Dry Replay scope (matched-but-not-selected, capped) + file-level checkpoint |
| 0012 | Two-sided SPRT for demotion/re-promotion; PAUSED-only effect; LLR recomputed |
| 0013 | Safe-mode tri-state flag (active/audit_only/paused) |
| 0015 | bluei learn namespace (read unified, write native) |
| 0016 | Bundle schema minimal and forward-compatible |
Testing
6,245 tests (+128 from alpha.1). All synthetic — no live cycles run during alpha.2 by design.
What's Next
v0.2.0-alpha.3 "Evidence Foundation" — self-seed the substrate from vetted open-source data. The system will not run on any live repo before 0.2.0 stable, so the evidence base must be pre-populated from proven historical fixes, not auto-discovered from unvetted code.
Full changelog: CHANGELOG.md
v0.2.0-alpha.1 — Evidence
bluei v0.2.0-alpha.1 — Evidence
First release of the 0.2.0 line — the deterministic flywheel era. This release makes the Deterministic Flywheel visible. It is observability only — no fix-behavior changes, no auto-promotion. The thesis: prove the flywheel's value with measurement before alpha.2 introduces the (riskier) learning/promotion machinery.
⚠️ Pre-release software. Do not use in production. Use for evaluation, testing, and contributions only.
Flywheel Ledger
The deterministic-vs-LLM resolution picture, surfaced across the clean summary, report (markdown + HTML), and the dashboard:
- Per-stage resolution counts — which cascade stage won (linter / recipe / pattern-replay / composite-pattern / ast) vs. LLM fallback vs. exhausted.
- Honest replay outcomes — three-way HIT / MISS / FAILURE (replacing the mislabeled
skip_count, which silently held validation failures). - Standalone-Pattern-replay $ savings — observed substitution cost avoided (grounded, not counterfactual; built-in deterministic stages report throughput, not dollars).
- Rates as
num/denom (%)overfindings_attempted— the denominator is always shown beside the rate. - A dedicated
cascade_resolutions.jsonlsink + an in-memoryledger_recordsaccumulator feed aflywheel_ledgerblock instatus.json.
Pattern Court Lite
Learned Patterns become inspectable and their replay evidence honest (observe only; demotion/promotion deferred to alpha.2):
ReplayOutcomeenum — HIT/MISS/FAILURE with correct storage mapping and a newlast_failed_atstamp.- Evidence envelope —
last_failed_at+excluded_paths(enforced at the lookup layer so scoped-out Patterns never become candidates). - Explainability — enriched
patterns show(3-way counts, last failure, excluded scope) + aMISScolumn inpatterns list. - Producer — new
patterns exclude/patterns unexcludesubcommands makeexcluded_pathsreal (not inert scaffolding).
Decisions
Five ADRs record the load-bearing choices: dedicated ledger sink (0001), findings_attempted denominator (0002), hybrid savings methodology (0003), three-way replay taxonomy with exactly-once recording (0004), and write-time per-cycle aggregation via the in-memory accumulator (0005).
Carried forward to alpha.2 ("Safe Learning")
Shadow / dry replay, demotion & promotion triggers, the capture-infra envelope fields (imports_touched, validation_commands_passed, negative-example store, rule_family), cascade-internal savings instrumentation, the bluei savings CLI, and the run_id correlation key (add before any cumulative/cross-cycle feature). Tracked in the ROADMAP "Carried forward from v0.2.0-alpha.1" table.
Quality
- 6,121 tests passing, 9 skipped, 0 failures.
- Post-release code review: 10/10 invariant checks pass, 7 non-blocking findings addressed.
- Scope verified additive against the
v0.1.0-beta.1baseline.
v0.1.0-beta.1 — Post-alpha hardening
bluei v0.1.0-beta.1 — Post-alpha hardening
This is the alpha → beta transition for the 0.1.0 line. It contains no new user-facing features — instead it is the internal quality work that hardens the initial pre-release into something maintainable and safe to evaluate.
⚠️ Pre-release software. Do not use in production. Use for evaluation, testing, and contributions only.
Architecture
- Tier 1 cleanup complete — cycle/cli/orchestrator/structural_hash/pipeline decomposition.
- God-module decompositions —
batch_prsplit into 4 modules;gh.py(1222L) →gh/package (8 submodules);review/observation.py(1150L) → 5 focused mixins;review/autonomous.pymixin-aligned. - H5 review→app decoupling —
bluei/commonshared-types layer extracted (Repo,ReviewMode,ReviewRun,FeedbackEvent); zero review→app violations. - Engine→app layering — 4 of 5 violation classes closed; enforced as a CI gate.
Behavior fixes
- Merge-cycle audit closed — all 21 items (DISMISSED review gate, observation state recovery, review-state race locking, merge-queue detection, worktree reuse validation, loop-count semantic guard, atomic-write fsync, JSONL rotation, and more).
- F1 rule-pack wiring —
select_rule_pack()wired into onboarding with interactive confirmation +--rule-packoverride. - Pattern learning fixes — confidence preservation on insert, staleness fallback, globstar pattern matching.
- Notifications hardening — digest severity filter, token masking.
Internal
- State schema reconciliation (Rec 07) —
StateManagerdelegates shared schemas to canonical engine owners; engine owns schema, StateManager is a path resolver. - JSONL primitive consolidation —
engine/jsonl.pyreplaces 50+ inline reimplementations. - E2E test suite — 83 tests across 9 domains. Full suite now 6,017 tests across 200+ files, all offline and deterministic.
What's next
The 0.2.0 line begins the deterministic flywheel direction — turning repeated successful fixes into deterministic repo-local assets (Patterns, Recipes, AST transforms, Emergent Rules) so recurring findings need less LLM judgment over time. See the roadmap for the planned 0.2.0-alpha.1 → alpha.5 arc, stabilizing through beta → rc → 0.2.0.
Install:
curl -fsSL https://bluei.dev/install.sh | bash
bluei --version