Run Ci
Run the full CI workflow locally (ruff format, ruff check, mypy, pytest) and fix every issue until green.
Claude CodeGeneric
---
description: Run the full CI workflow locally (ruff format, ruff check, mypy, pytest) and fix every issue until green.
allowed-tools: Bash, Read, Edit, Grep, Glob
---
Ported from `.kiro/hooks/run-ci-workflow.kiro.hook`. USE THE VENV FOR ALL STEPS —
nothing is executed outside the activated venv (`venv\Scripts\activate`). Read complete
output for every command (no tail/head/Select-Object). Iteratively execute the following
steps until the CI workflow for this project executes successfully:
1. Review the CI workflow defined in `.github/workflows/ci.yml`. Run the unit tests as
defined by CI (including integration tests where runnable):
`venv\Scripts\activate & pytest test/ --cov=bestehorn_llmmanager --cov-report=term-missing`
2. Collect all errors, warnings, and skipped tests.
3. Analyze them:
- **ERRORS**: MUST be fixed — no exceptions. Use the spec/design/documentation files to
determine the correct fix that aligns with those documents.
- **WARNINGS**: group by severity; fix those indicating serious errors/malfunctions;
minimize the total; keep a list of the ones left unfixed for the final report.
- **SKIPPED**: determine why each is skipped; minimize the count; fix those easily fixed;
keep the remaining on a list for the final report.
4. If there were ANY errors during the test run, go back to step 1 and re-execute.
There are NO exceptions. Only proceed to step 5 when there are ZERO errors.
5. Locally execute the linting / formatting / type / security checks of CI (everything that
is not unit/integration tests):
- `venv\Scripts\activate & ruff format --check src/ test/ scripts/`
- `venv\Scripts\activate & ruff check src/ test/ scripts/`
- `venv\Scripts\activate & mypy --exclude="_version" src/`
Only if there are ZERO issues may you proceed to step 7.
6. Fix all issues identified in step 5. No exceptions, no intermediate summaries.
7. Create a summary of the skipped tests and warnings collected in step 3. For each class,
suggest how it could be fixed and its impact, plus an overview of fixes implemented.
Never skip, disable, `--no-verify`, or delete a check to go green. Continue until every
check passes.
**Project-specific notes**: line length is 100 (not 120); always exclude
`src/bestehorn_llmmanager/_version.py` from every check (auto-generated by setuptools-scm);
package name `bestehorn-llmmanager`; source dir `src/bestehorn_llmmanager/`; Windows
activation `venv\Scripts\activate`.
Maintain Run Ci?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Run Ci on getagentictools](https://getagentictools.com/loops/bestehorn-run-ci?ref=badge)