update steering docs and hooks for current project state
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Phase Commit and Push
|
||||
description: Commit and push after completing a spec phase task
|
||||
version: "1.0"
|
||||
description: Commit, push, and verify CI after completing a phase task
|
||||
version: "2.0"
|
||||
trigger:
|
||||
type: manual
|
||||
---
|
||||
@@ -13,3 +13,6 @@ When triggered manually after completing a phase:
|
||||
3. Run `git commit -m "{message}"`
|
||||
4. Run `git push origin main`
|
||||
5. Report the commit SHA and confirm push succeeded
|
||||
6. Wait 30 seconds, then check CI status with `nix-shell -p gh --run "gh run list -L 1"`
|
||||
7. If CI is still running, report that and suggest checking back later
|
||||
8. If CI failed, run `nix-shell -p gh --run "gh run view --log-failed"` and report the error
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
---
|
||||
name: Run Tests on Save
|
||||
description: Automatically run relevant tests when a Python service file is saved
|
||||
version: "1.0"
|
||||
description: Run relevant tests when service or frontend files are saved
|
||||
version: "2.0"
|
||||
trigger:
|
||||
type: onSave
|
||||
filePattern: "services/**/*.py"
|
||||
filePattern: "{services/**/*.py,frontend/src/**/*.{ts,tsx}}"
|
||||
---
|
||||
|
||||
When a Python file under `services/` is saved:
|
||||
When a file is saved:
|
||||
|
||||
1. Identify which service module was modified (e.g. `services/ingestion/worker.py` → `ingestion`)
|
||||
2. Look for corresponding tests in `tests/` matching the service name
|
||||
3. Run `pytest tests/test_{service_name}*.py -x --tb=short -q` if test files exist
|
||||
4. If no specific test file exists, run `ruff check` on the modified file to catch syntax/lint issues
|
||||
5. Report results concisely — only show failures or a one-line success confirmation
|
||||
1. If it's a Python file under `services/`:
|
||||
- Identify the service module (e.g. `services/ingestion/worker.py` → `ingestion`)
|
||||
- Look for corresponding tests in `tests/` matching the service name
|
||||
- Run `python -m pytest tests/test_{service_name}*.py -x --tb=short -q` if test files exist
|
||||
- If no specific test file exists, run lint check only
|
||||
- Report results concisely
|
||||
|
||||
2. If it's a TypeScript/React file under `frontend/src/`:
|
||||
- Run `npx vitest --run` from the `frontend/` directory
|
||||
- Report results concisely — only show failures or a one-line success
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
---
|
||||
name: Validate K8s Manifests
|
||||
description: Validate Kubernetes YAML when manifest files are saved
|
||||
version: "1.0"
|
||||
name: Validate Helm & K8s on Save
|
||||
description: Validate Helm templates and K8s manifests when infrastructure files are saved
|
||||
version: "2.0"
|
||||
trigger:
|
||||
type: onSave
|
||||
filePattern: "infra/k8s/**/*.yaml"
|
||||
filePattern: "infra/**/*.{yaml,yml,tpl}"
|
||||
---
|
||||
|
||||
When a Kubernetes manifest YAML file is saved:
|
||||
When a Helm or K8s manifest file is saved:
|
||||
|
||||
1. Parse the YAML to check for syntax errors
|
||||
2. Verify required fields exist (apiVersion, kind, metadata)
|
||||
3. Check that namespace is set to `stonks-oracle` for application resources
|
||||
4. Verify image references point to `ghcr.io/celesrenata/stonks-oracle/`
|
||||
5. Report any issues found
|
||||
1. If it's under `infra/helm/`:
|
||||
- Run `helm template stonks-oracle infra/helm/stonks-oracle -n stonks-oracle` to validate template rendering
|
||||
- Check for template syntax errors
|
||||
- Verify the output contains expected resource types (Deployment, Service, Ingress, NetworkPolicy)
|
||||
- Report any rendering errors concisely
|
||||
|
||||
2. If it's under `infra/k8s/`:
|
||||
- Parse the YAML to check for syntax errors
|
||||
- Verify required fields exist (apiVersion, kind, metadata)
|
||||
- Check that namespace is set to `stonks-oracle`
|
||||
- Report any issues found
|
||||
|
||||
Reference in New Issue
Block a user