cov-loupe 3.0.0 → 4.0.0.pre

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 (281) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +230 -0
  3. data/CLAUDE.md +5 -0
  4. data/CODE_OF_CONDUCT.md +62 -0
  5. data/CONTRIBUTING.md +102 -0
  6. data/GEMINI.md +5 -0
  7. data/README.md +154 -51
  8. data/RELEASE_NOTES.md +452 -0
  9. data/dev/images/cov-loupe-icon-lores.png +0 -0
  10. data/dev/images/cov-loupe-icon-square.png +0 -0
  11. data/dev/images/cov-loupe-icon.png +0 -0
  12. data/dev/images/cov-loupe-logo.png +0 -0
  13. data/dev/prompts/README.md +74 -0
  14. data/dev/prompts/archive/architectural-review-and-actions-prompt.md +53 -0
  15. data/dev/prompts/archive/investigate-and-report-issues-prompt.md +33 -0
  16. data/dev/prompts/archive/produce-action-items-prompt.md +25 -0
  17. data/dev/prompts/guidelines/ai-code-evaluator-guidelines.md +337 -0
  18. data/dev/prompts/improve/refactor-test-suite.md +18 -0
  19. data/dev/prompts/improve/simplify-code-logic.md +133 -0
  20. data/dev/prompts/improve/update-documentation.md +21 -0
  21. data/dev/prompts/review/comprehensive-codebase-review.md +176 -0
  22. data/dev/prompts/review/identify-action-items.md +143 -0
  23. data/dev/prompts/review/verify-code-changes.md +54 -0
  24. data/dev/prompts/validate/create-screencast-outline.md +234 -0
  25. data/dev/prompts/validate/test-documentation-examples.md +180 -0
  26. data/docs/QUICKSTART.md +63 -0
  27. data/docs/assets/images/cov-loupe-logo-lores.png +0 -0
  28. data/docs/assets/images/cov-loupe-logo.png +0 -0
  29. data/docs/assets/images/favicon.png +0 -0
  30. data/docs/assets/stylesheets/branding.css +16 -0
  31. data/docs/assets/stylesheets/extra.css +15 -0
  32. data/docs/code_of_conduct.md +1 -0
  33. data/docs/contributing.md +1 -0
  34. data/docs/dev/ARCHITECTURE.md +56 -11
  35. data/docs/dev/DEVELOPMENT.md +116 -12
  36. data/docs/dev/FUTURE_ENHANCEMENTS.md +14 -0
  37. data/docs/dev/README.md +3 -2
  38. data/docs/dev/RELEASING.md +2 -0
  39. data/docs/dev/arch-decisions/README.md +10 -7
  40. data/docs/dev/arch-decisions/application-architecture.md +259 -0
  41. data/docs/dev/arch-decisions/coverage-data-quality.md +193 -0
  42. data/docs/dev/arch-decisions/output-character-mode.md +217 -0
  43. data/docs/dev/arch-decisions/path-resolution.md +90 -0
  44. data/docs/dev/arch-decisions/{004-x-arch-decision.md → policy-validation.md} +32 -28
  45. data/docs/dev/arch-decisions/{005-x-arch-decision.md → simplecov-integration.md} +47 -44
  46. data/docs/dev/presentations/cov-loupe-presentation.md +15 -13
  47. data/docs/examples/mcp-inputs.md +3 -0
  48. data/docs/examples/prompts.md +3 -0
  49. data/docs/examples/success_predicates.md +3 -0
  50. data/docs/fixtures/demo_project/.resultset.json +170 -0
  51. data/docs/fixtures/demo_project/README.md +6 -0
  52. data/docs/fixtures/demo_project/app/controllers/admin/audit_logs_controller.rb +19 -0
  53. data/docs/fixtures/demo_project/app/controllers/orders_controller.rb +26 -0
  54. data/docs/fixtures/demo_project/app/models/order.rb +20 -0
  55. data/docs/fixtures/demo_project/app/models/user.rb +19 -0
  56. data/docs/fixtures/demo_project/lib/api/client.rb +22 -0
  57. data/docs/fixtures/demo_project/lib/ops/jobs/cleanup_job.rb +16 -0
  58. data/docs/fixtures/demo_project/lib/ops/jobs/report_job.rb +17 -0
  59. data/docs/fixtures/demo_project/lib/payments/processor.rb +15 -0
  60. data/docs/fixtures/demo_project/lib/payments/refund_service.rb +15 -0
  61. data/docs/fixtures/demo_project/lib/payments/reporting/exporter.rb +16 -0
  62. data/docs/index.md +1 -0
  63. data/docs/license.md +3 -0
  64. data/docs/release_notes.md +3 -0
  65. data/docs/user/ADVANCED_USAGE.md +208 -115
  66. data/docs/user/CLI_FALLBACK_FOR_LLMS.md +2 -0
  67. data/docs/user/CLI_USAGE.md +276 -101
  68. data/docs/user/ERROR_HANDLING.md +4 -4
  69. data/docs/user/EXAMPLES.md +121 -128
  70. data/docs/user/INSTALLATION.md +9 -28
  71. data/docs/user/LIBRARY_API.md +227 -122
  72. data/docs/user/MCP_INTEGRATION.md +114 -203
  73. data/docs/user/README.md +5 -1
  74. data/docs/user/TROUBLESHOOTING.md +49 -27
  75. data/docs/user/installing-a-prelease-version-of-covloupe.md +43 -0
  76. data/docs/user/{V2-BREAKING-CHANGES.md → migrations/MIGRATING_TO_V2.md} +62 -72
  77. data/docs/user/migrations/MIGRATING_TO_V3.md +72 -0
  78. data/docs/user/migrations/MIGRATING_TO_V4.md +591 -0
  79. data/docs/user/migrations/README.md +22 -0
  80. data/docs/user/prompts/README.md +9 -0
  81. data/docs/user/prompts/non-web-coverage-analysis-prompt.md +103 -0
  82. data/docs/user/prompts/rails-coverage-analysis-prompt.md +94 -0
  83. data/docs/user/prompts/use-cli-not-mcp-prompt.md +53 -0
  84. data/examples/cli_demo.sh +77 -0
  85. data/examples/filter_and_table_demo-output.md +114 -0
  86. data/examples/filter_and_table_demo.rb +174 -0
  87. data/examples/fixtures/demo_project/coverage/.resultset.json +10 -0
  88. data/examples/mcp-inputs/README.md +66 -0
  89. data/examples/mcp-inputs/coverage_detailed.json +1 -0
  90. data/examples/mcp-inputs/coverage_raw.json +1 -0
  91. data/examples/mcp-inputs/coverage_summary.json +1 -0
  92. data/examples/mcp-inputs/list.json +1 -0
  93. data/examples/mcp-inputs/uncovered_lines.json +1 -0
  94. data/examples/prompts/README.md +27 -0
  95. data/examples/prompts/custom_resultset.txt +2 -0
  96. data/examples/prompts/detailed_with_source.txt +2 -0
  97. data/examples/prompts/list_lowest.txt +2 -0
  98. data/examples/prompts/summary.txt +2 -0
  99. data/examples/prompts/uncovered.txt +2 -0
  100. data/examples/success_predicates/README.md +198 -0
  101. data/examples/success_predicates/all_files_above_threshold_predicate.rb +21 -0
  102. data/examples/success_predicates/directory_specific_thresholds_predicate.rb +30 -0
  103. data/examples/success_predicates/project_coverage_minimum_predicate.rb +6 -0
  104. data/lib/cov_loupe/base_tool.rb +229 -20
  105. data/lib/cov_loupe/cli.rb +132 -23
  106. data/lib/cov_loupe/commands/base_command.rb +25 -6
  107. data/lib/cov_loupe/commands/command_factory.rb +0 -1
  108. data/lib/cov_loupe/commands/detailed_command.rb +10 -5
  109. data/lib/cov_loupe/commands/list_command.rb +2 -1
  110. data/lib/cov_loupe/commands/raw_command.rb +7 -5
  111. data/lib/cov_loupe/commands/summary_command.rb +12 -7
  112. data/lib/cov_loupe/commands/totals_command.rb +74 -10
  113. data/lib/cov_loupe/commands/uncovered_command.rb +7 -5
  114. data/lib/cov_loupe/commands/validate_command.rb +11 -3
  115. data/lib/cov_loupe/commands/version_command.rb +6 -4
  116. data/lib/cov_loupe/{app_config.rb → config/app_config.rb} +13 -5
  117. data/lib/cov_loupe/config/app_context.rb +43 -0
  118. data/lib/cov_loupe/config/boolean_type.rb +91 -0
  119. data/lib/cov_loupe/config/logger.rb +92 -0
  120. data/lib/cov_loupe/{option_normalizers.rb → config/option_normalizers.rb} +55 -24
  121. data/lib/cov_loupe/{option_parser_builder.rb → config/option_parser_builder.rb} +46 -24
  122. data/lib/cov_loupe/coverage/coverage_calculator.rb +53 -0
  123. data/lib/cov_loupe/coverage/coverage_reporter.rb +63 -0
  124. data/lib/cov_loupe/coverage/coverage_table_formatter.rb +133 -0
  125. data/lib/cov_loupe/{error_handler.rb → errors/error_handler.rb} +21 -33
  126. data/lib/cov_loupe/{errors.rb → errors/errors.rb} +48 -71
  127. data/lib/cov_loupe/formatters/formatters.rb +75 -0
  128. data/lib/cov_loupe/formatters/source_formatter.rb +18 -7
  129. data/lib/cov_loupe/formatters/table_formatter.rb +80 -0
  130. data/lib/cov_loupe/loaders/all.rb +15 -0
  131. data/lib/cov_loupe/loaders/all_cli.rb +10 -0
  132. data/lib/cov_loupe/loaders/all_mcp.rb +23 -0
  133. data/lib/cov_loupe/loaders/resultset_loader.rb +147 -0
  134. data/lib/cov_loupe/mcp_server.rb +3 -2
  135. data/lib/cov_loupe/model/model.rb +520 -0
  136. data/lib/cov_loupe/model/model_data.rb +13 -0
  137. data/lib/cov_loupe/model/model_data_cache.rb +116 -0
  138. data/lib/cov_loupe/option_parsers/env_options_parser.rb +17 -6
  139. data/lib/cov_loupe/option_parsers/error_helper.rb +16 -10
  140. data/lib/cov_loupe/output_chars.rb +192 -0
  141. data/lib/cov_loupe/paths/glob_utils.rb +100 -0
  142. data/lib/cov_loupe/{path_relativizer.rb → paths/path_relativizer.rb} +5 -13
  143. data/lib/cov_loupe/paths/path_utils.rb +265 -0
  144. data/lib/cov_loupe/paths/volume_case_sensitivity.rb +173 -0
  145. data/lib/cov_loupe/presenters/base_coverage_presenter.rb +9 -13
  146. data/lib/cov_loupe/presenters/coverage_payload_presenter.rb +21 -0
  147. data/lib/cov_loupe/presenters/payload_caching.rb +23 -0
  148. data/lib/cov_loupe/presenters/project_coverage_presenter.rb +73 -21
  149. data/lib/cov_loupe/presenters/project_totals_presenter.rb +16 -10
  150. data/lib/cov_loupe/repositories/coverage_repository.rb +149 -0
  151. data/lib/cov_loupe/resolvers/coverage_line_resolver.rb +90 -76
  152. data/lib/cov_loupe/resolvers/{resolver_factory.rb → resolver_helpers.rb} +6 -5
  153. data/lib/cov_loupe/resolvers/resultset_path_resolver.rb +40 -12
  154. data/lib/cov_loupe/scripts/command_execution.rb +113 -0
  155. data/lib/cov_loupe/scripts/latest_ci_status.rb +97 -0
  156. data/lib/cov_loupe/scripts/pre_release_check.rb +164 -0
  157. data/lib/cov_loupe/scripts/setup_doc_server.rb +23 -0
  158. data/lib/cov_loupe/scripts/start_doc_server.rb +24 -0
  159. data/lib/cov_loupe/staleness/stale_status.rb +23 -0
  160. data/lib/cov_loupe/staleness/staleness_checker.rb +328 -0
  161. data/lib/cov_loupe/staleness/staleness_message_formatter.rb +91 -0
  162. data/lib/cov_loupe/tools/coverage_detailed_tool.rb +14 -15
  163. data/lib/cov_loupe/tools/coverage_raw_tool.rb +14 -14
  164. data/lib/cov_loupe/tools/coverage_summary_tool.rb +16 -16
  165. data/lib/cov_loupe/tools/coverage_table_tool.rb +139 -21
  166. data/lib/cov_loupe/tools/coverage_totals_tool.rb +31 -13
  167. data/lib/cov_loupe/tools/help_tool.rb +16 -20
  168. data/lib/cov_loupe/tools/list_tool.rb +65 -0
  169. data/lib/cov_loupe/tools/uncovered_lines_tool.rb +14 -14
  170. data/lib/cov_loupe/tools/validate_tool.rb +18 -24
  171. data/lib/cov_loupe/tools/version_tool.rb +8 -3
  172. data/lib/cov_loupe/version.rb +1 -1
  173. data/lib/cov_loupe.rb +83 -55
  174. metadata +184 -154
  175. data/docs/dev/BRANCH_ONLY_COVERAGE.md +0 -158
  176. data/docs/dev/arch-decisions/001-x-arch-decision.md +0 -95
  177. data/docs/dev/arch-decisions/002-x-arch-decision.md +0 -159
  178. data/docs/dev/arch-decisions/003-x-arch-decision.md +0 -165
  179. data/lib/cov_loupe/app_context.rb +0 -26
  180. data/lib/cov_loupe/constants.rb +0 -22
  181. data/lib/cov_loupe/coverage_reporter.rb +0 -31
  182. data/lib/cov_loupe/formatters.rb +0 -51
  183. data/lib/cov_loupe/mode_detector.rb +0 -56
  184. data/lib/cov_loupe/model.rb +0 -339
  185. data/lib/cov_loupe/presenters/coverage_detailed_presenter.rb +0 -14
  186. data/lib/cov_loupe/presenters/coverage_raw_presenter.rb +0 -14
  187. data/lib/cov_loupe/presenters/coverage_summary_presenter.rb +0 -14
  188. data/lib/cov_loupe/presenters/coverage_uncovered_presenter.rb +0 -14
  189. data/lib/cov_loupe/resultset_loader.rb +0 -131
  190. data/lib/cov_loupe/staleness_checker.rb +0 -247
  191. data/lib/cov_loupe/table_formatter.rb +0 -64
  192. data/lib/cov_loupe/tools/all_files_coverage_tool.rb +0 -51
  193. data/lib/cov_loupe/util.rb +0 -88
  194. data/spec/MCP_INTEGRATION_TESTS_README.md +0 -111
  195. data/spec/TIMESTAMPS.md +0 -48
  196. data/spec/all_files_coverage_tool_spec.rb +0 -53
  197. data/spec/app_config_spec.rb +0 -142
  198. data/spec/base_tool_spec.rb +0 -62
  199. data/spec/cli/show_default_report_spec.rb +0 -33
  200. data/spec/cli_enumerated_options_spec.rb +0 -90
  201. data/spec/cli_error_spec.rb +0 -184
  202. data/spec/cli_format_spec.rb +0 -123
  203. data/spec/cli_json_options_spec.rb +0 -50
  204. data/spec/cli_source_spec.rb +0 -44
  205. data/spec/cli_spec.rb +0 -192
  206. data/spec/cli_table_spec.rb +0 -28
  207. data/spec/cli_usage_spec.rb +0 -42
  208. data/spec/commands/base_command_spec.rb +0 -107
  209. data/spec/commands/command_factory_spec.rb +0 -76
  210. data/spec/commands/detailed_command_spec.rb +0 -34
  211. data/spec/commands/list_command_spec.rb +0 -28
  212. data/spec/commands/raw_command_spec.rb +0 -69
  213. data/spec/commands/summary_command_spec.rb +0 -34
  214. data/spec/commands/totals_command_spec.rb +0 -34
  215. data/spec/commands/uncovered_command_spec.rb +0 -55
  216. data/spec/commands/validate_command_spec.rb +0 -213
  217. data/spec/commands/version_command_spec.rb +0 -38
  218. data/spec/constants_spec.rb +0 -61
  219. data/spec/cov_loupe/formatters/source_formatter_spec.rb +0 -267
  220. data/spec/cov_loupe/formatters_spec.rb +0 -76
  221. data/spec/cov_loupe/presenters/base_coverage_presenter_spec.rb +0 -79
  222. data/spec/cov_loupe_model_spec.rb +0 -454
  223. data/spec/cov_loupe_module_spec.rb +0 -37
  224. data/spec/cov_loupe_opts_spec.rb +0 -185
  225. data/spec/coverage_reporter_spec.rb +0 -102
  226. data/spec/coverage_table_tool_spec.rb +0 -59
  227. data/spec/coverage_totals_tool_spec.rb +0 -37
  228. data/spec/error_handler_spec.rb +0 -197
  229. data/spec/error_mode_spec.rb +0 -139
  230. data/spec/errors_edge_cases_spec.rb +0 -312
  231. data/spec/errors_stale_spec.rb +0 -83
  232. data/spec/file_based_mcp_tools_spec.rb +0 -99
  233. data/spec/help_tool_spec.rb +0 -26
  234. data/spec/integration_spec.rb +0 -789
  235. data/spec/logging_fallback_spec.rb +0 -128
  236. data/spec/mcp_logging_spec.rb +0 -44
  237. data/spec/mcp_server_integration_spec.rb +0 -23
  238. data/spec/mcp_server_spec.rb +0 -106
  239. data/spec/mode_detector_spec.rb +0 -153
  240. data/spec/model_error_handling_spec.rb +0 -269
  241. data/spec/model_staleness_spec.rb +0 -79
  242. data/spec/option_normalizers_spec.rb +0 -203
  243. data/spec/option_parsers/env_options_parser_spec.rb +0 -221
  244. data/spec/option_parsers/error_helper_spec.rb +0 -222
  245. data/spec/path_relativizer_spec.rb +0 -98
  246. data/spec/presenters/coverage_detailed_presenter_spec.rb +0 -19
  247. data/spec/presenters/coverage_raw_presenter_spec.rb +0 -15
  248. data/spec/presenters/coverage_summary_presenter_spec.rb +0 -15
  249. data/spec/presenters/coverage_uncovered_presenter_spec.rb +0 -16
  250. data/spec/presenters/project_coverage_presenter_spec.rb +0 -87
  251. data/spec/presenters/project_totals_presenter_spec.rb +0 -144
  252. data/spec/resolvers/coverage_line_resolver_spec.rb +0 -282
  253. data/spec/resolvers/resolver_factory_spec.rb +0 -61
  254. data/spec/resolvers/resultset_path_resolver_spec.rb +0 -60
  255. data/spec/resultset_loader_spec.rb +0 -167
  256. data/spec/shared_examples/README.md +0 -115
  257. data/spec/shared_examples/coverage_presenter_examples.rb +0 -66
  258. data/spec/shared_examples/file_based_mcp_tools.rb +0 -179
  259. data/spec/shared_examples/formatted_command_examples.rb +0 -64
  260. data/spec/shared_examples/mcp_tool_text_json_response.rb +0 -16
  261. data/spec/spec_helper.rb +0 -127
  262. data/spec/staleness_checker_spec.rb +0 -374
  263. data/spec/staleness_more_spec.rb +0 -42
  264. data/spec/support/cli_helpers.rb +0 -22
  265. data/spec/support/control_flow_helpers.rb +0 -20
  266. data/spec/support/fake_mcp.rb +0 -40
  267. data/spec/support/io_helpers.rb +0 -29
  268. data/spec/support/mcp_helpers.rb +0 -35
  269. data/spec/support/mcp_runner.rb +0 -66
  270. data/spec/support/mocking_helpers.rb +0 -30
  271. data/spec/table_format_spec.rb +0 -70
  272. data/spec/tools/validate_tool_spec.rb +0 -132
  273. data/spec/tools_error_handling_spec.rb +0 -130
  274. data/spec/util_spec.rb +0 -154
  275. data/spec/version_spec.rb +0 -123
  276. data/spec/version_tool_spec.rb +0 -141
  277. /data/{spec/fixtures/project1 → examples/fixtures/demo_project}/lib/bar.rb +0 -0
  278. /data/{spec/fixtures/project1 → examples/fixtures/demo_project}/lib/foo.rb +0 -0
  279. /data/lib/cov_loupe/{config_parser.rb → config/config_parser.rb} +0 -0
  280. /data/lib/cov_loupe/{predicate_evaluator.rb → config/predicate_evaluator.rb} +0 -0
  281. /data/lib/cov_loupe/{error_handler_factory.rb → errors/error_handler_factory.rb} +0 -0
@@ -0,0 +1,43 @@
1
+ # Installing a Prerelease Version of cov-loupe
2
+
3
+ Prerelease versions of gems (those containing `.pre`, `.alpha`, `.beta`, `.rc`, etc.) are **not** installed by default in RubyGems.
4
+
5
+ ## Command Line Installation
6
+
7
+ When users run `gem install cov-loupe`, RubyGems installs the latest **stable** version, skipping any prereleases.
8
+
9
+ To install a prerelease, you must explicitly opt in:
10
+
11
+ ```sh
12
+ # Install the latest prerelease
13
+ gem install cov-loupe --pre
14
+
15
+ # Install a specific prerelease version
16
+ gem install cov-loupe -v 4.0.0.pre
17
+ ```
18
+
19
+ ## Gemfile
20
+
21
+ In a Gemfile, you need to explicitly specify the prerelease version:
22
+
23
+ ```ruby
24
+ # Exact version
25
+ gem 'cov-loupe', '4.0.0.pre'
26
+
27
+ # Or allow any 4.0.0 prerelease
28
+ gem 'cov-loupe', '~> 4.0.0.pre'
29
+ ```
30
+
31
+ Without an explicit version constraint that includes the prerelease suffix, Bundler will skip prereleases just like `gem install` does.
32
+
33
+ ## Gemspec Dependencies
34
+
35
+ For gemspec dependencies on prerelease gems, you must specify the prerelease version explicitly:
36
+
37
+ ```ruby
38
+ spec.add_dependency 'cov-loupe', '~> 4.0.0.pre'
39
+ ```
40
+
41
+ ## Key Point
42
+
43
+ Version constraints like `~> 4.0` or `>= 4.0` will **not** match prereleases. You must include the prerelease segment in the constraint for it to match.
@@ -1,23 +1,20 @@
1
- # V2.0 Breaking Changes Guide
1
+ # V2.0 Breaking Changes and Migration Guide
2
2
 
3
- This document describes all breaking changes introduced in version 2.0.0 of cov-loupe. These changes improve consistency, clarity, and alignment with Ruby conventions.
3
+ [Back to main README](../../index.md)
4
+
5
+ This document describes all breaking changes introduced in version 2.0.0 of simplecov-mcp. These changes improve consistency, clarity, and alignment with Ruby conventions.
6
+
7
+ > Note: Current versions use the boolean `--raise-on-stale` / `raise_on_stale` flag (short form `-S`) for staleness enforcement. The `--staleness` and `stale` names referenced below are kept for historical context about the v1→v2 transition.
4
8
 
5
9
  ---
6
10
 
7
11
  ## Table of Contents
8
12
 
9
13
  - [Command Line Interface Changes](#command-line-interface-changes)
10
- - [Options Must Precede Subcommands](#options-must-precede-subcommands)
11
- - [--stale Renamed to --staleness](#--stale-renamed-to---staleness)
12
- - [--source-context Renamed to --context-lines](#--source-context-renamed-to---context-lines)
13
- - [--source Now Requires Explicit Mode](#--source-now-requires-explicit-mode)
14
- - [--json Replaced with --format](#--json-replaced-with---format)
15
14
  - [Error Mode Values Changed](#error-mode-values-changed)
16
- - [--success-predicate Replaced with validate Subcommand](#--success-predicate-replaced-with-validate-subcommand)
17
15
  - [Default Sort Order Changed](#default-sort-order-changed)
18
16
  - [MCP Tool Changes](#mcp-tool-changes)
19
17
  - [stale Parameter Renamed to staleness](#stale-parameter-renamed-to-staleness)
20
- - [Error Mode Values Changed](#error-mode-values-changed-1)
21
18
  - [MCP Tool Arguments Use Symbols](#mcp-tool-arguments-use-symbols)
22
19
  - [Ruby API Changes](#ruby-api-changes)
23
20
  - [CLIConfig Renamed to AppConfig](#cliconfig-renamed-to-appconfig)
@@ -30,25 +27,17 @@ This document describes all breaking changes introduced in version 2.0.0 of cov-
30
27
 
31
28
  ## Command Line Interface Changes
32
29
 
33
- ### Options Must Precede Subcommands
34
30
 
35
- **Change:** Global options must now appear *before* the subcommand, not after.
36
31
 
37
- **Rationale:** This aligns with standard Unix command conventions (e.g., `git`, `docker`) and simplifies argument parsing.
32
+ **Migration:** Move all global options before the subcommand name. These options are:
38
33
 
39
- **Before (v1.x):**
40
- ```bash
41
- cov-loupe list --resultset coverage --format json
42
- cov-loupe summary lib/foo.rb --json
43
- ```
34
+ `-r`, `-R`, `-f`, `-o`, `-s`, `-c`, `-C`, `-S`, `-g`, `-l`, `-F`, and `-e`
44
35
 
45
- **After (v2.x):**
36
+ **Exception:** The `validate` subcommand has its own subcommand-specific option `-i/--inline` that must appear *after* the subcommand:
46
37
  ```bash
47
- cov-loupe --resultset coverage --format json list
48
- cov-loupe --format json summary lib/foo.rb
38
+ cov-loupe validate -i '->(m) { m.list.all? { |f| f["percentage"] >= 80 } }'
49
39
  ```
50
40
 
51
- **Migration:** Move all global options (flags like `-r`, `-f`, `-S`, etc.) before the subcommand name.
52
41
 
53
42
  ---
54
43
 
@@ -60,14 +49,14 @@ cov-loupe --format json summary lib/foo.rb
60
49
 
61
50
  **Before (v1.x):**
62
51
  ```bash
63
- cov-loupe --stale error list
52
+ simplecov-mcp --stale error list
64
53
  ```
65
54
 
66
55
  **After (v2.x):**
67
56
  ```bash
68
- cov-loupe --staleness error list
57
+ simplecov-mcp --staleness error list
69
58
  # OR use the short form:
70
- cov-loupe -S error list
59
+ simplecov-mcp -S error list
71
60
  ```
72
61
 
73
62
  **Migration:** Replace `--stale` with `--staleness` (or continue using `-S`).
@@ -82,14 +71,14 @@ cov-loupe -S error list
82
71
 
83
72
  **Before (v1.x):**
84
73
  ```bash
85
- cov-loupe --source uncovered --source-context 3 uncovered lib/foo.rb
74
+ simplecov-mcp --source uncovered --source-context 3 uncovered lib/foo.rb
86
75
  ```
87
76
 
88
77
  **After (v2.x):**
89
78
  ```bash
90
- cov-loupe --source uncovered --context-lines 3 uncovered lib/foo.rb
79
+ simplecov-mcp --source uncovered --context-lines 3 uncovered lib/foo.rb
91
80
  # OR use the short form:
92
- cov-loupe -s uncovered -c 3 uncovered lib/foo.rb
81
+ simplecov-mcp -s uncovered -c 3 uncovered lib/foo.rb
93
82
  ```
94
83
 
95
84
  **Migration:** Replace `--source-context` with `--context-lines` (or use `-c`).
@@ -105,15 +94,15 @@ cov-loupe -s uncovered -c 3 uncovered lib/foo.rb
105
94
  **Before (v1.x):**
106
95
  ```bash
107
96
  # Implied 'full' mode
108
- cov-loupe --source summary lib/foo.rb
97
+ simplecov-mcp --source summary lib/foo.rb
109
98
  ```
110
99
 
111
100
  **After (v2.x):**
112
101
  ```bash
113
102
  # Must specify mode explicitly
114
- cov-loupe --source full summary lib/foo.rb
103
+ simplecov-mcp --source full summary lib/foo.rb
115
104
  # OR
116
- cov-loupe --source uncovered summary lib/foo.rb
105
+ simplecov-mcp --source uncovered summary lib/foo.rb
117
106
  ```
118
107
 
119
108
  **Migration:** Add an explicit mode (`full` or `uncovered`) after `--source`.
@@ -122,23 +111,23 @@ cov-loupe --source uncovered summary lib/foo.rb
122
111
 
123
112
  ### --json Replaced with --format
124
113
 
125
- **Change:** The `--json` flag (and related `-j`, `-J`, `--pretty-json` flags) have been removed. Use `--format` instead.
114
+ **Change:** The `--json` flag (and related `-j`, `-J`, `--pretty-json` flags) have been removed. Use `-f/--format` instead.
126
115
 
127
116
  **Rationale:** Supports multiple output formats beyond JSON (YAML, awesome_print, etc.) with a consistent interface.
128
117
 
129
118
  **Before (v1.x):**
130
119
  ```bash
131
- cov-loupe --json list
132
- cov-loupe -j summary lib/foo.rb
133
- cov-loupe --pretty-json list
120
+ simplecov-mcp --json list
121
+ simplecov-mcp -j summary lib/foo.rb
122
+ simplecov-mcp --pretty-json list
134
123
  ```
135
124
 
136
125
  **After (v2.x):**
137
126
  ```bash
138
- cov-loupe --format json list
139
- cov-loupe -f j summary lib/foo.rb # Short form
140
- cov-loupe --format pretty-json list
141
- cov-loupe -f J list # Short form for pretty-json
127
+ simplecov-mcp --format json list
128
+ simplecov-mcp -f j summary lib/foo.rb # Short form
129
+ simplecov-mcp --format pretty-json list
130
+ simplecov-mcp -f J list # Short form for pretty-json
142
131
  ```
143
132
 
144
133
  **Available formats:**
@@ -146,7 +135,7 @@ cov-loupe -f J list # Short form for pretty-json
146
135
  - `json` or `j` - Single-line JSON
147
136
  - `pretty-json` or `J` - Pretty-printed JSON
148
137
  - `yaml` or `y` - YAML format
149
- - `awesome-print` or `ap` - Colored awesome_print format (requires `awesome_print` gem)
138
+ - `awesome_print` or `ap` - Colored awesome_print format (requires `awesome_print` gem)
150
139
 
151
140
  **Migration:** Replace `--json` with `--format json` (or `-f j`). Replace `--pretty-json` with `--format pretty-json` (or `-f J`).
152
141
 
@@ -164,17 +153,17 @@ The old values are **no longer supported**.
164
153
 
165
154
  **Before (v1.x):**
166
155
  ```bash
167
- cov-loupe --error-mode on list
168
- cov-loupe --error-mode trace list
156
+ simplecov-mcp --error-mode on list
157
+ simplecov-mcp --error-mode trace list
169
158
  ```
170
159
 
171
160
  **After (v2.x):**
172
161
  ```bash
173
- cov-loupe --error-mode log list
174
- cov-loupe --error-mode debug list
162
+ simplecov-mcp --error-mode log list
163
+ simplecov-mcp --error-mode debug list
175
164
  # OR use short forms:
176
- cov-loupe --error-mode l list
177
- cov-loupe --error-mode d list
165
+ simplecov-mcp --error-mode l list
166
+ simplecov-mcp --error-mode d list
178
167
  ```
179
168
 
180
169
  **Error modes:**
@@ -194,16 +183,16 @@ cov-loupe --error-mode d list
194
183
 
195
184
  **Before (v1.x):**
196
185
  ```bash
197
- cov-loupe --success-predicate policy.rb
186
+ simplecov-mcp --success-predicate policy.rb
198
187
  ```
199
188
 
200
189
  **After (v2.x):**
201
190
  ```bash
202
191
  # File-based policy
203
- cov-loupe validate policy.rb
192
+ simplecov-mcp validate policy.rb
204
193
 
205
194
  # Inline policy (new feature)
206
- cov-loupe validate -i '->(m) { m.all_files.all? { |f| f["percentage"] >= 80 } }'
195
+ simplecov-mcp validate -i '->(m) { m.list.all? { |f| f["percentage"] >= 80 } }'
207
196
  ```
208
197
 
209
198
  **Migration:** Replace `--success-predicate FILE` with `validate FILE`.
@@ -214,22 +203,23 @@ cov-loupe validate -i '->(m) { m.all_files.all? { |f| f["percentage"] >= 80 } }'
214
203
 
215
204
  **Change:** The default sort order for the `list` command changed from `ascending` to `descending`.
216
205
 
217
- **Rationale:** Most users want to see best-covered files first, not worst-covered files first.
206
+ **Rationale:** Most users want to see worst-covered files last so that when scrolling is finished
207
+ the worst-covered files are displayed on the screen.
218
208
 
219
209
  **Before (v1.x):**
220
210
  ```bash
221
211
  # Shows worst coverage first by default
222
- cov-loupe list
212
+ simplecov-mcp list
223
213
  ```
224
214
 
225
215
  **After (v2.x):**
226
216
  ```bash
227
217
  # Shows best coverage first by default
228
- cov-loupe list
218
+ simplecov-mcp list
229
219
 
230
220
  # To get old behavior (worst first):
231
- cov-loupe --sort-order ascending list
232
- cov-loupe -o a list # Short form
221
+ simplecov-mcp --sort-order ascending list
222
+ simplecov-mcp -o a list # Short form
233
223
  ```
234
224
 
235
225
  **Migration:** If you relied on ascending order (worst coverage first), explicitly specify `--sort-order ascending` or `-o a`.
@@ -274,7 +264,7 @@ cov-loupe -o a list # Short form
274
264
  }
275
265
  ```
276
266
 
277
- **Affected tools:** All file-based tools (`coverage_summary_tool`, `coverage_detailed_tool`, `coverage_raw_tool`, `uncovered_lines_tool`) and aggregate tools (`all_files_coverage_tool`, `coverage_totals_tool`).
267
+ **Affected tools:** All file-based tools (`coverage_summary_tool`, `coverage_detailed_tool`, `coverage_raw_tool`, `uncovered_lines_tool`) and aggregate tools (`list_tool`, `coverage_totals_tool`).
278
268
 
279
269
  **Migration:** Replace `"stale"` with `"staleness"` in all MCP tool calls.
280
270
 
@@ -388,13 +378,13 @@ config = CovLoupe::AppConfig.new(
388
378
  **Before (v1.x):**
389
379
  ```bash
390
380
  # Silently clamped to 0
391
- cov-loupe --source-context -5 uncovered lib/foo.rb
381
+ simplecov-mcp --source-context -5 uncovered lib/foo.rb
392
382
  ```
393
383
 
394
384
  **After (v2.x):**
395
385
  ```bash
396
386
  # Raises ArgumentError
397
- cov-loupe --context-lines -5 uncovered lib/foo.rb
387
+ simplecov-mcp --context-lines -5 uncovered lib/foo.rb
398
388
  # Error: Context lines must be non-negative (got: -5)
399
389
  ```
400
390
 
@@ -426,26 +416,26 @@ cov-loupe --context-lines -5 uncovered lib/foo.rb
426
416
  **Before (v1.x):**
427
417
  ```bash
428
418
  #!/bin/bash
429
- cov-loupe list --json --stale error --sort-order ascending
430
- cov-loupe summary lib/foo.rb --json
431
- cov-loupe uncovered lib/bar.rb --source=uncovered --source-context 3
432
- cov-loupe --success-predicate policy.rb
419
+ simplecov-mcp list --json --stale error --sort-order ascending
420
+ simplecov-mcp summary lib/foo.rb --json
421
+ simplecov-mcp uncovered lib/bar.rb --source=uncovered --source-context 3
422
+ simplecov-mcp --success-predicate policy.rb
433
423
  ```
434
424
 
435
425
  **After (v2.x):**
436
426
  ```bash
437
427
  #!/bin/bash
438
- cov-loupe --format json --staleness error --sort-order ascending list
439
- cov-loupe --format json summary lib/foo.rb
440
- cov-loupe --source uncovered --context-lines 3 uncovered lib/bar.rb
441
- cov-loupe validate policy.rb
428
+ simplecov-mcp --format json --staleness error --sort-order ascending list
429
+ simplecov-mcp --format json summary lib/foo.rb
430
+ simplecov-mcp --source uncovered --context-lines 3 uncovered lib/bar.rb
431
+ simplecov-mcp validate policy.rb
442
432
  ```
443
433
 
444
434
  ### Environment Variable Migration
445
435
 
446
436
  **Before (v1.x):**
447
437
  ```bash
448
- export COV_LOUPE_OPTS="--stale error --json"
438
+ export SIMPLECOV_MCP_OPTS="--stale error --json"
449
439
  ```
450
440
 
451
441
  **After (v2.x):**
@@ -459,14 +449,14 @@ export COV_LOUPE_OPTS="--staleness error --format json"
459
449
 
460
450
  If you encounter issues migrating to v2.0:
461
451
 
462
- 1. Check the [TROUBLESHOOTING.md](TROUBLESHOOTING.md) guide
463
- 2. Review the [CLI_USAGE.md](CLI_USAGE.md) for complete CLI reference
464
- 3. See [MCP_INTEGRATION.md](MCP_INTEGRATION.md) for MCP tool documentation
465
- 4. Open an issue at https://github.com/keithrbennett/cov-loupe/issues
452
+ 1. Check the [Troubleshooting](../TROUBLESHOOTING.md) guide
453
+ 2. Review the [CLI Usage](../CLI_USAGE.md) for complete CLI reference
454
+ 3. See [MCP Integration](../MCP_INTEGRATION.md) for MCP tool documentation
455
+ 4. Open an issue at https://github.com/keithrbennett/simplecov-mcp/issues
466
456
 
467
457
  ---
468
458
 
469
459
  **See also:**
470
- - [RELEASE_NOTES.md](../../RELEASE_NOTES.md) - Full release notes with new features
471
- - [CLI_USAGE.md](CLI_USAGE.md) - Complete CLI reference
472
- - [MCP_INTEGRATION.md](MCP_INTEGRATION.md) - MCP tool reference
460
+ - [RELEASE_NOTES.md](../../release_notes.md) - Full release notes with new features
461
+ - [CLI Usage](../CLI_USAGE.md) - Complete CLI reference
462
+ - [MCP Integration](../MCP_INTEGRATION.md) - MCP tool reference
@@ -0,0 +1,72 @@
1
+ # V3.0 Breaking Changes Guide
2
+
3
+ [Back to main README](../../index.md)
4
+
5
+ This document describes the breaking changes introduced in version 3.0.0, which primarily involve the renaming of the gem from `simplecov-mcp` to `cov-loupe`. These changes affect the gem name, executable, Ruby API, and configuration.
6
+
7
+ ---
8
+
9
+ ## What Changed
10
+
11
+ The project has been completely renamed, impacting various aspects:
12
+
13
+ ### Gem & Executable
14
+ * **Gem name**: `simplecov-mcp` → `cov-loupe`
15
+ * **Executable**: `simplecov-mcp` → `cov-loupe`
16
+ * **Repository**: `github.com/keithrbennett/simplecov-mcp` → `github.com/keithrbennett/cov-loupe`
17
+
18
+ ### Ruby API
19
+ * **Module Name**: `SimpleCovMcp` → `CovLoupe`
20
+ * **Require Path**: `require 'simplecov_mcp'` → `require 'cov_loupe'`
21
+
22
+ ### Configuration
23
+ * **Environment variable**: `SIMPLECOV_MCP_OPTS` → `COV_LOUPE_OPTS`
24
+ * **Log file**: `simplecov_mcp.log` → `cov_loupe.log`
25
+ * **Documentation alias**: `smcp` → `clp`
26
+
27
+ ## What Stayed the Same
28
+
29
+ * **Core functionality**: No breaking changes to features, CLI command logic (other than the executable name), or the internal structure of the `CoverageModel` logic.
30
+ * **MCP Protocol**: The JSON-RPC tool definitions and behaviors remain consistent.
31
+
32
+ ## Migration Steps
33
+
34
+ To upgrade from `simplecov-mcp` (v2.x) to `cov-loupe` (v3.x), follow these steps:
35
+
36
+ 1. **Uninstall the old gem**:
37
+ ```bash
38
+ gem uninstall simplecov-mcp
39
+ ```
40
+
41
+ 2. **Install the new gem**:
42
+ ```bash
43
+ gem install cov-loupe
44
+ ```
45
+
46
+ 3. **Update scripts and aliases**:
47
+ * Change all occurrences of the `simplecov-mcp` command to `cov-loupe` in your shell scripts, CI/CD configurations, and shell aliases.
48
+
49
+ 4. **Update Ruby code**:
50
+ * Find: `require 'simplecov_mcp'`
51
+ * Replace with: `require 'cov_loupe'`
52
+ * Find: `SimpleCovMcp`
53
+ * Replace with: `CovLoupe`
54
+
55
+ 5. **Update environment variables**:
56
+ * Rename any `SIMPLECOV_MCP_OPTS` environment variables to `COV_LOUPE_OPTS`.
57
+
58
+ 6. **Update log file references**:
59
+ * If you rely on the default log file, it will now be named `cov_loupe.log`. Update any scripts or tools that reference `simplecov_mcp.log`.
60
+
61
+ **Note**: The old `simplecov-mcp` gem (v2.0.1) will remain available on RubyGems but will not receive further updates.
62
+
63
+ ---
64
+
65
+ ## Getting Help
66
+
67
+ If you encounter issues migrating to v3.0:
68
+
69
+ 1. Check the [Troubleshooting](../TROUBLESHOOTING.md) guide.
70
+ 2. Review the [CLI Usage](../CLI_USAGE.md) for complete CLI reference.
71
+ 3. See [MCP Integration](../MCP_INTEGRATION.md) for MCP tool documentation.
72
+ 4. Open an issue at https://github.com/keithrbennett/cov-loupe/issues.