lemming-cli 0.10.1__tar.gz → 0.11.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 (195) hide show
  1. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/PKG-INFO +24 -24
  2. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/README.md +23 -23
  3. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/SKILL.md +21 -11
  4. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/HOOKS.md +22 -24
  5. lemming_cli-0.11.0/docs/screenshots/task-log-desktop.png +0 -0
  6. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/pyproject.toml +1 -1
  7. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/hooks.py +6 -6
  8. lemming_cli-0.11.0/src/lemming/cli/progress.py +73 -0
  9. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/progress_test.py +36 -0
  10. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/hooks.py +1 -4
  11. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/orchestrator.py +11 -7
  12. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/orchestrator_test.py +112 -25
  13. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/90-roadmap.md +9 -6
  14. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/taskrunner.md +4 -0
  15. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts.py +19 -7
  16. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts_test.py +80 -3
  17. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/index.html +1 -1
  18. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/uv.lock +1 -1
  19. lemming_cli-0.10.1/docs/screenshots/task-log-desktop.png +0 -0
  20. lemming_cli-0.10.1/src/lemming/cli/progress.py +0 -47
  21. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.dockerignore +0 -0
  22. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/ci.yml +0 -0
  23. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/publish.yml +0 -0
  24. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/screenshots.yml +0 -0
  25. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.gitignore +0 -0
  26. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/Dockerfile +0 -0
  27. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/LICENSE +0 -0
  28. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/biome.json +0 -0
  29. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docker-compose.yml +0 -0
  30. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/EVALS.md +0 -0
  31. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/WORKSPACE.md +0 -0
  32. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/dashboard-desktop.png +0 -0
  33. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/dashboard-mobile.png +0 -0
  34. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/task-log-mobile.png +0 -0
  35. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/package-lock.json +0 -0
  36. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/package.json +0 -0
  37. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/playwright.config.js +0 -0
  38. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/__init__.py +0 -0
  39. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/__init__.py +0 -0
  40. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/auth.py +0 -0
  41. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/auth_test.py +0 -0
  42. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/config.py +0 -0
  43. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/config_test.py +0 -0
  44. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/conftest.py +0 -0
  45. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/context.py +0 -0
  46. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/context_test.py +0 -0
  47. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/directories.py +0 -0
  48. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/directories_test.py +0 -0
  49. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/files.py +0 -0
  50. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/files_test.py +0 -0
  51. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/hooks.py +0 -0
  52. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/hooks_test.py +0 -0
  53. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/logging.py +0 -0
  54. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/logging_test.py +0 -0
  55. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/loop.py +0 -0
  56. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/loop_test.py +0 -0
  57. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/main.py +0 -0
  58. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/main_test.py +0 -0
  59. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/tasks.py +0 -0
  60. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/tasks_test.py +0 -0
  61. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/artifact_test.py +0 -0
  62. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/brief_test.py +0 -0
  63. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/__init__.py +0 -0
  64. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/artifact.py +0 -0
  65. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/brief.py +0 -0
  66. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/config.py +0 -0
  67. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/config_test.py +0 -0
  68. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/exec_cli.py +0 -0
  69. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/exec_cli_test.py +0 -0
  70. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/goal.py +0 -0
  71. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/goal_test.py +0 -0
  72. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/hooks_test.py +0 -0
  73. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/machine_output_test.py +0 -0
  74. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/main.py +0 -0
  75. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/main_test.py +0 -0
  76. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/operations.py +0 -0
  77. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/operations_test.py +0 -0
  78. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/readability_cli.py +0 -0
  79. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/readability_cli_test.py +0 -0
  80. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/skill.py +0 -0
  81. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/skill_test.py +0 -0
  82. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/stop_test.py +0 -0
  83. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/tasks.py +0 -0
  84. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/tasks_test.py +0 -0
  85. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/conftest.py +0 -0
  86. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/__init__.py +0 -0
  87. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/__main__.py +0 -0
  88. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/cli.py +0 -0
  89. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/cli_test.py +0 -0
  90. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/container.py +0 -0
  91. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/container_test.py +0 -0
  92. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/fixtures.py +0 -0
  93. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/fixtures_test.py +0 -0
  94. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/harness.py +0 -0
  95. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/harness_test.py +0 -0
  96. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/metrics.py +0 -0
  97. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/metrics_test.py +0 -0
  98. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/README.md +0 -0
  99. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/__init__.py +0 -0
  100. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/legacy.py +0 -0
  101. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/ops.py +0 -0
  102. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/ops_test.py +0 -0
  103. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/clean/calc/ops.py +0 -0
  104. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/clean/calc/ops_test.py +0 -0
  105. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/dead-code/calc/ops.py +0 -0
  106. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/dead-code/calc/ops_test.py +0 -0
  107. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops.py +0 -0
  108. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops_test.py +0 -0
  109. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/false-reuse/calc/limits.py +0 -0
  110. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/false-reuse/calc/limits_test.py +0 -0
  111. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/lint-debt/calc/ops.py +0 -0
  112. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/lint-debt/calc/ops_test.py +0 -0
  113. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/README.md +0 -0
  114. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/__init__.py +0 -0
  115. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/ops.py +0 -0
  116. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/ops_test.py +0 -0
  117. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/README.md +0 -0
  118. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/__init__.py +0 -0
  119. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops.py +0 -0
  120. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops_test.py +0 -0
  121. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/README.md +0 -0
  122. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/__init__.py +0 -0
  123. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/ops.py +0 -0
  124. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/ops_test.py +0 -0
  125. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/README.md +0 -0
  126. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/__init__.py +0 -0
  127. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli.py +0 -0
  128. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli_test.py +0 -0
  129. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops.py +0 -0
  130. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops_test.py +0 -0
  131. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/hidden/stats/summary_hidden_test.py +0 -0
  132. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/README.md +0 -0
  133. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/__init__.py +0 -0
  134. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/summary.py +0 -0
  135. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/summary_test.py +0 -0
  136. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/readability.py +0 -0
  137. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/readability_test.py +0 -0
  138. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/report.py +0 -0
  139. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/report_test.py +0 -0
  140. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/roadmap.py +0 -0
  141. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/roadmap_test.py +0 -0
  142. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/scenarios.py +0 -0
  143. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/scenarios_test.py +0 -0
  144. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/suites.py +0 -0
  145. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/task.py +0 -0
  146. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/task_test.py +0 -0
  147. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/trial.py +0 -0
  148. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/trial_test.py +0 -0
  149. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/hooks_test.py +0 -0
  150. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/integration_test.py +0 -0
  151. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/main.py +0 -0
  152. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/main_test.py +0 -0
  153. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/models.py +0 -0
  154. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/models_test.py +0 -0
  155. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/paths.py +0 -0
  156. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/paths_test.py +0 -0
  157. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/persistence.py +0 -0
  158. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/persistence_test.py +0 -0
  159. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/50-readability.md +0 -0
  160. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/60-testing.md +0 -0
  161. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/70-ux.md +0 -0
  162. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/providers.py +0 -0
  163. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/providers_test.py +0 -0
  164. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/runner.py +0 -0
  165. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/runner_test.py +0 -0
  166. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/scope.py +0 -0
  167. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/scope_test.py +0 -0
  168. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown.py +0 -0
  169. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown_integration_test.py +0 -0
  170. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown_test.py +0 -0
  171. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/snapshots.py +0 -0
  172. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/snapshots_test.py +0 -0
  173. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/__init__.py +0 -0
  174. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/lifecycle.py +0 -0
  175. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/lifecycle_test.py +0 -0
  176. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/limits.py +0 -0
  177. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/operations.py +0 -0
  178. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/operations_test.py +0 -0
  179. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/progress.py +0 -0
  180. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/progress_test.py +0 -0
  181. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/queries.py +0 -0
  182. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/queries_test.py +0 -0
  183. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/state_machine.py +0 -0
  184. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/state_machine_test.py +0 -0
  185. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/dashboard.spec.js +0 -0
  186. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/dashboard.test.js +0 -0
  187. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/favicon.js +0 -0
  188. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/favicon.spec.js +0 -0
  189. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/files.html +0 -0
  190. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/files.spec.js +0 -0
  191. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/index.js +0 -0
  192. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/logs.html +0 -0
  193. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/logs.test.js +0 -0
  194. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/mancha.js +0 -0
  195. {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/screenshots.spec.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lemming-cli
3
- Version: 0.10.1
3
+ Version: 0.11.0
4
4
  Summary: An autonomous, iterative task runner for AI coding agents.
5
5
  Project-URL: Homepage, https://github.com/owahltinez/lemming
6
6
  Project-URL: Repository, https://github.com/owahltinez/lemming
@@ -65,10 +65,10 @@ Set the long-term goal and define the first tasks.
65
65
  # Set the long-term goal that every task works toward
66
66
  lemming goal "Build a habit-tracking web app with auth, offline support, and tests"
67
67
 
68
- # Add tasks to the queue
69
- lemming add "Initialize the project with Vite"
70
- lemming add "Create the Button component"
71
- lemming add "Implement the authentication flow"
68
+ # Add self-contained vertical slices to the queue
69
+ lemming add "Scaffold the Vite app, routing shell, and test setup"
70
+ lemming add "Add user sign-in and session persistence with auth tests"
71
+ lemming add "Add habit check-ins with offline IndexedDB sync and tests"
72
72
  ```
73
73
 
74
74
  The goal is the one piece of state every task sees, no matter how far into the
@@ -261,31 +261,32 @@ loops through each pending task:
261
261
  with accumulated progress as context. A timeout also keeps the tail of the
262
262
  agent's output as `attempt-<N>-timeout.log`, so the retry starts from what
263
263
  the killed attempt found. On success, it moves to the next task.
264
- 5. **Orchestration**: After each task, Lemming can run one or more
265
- **Orchestrator Hooks** (like the built-in `roadmap` hook) to evaluate the
266
- results and adapt the roadmap if needed. Only `roadmap` runs by default;
267
- reviews are opt-in.
264
+ 5. **Orchestration**: Lemming runs enabled **Orchestrator Hooks** to review
265
+ completed work or recover from failures. Opt-in review hooks (`< 90`) run
266
+ after each completed task; failure hooks (`90+`, including the default
267
+ `roadmap` hook) run only when a task fails.
268
268
 
269
269
  ---
270
270
 
271
271
  ## Orchestrator Hooks ⚓️
272
272
 
273
273
  For longer, multi-stage projects, the initial task list often can't anticipate
274
- everything. Tasks may fail in ways that retrying won't fix, or completing all
275
- tasks may not fully achieve the stated goal. **Orchestrator Hooks** address this
276
- by running custom agents or scripts after each task execution to evaluate
277
- results and adapt the roadmap.
274
+ everything. Tasks may fail in ways that retrying won't fix, or completed changes
275
+ may benefit from an independent review pass. **Orchestrator Hooks** address this
276
+ by running custom agents or scripts to review completed work or repair the
277
+ roadmap on failure.
278
278
 
279
279
  Lemming runs the hooks enabled for the project, which by default is only the
280
280
  built-in `roadmap` hook; review hooks are opt-in. Hooks are plain Markdown
281
281
  files, and udev-style filename conventions control their behavior:
282
282
 
283
283
  - **Ordering**: A numeric prefix sets the execution order (e.g. `10-lint.md`
284
- runs before `90-roadmap.md`); files without a prefix default to priority 50.
285
- - **Failure hooks**: Hooks at priority 90 and above also run when a task fails;
286
- all others only run on success.
287
- - **Oneshot tasks**: A task added with `--oneshot` skips all hooks once it
288
- completes, so mechanical work (a typo fix, a version bump) does not pay for
284
+ runs before `50-readability.md`); files without a prefix default to priority 50.
285
+ - **Failure hooks**: Hooks at priority 90 and above (such as `90-roadmap.md`)
286
+ run only when a task fails; hooks below 90 are review hooks and run only on
287
+ success.
288
+ - **Oneshot tasks**: A task added with `--oneshot` skips all review hooks once
289
+ it completes, so mechanical work (a typo fix, a version bump) does not pay for
289
290
  the full review lifecycle. Failure hooks still run if it fails.
290
291
  - **Masking**: An empty file hides the hook of the same name from a
291
292
  lower-precedence layer, even where it is enabled.
@@ -302,10 +303,9 @@ lemming add "Redesign the settings page" --hooks ux,testing
302
303
 
303
304
  Lemming comes with several built-in hooks to help manage your project:
304
305
 
305
- - **`roadmap`**: The primary mechanism for autonomous project management. It
306
- analyzes the results of the finished task and decides if the remaining roadmap
307
- needs to be adjusted (e.g., adding a missing prerequisite, skipping obsolete
308
- tasks, or breaking down a broad task).
306
+ - **`roadmap`**: Failure-recovery orchestration. When a task exhausts retries or
307
+ fails, it diagnoses the failure and adapts the roadmap (e.g., rewriting the
308
+ approach, splitting into prerequisites, or superseding obsolete tasks).
309
309
  - **`readability`**: A code quality and simplification hook that challenges
310
310
  unnecessary complexity and duplicate implementations, then reviews changes for
311
311
  adherence to the Google Style Guide and general readability using the
@@ -434,8 +434,8 @@ These come before the subcommand and apply to all of them.
434
434
  model without touching the runner.
435
435
  - **`hooks`**: Manage orchestrator hooks.
436
436
  - `list`: View available hooks and the ones enabled for the project.
437
- - `enable <name>...`: Run one or more hooks after every task.
438
- - `disable <name>...`: Stop running one or more hooks by default.
437
+ - `enable <name>...`: Enable one or more hooks for the project.
438
+ - `disable <name>...`: Disable one or more hooks for the project.
439
439
  - **`readability`**: Code quality tool for style guide adherence, wrapping the
440
440
  [readability](https://github.com/owahltinez/readability) package. Ruff and
441
441
  Pyrefly run with bundled Google-style defaults unless the target project
@@ -45,10 +45,10 @@ Set the long-term goal and define the first tasks.
45
45
  # Set the long-term goal that every task works toward
46
46
  lemming goal "Build a habit-tracking web app with auth, offline support, and tests"
47
47
 
48
- # Add tasks to the queue
49
- lemming add "Initialize the project with Vite"
50
- lemming add "Create the Button component"
51
- lemming add "Implement the authentication flow"
48
+ # Add self-contained vertical slices to the queue
49
+ lemming add "Scaffold the Vite app, routing shell, and test setup"
50
+ lemming add "Add user sign-in and session persistence with auth tests"
51
+ lemming add "Add habit check-ins with offline IndexedDB sync and tests"
52
52
  ```
53
53
 
54
54
  The goal is the one piece of state every task sees, no matter how far into the
@@ -241,31 +241,32 @@ loops through each pending task:
241
241
  with accumulated progress as context. A timeout also keeps the tail of the
242
242
  agent's output as `attempt-<N>-timeout.log`, so the retry starts from what
243
243
  the killed attempt found. On success, it moves to the next task.
244
- 5. **Orchestration**: After each task, Lemming can run one or more
245
- **Orchestrator Hooks** (like the built-in `roadmap` hook) to evaluate the
246
- results and adapt the roadmap if needed. Only `roadmap` runs by default;
247
- reviews are opt-in.
244
+ 5. **Orchestration**: Lemming runs enabled **Orchestrator Hooks** to review
245
+ completed work or recover from failures. Opt-in review hooks (`< 90`) run
246
+ after each completed task; failure hooks (`90+`, including the default
247
+ `roadmap` hook) run only when a task fails.
248
248
 
249
249
  ---
250
250
 
251
251
  ## Orchestrator Hooks ⚓️
252
252
 
253
253
  For longer, multi-stage projects, the initial task list often can't anticipate
254
- everything. Tasks may fail in ways that retrying won't fix, or completing all
255
- tasks may not fully achieve the stated goal. **Orchestrator Hooks** address this
256
- by running custom agents or scripts after each task execution to evaluate
257
- results and adapt the roadmap.
254
+ everything. Tasks may fail in ways that retrying won't fix, or completed changes
255
+ may benefit from an independent review pass. **Orchestrator Hooks** address this
256
+ by running custom agents or scripts to review completed work or repair the
257
+ roadmap on failure.
258
258
 
259
259
  Lemming runs the hooks enabled for the project, which by default is only the
260
260
  built-in `roadmap` hook; review hooks are opt-in. Hooks are plain Markdown
261
261
  files, and udev-style filename conventions control their behavior:
262
262
 
263
263
  - **Ordering**: A numeric prefix sets the execution order (e.g. `10-lint.md`
264
- runs before `90-roadmap.md`); files without a prefix default to priority 50.
265
- - **Failure hooks**: Hooks at priority 90 and above also run when a task fails;
266
- all others only run on success.
267
- - **Oneshot tasks**: A task added with `--oneshot` skips all hooks once it
268
- completes, so mechanical work (a typo fix, a version bump) does not pay for
264
+ runs before `50-readability.md`); files without a prefix default to priority 50.
265
+ - **Failure hooks**: Hooks at priority 90 and above (such as `90-roadmap.md`)
266
+ run only when a task fails; hooks below 90 are review hooks and run only on
267
+ success.
268
+ - **Oneshot tasks**: A task added with `--oneshot` skips all review hooks once
269
+ it completes, so mechanical work (a typo fix, a version bump) does not pay for
269
270
  the full review lifecycle. Failure hooks still run if it fails.
270
271
  - **Masking**: An empty file hides the hook of the same name from a
271
272
  lower-precedence layer, even where it is enabled.
@@ -282,10 +283,9 @@ lemming add "Redesign the settings page" --hooks ux,testing
282
283
 
283
284
  Lemming comes with several built-in hooks to help manage your project:
284
285
 
285
- - **`roadmap`**: The primary mechanism for autonomous project management. It
286
- analyzes the results of the finished task and decides if the remaining roadmap
287
- needs to be adjusted (e.g., adding a missing prerequisite, skipping obsolete
288
- tasks, or breaking down a broad task).
286
+ - **`roadmap`**: Failure-recovery orchestration. When a task exhausts retries or
287
+ fails, it diagnoses the failure and adapts the roadmap (e.g., rewriting the
288
+ approach, splitting into prerequisites, or superseding obsolete tasks).
289
289
  - **`readability`**: A code quality and simplification hook that challenges
290
290
  unnecessary complexity and duplicate implementations, then reviews changes for
291
291
  adherence to the Google Style Guide and general readability using the
@@ -414,8 +414,8 @@ These come before the subcommand and apply to all of them.
414
414
  model without touching the runner.
415
415
  - **`hooks`**: Manage orchestrator hooks.
416
416
  - `list`: View available hooks and the ones enabled for the project.
417
- - `enable <name>...`: Run one or more hooks after every task.
418
- - `disable <name>...`: Stop running one or more hooks by default.
417
+ - `enable <name>...`: Enable one or more hooks for the project.
418
+ - `disable <name>...`: Disable one or more hooks for the project.
419
419
  - **`readability`**: Code quality tool for style guide adherence, wrapping the
420
420
  [readability](https://github.com/owahltinez/readability) package. Ruff and
421
421
  Pyrefly run with bundled Google-style defaults unless the target project
@@ -19,7 +19,7 @@ One interface over several agent CLIs. You do not need to know how `agy`,
19
19
  Use `exec` for one unit of work, and a roadmap for anything larger than a single
20
20
  agent run can hold.
21
21
 
22
- This guide is for `lemming` 0.10.1 or newer. If `lemming --version` is older,
22
+ This guide is for `lemming` 0.11.0 or newer. If `lemming --version` is older,
23
23
  run `uv tool upgrade lemming-cli` first; older versions lack flags used below.
24
24
 
25
25
  ## Delegate one task
@@ -155,14 +155,19 @@ copy and pass it with the global `-C` option, as in the example above.
155
155
  ## Drive a roadmap
156
156
 
157
157
  For work that outlasts one agent run — a migration, a multi-step feature — break
158
- it into tasks. Each runs with a fresh context seeded only by the goal and
159
- recorded progress, so the project survives context limits.
158
+ it into self-contained vertical slices that each fit comfortably in one run.
159
+ Bundle implementation, caller wiring, and warranted tests into one task rather
160
+ than splitting production code from tests or layers from callers; keep each
161
+ slice small enough to finish well within the time limit. Each task runs with a
162
+ fresh context seeded only by the goal and recorded progress, so the project
163
+ survives context limits.
160
164
 
161
165
  ```sh
162
166
  lemming goal "Add offline support with a service worker and a sync queue"
163
- lemming add "Register the service worker and cache the app shell"
164
- lemming add "Queue writes in IndexedDB while offline"
165
- lemming add "Bump the service worker cache version" --oneshot
167
+ lemming add "Ignore dist/ and coverage/ in .gitignore" --oneshot
168
+ lemming add "Add the service worker, register it on boot, and test shell caching"
169
+ lemming add "Queue offline writes in IndexedDB and replay on reconnect, with tests"
170
+ lemming add "Verify end-to-end offline caching and reconnect replay against every goal clause"
166
171
  lemming run --detach # runs until the queue drains
167
172
  lemming run --detach --until <task-id> # or stops once that task settles
168
173
  ```
@@ -174,11 +179,16 @@ without a `.gitignore`, create one (or queue it as the first `--oneshot` task)
174
179
  before tasks install dependencies or run builds so workspace snapshots skip
175
180
  `node_modules/`, `.venv/`, and build outputs.
176
181
 
177
- **Mark mechanical tasks `--oneshot`.** After every other task, a roadmap hook
178
- may revise the queue and any enabled reviews run; each hook is a full agent run,
179
- so a typo fix, rename, version bump, or cleanup without `--oneshot` takes
180
- several times longer than the work itself. Reviews are opt-in: pick them for one
181
- task with `lemming add ... --hooks testing,ux`, or for every task with
182
+ **End multi-task roadmaps with a verification task.** Because `roadmap` runs
183
+ only on failures, queue a final task that verifies every clause of the goal
184
+ end-to-end against the built workspace.
185
+
186
+ **Mark mechanical tasks `--oneshot`.** When review hooks are enabled, each hook
187
+ is a full agent run after every non-oneshot completion, so a typo fix, rename,
188
+ version bump, or cleanup without `--oneshot` takes several times longer than the
189
+ work itself. The default `roadmap` hook (`90+`) runs only on task failures;
190
+ reviews are opt-in: pick them for one task with
191
+ `lemming add ... --hooks testing,ux`, or for every task with
182
192
  `lemming hooks enable <name>`. `lemming hooks list` shows which are enabled.
183
193
 
184
194
  ### Supervise in milestones
@@ -1,8 +1,8 @@
1
1
  # Orchestrator Hooks ⚓️
2
2
 
3
3
  Orchestrator hooks are a powerful way to extend the Lemming workflow. They allow
4
- you to execute custom agents or scripts after each task, enabling automated
5
- roadmap revision, code quality checks, or any other post-task validation.
4
+ you to execute custom agents or scripts after task execution, enabling automated
5
+ failure recovery, code quality checks, or any other post-task validation.
6
6
 
7
7
  ## How it Works
8
8
 
@@ -31,14 +31,12 @@ conventions control their behavior:
31
31
  before `90-roadmap.md`. Files without a prefix default to priority 50. The
32
32
  prefix is **not** part of the hook's name: `90-roadmap.md` defines the hook
33
33
  `roadmap`.
34
- - **Failure hooks**: Hooks at priority 90 and above also run when a task fails.
35
- All other hooks only run after successful tasks. The built-in `roadmap` hook
36
- ships as `90-roadmap.md` so it can react to failures.
37
- - **Oneshot tasks**: No hook runs after a task marked `--oneshot` completes,
38
- keeping mechanical changes cheap. A oneshot task that fails still gets its
39
- failure hooks, so recovery is never skipped. Note that `roadmap` is skipped
40
- too: if a oneshot task is the last one in the queue, the run ends without a
41
- goal audit, so nothing is queued to carry the goal further.
34
+ - **Failure hooks**: Hooks at priority 90 and above (such as `90-roadmap.md`)
35
+ run only when a task fails. Hooks below priority 90 are review hooks and run
36
+ only after successful non-oneshot tasks.
37
+ - **Oneshot tasks**: No review hook runs after a task marked `--oneshot`
38
+ completes, keeping mechanical changes cheap. A oneshot task that fails still
39
+ gets its failure hooks, so recovery is never skipped.
42
40
  - **Masking**: An empty file hides the hook of the same name from a
43
41
  lower-precedence layer (see below), even where a project or task enables it.
44
42
  For example, an empty `.lemming/hooks/readability.md` hides the built-in
@@ -55,10 +53,10 @@ Only `roadmap` runs by default; the review hooks are opt-in per project or task
55
53
 
56
54
  ### `roadmap` (Default)
57
55
 
58
- The primary mechanism for autonomous project management. It analyzes the results
59
- of the finished task and decides if the remaining roadmap needs to be adjusted
60
- (e.g., adding a missing prerequisite, skipping obsolete tasks, or breaking down
61
- a broad task).
56
+ The built-in failure-recovery hook (`90-roadmap.md`). When a task fails or
57
+ exhausts retries, it diagnoses the failure and adapts the roadmap (e.g.,
58
+ rewriting the approach, splitting into smaller prerequisites, or superseding
59
+ obsolete tasks).
62
60
 
63
61
  ### `readability`
64
62
 
@@ -72,8 +70,8 @@ fixes in the working directory and records broader findings as task progress.
72
70
 
73
71
  Checks that changed behavior has focused test coverage and runs the relevant
74
72
  tests. It may repair small, targeted problems in production code or tests and
75
- may add, merge, or remove tests. It records larger testing gaps as task progress
76
- for the roadmap hook.
73
+ may add, merge, or remove tests. It records larger testing gaps as task
74
+ progress.
77
75
 
78
76
  ### `ux`
79
77
 
@@ -81,7 +79,7 @@ A lightweight journey-continuity review for user-visible changes. It considers
81
79
  at most one affected critical journey, reports only concrete and reproducible
82
80
  gaps, and exits immediately when the task did not change user-facing behavior.
83
81
  Its prompt instructs the agent to stay advisory, but this is not
84
- sandbox-enforced. It runs after `testing` and before `roadmap`.
82
+ sandbox-enforced. It runs after `testing`.
85
83
 
86
84
  ### Rejecting Completion
87
85
 
@@ -93,13 +91,13 @@ lemming --tasks-file <path> reject <taskid> '<reason>'
93
91
  ```
94
92
 
95
93
  A rejection only applies to a task that is finalizing as completed, and it does
96
- not change the task's status on the spot. The remaining hooks still run and see
97
- the task as `REJECTED` with the reason, so the roadmap hook can tell a rejected
98
- task from a finished one. Once every hook has run, Lemming saves the rejected
99
- attempt's diff as an `attempt-<N>.patch` artifact, restores the workspace to the
100
- task's `pre_tree`, and reverts the task to pending with its attempt count intact
101
- — just as it does when a hook process fails. The rejection reason stays in
102
- `progress` so the next attempt starts with the diagnosis.
94
+ not change the task's status on the spot. Any remaining review hooks (below
95
+ priority 90) still run and see the task as `REJECTED` with the reason, while
96
+ `90+` failure hooks do not run on completions. Once the hooks finish, Lemming
97
+ saves the rejected attempt's diff as an `attempt-<N>.patch` artifact, restores
98
+ the workspace to the task's `pre_tree`, and reverts the task to pending with its
99
+ attempt count intact — just as it does when a hook process fails. The rejection
100
+ reason stays in `progress` so the next attempt starts with the diagnosis.
103
101
 
104
102
  Each hook that runs is also bracketed by its own shadow Git snapshot pair in
105
103
  `hook_trees`. If an individual hook process crashes or exits non-zero, its own
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "lemming-cli"
7
- version = "0.10.1"
7
+ version = "0.11.0"
8
8
  description = "An autonomous, iterative task runner for AI coding agents."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -13,13 +13,13 @@ def hooks_group():
13
13
  Hooks are Markdown prompt files discovered from the project
14
14
  (.lemming/hooks/), global (~/.local/lemming/hooks/), and built-in
15
15
  layers, with the project layer taking precedence. A numeric filename
16
- prefix (e.g. 90-roadmap.md) sets the execution order; hooks at 90 and
17
- above also run when a task fails. An empty file masks the hook of the
18
- same name.
16
+ prefix (e.g. 90-roadmap.md) sets the execution order. Hooks below 90
17
+ review completed tasks; hooks at 90 and above run only when a task
18
+ fails. An empty file masks the hook of the same name.
19
19
 
20
- Only the hooks enabled for the project run after each task; by default
21
- that is just roadmap. A task can pick its own reviews with
22
- 'add --hooks' or 'edit --hooks'.
20
+ Only the hooks enabled for the project run by default (initially just
21
+ roadmap). A task can pick its own reviews with 'add --hooks' or
22
+ 'edit --hooks'.
23
23
  """
24
24
  pass
25
25
 
@@ -0,0 +1,73 @@
1
+ """CLI command for recording task progress entries."""
2
+
3
+ import time
4
+ import typing
5
+
6
+ import click
7
+
8
+ from .. import models, orchestrator, persistence
9
+ from ..tasks import progress as task_progress
10
+ from .main import TEXT_FILE, cli
11
+
12
+
13
+ def _format_budget_suffix(task: models.Task, time_limit: int) -> str:
14
+ """Formats elapsed and remaining time for an active bounded execution."""
15
+ component = task.active_execution_component
16
+ started_at = task.active_execution_started_at
17
+ if time_limit <= 0 or not component or started_at is None:
18
+ return ""
19
+ if component == "runner":
20
+ limit_min = time_limit
21
+ elif component.startswith("hook:"):
22
+ limit_min = min(time_limit, orchestrator.HOOK_TIME_LIMIT)
23
+ else:
24
+ return ""
25
+
26
+ elapsed_s = max(0, int(time.time() - started_at))
27
+ elapsed = "<1m" if elapsed_s < 60 else f"{elapsed_s // 60}m"
28
+ remaining_s = limit_min * 60 - elapsed_s
29
+ if remaining_s <= 0:
30
+ return f" ({elapsed}/{limit_min}m elapsed, time limit reached)"
31
+ remaining = "<1m" if remaining_s < 60 else f"{remaining_s // 60}m"
32
+ return f" ({elapsed}/{limit_min}m elapsed, {remaining} remaining)"
33
+
34
+
35
+ @cli.command(short_help="<taskid> [text] Add a progress entry")
36
+ @click.argument("task_id")
37
+ @click.argument("text", required=False)
38
+ @click.option(
39
+ "--file",
40
+ "-f",
41
+ type=TEXT_FILE,
42
+ help="Read progress text from a file (or - for stdin).",
43
+ )
44
+ @click.pass_context
45
+ def progress(
46
+ ctx: click.Context,
47
+ task_id: str,
48
+ text: str | None,
49
+ file: typing.TextIO | None,
50
+ ):
51
+ """Records a progress entry or finding for a specific task."""
52
+ tasks_file = ctx.obj["TASKS_FILE"]
53
+
54
+ if file:
55
+ if text:
56
+ click.echo("Error: Cannot provide both progress text and --file.")
57
+ ctx.exit(1)
58
+ text = file.read().strip()
59
+ elif text:
60
+ text = text.strip()
61
+
62
+ if not text:
63
+ click.echo("Error: Must provide either progress text or --file.")
64
+ ctx.exit(1)
65
+
66
+ try:
67
+ target_task = task_progress.add_progress(tasks_file, task_id, text)
68
+ time_limit = persistence.load_tasks(tasks_file).config.time_limit
69
+ suffix = _format_budget_suffix(target_task, time_limit)
70
+ click.echo(f"Progress added to task {target_task.id}{suffix}.")
71
+ except ValueError as e:
72
+ click.echo(f"Error: {e}")
73
+ ctx.exit(1)
@@ -1,3 +1,5 @@
1
+ import time
2
+
1
3
  import pytest
2
4
  from click.testing import CliRunner
3
5
 
@@ -59,3 +61,37 @@ def test_progress_reports_actionable_size_error(setup_env):
59
61
  assert "lemming artifact <id> <name> --file -" in result.output
60
62
  assert str(tasks_file.parent) not in result.output
61
63
  assert persistence.load_tasks(tasks_file).tasks[0].progress == []
64
+
65
+
66
+ @pytest.mark.parametrize(
67
+ ("component", "time_limit", "elapsed_s", "expected"),
68
+ [
69
+ ("runner", 30, 20, "(<1m/30m elapsed, 29m remaining)."),
70
+ ("runner", 30, 22 * 60, "(22m/30m elapsed, 8m remaining)."),
71
+ ("runner", 30, 29 * 60 + 30, "(29m/30m elapsed, <1m remaining)."),
72
+ ("runner", 30, 31 * 60, "(31m/30m elapsed, time limit reached)."),
73
+ ("hook:testing", 60, 5 * 60, "(5m/15m elapsed, 10m remaining)."),
74
+ ("hook:testing", 10, 5 * 60, "(5m/10m elapsed, 5m remaining)."),
75
+ ("runner", 0, 10 * 60, "Progress added to task 12345678."),
76
+ ],
77
+ )
78
+ def test_progress_reports_elapsed_time_budget(
79
+ setup_env, monkeypatch, component, time_limit, elapsed_s, expected
80
+ ):
81
+ runner, base_args, tasks_file = setup_env
82
+ now = 1_700_000_000.0
83
+ monkeypatch.setattr(time, "time", lambda: now)
84
+
85
+ data = persistence.load_tasks(tasks_file)
86
+ data.config.time_limit = time_limit
87
+ data.tasks[0].status = models.TaskStatus.RUNNING
88
+ data.tasks[0].active_execution_component = component
89
+ data.tasks[0].active_execution_started_at = now - elapsed_s
90
+ persistence.save_tasks(tasks_file, data)
91
+
92
+ result = runner.invoke(
93
+ cli.cli, base_args + ["progress", "12345678", "checkpoint"]
94
+ )
95
+
96
+ assert result.exit_code == 0
97
+ assert result.output.strip().endswith(expected)
@@ -11,10 +11,7 @@ import typing
11
11
 
12
12
  from . import paths, persistence
13
13
 
14
- # Hook files follow a udev-style naming convention: "NN-name.md" where the
15
- # numeric prefix orders execution and the remainder is the hook's logical
16
- # name. Unprefixed files default to DEFAULT_HOOK_PRIORITY. Hooks at or above
17
- # FAILURE_HOOK_PRIORITY also run when a task fails.
14
+ # "NN-name.md" prefixes order hooks; >= 90 runs only when a task fails.
18
15
  DEFAULT_HOOK_PRIORITY = 50
19
16
  FAILURE_HOOK_PRIORITY = 90
20
17
 
@@ -80,8 +80,9 @@ def run_hooks(
80
80
  verbose: Whether to echo prompts and hook diagnostics.
81
81
  hooks: Explicit list of hooks to run. If None, runs the project's
82
82
  enabled hooks, with the task's own reviews replacing the
83
- project's (see hooks.select_hooks). A oneshot task runs none of
84
- them on success.
83
+ project's (see hooks.select_hooks): reviews (< 90) run on
84
+ completion and failure hooks (>= 90) run only on failure. A
85
+ oneshot task runs none of them on success.
85
86
  working_dir: Working directory for the hook runner processes.
86
87
  time_limit: Task time limit in minutes; each hook run gets at most
87
88
  HOOK_TIME_LIMIT of it (0 disables it).
@@ -116,13 +117,19 @@ def run_hooks(
116
117
  if task.oneshot and task.status == models.TaskStatus.COMPLETING:
117
118
  active_hooks = []
118
119
 
119
- # On failure, only failure hooks (9x priority prefix) run
120
+ # 9x hooks run only on failure; below-90 reviews run only on completion.
120
121
  if task.status == models.TaskStatus.FAILING:
121
122
  active_hooks = [
122
123
  h
123
124
  for h in active_hooks
124
125
  if get_hook_priority(h, tasks_file) >= FAILURE_HOOK_PRIORITY
125
126
  ]
127
+ elif task.status == models.TaskStatus.COMPLETING and hooks is None:
128
+ active_hooks = [
129
+ h
130
+ for h in active_hooks
131
+ if get_hook_priority(h, tasks_file) < FAILURE_HOOK_PRIORITY
132
+ ]
126
133
 
127
134
  if not active_hooks:
128
135
  if finalizing:
@@ -246,10 +253,7 @@ def run_hooks(
246
253
  elif exit_codes[hook_name] == 0 and hook_pre_tree is not None:
247
254
  hook_post_tree = snapshots.snapshot_tree(tasks_file, working_dir)
248
255
 
249
- # A hook that finds a defect it cannot fix rejects the completion
250
- # rather than failing its own process. Attribute it here, while it is
251
- # still known which hook ran, but keep going: the later hooks (the
252
- # roadmap hook above all) need to see the rejection too.
256
+ # Attribute rejections while remaining review hooks still see them.
253
257
  rejection = _record_hook_tree_and_read_rejection(
254
258
  tasks_file, task_id, hook_name, hook_pre_tree, hook_post_tree
255
259
  )