Deleting a Second Platform

How Kepler became a surface, not a fork

Kepler shipped fast — by quietly rebuilding the platform inside itself

Kepler is Amplifier's native desktop GUI: a Tauri Rust shell, a React/TypeScript frontend, and a Python sidecar. To move fast, it rebuilt the platform's own machinery internally instead of reusing it.

It worked — but only by becoming a duplicate of the platform. That is the tension this deck resolves.

The approved design named three duplicated subsystems

This isn't asserted — DISTRO_INTEGRATION_DESIGN.md states it verbatim: Kepler has "its own provider management, its own session creation pipeline, its own configuration namespace (~/.kepler/)."

Three copies of platform machinery, documented before a line was changed.

138
lines in provider_registry.py
222
lines in settings.py
647
lines in amplifier_hooks.py
The Complication

A second platform means every distro improvement is redone — or missed

The design named the cost directly: duplicated infrastructure and divergence risk. Because provider registry, session lifecycle, and config were rebuilt in Kepler instead of reused from distro, upstream work — handoff injection, preflight, streaming — had to be re-implemented or was simply left behind.

The code kept diverging. The fix had to make Kepler stop being its own platform.

Kepler carried amplifier-distro as a submodule — but barely used it

amplifier-distro is the platform layer that already powers distro's Slack, Voice, and Web Chat surfaces. Kepler declared it as a git submodule yet delegated almost nothing to it.

The target was in the repo the whole time. The refactor just had to lean on it.

A 5-phase plan rerouted every subsystem onto distro instead of rebuilding it

One idea, applied five times: delegate to distro rather than duplicate. Documented in an approved design and executed phase by phase.

With each subsystem delegated, the old copies had nothing left to do.

Once delegated, the duplicated modules had zero importers left

Delegation turned the old machinery into dead weight. Grepping the sidecar found no remaining provider_registry or settings imports — so the modules could simply be deleted.

Nothing consumed them anymore. That made subtraction the payoff.

138
provider_registry.py deleted
222
settings.py deleted
68
events.py deleted
0
importers remaining in sidecar/

The value was subtraction: 606 dead lines out, 104 tests in

One cleanup commit removed 606 lines of dead code — amplifier_hooks.py shrank from 647 to 41 lines. A follow-up added 104 new tests (211 passing total). Kepler is now a surface, not a fork.

Architecturally equal to distro's Slack, Voice, and Web Chat — it consumes the platform.

606
dead lines removed (647 → 41)
104
new tests added
211
tests passing total
The Takeaway

The best refactor often ships negative lines

Stop rebuilding the platform. Consume it. When a surface delegates instead of duplicating, every upstream improvement arrives for free — and the duplicated machinery becomes deletable dead weight.

23 files changed, net-subtractive where it counted — the win was what got removed.

Sources

Research Methodology

Data as of: repository state through 2026-03-24 (latest commit cb00138).

Feature status: Active / DONE — refactor merged across commits 4eae89d..9288bb9.

Primary source: local checkout of ramparte/amplifier-distro-kepler; amplifier-distro consumed as submodule (github.com/ramparte/amplifier-distro.git).

Commands run:

Primary contributor: Sam Schillace (author of all 11 refactor-arc commits), co-authored by Amplifier per commit trailers.

Gaps: wc -l of the post-commit amplifier_hooks.py blob reports 38 (a trailing-newline/counting artifact); the headline 606 = author-stated 647 − 41, internally consistent. Design-doc line estimates (129/204/542) differ from the authoritative deletion-commit blob measurements (138/222/647) used here. "211 passing" is per commit body plus an independent def test_ grep count; tests were not re-executed this session.

More Amplifier Stories