606 lines of dead code removed. 104 new tests added.
A disciplined, AI-assisted 5-phase migration.
An Electron-based application that gives users a native desktop experience for Amplifier—session management, provider configuration, artifact editing, and more.
Electron app with full OS integration—tray icon, native menus, file system access, local sidecar process.
Session creation, provider management, settings configuration, onboarding flows, artifact preview and editing.
67 commits, 3 contributors, rapid feature development. But rapid growth was creating architectural debt.
Provider registry, session lifecycle, and config management were all rebuilt independently inside Kepler—logic that already existed in the distro platform.
Sessions didn't get distro's handoff injection, preflight checks, or streaming hooks. Kepler users got a degraded experience.
Two codebases evolving the same concerns independently. Every distro improvement required a separate Kepler update—or was simply missed.
Architecturally equivalent to distro's Slack bridge, Voice bridge, and Web Chat. Kepler should consume the platform, not rebuild it.
A methodical 5-phase refactor. Each phase building on the last.
Design docs before code. Tests after every change. AI planning the migration.
Replace direct session creation with distro LocalBridge
Replace provider registry with distro catalog
Migrate settings to distro.yaml config
Integrate with distro preflight and identity
Remove dead code, delete deprecated files, restructure
The biggest single change. Session lifecycle now goes through LocalBridge instead of direct amplifier-foundation calls.
# Before: Direct coupling to amplifier-foundation
from amplifier_foundation import Session
session = Session(config=compose_mount_plan(...))
inject_settings_into_mount_plan(session, FEATURE_MODULES)
# After: Clean platform consumption
from amplifier_distro.bridge import LocalBridge
bridge = LocalBridge(distro_path)
session = bridge.create_session(project_path)
Key deletion: inject_settings_into_mount_plan, compose_mount_plan, and the entire FEATURE_MODULES constant—all replaced by a single bridge call.
All provider lookups moved to amplifier_distro.features.PROVIDERS. Zero remaining provider_registry imports. Surgical: just 3 files, +47/-44 lines.
New distro_config.py adapter bridges Settings interface to distro.yaml. Backward compatible—legacy settings.yaml fallback preserved.
Onboarding routes now use distro's run_preflight() and detect_github_identity(). All distro calls non-blocking with graceful fallback.
Design principle: Each phase was independently deployable. No phase required the next one to work. Backward compatibility preserved at every step.
With all four replacement phases complete, the dead code was surgically identified and removed in three passes.
Deprecated create_bridge, mount_bridge_hooks, create_forwarder, entire provider_registry.py and settings.py.
amplifier_hooks.py: 647 → 41 lines. Dead FEATURE_MODULES, dead composer routes, stale tests—all gone.
Deleted 3 entire files: provider_registry.py (138 lines), events.py (68 lines), settings.py (222 lines).
The final commit restructured sidecar-shared from a loose directory with sys.path hacks into a proper Python package.
# Before: sys.path manipulation
sys.path.insert(0, os.path.join(HERE, '..', 'sidecar-shared'))
from amplifier_hooks import create_bridge
from provider_registry import get_providers
from settings import load_settings
# After: Clean package imports
from sidecar.shared.distro_config import DistroConfig
from sidecar.shared.stream_events import StreamHandler
from sidecar.shared.session_lifecycle import SessionManager
13 files touched, eliminating all sys.path manipulation. Modules became discoverable, testable, importable.
Five new test files covering every refactored integration point. Total suite: 211 tests (104 new + 107 pre-existing).
*From project narrative; not independently verified via git
Contributors: Michael J. Jabbour (38 commits, 58%) • Marc Goodner (15 commits, 23%) • Sam Schillace (12 commits, 18%)
amplifier_hooks.py
647 lines → 41 lines
The refactor wasn't just internal. Multiple user-facing fixes were included in the same development period.
Unified code editor, restored folder open, hardened parsing and preview behavior.
Tightened sidebar controls, added folder actions, improved composer UX flow.
Fixed missing API key fields and "Not configured" false positives after fresh database.
13 bugs fixed in a single commit alongside the refactor. Discipline doesn't mean ignoring UX—it means handling both.
3 design documents totaling 1,064 lines were produced before a single line of code changed:
Every commit co-authored by Amplifier. 48 sessions orchestrated the work across all 5 phases.
Co-Authored-By: Amplifier
🤖 Generated with Amplifier
# The handoff doc explicitly described
# orchestration by an AI session:
IMPLEMENTATION_HANDOFF.md
"Handoff to implementation
orchestrator session"
Design docs before code. One concern per phase. Backward compatibility at every step. Tests after every change. Dead code identified, marked, then removed. This is what disciplined AI-assisted engineering looks like.
3 documents, 1,064 lines. Architecture, tasks, and AI handoff spec.
Session lifecycle migrated to LocalBridge. +469/-304 lines.
All provider lookups moved to distro. +47/-44 lines.
New distro_config.py adapter with backward compatibility. +405/-69 lines.
Non-blocking distro preflight with graceful fallback. +105/-13 lines.
Deprecated functions and modules flagged. +224/-101 lines.
amplifier_hooks.py: 647 → 41. Dead routes, stale tests gone. +7/-689 lines.
3 files deleted entirely. Compat shims removed. +24/-503 lines.
sidecar-shared → sidecar/shared/ Python package. 13 files. +95/-112 lines.
5 test files, 1,984 lines. Total suite: 211 tests, all passing.
Data as of: February 20, 2026
Feature status: Active
Research performed:
git log --oneline amplifier-distro-kepler (67 commits)git log --format="%an" | sort | uniq -cGaps & estimates:
Primary contributors: Michael J. Jabbour (38 commits, 58%), Marc Goodner (15 commits, 23%), Sam Schillace (12 commits, 18%)
The Kepler refactor is a template for disciplined AI-assisted migration.
Design first. Migrate phase by phase. Test everything. Delete fearlessly.