Class: Aidp::CLI::HarnessCommand

Inherits:
Object
  • Object
show all
Includes:
MessageDisplay, RescueLogging
Defined in:
lib/aidp/cli/harness_command.rb

Overview

Command handler for ‘aidp harness status` and `aidp harness reset` subcommands

Provides commands for viewing and managing harness state:

- status: Show detailed harness status for all modes
- reset: Reset harness state for a specific mode

Usage:

aidp harness status
aidp harness reset --mode analyze

Constant Summary

Constants included from MessageDisplay

MessageDisplay::COLOR_MAP

Instance Method Summary collapse

Methods included from RescueLogging

__log_rescue_impl, log_rescue, #log_rescue

Methods included from MessageDisplay

#display_message, included, #message_display_prompt

Constructor Details

#initialize(prompt: TTY::Prompt.new, runner_class: nil, project_dir: nil) ⇒ HarnessCommand

Returns a new instance of HarnessCommand.



21
22
23
24
25
# File 'lib/aidp/cli/harness_command.rb', line 21

def initialize(prompt: TTY::Prompt.new, runner_class: nil, project_dir: nil)
  @prompt = prompt
  @runner_class = runner_class || Aidp::Harness::Runner
  @project_dir = project_dir || Dir.pwd
end

Instance Method Details

#run(args, subcommand:, options: {}) ⇒ Object

Main entry point for harness status/reset subcommands



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/aidp/cli/harness_command.rb', line 28

def run(args, subcommand:, options: {})
  case subcommand
  when "status"
    run_status_command
  when "reset"
    run_reset_command(options)
  else
    display_message("Unknown harness subcommand: #{subcommand}", type: :error)
    display_help
    1
  end
end