bmsdna-devtools 1.10.0__tar.gz → 1.12.0__tar.gz

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 (167) hide show
  1. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/PKG-INFO +49 -4
  2. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/README.md +48 -3
  3. bmsdna_devtools-1.12.0/bmsdna/devtools/cleanup_scan.py +871 -0
  4. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/cli.py +90 -4
  5. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/worktree.py +297 -61
  6. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/pyproject.toml +1 -1
  7. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/skills/bmsdna-devtools/SKILL.md +6 -1
  8. bmsdna_devtools-1.12.0/tests/test_cleanup_scan.py +917 -0
  9. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_cleanup.py +7 -0
  10. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_worktree_clean.py +393 -0
  11. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/uv.lock +1 -1
  12. bmsdna_devtools-1.10.0/bmsdna/devtools/cleanup_scan.py +0 -355
  13. bmsdna_devtools-1.10.0/tests/test_cleanup_scan.py +0 -237
  14. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/.github/workflows/auto-release.yml +0 -0
  15. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/.github/workflows/python-publish.yml +0 -0
  16. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/.github/workflows/python-test.yml +0 -0
  17. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/.gitignore +0 -0
  18. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/.python-version +0 -0
  19. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/__init__.py +0 -0
  20. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/_api_dump.py +0 -0
  21. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/ado_auth.py +0 -0
  22. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/ado_issue.py +0 -0
  23. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/agent_mentions.py +0 -0
  24. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/api_usage.py +0 -0
  25. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/app_service_logs.py +0 -0
  26. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/azure_arm.py +0 -0
  27. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/azure_auth.py +0 -0
  28. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/bdt_config.py +0 -0
  29. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/build_warnings.py +0 -0
  30. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/business_user.py +0 -0
  31. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/ci_plan.py +0 -0
  32. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/ci_plan_env.py +0 -0
  33. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/ci_warnings.py +0 -0
  34. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/cleanup_claude.py +0 -0
  35. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/cli_tools.py +0 -0
  36. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/commit.py +0 -0
  37. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/dead_code.py +0 -0
  38. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/__init__.py +0 -0
  39. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/advisories.py +0 -0
  40. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/cli.py +0 -0
  41. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/cooldown.py +0 -0
  42. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/lockfiles.py +0 -0
  43. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/osv.py +0 -0
  44. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/deps/versions.py +0 -0
  45. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/env_config.py +0 -0
  46. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/env_files.py +0 -0
  47. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/find_injection.py +0 -0
  48. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/find_repo.py +0 -0
  49. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/gh_args.py +0 -0
  50. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/gh_issue.py +0 -0
  51. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/gh_pr.py +0 -0
  52. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/github_api.py +0 -0
  53. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/gitrepo.py +0 -0
  54. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/injection_frontend.py +0 -0
  55. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/injection_python.py +0 -0
  56. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/issue_do.py +0 -0
  57. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/issue_show.py +0 -0
  58. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/issue_watch.py +0 -0
  59. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint.py +0 -0
  60. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_findings.py +0 -0
  61. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_models.py +0 -0
  62. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_sql.py +0 -0
  63. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_sql_files.py +0 -0
  64. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_tooling.py +0 -0
  65. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/lint_typescript.py +0 -0
  66. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/logs.py +0 -0
  67. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_build.py +0 -0
  68. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_cancel.py +0 -0
  69. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_choice.py +0 -0
  70. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_create_args.py +0 -0
  71. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_drift.py +0 -0
  72. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_info.py +0 -0
  73. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_issue_link.py +0 -0
  74. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_labels.py +0 -0
  75. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_list.py +0 -0
  76. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_logs.py +0 -0
  77. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_markdown.py +0 -0
  78. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_merge_defaults.py +0 -0
  79. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_ref.py +0 -0
  80. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pr_warnings.py +0 -0
  81. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/pull.py +0 -0
  82. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/testdb.py +0 -0
  83. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/translate.py +0 -0
  84. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/__init__.py +0 -0
  85. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/cli.py +0 -0
  86. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/pipeline.py +0 -0
  87. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/pricing.py +0 -0
  88. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/report.py +0 -0
  89. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/00_schema.sql +0 -0
  90. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/01_ingest_claude.sql +0 -0
  91. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/01_ingest_codex.sql +0 -0
  92. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/02_messages.sql +0 -0
  93. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/03_markers.sql +0 -0
  94. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/04_facts.sql +0 -0
  95. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/bmsdna/devtools/usage/sql/05_views.sql +0 -0
  96. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/justfile +0 -0
  97. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/prek.toml +0 -0
  98. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/conftest.py +0 -0
  99. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/fake_github.py +0 -0
  100. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ado_auth.py +0 -0
  101. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ado_issue.py +0 -0
  102. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ado_issue_flow.py +0 -0
  103. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_agent_mentions.py +0 -0
  104. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_api_usage.py +0 -0
  105. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_app_service_logs.py +0 -0
  106. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_azure_arm.py +0 -0
  107. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_bdt_config.py +0 -0
  108. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_build_warnings.py +0 -0
  109. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_business_user.py +0 -0
  110. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ci_plan.py +0 -0
  111. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ci_plan_env.py +0 -0
  112. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_ci_warnings.py +0 -0
  113. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cleanup_claude.py +0 -0
  114. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_commit.py +0 -0
  115. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_deps.py +0 -0
  116. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_issue.py +0 -0
  117. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_pr_create.py +0 -0
  118. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_pr_id.py +0 -0
  119. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_pull.py +0 -0
  120. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_tools.py +0 -0
  121. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_cli_version.py +0 -0
  122. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_commit.py +0 -0
  123. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_deps_advisories.py +0 -0
  124. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_deps_cooldown.py +0 -0
  125. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_deps_lockfiles.py +0 -0
  126. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_deps_osv.py +0 -0
  127. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_deps_versions.py +0 -0
  128. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_env_config.py +0 -0
  129. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_env_files.py +0 -0
  130. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_find_injection.py +0 -0
  131. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_find_repo.py +0 -0
  132. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_gh_issue.py +0 -0
  133. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_gh_pr.py +0 -0
  134. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_github_api.py +0 -0
  135. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_gitrepo.py +0 -0
  136. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_issue_do.py +0 -0
  137. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_issue_for_me.py +0 -0
  138. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_issue_show.py +0 -0
  139. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_issue_watch.py +0 -0
  140. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint.py +0 -0
  141. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint_models.py +0 -0
  142. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint_sql.py +0 -0
  143. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint_sql_files.py +0 -0
  144. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint_tooling.py +0 -0
  145. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_lint_typescript.py +0 -0
  146. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_logs.py +0 -0
  147. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_build.py +0 -0
  148. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_build_create_options.py +0 -0
  149. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_build_flow.py +0 -0
  150. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_cancel_build.py +0 -0
  151. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_choice.py +0 -0
  152. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_create_args.py +0 -0
  153. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_description_not_truncated.py +0 -0
  154. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_drift.py +0 -0
  155. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_info.py +0 -0
  156. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_issue_link.py +0 -0
  157. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_labels.py +0 -0
  158. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_list.py +0 -0
  159. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_logs.py +0 -0
  160. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_markdown.py +0 -0
  161. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pr_merge_defaults.py +0 -0
  162. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_pull.py +0 -0
  163. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_testdb.py +0 -0
  164. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_translate.py +0 -0
  165. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_usage.py +0 -0
  166. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_wait_timeout.py +0 -0
  167. {bmsdna_devtools-1.10.0 → bmsdna_devtools-1.12.0}/tests/test_worktree_create.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bmsdna-devtools
3
- Version: 1.10.0
3
+ Version: 1.12.0
4
4
  Summary: Shared Azure DevOps / GitHub / git / Azure Monitor developer tooling for BMS projects
5
5
  Requires-Python: >=3.14
6
6
  Requires-Dist: azure-identity>=1.19.0
@@ -795,7 +795,7 @@ configured, or with `--local`, it lists the clones under the work dir instead (t
795
795
  ## `bdt cleanup worktrees` / `bdt cleanup orphaned-dbs` / `bdt cleanup db` / `bdt cleanup worktree`
796
796
 
797
797
  ```bash
798
- bdt cleanup worktrees [root] [--remote origin] [--keep-dbs] [--yes]
798
+ bdt cleanup worktrees [root] [--remote origin] [--keep-dbs] [--pushed] [--dirty-older-than DAYS] [--aggressive] [--yes]
799
799
  bdt cleanup orphaned-dbs [root] [--include-caution] [--yes]
800
800
  bdt cleanup db [path] [--confirm]
801
801
  bdt cleanup worktree [path] [--keep-db] [--confirm]
@@ -813,6 +813,22 @@ ever merged anywhere. Like `bdt issue delete`, neither command has an
813
813
  interactive prompt — both only ever *print* what they would remove/drop;
814
814
  pass `--yes` to actually do it.
815
815
 
816
+ `bdt cleanup worktrees` also recognises **squash / rebase merges**, where the branch's commits never become
817
+ ancestors of `main`: a worktree counts as merged when merging its branch into the target would change nothing, or
818
+ when its whole diff, squashed, has the same patch-id as a commit on the target (no network needed; run
819
+ `git fetch` first so `<remote>/main` is current). Three flags widen what is removed:
820
+
821
+ - `--pushed` — also remove worktrees whose commits are all pushed to `--remote`, merged or not (the local branch
822
+ stays, so nothing is lost).
823
+ - `--dirty-older-than DAYS` — also remove a *dirty* worktree whose latest edit (newest modified / untracked file, or
824
+ its HEAD commit) is at least that old. **This discards its uncommitted changes.** It only lifts the "dirty"
825
+ blocker: the worktree still has to be merged (or, with `--pushed`, pushed).
826
+ - `--aggressive` — `--pushed` plus `--dirty-older-than 14` (an explicit `--dirty-older-than` wins).
827
+
828
+ The main checkout, `main`/`test`/`dev` and locked worktrees are never removed. With `--yes` every worktree is
829
+ removed (and its DBs dropped) as soon as it is examined rather than after the whole scan, so an interrupted run
830
+ keeps what it already cleaned; the remote-DB-host confirmation is asked before the first DB drop.
831
+
816
832
  `bdt cleanup db` / `bdt cleanup worktree` instead target one specific,
817
833
  still-live worktree — `path` defaults to `.`, so both are meant to be run
818
834
  from inside the worktree in question, regardless of its merge status.
@@ -832,17 +848,46 @@ requires typing `yes` at an interactive prompt whenever `--pg-host` isn't
832
848
  database on a shared/remote Postgres instance without a human confirming it
833
849
  directly.
834
850
 
835
- ### Read-only disk-usage reports
851
+ ### Disk-usage reports
836
852
 
837
853
  ```bash
838
854
  bdt cleanup caches [--min-mb 50] [--json]
855
+ bdt cleanup caches --clean [--older-than-days N] [--only ID ...] [--yes] # alias: --fewer-days
839
856
  bdt cleanup stale-envs [root] [--days 30] [--min-mb 100] [--json]
840
857
  bdt cleanup inspect [root] [--idle-hours 24] [--json]
841
858
  bdt cleanup claude-home [root] [--depth 2] [--json]
842
859
  bdt cleanup claude-plugins [PATH ...] [--yes]
843
860
  ```
844
861
 
845
- `caches`, `stale-envs`, `inspect` (and `claude-home`, below) delete nothing; they feed the `dev-cleanup` skill's overview. `caches` lists the size of the
862
+ `bdt cleanup caches` only reports. With `--clean` it empties the listed caches: the `low`-risk rows, or the ones named
863
+ with `--only <id>` (which also allows `medium`). Without `--yes` it only prints the steps. Rustup toolchains,
864
+ HuggingFace models and Trash are never cleaned automatically.
865
+ `--older-than-days N` (alias `--fewer-days`) keeps what was modified recently (not "used": an old entry that is still in
866
+ use is just re-downloaded):
867
+
868
+ - podman/docker and Homebrew use their own age option.
869
+ - **bun**: whole `<pkg>@<ver>@@@1` entries and `.npm` manifests by modification date. Entries that a `node_modules`
870
+ under `$HOME` links into (also nested ones) are kept: that is how `bun install --backend=symlink` (a CLI flag; bunfig
871
+ and env cannot set it) works, so such projects keep working.
872
+ - **uv**: `archive-v0` entries and `simple-v*` files by modification date. Archives that a virtualenv under `$HOME`
873
+ links into (`--link-mode=symlink`, also settable in uv's config) are kept. uv does not support deleting in its cache
874
+ while it runs, so this takes uv's own cache lock and is skipped when uv is busy (this includes `uv run bdt ...`: run
875
+ it from a plain shell). Lock files, source trees and git checkouts are never cut by date, and `uv cache prune` is not
876
+ run (it ignores the cutoff).
877
+ - The link scan only covers `$HOME`: a symlink-mode project elsewhere (another drive) is not seen and would need a
878
+ `bun install` / `uv sync` again. It skips tool dirs (`~/.cache`, `~/.npm`, `~/.cargo`, `~/.bun`, `~/Library/Caches`, ...)
879
+ and silently passes over unreadable directories; if a `node_modules` or venv it does find cannot be read completely,
880
+ nothing is deleted.
881
+ - pip, sccache, `~/Library/Logs`, app caches: files by date. Xcode DerivedData: whole project entries by their newest file.
882
+ - npm, pnpm, cargo, NuGet, gradle, Playwright have no age option and cutting them by file date breaks in-use entries, so
883
+ they are skipped.
884
+
885
+ A tool that is not installed is never an error: uv, npm, bun, pip and NuGet fall back to deleting their cache files,
886
+ everything else is skipped with a note. The native cleaners are pinned to the listed cache dir. A path that resolves
887
+ outside `$HOME` (a symlinked `~/.gradle`, `~/.npm`) is refused, and real delete errors (permissions, I/O, unreadable
888
+ directories) make the command fail.
889
+
890
+ `caches` (without `--clean`), `stale-envs`, `inspect` (and `claude-home`, below) delete nothing; they feed the `dev-cleanup` skill's overview. `caches` lists the size of the
846
891
  podman/docker, uv/npm/bun/pnpm/pip, cargo/sccache/rustup, NuGet, gradle, HuggingFace, Playwright, Homebrew and
847
892
  Xcode caches (plus each `~/Library/Caches` app) with the command that cleans it and its risk. `stale-envs` finds
848
893
  `node_modules`, `.venv`, `.next`/`.turbo`, Rust `target/` (next to a `Cargo.toml`) and .NET `bin/`/`obj/` (next
@@ -776,7 +776,7 @@ configured, or with `--local`, it lists the clones under the work dir instead (t
776
776
  ## `bdt cleanup worktrees` / `bdt cleanup orphaned-dbs` / `bdt cleanup db` / `bdt cleanup worktree`
777
777
 
778
778
  ```bash
779
- bdt cleanup worktrees [root] [--remote origin] [--keep-dbs] [--yes]
779
+ bdt cleanup worktrees [root] [--remote origin] [--keep-dbs] [--pushed] [--dirty-older-than DAYS] [--aggressive] [--yes]
780
780
  bdt cleanup orphaned-dbs [root] [--include-caution] [--yes]
781
781
  bdt cleanup db [path] [--confirm]
782
782
  bdt cleanup worktree [path] [--keep-db] [--confirm]
@@ -794,6 +794,22 @@ ever merged anywhere. Like `bdt issue delete`, neither command has an
794
794
  interactive prompt — both only ever *print* what they would remove/drop;
795
795
  pass `--yes` to actually do it.
796
796
 
797
+ `bdt cleanup worktrees` also recognises **squash / rebase merges**, where the branch's commits never become
798
+ ancestors of `main`: a worktree counts as merged when merging its branch into the target would change nothing, or
799
+ when its whole diff, squashed, has the same patch-id as a commit on the target (no network needed; run
800
+ `git fetch` first so `<remote>/main` is current). Three flags widen what is removed:
801
+
802
+ - `--pushed` — also remove worktrees whose commits are all pushed to `--remote`, merged or not (the local branch
803
+ stays, so nothing is lost).
804
+ - `--dirty-older-than DAYS` — also remove a *dirty* worktree whose latest edit (newest modified / untracked file, or
805
+ its HEAD commit) is at least that old. **This discards its uncommitted changes.** It only lifts the "dirty"
806
+ blocker: the worktree still has to be merged (or, with `--pushed`, pushed).
807
+ - `--aggressive` — `--pushed` plus `--dirty-older-than 14` (an explicit `--dirty-older-than` wins).
808
+
809
+ The main checkout, `main`/`test`/`dev` and locked worktrees are never removed. With `--yes` every worktree is
810
+ removed (and its DBs dropped) as soon as it is examined rather than after the whole scan, so an interrupted run
811
+ keeps what it already cleaned; the remote-DB-host confirmation is asked before the first DB drop.
812
+
797
813
  `bdt cleanup db` / `bdt cleanup worktree` instead target one specific,
798
814
  still-live worktree — `path` defaults to `.`, so both are meant to be run
799
815
  from inside the worktree in question, regardless of its merge status.
@@ -813,17 +829,46 @@ requires typing `yes` at an interactive prompt whenever `--pg-host` isn't
813
829
  database on a shared/remote Postgres instance without a human confirming it
814
830
  directly.
815
831
 
816
- ### Read-only disk-usage reports
832
+ ### Disk-usage reports
817
833
 
818
834
  ```bash
819
835
  bdt cleanup caches [--min-mb 50] [--json]
836
+ bdt cleanup caches --clean [--older-than-days N] [--only ID ...] [--yes] # alias: --fewer-days
820
837
  bdt cleanup stale-envs [root] [--days 30] [--min-mb 100] [--json]
821
838
  bdt cleanup inspect [root] [--idle-hours 24] [--json]
822
839
  bdt cleanup claude-home [root] [--depth 2] [--json]
823
840
  bdt cleanup claude-plugins [PATH ...] [--yes]
824
841
  ```
825
842
 
826
- `caches`, `stale-envs`, `inspect` (and `claude-home`, below) delete nothing; they feed the `dev-cleanup` skill's overview. `caches` lists the size of the
843
+ `bdt cleanup caches` only reports. With `--clean` it empties the listed caches: the `low`-risk rows, or the ones named
844
+ with `--only <id>` (which also allows `medium`). Without `--yes` it only prints the steps. Rustup toolchains,
845
+ HuggingFace models and Trash are never cleaned automatically.
846
+ `--older-than-days N` (alias `--fewer-days`) keeps what was modified recently (not "used": an old entry that is still in
847
+ use is just re-downloaded):
848
+
849
+ - podman/docker and Homebrew use their own age option.
850
+ - **bun**: whole `<pkg>@<ver>@@@1` entries and `.npm` manifests by modification date. Entries that a `node_modules`
851
+ under `$HOME` links into (also nested ones) are kept: that is how `bun install --backend=symlink` (a CLI flag; bunfig
852
+ and env cannot set it) works, so such projects keep working.
853
+ - **uv**: `archive-v0` entries and `simple-v*` files by modification date. Archives that a virtualenv under `$HOME`
854
+ links into (`--link-mode=symlink`, also settable in uv's config) are kept. uv does not support deleting in its cache
855
+ while it runs, so this takes uv's own cache lock and is skipped when uv is busy (this includes `uv run bdt ...`: run
856
+ it from a plain shell). Lock files, source trees and git checkouts are never cut by date, and `uv cache prune` is not
857
+ run (it ignores the cutoff).
858
+ - The link scan only covers `$HOME`: a symlink-mode project elsewhere (another drive) is not seen and would need a
859
+ `bun install` / `uv sync` again. It skips tool dirs (`~/.cache`, `~/.npm`, `~/.cargo`, `~/.bun`, `~/Library/Caches`, ...)
860
+ and silently passes over unreadable directories; if a `node_modules` or venv it does find cannot be read completely,
861
+ nothing is deleted.
862
+ - pip, sccache, `~/Library/Logs`, app caches: files by date. Xcode DerivedData: whole project entries by their newest file.
863
+ - npm, pnpm, cargo, NuGet, gradle, Playwright have no age option and cutting them by file date breaks in-use entries, so
864
+ they are skipped.
865
+
866
+ A tool that is not installed is never an error: uv, npm, bun, pip and NuGet fall back to deleting their cache files,
867
+ everything else is skipped with a note. The native cleaners are pinned to the listed cache dir. A path that resolves
868
+ outside `$HOME` (a symlinked `~/.gradle`, `~/.npm`) is refused, and real delete errors (permissions, I/O, unreadable
869
+ directories) make the command fail.
870
+
871
+ `caches` (without `--clean`), `stale-envs`, `inspect` (and `claude-home`, below) delete nothing; they feed the `dev-cleanup` skill's overview. `caches` lists the size of the
827
872
  podman/docker, uv/npm/bun/pnpm/pip, cargo/sccache/rustup, NuGet, gradle, HuggingFace, Playwright, Homebrew and
828
873
  Xcode caches (plus each `~/Library/Caches` app) with the command that cleans it and its risk. `stale-envs` finds
829
874
  `node_modules`, `.venv`, `.next`/`.turbo`, Rust `target/` (next to a `Cargo.toml`) and .NET `bin/`/`obj/` (next