update steering docs and hooks for current project state

This commit is contained in:
Celes Renata
2026-04-11 20:41:57 -07:00
parent 99e17be282
commit 37d5f9b01c
8 changed files with 177 additions and 67 deletions
+13 -8
View File
@@ -1,14 +1,19 @@
---
name: Lint Python on Save
description: Run ruff linter when any Python file is saved
version: "1.0"
name: Lint on Save
description: Run linter when Python or TypeScript files are saved
version: "2.0"
trigger:
type: onSave
filePattern: "**/*.py"
filePattern: "**/*.{py,ts,tsx}"
---
When any Python file is saved:
When a file is saved:
1. Run `ruff check {filePath}` on the saved file
2. If there are fixable issues, run `ruff check --fix {filePath}` to auto-fix
3. Report any remaining issues concisely
1. If it's a Python file (`*.py`):
- Run `nix-shell -p ruff --run "ruff check {filePath}"` on the saved file
- If there are fixable issues, run `nix-shell -p ruff --run "ruff check --fix {filePath}"`
- Report any remaining issues concisely
2. If it's a TypeScript/React file (`*.ts` or `*.tsx`) under `frontend/`:
- Run `npx tsc --noEmit` from the `frontend/` directory to check types
- Report any type errors concisely