Class: Aidp::Workflows::GuidedAgent
- Inherits:
-
Object
- Object
- Aidp::Workflows::GuidedAgent
- Includes:
- DebugMixin, MessageDisplay
- Defined in:
- lib/aidp/workflows/guided_agent.rb
Overview
Guided workflow agent that uses AI to help users select appropriate workflows Acts as a copilot to match user intent to AIDP capabilities
Defined Under Namespace
Classes: ConversationError
Constant Summary
Constants included from DebugMixin
DebugMixin::DEBUG_BASIC, DebugMixin::DEBUG_OFF, DebugMixin::DEBUG_VERBOSE
Constants included from MessageDisplay
Instance Method Summary collapse
-
#initialize(project_dir, prompt: nil, use_enhanced_input: true, verbose: false, config_manager: nil, provider_manager: nil) ⇒ GuidedAgent
constructor
A new instance of GuidedAgent.
-
#select_workflow ⇒ Object
Main entry point for guided workflow selection Uses plan-then-execute approach: iterative planning conversation to identify needed steps, then executes those steps.
Methods included from DebugMixin
#debug_basic?, #debug_command, #debug_enabled?, #debug_error, #debug_execute_command, #debug_level, #debug_log, #debug_logger, #debug_provider, #debug_step, #debug_timing, #debug_verbose?, included, shared_logger
Methods included from MessageDisplay
#display_message, included, #message_display_prompt
Constructor Details
#initialize(project_dir, prompt: nil, use_enhanced_input: true, verbose: false, config_manager: nil, provider_manager: nil) ⇒ GuidedAgent
Returns a new instance of GuidedAgent.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/aidp/workflows/guided_agent.rb', line 22 def initialize(project_dir, prompt: nil, use_enhanced_input: true, verbose: false, config_manager: nil, provider_manager: nil) @project_dir = project_dir # Use EnhancedInput with Reline for full readline-style key bindings @prompt = if use_enhanced_input && prompt.nil? Aidp::CLI::EnhancedInput.new else prompt || TTY::Prompt.new end @config_manager = config_manager || Aidp::Harness::ConfigManager.new(project_dir) @provider_manager = provider_manager || Aidp::Harness::ProviderManager.new(@config_manager, prompt: @prompt) @conversation_history = [] @user_input = {} @verbose = verbose @debug_env = ENV["DEBUG"] == "1" || ENV["DEBUG"] == "2" end |
Instance Method Details
#select_workflow ⇒ Object
Main entry point for guided workflow selection Uses plan-then-execute approach: iterative planning conversation to identify needed steps, then executes those steps
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/aidp/workflows/guided_agent.rb', line 43 def select_workflow ("\nš¤ Welcome to AIDP Guided Workflow!", type: :highlight) ("I'll help you plan and execute your project.\n", type: :info) validate_provider_configuration! plan_and_execute_workflow rescue => e raise ConversationError, "Failed to guide workflow selection: #{e.}" end |