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.
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/PKG-INFO +24 -24
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/README.md +23 -23
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/SKILL.md +21 -11
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/HOOKS.md +22 -24
- lemming_cli-0.11.0/docs/screenshots/task-log-desktop.png +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/pyproject.toml +1 -1
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/hooks.py +6 -6
- lemming_cli-0.11.0/src/lemming/cli/progress.py +73 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/progress_test.py +36 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/hooks.py +1 -4
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/orchestrator.py +11 -7
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/orchestrator_test.py +112 -25
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/90-roadmap.md +9 -6
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/taskrunner.md +4 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts.py +19 -7
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts_test.py +80 -3
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/index.html +1 -1
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/uv.lock +1 -1
- lemming_cli-0.10.1/docs/screenshots/task-log-desktop.png +0 -0
- lemming_cli-0.10.1/src/lemming/cli/progress.py +0 -47
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.dockerignore +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/ci.yml +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/publish.yml +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.github/workflows/screenshots.yml +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/.gitignore +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/Dockerfile +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/LICENSE +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/biome.json +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docker-compose.yml +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/EVALS.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/WORKSPACE.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/dashboard-desktop.png +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/dashboard-mobile.png +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/docs/screenshots/task-log-mobile.png +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/package-lock.json +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/package.json +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/playwright.config.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/auth.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/auth_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/config.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/config_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/conftest.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/context.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/context_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/directories.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/directories_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/files.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/files_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/hooks.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/hooks_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/logging.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/logging_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/loop.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/loop_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/main.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/main_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/tasks.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/api/tasks_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/artifact_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/brief_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/artifact.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/brief.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/config.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/config_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/exec_cli.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/exec_cli_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/goal.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/goal_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/hooks_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/machine_output_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/main.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/main_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/operations.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/operations_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/readability_cli.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/readability_cli_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/skill.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/skill_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/stop_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/tasks.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/cli/tasks_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/conftest.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/__main__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/cli.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/cli_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/container.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/container_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/fixtures.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/fixtures_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/harness.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/harness_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/metrics.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/metrics_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/legacy.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/base/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/clean/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/clean/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/dead-code/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/dead-code/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/false-reuse/calc/limits.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/false-reuse/calc/limits_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/lint-debt/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/readability/lint-debt/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/add-only/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/full-ops/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/hidden/stats/summary_hidden_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/README.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/summary.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/projects/task/summary/stats/summary_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/readability.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/readability_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/report.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/report_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/roadmap.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/roadmap_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/scenarios.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/scenarios_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/suites.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/task.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/task_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/trial.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/evals/trial_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/hooks_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/integration_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/main.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/main_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/models.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/models_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/paths.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/paths_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/persistence.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/persistence_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/50-readability.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/60-testing.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/prompts/hooks/70-ux.md +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/providers.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/providers_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/runner.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/runner_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/scope.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/scope_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown_integration_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/shutdown_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/snapshots.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/snapshots_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/__init__.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/lifecycle.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/lifecycle_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/limits.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/operations.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/operations_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/progress.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/progress_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/queries.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/queries_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/state_machine.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/tasks/state_machine_test.py +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/dashboard.spec.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/dashboard.test.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/favicon.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/favicon.spec.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/files.html +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/files.spec.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/index.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/logs.html +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/logs.test.js +0 -0
- {lemming_cli-0.10.1 → lemming_cli-0.11.0}/src/lemming/web/mancha.js +0 -0
- {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.
|
|
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
|
|
69
|
-
lemming add "
|
|
70
|
-
lemming add "
|
|
71
|
-
lemming add "
|
|
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**:
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
|
275
|
-
|
|
276
|
-
by running custom agents or scripts
|
|
277
|
-
|
|
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 `
|
|
285
|
-
- **Failure hooks**: Hooks at priority 90 and above
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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`**:
|
|
306
|
-
|
|
307
|
-
|
|
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>...`:
|
|
438
|
-
- `disable <name>...`:
|
|
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
|
|
49
|
-
lemming add "
|
|
50
|
-
lemming add "
|
|
51
|
-
lemming add "
|
|
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**:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
|
255
|
-
|
|
256
|
-
by running custom agents or scripts
|
|
257
|
-
|
|
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 `
|
|
265
|
-
- **Failure hooks**: Hooks at priority 90 and above
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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`**:
|
|
286
|
-
|
|
287
|
-
|
|
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>...`:
|
|
418
|
-
- `disable <name>...`:
|
|
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.
|
|
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
|
|
159
|
-
|
|
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 "
|
|
164
|
-
lemming add "
|
|
165
|
-
lemming add "
|
|
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
|
-
**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
|
5
|
-
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- **Oneshot tasks**: No hook runs after a task marked `--oneshot`
|
|
38
|
-
keeping mechanical changes cheap. A oneshot task that fails still
|
|
39
|
-
failure hooks, so recovery is never 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
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
|
76
|
-
|
|
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
|
|
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.
|
|
97
|
-
the task as `REJECTED` with the reason,
|
|
98
|
-
|
|
99
|
-
attempt's diff as an `attempt-<N>.patch` artifact, restores
|
|
100
|
-
task's `pre_tree`, and reverts the task to pending with its
|
|
101
|
-
— just as it does when a hook process fails. The rejection
|
|
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
|
|
Binary file
|
|
@@ -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
|
|
17
|
-
|
|
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
|
|
21
|
-
|
|
22
|
-
'
|
|
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
|
-
#
|
|
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)
|
|
84
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
)
|