Class: RubynCode::CLI::Commands::ChiselGain
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::ChiselGain
show all
- Defined in:
- lib/rubyn_code/cli/commands/chisel_gain.rb
Overview
‘/chisel-gain` — quick read on Chisel’s status and what it buys you.
Constant Summary
collapse
- REFERENCE_IMPACT =
Measured on a real open-source repo for the approach Chisel is built on; shown as an attributed reference, not fabricated per-user metrics (which rubyn-code does not instrument).
'Reference benchmark for this approach (real FastAPI + React repo): ' \
'~54% less code, ~20% cheaper, ~27% faster.'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
aliases, all_names, hidden?
Class Method Details
.command_name ⇒ Object
8
|
# File 'lib/rubyn_code/cli/commands/chisel_gain.rb', line 8
def self.command_name = '/chisel-gain'
|
.description ⇒ Object
9
|
# File 'lib/rubyn_code/cli/commands/chisel_gain.rb', line 9
def self.description = 'Show Chisel status and reference impact'
|
Instance Method Details
#execute(_args, ctx) ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/rubyn_code/cli/commands/chisel_gain.rb', line 17
def execute(_args, ctx)
mode = RubynCode::Chisel.mode
debt = RubynCode::Chisel::Debt.scan(ctx.project_root).size
ctx.renderer.info("Chisel mode: #{mode}")
ctx.renderer.info('Turn it on with /chisel full.') if mode == 'off'
ctx.renderer.info("Outstanding chisel: debt markers: #{debt}")
ctx.renderer.info(REFERENCE_IMPACT)
ctx.renderer.info('Run /chisel-review for concrete cuts in your current diff.')
end
|