quality · git:20261006.fcbea87 · 2026-10-06 · sha256 8863f391185d5d58
quality git:20261006.fcbea87A
Immutable. This exact content never changes and is served at /api/v1/blob/8863f391185d5d58.
--- description: Code quality. 0 linter warnings, SOLID/DRY/KISS, strict typing. globs: ["*.php","*.ts","*.tsx","*.js","*.jsx","*.py","*.go","*.rs"] alwaysApply: true --- [FILE] quality.mdc [OBJ] Quality gates. [RULES] 1. [REQ] `[CODE-01]` Service-Repo separation. Thin controllers. 2. [REQ] `[CODE-02]` Strict typing. No `any` / `mixed` / `unknown` abuse. 3. [REQ] `[CODE-03]` Class <300 lines, method <30 lines. 4. [REQ] `[CODE-04]` Enums/constants over magic strings. 5. [REQ] `[CODE-05]` SOLID & DRY. 6. [REQ] `[TEST-01]` Mandatory coverage. 7. [REQ] `[TEST-02]` AAA pattern. One behavior per test. 8. [REQ] `[TEST-03]` Factories/seeders. No hardcoded IDs/dates. 9. [REQ] `[TEST-04]` Pest 3+ (backend), Vitest+RTL (frontend), pytest (Python), go test (Go). 10. [REQ] `[TEST-06]` 80% logic, 90% API, 70% total coverage. 11. [REQ] `[TEST-07]` Two-tier testing: FAST (targeted, ~5s, during iteration) + FULL (complete suite + coverage, before done). See `workflows/testing-tiers.md`. 12. [REQ] `[TEST-08]` Per-stack commands: PHP `artisan test --filter=` / `artisan test`; JS `vitest run <file>` / `vitest run --coverage`; Python `pytest <file> --no-cov` / `pytest --cov`; Go `go test <pkg> -short` / `go test ./... -cover`. 13. [REQ] `[TEST-09]` If no test framework exists, write the first test for touched code before done. 14. [REQ] `[TEST-10]` Mark slow tests (E2E, integration, model-loading) with framework skip mechanism. Fast tier stays under 5s. 15. [PROHIBIT] No inline imports (`await import()`). No downgrade deps for type errors. 16. [PROHIBIT] No `TODO`/`FIXME` without ticket tag. 17. [PROHIBIT] No full test suite on every change (use FAST tier). No skipping FULL tier before done. 18. [REQ] `[TEST-11]` FULL tier maxes machine resources by default — `aizee test --full` runs all cores minus 2 via xdist; `--no-xdist` is the escape hatch. GPU only when tests run real GPU-bound code — mocked-model suites gain nothing and pay CUDA-context overhead (measured 151s vs 127s). Verify with `nvidia-smi` util, not process listing.