Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/agents/code-quality.agent.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
name: code-quality-agent
description: Fixes linting, formatting, and type checking issues by running make commands until all checks pass
description: Fixes linting, formatting, and type checking issues by running invoke commands until all checks pass
tools: ['execute/getTerminalOutput', 'execute/runInTerminal', 'execute/runTests', 'read', 'edit', 'search']
---

# Code Quality Agent

Fix all code quality issues by running make commands iteratively and addressing any remaining problems until all checks pass.
Fix all code quality issues by running invoke commands iteratively and addressing any remaining problems until all checks pass.

## Workflow

1. Run `make format` then `make lint` (auto-fixes 60-80% of issues)
2. Run `make mypy-check` to find type errors
1. Run `invoke format` then `invoke lint` (auto-fixes 60-80% of issues)
2. Run `invoke mypy-check` to find type errors
3. Fix remaining issues manually
4. Verify: All checks must pass with exit code 0

## Commands

```bash
make format # Auto-format with Ruff
make lint # Auto-fix linting with Ruff
make mypy-check # Type check with mypy
invoke format # Auto-format with Ruff
invoke lint # Auto-fix linting with Ruff
invoke mypy-check # Type check with mypy
```

## Common Mypy Fixes
Expand Down Expand Up @@ -71,7 +71,7 @@ class Child(Parent):
## Success Criteria

```bash
make format-check # No changes needed
make lint-check # No issues found
make mypy-check # No type errors
invoke format-check # No changes needed
invoke lint-check # No issues found
invoke mypy-check # No type errors
```
42 changes: 21 additions & 21 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,86 +17,86 @@ jobs:
formatting:
name: Code Formatting
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check code formatting
run: make format-check
run: uv run invoke format-check

linting:
name: Linting
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check linting
run: make lint-check
run: uv run invoke lint-check

type-checking:
name: Type Checking
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash

- name: Configure Git for private repos
run: |
git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync

- name: Check type hints
run: make mypy-check
run: uv run invoke mypy-check
125 changes: 0 additions & 125 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests
6 changes: 3 additions & 3 deletions .github/workflows/tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests

- name: Run linting
run: |
make lint-check
uv run invoke lint-check
continue-on-error: true

- name: Run type checking
run: |
make mypy-check
uv run invoke mypy-check
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Run tests
run: |
make run-tests
uv run invoke run-tests
24 changes: 12 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ Hybrid "unstructured state + signals" PyQt pattern. See `docs/ARCHITECTURE.md` f

## Setup & Common Commands

Use `make` — do not invoke tools directly unless you need a flag `make` doesn't expose.
Use `invoke` (pyinvoke, tasks defined in `tasks.py`) — do not invoke tools directly unless you need a flag the task doesn't expose.

| Command | Purpose |
|---|---|
| `make setup` | Install deps + pre-commit hooks (run first) |
| `make dev` | Launch the app in dev mode |
| `make run-tests` | Unit + GUI tests |
| `make test-coverage` | Coverage for core modules |
| `make lint` / `make lint-check` | Ruff lint (fix / check) |
| `make format` / `make format-check` | Ruff format |
| `make mypy-check` | Type check |
| `make build` | Standalone executable (PyInstaller) |
| `make clean` | Remove build artifacts |
| `make help` | Full list |
| `invoke setup` | Install deps + pre-commit hooks (run first) |
| `invoke dev` | Launch the app in dev mode |
| `invoke run-tests` | Unit + GUI tests |
| `invoke test-coverage` | Coverage for core modules |
| `invoke lint` / `invoke lint-check` | Ruff lint (fix / check) |
| `invoke format` / `invoke format-check` | Ruff format |
| `invoke mypy-check` | Type check |
| `invoke build` | Standalone executable (PyInstaller) |
| `invoke clean` | Remove build artifacts |
| `invoke --list` | Full list |

## Code Standards

Expand All @@ -62,7 +62,7 @@ Use `make` — do not invoke tools directly unless you need a flag `make` doesn'

- Framework: `pytest`, with `pytest-qt` for GUI and `pytest-asyncio` for async.
- Write tests for new business logic in `storage/`, `config/`, `analyzers/`. GUI components are excluded from coverage metrics but still testable with `pytest-qt` when useful.
- Run `make run-tests` before reporting a task complete. For UI changes, also launch `make dev` and exercise the feature — type checks don't verify user-facing behavior.
- Run `invoke run-tests` before reporting a task complete. For UI changes, also launch `invoke dev` and exercise the feature — type checks don't verify user-facing behavior.

## Commit & PR Conventions

Expand Down
Loading
Loading