aidp 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +35 -0
- data/lib/aidp/analyze/feature_analyzer.rb +322 -320
- data/lib/aidp/analyze/tree_sitter_scan.rb +3 -0
- data/lib/aidp/auto_update/coordinator.rb +97 -7
- data/lib/aidp/auto_update.rb +0 -12
- data/lib/aidp/cli/devcontainer_commands.rb +0 -5
- data/lib/aidp/cli/eval_command.rb +399 -0
- data/lib/aidp/cli/harness_command.rb +1 -1
- data/lib/aidp/cli/security_command.rb +416 -0
- data/lib/aidp/cli/tools_command.rb +6 -4
- data/lib/aidp/cli.rb +172 -4
- data/lib/aidp/comment_consolidator.rb +78 -0
- data/lib/aidp/concurrency/exec.rb +3 -0
- data/lib/aidp/concurrency.rb +0 -3
- data/lib/aidp/config.rb +113 -1
- data/lib/aidp/config_paths.rb +91 -0
- data/lib/aidp/daemon/runner.rb +8 -4
- data/lib/aidp/errors.rb +134 -0
- data/lib/aidp/evaluations/context_capture.rb +205 -0
- data/lib/aidp/evaluations/evaluation_record.rb +114 -0
- data/lib/aidp/evaluations/evaluation_storage.rb +250 -0
- data/lib/aidp/evaluations.rb +23 -0
- data/lib/aidp/execute/async_work_loop_runner.rb +4 -1
- data/lib/aidp/execute/interactive_repl.rb +6 -2
- data/lib/aidp/execute/prompt_evaluator.rb +359 -0
- data/lib/aidp/execute/repl_macros.rb +100 -1
- data/lib/aidp/execute/work_loop_runner.rb +719 -58
- data/lib/aidp/execute/work_loop_state.rb +4 -1
- data/lib/aidp/execute/workflow_selector.rb +3 -0
- data/lib/aidp/harness/ai_decision_engine.rb +79 -0
- data/lib/aidp/harness/ai_filter_factory.rb +285 -0
- data/lib/aidp/harness/capability_registry.rb +2 -0
- data/lib/aidp/harness/condition_detector.rb +3 -0
- data/lib/aidp/harness/config_loader.rb +3 -0
- data/lib/aidp/harness/config_schema.rb +97 -1
- data/lib/aidp/harness/config_validator.rb +1 -1
- data/lib/aidp/harness/configuration.rb +61 -5
- data/lib/aidp/harness/enhanced_runner.rb +14 -11
- data/lib/aidp/harness/error_handler.rb +3 -0
- data/lib/aidp/harness/filter_definition.rb +212 -0
- data/lib/aidp/harness/generated_filter_strategy.rb +197 -0
- data/lib/aidp/harness/output_filter.rb +50 -25
- data/lib/aidp/harness/output_filter_config.rb +129 -0
- data/lib/aidp/harness/provider_factory.rb +3 -0
- data/lib/aidp/harness/provider_manager.rb +96 -2
- data/lib/aidp/harness/runner.rb +5 -12
- data/lib/aidp/harness/state/persistence.rb +3 -0
- data/lib/aidp/harness/state_manager.rb +3 -0
- data/lib/aidp/harness/status_display.rb +28 -20
- data/lib/aidp/harness/test_runner.rb +179 -41
- data/lib/aidp/harness/thinking_depth_manager.rb +44 -28
- data/lib/aidp/harness/ui/enhanced_tui.rb +4 -0
- data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +4 -0
- data/lib/aidp/harness/ui/error_handler.rb +3 -0
- data/lib/aidp/harness/ui/job_monitor.rb +4 -0
- data/lib/aidp/harness/ui/navigation/submenu.rb +2 -2
- data/lib/aidp/harness/ui/navigation/workflow_selector.rb +6 -0
- data/lib/aidp/harness/ui/spinner_helper.rb +3 -0
- data/lib/aidp/harness/ui/workflow_controller.rb +3 -0
- data/lib/aidp/harness/user_interface.rb +3 -0
- data/lib/aidp/loader.rb +195 -0
- data/lib/aidp/logger.rb +3 -0
- data/lib/aidp/message_display.rb +31 -0
- data/lib/aidp/metadata/compiler.rb +29 -17
- data/lib/aidp/metadata/query.rb +1 -1
- data/lib/aidp/metadata/scanner.rb +8 -1
- data/lib/aidp/metadata/tool_metadata.rb +13 -13
- data/lib/aidp/metadata/validator.rb +10 -0
- data/lib/aidp/metadata.rb +16 -0
- data/lib/aidp/pr_worktree_manager.rb +20 -8
- data/lib/aidp/provider_manager.rb +4 -7
- data/lib/aidp/providers/base.rb +2 -0
- data/lib/aidp/security/rule_of_two_enforcer.rb +210 -0
- data/lib/aidp/security/secrets_proxy.rb +328 -0
- data/lib/aidp/security/secrets_registry.rb +227 -0
- data/lib/aidp/security/trifecta_state.rb +220 -0
- data/lib/aidp/security/watch_mode_handler.rb +306 -0
- data/lib/aidp/security/work_loop_adapter.rb +277 -0
- data/lib/aidp/security.rb +56 -0
- data/lib/aidp/setup/wizard.rb +283 -11
- data/lib/aidp/skills.rb +0 -5
- data/lib/aidp/storage/csv_storage.rb +3 -0
- data/lib/aidp/style_guide/selector.rb +360 -0
- data/lib/aidp/tooling_detector.rb +283 -16
- data/lib/aidp/version.rb +1 -1
- data/lib/aidp/watch/auto_merger.rb +274 -0
- data/lib/aidp/watch/auto_pr_processor.rb +125 -7
- data/lib/aidp/watch/build_processor.rb +16 -1
- data/lib/aidp/watch/change_request_processor.rb +682 -150
- data/lib/aidp/watch/ci_fix_processor.rb +262 -4
- data/lib/aidp/watch/feedback_collector.rb +191 -0
- data/lib/aidp/watch/hierarchical_pr_strategy.rb +256 -0
- data/lib/aidp/watch/implementation_verifier.rb +142 -1
- data/lib/aidp/watch/plan_generator.rb +70 -13
- data/lib/aidp/watch/plan_processor.rb +12 -5
- data/lib/aidp/watch/projects_processor.rb +286 -0
- data/lib/aidp/watch/repository_client.rb +871 -22
- data/lib/aidp/watch/review_processor.rb +33 -6
- data/lib/aidp/watch/runner.rb +80 -29
- data/lib/aidp/watch/state_store.rb +233 -0
- data/lib/aidp/watch/sub_issue_creator.rb +221 -0
- data/lib/aidp/watch.rb +5 -7
- data/lib/aidp/workflows/guided_agent.rb +4 -0
- data/lib/aidp/workstream_cleanup.rb +0 -2
- data/lib/aidp/workstream_executor.rb +3 -4
- data/lib/aidp/worktree.rb +61 -12
- data/lib/aidp/worktree_branch_manager.rb +347 -101
- data/lib/aidp.rb +21 -106
- data/templates/implementation/iterative_implementation.md +46 -3
- metadata +91 -36
- data/lib/aidp/config/paths.rb +0 -131
|
@@ -9,7 +9,9 @@ module Aidp
|
|
|
9
9
|
# - /split - Divide work into smaller contracts
|
|
10
10
|
# - /halt-on <pattern> - Pause on specific test failures
|
|
11
11
|
class ReplMacros
|
|
12
|
-
attr_reader :pinned_files, :focus_patterns, :halt_patterns, :split_mode, :current_workstream
|
|
12
|
+
attr_reader :pinned_files, :focus_patterns, :halt_patterns, :split_mode, :current_workstream
|
|
13
|
+
# Expose current_skill for testability
|
|
14
|
+
attr_accessor :current_skill
|
|
13
15
|
|
|
14
16
|
def initialize(project_dir: Dir.pwd)
|
|
15
17
|
@pinned_files = Set.new
|
|
@@ -299,6 +301,12 @@ module Aidp
|
|
|
299
301
|
usage: "/tasks <list|show|done|abandon|stats> [args]",
|
|
300
302
|
example: "/tasks list pending",
|
|
301
303
|
handler: method(:cmd_tasks)
|
|
304
|
+
},
|
|
305
|
+
"/rate" => {
|
|
306
|
+
description: "Rate the current output (good/neutral/bad)",
|
|
307
|
+
usage: "/rate <good|neutral|bad> [comment]",
|
|
308
|
+
example: "/rate good 'Clean code generated'",
|
|
309
|
+
handler: method(:cmd_rate)
|
|
302
310
|
}
|
|
303
311
|
}
|
|
304
312
|
end
|
|
@@ -2071,6 +2079,97 @@ module Aidp
|
|
|
2071
2079
|
{success: false, message: "Error: #{e.message}", action: :none}
|
|
2072
2080
|
end
|
|
2073
2081
|
|
|
2082
|
+
# Command: /rate <good|neutral|bad> [comment]
|
|
2083
|
+
# Rate the current output with optional comment
|
|
2084
|
+
def cmd_rate(args)
|
|
2085
|
+
rating = args.shift
|
|
2086
|
+
comment = args.join(" ")
|
|
2087
|
+
comment = nil if comment.empty?
|
|
2088
|
+
|
|
2089
|
+
unless rating
|
|
2090
|
+
return {
|
|
2091
|
+
success: false,
|
|
2092
|
+
message: "Usage: /rate <good|neutral|bad> [comment]\n\nExamples:\n /rate good\n /rate bad 'Generated code had bugs'\n /rate neutral 'Acceptable but could be better'",
|
|
2093
|
+
action: :none
|
|
2094
|
+
}
|
|
2095
|
+
end
|
|
2096
|
+
|
|
2097
|
+
# Validate rating
|
|
2098
|
+
unless %w[good neutral bad].include?(rating.downcase)
|
|
2099
|
+
return {
|
|
2100
|
+
success: false,
|
|
2101
|
+
message: "Invalid rating '#{rating}'. Must be: good, neutral, or bad",
|
|
2102
|
+
action: :none
|
|
2103
|
+
}
|
|
2104
|
+
end
|
|
2105
|
+
|
|
2106
|
+
Aidp.log_debug("repl_macros", "rate_command", rating: rating, has_comment: !comment.nil?)
|
|
2107
|
+
|
|
2108
|
+
begin
|
|
2109
|
+
require_relative "../evaluations"
|
|
2110
|
+
|
|
2111
|
+
# Capture context
|
|
2112
|
+
context_capture = Aidp::Evaluations::ContextCapture.new(project_dir: @project_dir)
|
|
2113
|
+
context = context_capture.capture(
|
|
2114
|
+
step_name: @current_step_name,
|
|
2115
|
+
iteration: @current_iteration
|
|
2116
|
+
)
|
|
2117
|
+
|
|
2118
|
+
# Create evaluation record
|
|
2119
|
+
record = Aidp::Evaluations::EvaluationRecord.new(
|
|
2120
|
+
rating: rating.downcase,
|
|
2121
|
+
comment: comment,
|
|
2122
|
+
target_type: "work_loop",
|
|
2123
|
+
context: context
|
|
2124
|
+
)
|
|
2125
|
+
|
|
2126
|
+
# Store evaluation
|
|
2127
|
+
storage = Aidp::Evaluations::EvaluationStorage.new(project_dir: @project_dir)
|
|
2128
|
+
result = storage.store(record)
|
|
2129
|
+
|
|
2130
|
+
if result[:success]
|
|
2131
|
+
rating_display = case rating.downcase
|
|
2132
|
+
when "good" then "good (+)"
|
|
2133
|
+
when "neutral" then "neutral (~)"
|
|
2134
|
+
when "bad" then "bad (-)"
|
|
2135
|
+
else rating
|
|
2136
|
+
end
|
|
2137
|
+
|
|
2138
|
+
msg_lines = ["Evaluation recorded: #{record.id}"]
|
|
2139
|
+
msg_lines << " Rating: #{rating_display}"
|
|
2140
|
+
msg_lines << " Comment: #{comment}" if comment
|
|
2141
|
+
msg_lines << ""
|
|
2142
|
+
msg_lines << "View all evaluations: aidp eval list"
|
|
2143
|
+
|
|
2144
|
+
{
|
|
2145
|
+
success: true,
|
|
2146
|
+
message: msg_lines.join("\n"),
|
|
2147
|
+
action: :evaluation_recorded,
|
|
2148
|
+
data: {id: record.id, rating: rating.downcase, comment: comment}
|
|
2149
|
+
}
|
|
2150
|
+
else
|
|
2151
|
+
{
|
|
2152
|
+
success: false,
|
|
2153
|
+
message: "Failed to store evaluation: #{result[:error]}",
|
|
2154
|
+
action: :none
|
|
2155
|
+
}
|
|
2156
|
+
end
|
|
2157
|
+
rescue ArgumentError => e
|
|
2158
|
+
{
|
|
2159
|
+
success: false,
|
|
2160
|
+
message: "Error: #{e.message}",
|
|
2161
|
+
action: :none
|
|
2162
|
+
}
|
|
2163
|
+
rescue => e
|
|
2164
|
+
Aidp.log_error("repl_macros", "rate_command_failed", error: e.message)
|
|
2165
|
+
{
|
|
2166
|
+
success: false,
|
|
2167
|
+
message: "Failed to record evaluation: #{e.message}",
|
|
2168
|
+
action: :none
|
|
2169
|
+
}
|
|
2170
|
+
end
|
|
2171
|
+
end
|
|
2172
|
+
|
|
2074
2173
|
private
|
|
2075
2174
|
|
|
2076
2175
|
# List tasks with optional status filter
|