Class: Aidp::CLI::CheckpointCommand
- Inherits:
-
Object
- Object
- Aidp::CLI::CheckpointCommand
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/checkpoint_command.rb
Overview
Command handler for ‘aidp checkpoint` subcommand
Provides commands for managing workflow checkpoints:
- show: Display latest checkpoint data
- summary: Show progress summary with trends
- history: Show last N checkpoints
- metrics: Show detailed metrics
- clear: Clear all checkpoint data
Usage:
aidp checkpoint show
aidp checkpoint summary --watch
aidp checkpoint history 10
aidp checkpoint metrics
aidp checkpoint clear --force
Constant Summary
Constants included from MessageDisplay
Instance Method Summary collapse
-
#initialize(prompt: TTY::Prompt.new, checkpoint_class: nil, display_class: nil, project_dir: nil) ⇒ CheckpointCommand
constructor
A new instance of CheckpointCommand.
-
#run(args) ⇒ Object
Main entry point for checkpoint subcommands.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt
Constructor Details
#initialize(prompt: TTY::Prompt.new, checkpoint_class: nil, display_class: nil, project_dir: nil) ⇒ CheckpointCommand
Returns a new instance of CheckpointCommand.
27 28 29 30 31 32 |
# File 'lib/aidp/cli/checkpoint_command.rb', line 27 def initialize(prompt: TTY::Prompt.new, checkpoint_class: nil, display_class: nil, project_dir: nil) @prompt = prompt @checkpoint_class = checkpoint_class || Aidp::Execute::Checkpoint @display_class = display_class || Aidp::Execute::CheckpointDisplay @project_dir = project_dir || Dir.pwd end |
Instance Method Details
#run(args) ⇒ Object
Main entry point for checkpoint subcommands
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/aidp/cli/checkpoint_command.rb', line 35 def run(args) sub = args.shift || "summary" checkpoint = @checkpoint_class.new(@project_dir) display = @display_class.new case sub when "show" run_show_command(checkpoint, display) when "summary" run_summary_command(checkpoint, display, args) when "history" run_history_command(checkpoint, display, args) when "metrics" run_metrics_command(checkpoint) when "clear" run_clear_command(checkpoint, args) else display_usage end end |