aidp 0.9.6 → 0.11.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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +194 -25
  3. data/lib/aidp/analyze/error_handler.rb +4 -2
  4. data/lib/aidp/{analysis → analyze}/kb_inspector.rb +93 -89
  5. data/lib/aidp/analyze/prioritizer.rb +3 -2
  6. data/lib/aidp/analyze/progress.rb +2 -1
  7. data/lib/aidp/analyze/ruby_maat_integration.rb +7 -3
  8. data/lib/aidp/analyze/runner.rb +73 -11
  9. data/lib/aidp/{analysis → analyze}/seams.rb +1 -1
  10. data/lib/aidp/analyze/steps.rb +10 -8
  11. data/lib/aidp/{analysis → analyze}/tree_sitter_grammar_loader.rb +11 -5
  12. data/lib/aidp/{analysis → analyze}/tree_sitter_scan.rb +21 -15
  13. data/lib/aidp/cli/checkpoint_command.rb +98 -0
  14. data/lib/aidp/cli/first_run_wizard.rb +83 -103
  15. data/lib/aidp/cli/jobs_command.rb +270 -36
  16. data/lib/aidp/cli/terminal_io.rb +3 -3
  17. data/lib/aidp/cli.rb +411 -69
  18. data/lib/aidp/config.rb +5 -8
  19. data/lib/aidp/debug_logger.rb +4 -4
  20. data/lib/aidp/debug_mixin.rb +11 -4
  21. data/lib/aidp/execute/checkpoint.rb +282 -0
  22. data/lib/aidp/execute/checkpoint_display.rb +221 -0
  23. data/lib/aidp/execute/progress.rb +2 -1
  24. data/lib/aidp/execute/prompt_manager.rb +62 -0
  25. data/lib/aidp/execute/runner.rb +67 -20
  26. data/lib/aidp/execute/steps.rb +36 -27
  27. data/lib/aidp/execute/work_loop_runner.rb +308 -0
  28. data/lib/aidp/execute/workflow_selector.rb +50 -26
  29. data/lib/aidp/harness/condition_detector.rb +4 -4
  30. data/lib/aidp/harness/config_schema.rb +40 -0
  31. data/lib/aidp/harness/config_validator.rb +3 -6
  32. data/lib/aidp/harness/configuration.rb +35 -1
  33. data/lib/aidp/harness/enhanced_runner.rb +25 -4
  34. data/lib/aidp/harness/error_handler.rb +103 -28
  35. data/lib/aidp/harness/provider_factory.rb +6 -1
  36. data/lib/aidp/harness/provider_manager.rb +273 -19
  37. data/lib/aidp/harness/runner.rb +14 -6
  38. data/lib/aidp/harness/simple_user_interface.rb +6 -4
  39. data/lib/aidp/harness/status_display.rb +118 -106
  40. data/lib/aidp/harness/test_runner.rb +83 -0
  41. data/lib/aidp/harness/ui/enhanced_tui.rb +7 -5
  42. data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +22 -4
  43. data/lib/aidp/harness/ui/error_handler.rb +7 -2
  44. data/lib/aidp/harness/ui/frame_manager.rb +61 -39
  45. data/lib/aidp/harness/ui/job_monitor.rb +2 -0
  46. data/lib/aidp/harness/ui/navigation/main_menu.rb +27 -16
  47. data/lib/aidp/harness/ui/navigation/menu_item.rb +1 -0
  48. data/lib/aidp/harness/ui/navigation/menu_state.rb +1 -0
  49. data/lib/aidp/harness/ui/navigation/submenu.rb +1 -0
  50. data/lib/aidp/harness/ui/navigation/workflow_selector.rb +2 -0
  51. data/lib/aidp/harness/ui/progress_display.rb +26 -7
  52. data/lib/aidp/harness/ui/question_collector.rb +2 -0
  53. data/lib/aidp/harness/ui/spinner_group.rb +2 -0
  54. data/lib/aidp/harness/ui/spinner_helper.rb +1 -1
  55. data/lib/aidp/harness/ui/status_manager.rb +4 -2
  56. data/lib/aidp/harness/ui/status_widget.rb +20 -9
  57. data/lib/aidp/harness/ui/workflow_controller.rb +27 -9
  58. data/lib/aidp/harness/user_interface.rb +338 -330
  59. data/lib/aidp/jobs/background_runner.rb +278 -0
  60. data/lib/aidp/message_display.rb +48 -0
  61. data/lib/aidp/provider_manager.rb +13 -7
  62. data/lib/aidp/providers/anthropic.rb +101 -18
  63. data/lib/aidp/providers/base.rb +51 -1
  64. data/lib/aidp/providers/codex.rb +248 -0
  65. data/lib/aidp/providers/cursor.rb +39 -48
  66. data/lib/aidp/providers/gemini.rb +26 -16
  67. data/lib/aidp/providers/github_copilot.rb +263 -0
  68. data/lib/aidp/providers/opencode.rb +38 -47
  69. data/lib/aidp/version.rb +1 -1
  70. data/lib/aidp/workflows/definitions.rb +357 -0
  71. data/lib/aidp/workflows/selector.rb +171 -0
  72. data/lib/aidp.rb +16 -4
  73. data/templates/planning/generate_llm_style_guide.md +119 -0
  74. metadata +43 -31
  75. data/lib/aidp/analyze/progress_visualizer.rb +0 -314
  76. /data/templates/{ANALYZE/02_ARCHITECTURE_ANALYSIS.md → analysis/analyze_architecture.md} +0 -0
  77. /data/templates/{ANALYZE/05_DOCUMENTATION_ANALYSIS.md → analysis/analyze_documentation.md} +0 -0
  78. /data/templates/{ANALYZE/04_FUNCTIONALITY_ANALYSIS.md → analysis/analyze_functionality.md} +0 -0
  79. /data/templates/{ANALYZE/01_REPOSITORY_ANALYSIS.md → analysis/analyze_repository.md} +0 -0
  80. /data/templates/{ANALYZE/06_STATIC_ANALYSIS.md → analysis/analyze_static_code.md} +0 -0
  81. /data/templates/{ANALYZE/03_TEST_ANALYSIS.md → analysis/analyze_tests.md} +0 -0
  82. /data/templates/{ANALYZE/07_REFACTORING_RECOMMENDATIONS.md → analysis/recommend_refactoring.md} +0 -0
  83. /data/templates/{ANALYZE/06a_tree_sitter_scan.md → analysis/scan_with_tree_sitter.md} +0 -0
  84. /data/templates/{EXECUTE/11_STATIC_ANALYSIS.md → implementation/configure_static_analysis.md} +0 -0
  85. /data/templates/{EXECUTE/14_DOCS_PORTAL.md → implementation/create_documentation_portal.md} +0 -0
  86. /data/templates/{EXECUTE/10_IMPLEMENTATION_AGENT.md → implementation/implement_features.md} +0 -0
  87. /data/templates/{EXECUTE/13_DELIVERY_ROLLOUT.md → implementation/plan_delivery.md} +0 -0
  88. /data/templates/{EXECUTE/15_POST_RELEASE.md → implementation/review_post_release.md} +0 -0
  89. /data/templates/{EXECUTE/09_SCAFFOLDING_DEVEX.md → implementation/setup_scaffolding.md} +0 -0
  90. /data/templates/{EXECUTE/02A_ARCH_GATE_QUESTIONS.md → planning/ask_architecture_questions.md} +0 -0
  91. /data/templates/{EXECUTE/00_PRD.md → planning/create_prd.md} +0 -0
  92. /data/templates/{EXECUTE/08_TASKS.md → planning/create_tasks.md} +0 -0
  93. /data/templates/{EXECUTE/04_DOMAIN_DECOMPOSITION.md → planning/decompose_domain.md} +0 -0
  94. /data/templates/{EXECUTE/01_NFRS.md → planning/define_nfrs.md} +0 -0
  95. /data/templates/{EXECUTE/05_CONTRACTS.md → planning/design_apis.md} +0 -0
  96. /data/templates/{EXECUTE/02_ARCHITECTURE.md → planning/design_architecture.md} +0 -0
  97. /data/templates/{EXECUTE/06_THREAT_MODEL.md → planning/design_data_model.md} +0 -0
  98. /data/templates/{EXECUTE/03_ADR_FACTORY.md → planning/generate_adrs.md} +0 -0
  99. /data/templates/{EXECUTE/12_OBSERVABILITY_SLOS.md → planning/plan_observability.md} +0 -0
  100. /data/templates/{EXECUTE/07_TEST_PLAN.md → planning/plan_testing.md} +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aidp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart Agapinan
@@ -233,21 +233,21 @@ files:
233
233
  - README.md
234
234
  - bin/aidp
235
235
  - lib/aidp.rb
236
- - lib/aidp/analysis/kb_inspector.rb
237
- - lib/aidp/analysis/seams.rb
238
- - lib/aidp/analysis/tree_sitter_grammar_loader.rb
239
- - lib/aidp/analysis/tree_sitter_scan.rb
240
236
  - lib/aidp/analyze/error_handler.rb
241
237
  - lib/aidp/analyze/feature_analyzer.rb
242
238
  - lib/aidp/analyze/json_file_storage.rb
239
+ - lib/aidp/analyze/kb_inspector.rb
243
240
  - lib/aidp/analyze/prioritizer.rb
244
241
  - lib/aidp/analyze/progress.rb
245
- - lib/aidp/analyze/progress_visualizer.rb
246
242
  - lib/aidp/analyze/report_generator.rb
247
243
  - lib/aidp/analyze/ruby_maat_integration.rb
248
244
  - lib/aidp/analyze/runner.rb
245
+ - lib/aidp/analyze/seams.rb
249
246
  - lib/aidp/analyze/steps.rb
247
+ - lib/aidp/analyze/tree_sitter_grammar_loader.rb
248
+ - lib/aidp/analyze/tree_sitter_scan.rb
250
249
  - lib/aidp/cli.rb
250
+ - lib/aidp/cli/checkpoint_command.rb
251
251
  - lib/aidp/cli/first_run_wizard.rb
252
252
  - lib/aidp/cli/jobs_command.rb
253
253
  - lib/aidp/cli/terminal_io.rb
@@ -255,9 +255,13 @@ files:
255
255
  - lib/aidp/core_ext/class_attribute.rb
256
256
  - lib/aidp/debug_logger.rb
257
257
  - lib/aidp/debug_mixin.rb
258
+ - lib/aidp/execute/checkpoint.rb
259
+ - lib/aidp/execute/checkpoint_display.rb
258
260
  - lib/aidp/execute/progress.rb
261
+ - lib/aidp/execute/prompt_manager.rb
259
262
  - lib/aidp/execute/runner.rb
260
263
  - lib/aidp/execute/steps.rb
264
+ - lib/aidp/execute/work_loop_runner.rb
261
265
  - lib/aidp/execute/workflow_selector.rb
262
266
  - lib/aidp/harness/completion_checker.rb
263
267
  - lib/aidp/harness/condition_detector.rb
@@ -282,6 +286,7 @@ files:
282
286
  - lib/aidp/harness/state/workflow_state.rb
283
287
  - lib/aidp/harness/state_manager.rb
284
288
  - lib/aidp/harness/status_display.rb
289
+ - lib/aidp/harness/test_runner.rb
285
290
  - lib/aidp/harness/ui/base.rb
286
291
  - lib/aidp/harness/ui/enhanced_tui.rb
287
292
  - lib/aidp/harness/ui/enhanced_workflow_selector.rb
@@ -302,11 +307,15 @@ files:
302
307
  - lib/aidp/harness/ui/status_widget.rb
303
308
  - lib/aidp/harness/ui/workflow_controller.rb
304
309
  - lib/aidp/harness/user_interface.rb
310
+ - lib/aidp/jobs/background_runner.rb
311
+ - lib/aidp/message_display.rb
305
312
  - lib/aidp/provider_manager.rb
306
313
  - lib/aidp/providers/anthropic.rb
307
314
  - lib/aidp/providers/base.rb
315
+ - lib/aidp/providers/codex.rb
308
316
  - lib/aidp/providers/cursor.rb
309
317
  - lib/aidp/providers/gemini.rb
318
+ - lib/aidp/providers/github_copilot.rb
310
319
  - lib/aidp/providers/macos_ui.rb
311
320
  - lib/aidp/providers/opencode.rb
312
321
  - lib/aidp/storage/csv_storage.rb
@@ -314,14 +323,8 @@ files:
314
323
  - lib/aidp/storage/json_storage.rb
315
324
  - lib/aidp/util.rb
316
325
  - lib/aidp/version.rb
317
- - templates/ANALYZE/01_REPOSITORY_ANALYSIS.md
318
- - templates/ANALYZE/02_ARCHITECTURE_ANALYSIS.md
319
- - templates/ANALYZE/03_TEST_ANALYSIS.md
320
- - templates/ANALYZE/04_FUNCTIONALITY_ANALYSIS.md
321
- - templates/ANALYZE/05_DOCUMENTATION_ANALYSIS.md
322
- - templates/ANALYZE/06_STATIC_ANALYSIS.md
323
- - templates/ANALYZE/06a_tree_sitter_scan.md
324
- - templates/ANALYZE/07_REFACTORING_RECOMMENDATIONS.md
326
+ - lib/aidp/workflows/definitions.rb
327
+ - lib/aidp/workflows/selector.rb
325
328
  - templates/COMMON/AGENT_BASE.md
326
329
  - templates/COMMON/CONVENTIONS.md
327
330
  - templates/COMMON/TEMPLATES/ADR_TEMPLATE.md
@@ -329,28 +332,37 @@ files:
329
332
  - templates/COMMON/TEMPLATES/EVENT_EXAMPLE.yaml
330
333
  - templates/COMMON/TEMPLATES/MERMAID_C4.md
331
334
  - templates/COMMON/TEMPLATES/OPENAPI_STUB.yaml
332
- - templates/EXECUTE/00_PRD.md
333
- - templates/EXECUTE/01_NFRS.md
334
- - templates/EXECUTE/02A_ARCH_GATE_QUESTIONS.md
335
- - templates/EXECUTE/02_ARCHITECTURE.md
336
- - templates/EXECUTE/03_ADR_FACTORY.md
337
- - templates/EXECUTE/04_DOMAIN_DECOMPOSITION.md
338
- - templates/EXECUTE/05_CONTRACTS.md
339
- - templates/EXECUTE/06_THREAT_MODEL.md
340
- - templates/EXECUTE/07_TEST_PLAN.md
341
- - templates/EXECUTE/08_TASKS.md
342
- - templates/EXECUTE/09_SCAFFOLDING_DEVEX.md
343
- - templates/EXECUTE/10_IMPLEMENTATION_AGENT.md
344
- - templates/EXECUTE/11_STATIC_ANALYSIS.md
345
- - templates/EXECUTE/12_OBSERVABILITY_SLOS.md
346
- - templates/EXECUTE/13_DELIVERY_ROLLOUT.md
347
- - templates/EXECUTE/14_DOCS_PORTAL.md
348
- - templates/EXECUTE/15_POST_RELEASE.md
349
335
  - templates/README.md
350
336
  - templates/aidp-development.yml.example
351
337
  - templates/aidp-minimal.yml.example
352
338
  - templates/aidp-production.yml.example
353
339
  - templates/aidp.yml.example
340
+ - templates/analysis/analyze_architecture.md
341
+ - templates/analysis/analyze_documentation.md
342
+ - templates/analysis/analyze_functionality.md
343
+ - templates/analysis/analyze_repository.md
344
+ - templates/analysis/analyze_static_code.md
345
+ - templates/analysis/analyze_tests.md
346
+ - templates/analysis/recommend_refactoring.md
347
+ - templates/analysis/scan_with_tree_sitter.md
348
+ - templates/implementation/configure_static_analysis.md
349
+ - templates/implementation/create_documentation_portal.md
350
+ - templates/implementation/implement_features.md
351
+ - templates/implementation/plan_delivery.md
352
+ - templates/implementation/review_post_release.md
353
+ - templates/implementation/setup_scaffolding.md
354
+ - templates/planning/ask_architecture_questions.md
355
+ - templates/planning/create_prd.md
356
+ - templates/planning/create_tasks.md
357
+ - templates/planning/decompose_domain.md
358
+ - templates/planning/define_nfrs.md
359
+ - templates/planning/design_apis.md
360
+ - templates/planning/design_architecture.md
361
+ - templates/planning/design_data_model.md
362
+ - templates/planning/generate_adrs.md
363
+ - templates/planning/generate_llm_style_guide.md
364
+ - templates/planning/plan_observability.md
365
+ - templates/planning/plan_testing.md
354
366
  homepage: https://github.com/viamin/aidp
355
367
  licenses:
356
368
  - MIT
@@ -1,314 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "tty-spinner"
4
- require "tty-progressbar"
5
- require "tty-table"
6
- require "pastel"
7
-
8
- module Aidp
9
- class ProgressVisualizer
10
- # Progress bar styles
11
- PROGRESS_STYLES = {
12
- default: {complete: "█", incomplete: "░", head: "█"},
13
- dots: {complete: "●", incomplete: "○", head: "●"},
14
- blocks: {complete: "▓", incomplete: "░", head: "▓"},
15
- arrows: {complete: "▶", incomplete: "▷", head: "▶"}
16
- }.freeze
17
-
18
- def initialize(config = {})
19
- @config = config
20
- @quiet = config[:quiet] || false
21
- @style = config[:style] || :default
22
- @show_details = config[:show_details] || true
23
- @pastel = Pastel.new
24
- end
25
-
26
- # Display analysis progress
27
- def show_analysis_progress(analysis_data, options = {})
28
- return if @quiet
29
-
30
- total_steps = analysis_data[:total_steps] || 1
31
- current_step = analysis_data[:current_step] || 0
32
- step_name = analysis_data[:current_step_name] || "Analyzing"
33
-
34
- progress_bar = create_progress_bar(total_steps, step_name, options)
35
-
36
- # Update progress
37
- progress_bar.advance(current_step)
38
-
39
- # Show step details if enabled
40
- show_step_details(analysis_data[:step_details]) if @show_details && analysis_data[:step_details]
41
-
42
- progress_bar
43
- end
44
-
45
- # Display step progress
46
- def show_step_progress(step_name, progress_data, options = {})
47
- return if @quiet
48
-
49
- total_items = progress_data[:total_items] || 1
50
- processed_items = progress_data[:processed_items] || 0
51
- current_item = progress_data[:current_item] || ""
52
-
53
- progress_bar = create_progress_bar(total_items, "#{step_name}: #{current_item}", options)
54
- progress_bar.advance(processed_items)
55
-
56
- progress_bar
57
- end
58
-
59
- # Display spinner for long-running operations
60
- def show_spinner(message, options = {})
61
- return if @quiet
62
-
63
- spinner = TTY::Spinner.new(message, format: :dots)
64
- spinner.start
65
- spinner
66
- end
67
-
68
- # Display analysis status table
69
- def show_analysis_status(status_data, options = {})
70
- return if @quiet
71
-
72
- table = create_status_table(status_data)
73
- puts table.render(:ascii)
74
- end
75
-
76
- # Display analysis summary
77
- def show_analysis_summary(summary_data, options = {})
78
- return if @quiet
79
-
80
- puts "\n" + "=" * 60
81
- puts "ANALYSIS SUMMARY".center(60)
82
- puts "=" * 60
83
-
84
- # Overall statistics
85
- puts "📊 Overall Statistics:"
86
- puts " • Total Steps: #{summary_data[:total_steps]}"
87
- puts " • Completed Steps: #{summary_data[:completed_steps]}"
88
- puts " • Failed Steps: #{summary_data[:failed_steps]}"
89
- puts " • Duration: #{format_duration(summary_data[:duration])}"
90
-
91
- # Step details
92
- if summary_data[:step_details]
93
- puts "\n📋 Step Details:"
94
- summary_data[:step_details].each do |step|
95
- status_icon = if step[:status] == "completed"
96
- "✅"
97
- else
98
- (step[:status] == "failed") ? "❌" : "⏳"
99
- end
100
- puts " #{status_icon} #{step[:name]}: #{format_duration(step[:duration])}"
101
- end
102
- end
103
-
104
- # Metrics summary
105
- if summary_data[:metrics]
106
- puts "\n📈 Metrics Summary:"
107
- summary_data[:metrics].each do |metric, value|
108
- puts " • #{metric}: #{value}"
109
- end
110
- end
111
-
112
- puts "=" * 60
113
- end
114
-
115
- # Display incremental analysis status
116
- def show_incremental_status(status_data, options = {})
117
- return if @quiet
118
-
119
- puts "\n🔄 Incremental Analysis Status"
120
- puts "-" * 40
121
-
122
- coverage = status_data[:analysis_coverage] || 0
123
- coverage_color = if coverage >= 0.8
124
- :green
125
- else
126
- (coverage >= 0.6) ? :yellow : :red
127
- end
128
-
129
- puts "📁 Total Components: #{status_data[:total_components]}"
130
- puts "✅ Analyzed Components: #{status_data[:analyzed_components]}"
131
- puts "⏳ Pending Components: #{status_data[:pending_components]}"
132
- puts "📊 Coverage: #{coverage_colorize(coverage * 100, coverage_color)}%"
133
-
134
- return unless status_data[:last_analysis]
135
-
136
- puts "🕒 Last Analysis: #{status_data[:last_analysis].strftime("%Y-%m-%d %H:%M:%S")}"
137
- end
138
-
139
- # Display recommendations
140
- def show_recommendations(recommendations, options = {})
141
- return if @quiet
142
-
143
- puts "\n💡 Recommendations"
144
- puts "-" * 30
145
-
146
- recommendations.each_with_index do |rec, index|
147
- priority_color = case rec[:priority]
148
- when "high"
149
- :red
150
- when "medium"
151
- :yellow
152
- when "low"
153
- :green
154
- else
155
- :white
156
- end
157
-
158
- puts "#{index + 1}. #{priority_colorize(rec[:message], priority_color)}"
159
- puts " Action: #{rec[:action]}"
160
- puts
161
- end
162
- end
163
-
164
- # Display error summary
165
- def show_error_summary(errors, options = {})
166
- return if @quiet
167
-
168
- puts "\n❌ Error Summary"
169
- puts "-" * 20
170
-
171
- errors.each_with_index do |error, index|
172
- puts "#{index + 1}. #{error[:step] || "Unknown step"}: #{error[:message]}"
173
- puts " Details: #{error[:details]}" if error[:details]
174
- puts
175
- end
176
- end
177
-
178
- # Display real-time progress
179
- def show_realtime_progress(progress_data, options = {})
180
- return if @quiet
181
-
182
- # Clear previous line
183
- print "\r\e[K"
184
-
185
- # Show current progress
186
- percentage = progress_data[:percentage] || 0
187
- message = progress_data[:message] || "Processing"
188
-
189
- progress_bar = create_simple_progress_bar(percentage, message)
190
- print progress_bar
191
-
192
- # Flush output
193
- $stdout.flush
194
- end
195
-
196
- # Display completion message
197
- def show_completion_message(message, options = {})
198
- return if @quiet
199
-
200
- success = options[:success] || true
201
- icon = success ? "✅" : "❌"
202
- color = success ? :green : :red
203
-
204
- puts "\n#{icon} #{colorize(message, color)}"
205
- end
206
-
207
- # Display warning message
208
- def show_warning_message(message, options = {})
209
- return if @quiet
210
-
211
- puts "\n⚠️ #{colorize(message, :yellow)}"
212
- end
213
-
214
- # Display info message
215
- def show_info_message(message, options = {})
216
- return if @quiet
217
-
218
- puts "\nℹ️ #{colorize(message, :blue)}"
219
- end
220
-
221
- private
222
-
223
- def create_progress_bar(total, title, options = {})
224
- style = options[:style] || @style
225
- PROGRESS_STYLES[style] || PROGRESS_STYLES[:default]
226
-
227
- # Use TTY progress bar
228
- TTY::ProgressBar.new(
229
- "[:bar] :percent% :current/:total",
230
- total: total,
231
- width: 30
232
- )
233
- end
234
-
235
- def create_simple_progress_bar(percentage, message)
236
- width = 30
237
- filled = (percentage * width / 100).to_i
238
- empty = width - filled
239
-
240
- bar = "█" * filled + "░" * empty
241
- "#{message}: [#{bar}] #{percentage.round(1)}%"
242
- end
243
-
244
- def create_status_table(status_data)
245
- headers = %w[Step Status Duration Progress]
246
- rows = []
247
-
248
- status_data[:steps]&.each do |step|
249
- status_icon = case step[:status]
250
- when "completed"
251
- "✅"
252
- when "failed"
253
- "❌"
254
- when "running"
255
- "⏳"
256
- else
257
- "⏸️"
258
- end
259
-
260
- rows << [
261
- step[:name],
262
- "#{status_icon} #{step[:status]}",
263
- format_duration(step[:duration]),
264
- step[:progress] ? "#{step[:progress]}%" : "N/A"
265
- ]
266
- end
267
-
268
- # Use TTY::Table for table display
269
- table = TTY::Table.new(headers, rows)
270
- puts table.render(:ascii)
271
- end
272
-
273
- def show_step_details(step_details)
274
- puts "\n📝 Current Step Details:"
275
- step_details.each do |key, value|
276
- puts " • #{key}: #{value}"
277
- end
278
- end
279
-
280
- def format_duration(seconds)
281
- return "N/A" unless seconds
282
-
283
- if seconds < 60
284
- "#{seconds.round(1)}s"
285
- elsif seconds < 3600
286
- minutes = (seconds / 60).to_i
287
- remaining_seconds = (seconds % 60).round(1)
288
- "#{minutes}m #{remaining_seconds}s"
289
- else
290
- hours = (seconds / 3600).to_i
291
- remaining_minutes = ((seconds % 3600) / 60).to_i
292
- "#{hours}h #{remaining_minutes}m"
293
- end
294
- end
295
-
296
- def colorize(text, color)
297
- return text unless @pastel
298
-
299
- @pastel.decorate(text.to_s, color)
300
- end
301
-
302
- def coverage_colorize(percentage, color)
303
- return percentage unless @pastel
304
-
305
- @pastel.decorate(percentage.to_s, color)
306
- end
307
-
308
- def priority_colorize(text, color)
309
- return text unless @pastel
310
-
311
- @pastel.decorate(text.to_s, color)
312
- end
313
- end
314
- end