Refactor Built-ins to Plugins
🏔️ Refactor Built-ins to Plugins
Objective
The current src/main.rs is 886 lines holding the App, the three panes, all
event handling, and rendering. M4 defines the plugin contracts; M5 proves they
work by extracting the three existing panes into plugins that implement those
contracts. After M5, main.rs is just the shell: it sets up the terminal,
constructs BastionHost, calls each plugin's init(host), runs the event
loop, and tears down on exit.
This is mostly mechanical refactor with one architectural payoff: any
later-discovered weakness in the M4 trait shapes surfaces here, while the only
consumers are three first-party plugins that can be changed in lockstep.
Success Criteria
crates/bastion-plugin-lhsb/— owns LHSB state, rendering, key handling, CRUD commandscrates/bastion-plugin-hero/— owns Hero state, rendering, edit mode (from M2)crates/bastion-plugin-rhsb/— owns RHSB status panelcrates/bastion-app/src/main.rsis dramatically smaller — recommend target of < 200
No due date
0% Completed