From bac7ba8a759b70de9d1e45d49d39315d8502023c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 3 Feb 2026 08:52:42 -0500 Subject: [PATCH] docs: clarify TypeScript paradigm as pragmatic imperative over OOP --- PROJECT_GUIDELINES.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PROJECT_GUIDELINES.md b/PROJECT_GUIDELINES.md index f25d7e7..8ea0094 100644 --- a/PROJECT_GUIDELINES.md +++ b/PROJECT_GUIDELINES.md @@ -17,7 +17,10 @@ - ❌ **NEVER modify backend/API for frontend features without user confirmation** - ❌ **NEVER use custom CSS** - TailwindCSS classes only - ❌ **NEVER use JavaScript** - convert all to TypeScript -- ❌ **NEVER use object-oriented programming patterns in TypeScript** - avoid classes, inheritance, and OOP bloat; use functional/other paradigms +- ❌ **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 fetch initial data via AJAX on page load** - use server-side rendering instead - ❌ **NEVER break progressive enhancement** - pages must work without JavaScript @@ -113,7 +116,10 @@ VERIFY → Compile successfully ### Frontend & Styling - ✅ Always use **TailwindCSS classes** for all styling - ✅ Convert all JavaScript to **TypeScript** -- ✅ Avoid OOP patterns - prefer functional/other paradigms +- ✅ **Never use Object-Oriented Programming** (no classes, inheritance, or this-capture) +- ✅ **Use procedural/imperative style** as your default +- ✅ **Borrow functional techniques** when they simplify code +- ✅ **Avoid ideological purity** - the best paradigm is the one that fits the problem - ✅ **Render initial data server-side** in Go templates for fast page loads - ✅ **Use JavaScript/HTMX for CRUD operations** (create, update, delete) - ✅ **Ensure progressive enhancement** - pages work without JavaScript @@ -207,7 +213,7 @@ VERIFY → Compile successfully - **Styling**: TailwindCSS (no custom CSS) - **Language**: TypeScript (no JavaScript) - **Templates**: HTMX with server-side rendering -- **Patterns**: Functional/other (no OOP) +- **Patterns**: Procedural/imperative with functional techniques where helpful (no OOP) ### Containerization - **Runtime**: Podman (not Docker)