diff --git a/PROJECT_GUIDELINES.md b/PROJECT_GUIDELINES.md index 3c1546f..608bf7f 100644 --- a/PROJECT_GUIDELINES.md +++ b/PROJECT_GUIDELINES.md @@ -26,12 +26,13 @@ ### Frontend & Styling - ❌ **NEVER modify backend/API for frontend features without user confirmation** - ❌ **NEVER use custom CSS** - TailwindCSS classes only + - **⚠️ EXCEPTION**: `templates/error.templ` may have inline CSS because error pages must work when main app fails (404, server errors, CSS fails to load) - ❌ **NEVER use JavaScript** - convert all to TypeScript - ❌ **NEVER use Object-Oriented Programming** (no classes, inheritance, or this-capture) - ✅ **DO use procedural/imperative style** as your default - ✅ **DO borrow functional techniques** when they simplify code - ✅ **DO avoid ideological purity** - the best paradigm is the one that fits the problem -- ❌ **NEVER add new Dockerfiles without user confirmation +- ❌ **NEVER add new Dockerfiles without user confirmation** - ❌ **NEVER fetch initial data via AJAX on page load** - use server-side rendering instead - ❌ **NEVER break progressive enhancement** - pages must work without JavaScript diff --git a/scripts/verify-guidelines.sh b/scripts/verify-guidelines.sh index cdd070d..760db8c 100755 --- a/scripts/verify-guidelines.sh +++ b/scripts/verify-guidelines.sh @@ -79,13 +79,14 @@ fi section "Frontend & Styling: No custom CSS (use TailwindCSS)" # GUIDELINE: NEVER use custom CSS - TailwindCSS classes only +# EXCEPTION: templates/error.templ is allowed to have inline CSS for error pages (must work when main app fails) echo "Checking for custom CSS in templates (should use TailwindCSS)..." -STYLE_COUNT=$(grep -l '