You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/research.md
+26-14Lines changed: 26 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ Its core purpose is not just to wrap HTTP endpoints, but to hide a number of inc
11
11
12
12
The project is fairly mature in terms of developer ergonomics: it has strong documentation, broad automated tests, typed Pydantic models, linting/type-checking/security checks, and CI across Python 3.10 to 3.14. The main architectural weakness is concentration of logic in large modules, especially the CLI module. There are also a few places where runtime `assert` statements are used as correctness guards, which is less robust than explicit error handling.
13
13
14
+
The package version is managed in `pyproject.toml`; the repository is on the `0.2.0.dev9` development line.
15
+
14
16
## What The Project Does
15
17
16
18
At a high level, this repository provides a stable and scriptable interface around Varvis for:
@@ -67,6 +69,8 @@ The package entry point is simple:
67
69
-`src/varvis_connector/__main__.py` creates `VarvisCLI` and runs it
68
70
-`src/varvis_connector/__init__.py` re-exports `VarvisClient` and package version
69
71
72
+
The package metadata in `pyproject.toml` is set up for public distribution. It includes README, author, GPL-3.0-only license metadata, license file declaration, keywords, PyPI classifiers for Python 3.10 through 3.14, and project URLs for homepage, hosted documentation, repository, issues, and changelog.
73
+
70
74
## Runtime Architecture
71
75
72
76
### 1. Main abstraction: `VarvisClient`
@@ -614,14 +618,9 @@ The docs are good and materially useful.
614
618
615
619
The development guide is better than average because it explains not only how to contribute, but why the code contains certain defensive logic.
616
620
617
-
### Documentation mismatch observed
618
-
619
-
The development docs mention workflow filenames `docs.yaml` and `release.yaml`, but the repository currently contains:
620
-
621
-
-`build_and_release.yaml`
622
-
- no `docs.yaml`
621
+
### Documentation publishing
623
622
624
-
So at least part of the development documentation is stale relative to the current workflow file names.
623
+
The documentation is published through the `docs.yaml` workflow and hosted on GitHub Pages. Production releases trigger the release orchestration workflow, which builds the package and then calls the docs workflow to publish the generated Sphinx documentation.
625
624
626
625
## CI / Release / Maintenance Workflow
627
626
@@ -633,6 +632,7 @@ The project uses:
633
632
634
633
-`uv` for environment and dependency management
635
634
-`uv_build` as build backend
635
+
- Pydantic, requests, and tqdm as runtime dependencies
636
636
- Ruff for linting/formatting
637
637
- basedpyright for type checking
638
638
- Bandit for security linting
@@ -650,22 +650,34 @@ The repository contains workflows for:
- tests and code quality run across Python 3.10 to 3.14
657
658
- tests intentionally serialize CI concurrency to reduce load on the Varvis server
658
659
- dependency updates are partially automated through a scheduled workflow that opens an issue, creates a branch, updates `uv.lock`, and pushes a commit
659
660
-`git-cliff` is used both for changelog generation and for conventional-commit enforcement
661
+
-`uv` uses a seven-day dependency cooldown through `exclude-newer`, with a package-specific exception for `pip`
662
+
- gitleaks ignores version-tag push events as a standalone workflow trigger because the release orchestration workflow calls it explicitly for releases
663
+
- pre-commit mirrors the main local quality gates, including Ruff, Bandit, basedpyright, shellcheck, markdown formatting, and project-local commit/changelog checks
660
664
661
665
### Release state
662
666
663
-
The release workflow is not fully implemented yet:
667
+
The release workflow is fully responsible for package publication on version tags.
668
+
669
+
`build_and_release.yaml` runs on tags matching `v*.*.*`. It gates releases with gitleaks and dependency audit for all tags. Non-development tags additionally require code quality and tests. Development tags containing `.dev` can build and publish after the security-oriented gates without running the full code quality and test gate inside the release workflow.
670
+
671
+
The build job creates wheel and source distributions with `make build`, derives the package version from the tag name, and uploads the `dist/` directory as a workflow artifact.
672
+
673
+
Publication is split by tag type:
664
674
665
-
- GitHub release publishing step is currently `echo "TODO"`
666
-
- PyPI publishing step is also `echo "TODO"`
675
+
- non-development tags publish artifacts to GitHub Releases
676
+
- non-development tags publish to PyPI through trusted publishing/OIDC
677
+
- development tags publish to TestPyPI
678
+
- all successful release builds trigger the documentation workflow for GitHub Pages
667
679
668
-
So the repository has strong scaffolding for release automation, but not a fully completed publishing pipeline.
680
+
GitHub release notes are generated from the current top section of `CHANGELOG.md`, and the release assets include both wheel and source distribution files.
669
681
670
682
## Code Quality Assessment
671
683
@@ -718,9 +730,9 @@ This is not fatal, but it is a tradeoff toward operator convenience over interna
718
730
719
731
Many command handlers call `exit(1)` directly. Others rely on the top-level `VarvisCLI.run()` exception trap. The result is a somewhat mixed control-flow style.
720
732
721
-
#### Minor stale docs / naming drift
733
+
#### Release workflow complexity
722
734
723
-
There are a few documentation/workflow naming mismatches, which suggests the documentation is maintained actively but not perfectly synchronized with recent automation changes.
735
+
The release workflow is one of the higher-risk pieces of repository automation. It coordinates security gates, optional quality/test gates for development tags, package artifact upload/download, GitHub Release publication, PyPI/TestPyPI publication, changelog extraction, and documentation publishing. Small YAML changes here can affect published artifacts directly.
724
736
725
737
## Specific Findings And Nuances Worth Remembering
726
738
@@ -731,7 +743,7 @@ There are a few documentation/workflow naming mismatches, which suggests the doc
731
743
- The CLI is intentionally pipeline-friendly and carefully avoids polluting stdout when data output is expected there.
732
744
- Virtual panel update performs client-side merge behavior by fetching the current remote panel first.
733
745
- File download handling has decent filename/path safety checks.
734
-
- The project currently looks like an initial public release with mature tooling but a short external changelog history.
746
+
- The project is an early but actively publishable package line, with mature tooling and an implemented release pipeline rather than only local build support.
description: Update all dependencies in the current project, including Python packages in `uv.lock` and pre-commit hook revisions in `.pre-commit-config.yaml`. Use when the user asks to "update dependencies", "update all dependencies", refresh the lockfile, refresh pre-commit hooks, or bring direct dependency minimum versions in `pyproject.toml` up to the versions actually adopted after an update.
4
+
---
5
+
6
+
# Update Dependencies
7
+
8
+
## Overview
9
+
10
+
Update this repository's dependencies with the project's own automation, validate the result end to end, fix small breakages, and roll back only the dependency updates that are not worth fixing. Keep the final state intentional and report exactly what changed.
11
+
12
+
## Workflow
13
+
14
+
1. Read `AGENTS.md`, `.agents/research.md`, `pyproject.toml`, `Makefile`, and `.pre-commit-config.yaml` before making changes.
15
+
2. Capture the starting state for later reporting:
16
+
- direct dependencies from `pyproject.toml`
17
+
- optional dependencies and dependency groups from `pyproject.toml`
18
+
- pre-commit hook revisions from `.pre-commit-config.yaml`
19
+
- current version pins in `uv.lock` for direct dependencies if needed
20
+
3. Run the project's update command:
21
+
22
+
```bash
23
+
make depupgrade
24
+
```
25
+
26
+
1. Inspect which files changed. Expect at least:
27
+
-`uv.lock`
28
+
-`.pre-commit-config.yaml`
29
+
- sometimes `pyproject.toml`
30
+
2. Update minimum versions in `pyproject.toml` for direct dependencies that were actually upgraded.
31
+
- Only change direct dependencies already listed in `pyproject.toml`.
32
+
- Do not add or remove dependencies unless the update flow clearly requires it.
33
+
- Keep version specifiers simple and consistent with the file's current style, usually `>=<new_version>`.
34
+
3. Run the full validation flow after the update.
35
+
4. If validation fails, fix small compatibility issues directly.
36
+
5. If a failure is caused by one updated dependency and the fix is too large for the update task, roll back only that dependency update, then rerun validation.
37
+
6. Summarize all dependency changes and any rollback decisions.
38
+
7. Update `.agents/research.md` if the repository-specific dependency update workflow or skill inventory changed in a way future work should know about.
39
+
40
+
## Validation
41
+
42
+
Load environment variables from `.env` before validation commands that need them.
43
+
44
+
Run the full repo checks expected for non-trivial code changes:
45
+
46
+
```bash
47
+
test -f .env &&set -a &&source .env &&set +a
48
+
ruff check
49
+
ruff format
50
+
basedpyright
51
+
bandit -c pyproject.toml -r src/
52
+
make testall
53
+
make build
54
+
make docs
55
+
```
56
+
57
+
Also refresh pre-commit hook state when useful:
58
+
59
+
```bash
60
+
uv run pre-commit run --all-files
61
+
```
62
+
63
+
If a command fails because the update changed generated files or formatting, fix that and rerun the failed command plus any downstream checks.
64
+
65
+
## Failure Triage
66
+
67
+
Use this order:
68
+
69
+
1. Determine whether the failure is caused by the dependency update or by unrelated local dirt.
70
+
2. If unrelated local dirt exists, avoid reverting it and work only with the update-related files.
71
+
3. If the failure is clearly caused by a small API or typing change, patch the project and keep the newer dependency.
72
+
4. If the failure points to one upgraded dependency and the fix would be broad, risky, or time-consuming, roll back that dependency instead of forcing a large refactor.
73
+
74
+
Treat these as "too big" unless the user asked for broader maintenance:
75
+
76
+
- wide API migrations across multiple modules
77
+
- behavior changes that require redesign rather than adaptation
78
+
- new dependency-family incompatibilities that spread across the repo
79
+
80
+
## Rolling Back One Dependency
81
+
82
+
Prefer the narrowest rollback possible.
83
+
84
+
For a direct dependency:
85
+
86
+
1. Find the previous working version from the git diff or pre-update state.
87
+
2. Restore the intended minimum version in `pyproject.toml`.
88
+
3. Re-lock to the previous version for that package.
89
+
90
+
For a transitive dependency:
91
+
92
+
1. Re-lock that package to the previous version without broad manual edits.
93
+
2. Keep the rest of the update set intact.
94
+
95
+
Useful commands:
96
+
97
+
```bash
98
+
uv lock -P <package>==<old_version>
99
+
uv sync --all-groups --all-extras
100
+
```
101
+
102
+
If pre-commit hook updates cause the problem and the issue is not worth fixing, revert only the affected hook revision in `.pre-commit-config.yaml` and rerun validation.
103
+
104
+
## Reporting
105
+
106
+
Always report:
107
+
108
+
- direct dependencies updated in `pyproject.toml`
109
+
- point out major-version changes in direct dependencies
110
+
- package updates reflected in `uv.lock`
111
+
- pre-commit hook revision changes
112
+
- any fixes made to keep the update
113
+
- any dependency rolled back and why
114
+
- validation commands run and their final outcome
115
+
116
+
Prefer a concise grouped summary rather than dumping raw lockfile diffs, but include exact package names and final versions.
0 commit comments