From 5ba386b1c89bf7e9e88d2159f825a5961f470051 Mon Sep 17 00:00:00 2001 From: jester Date: Sat, 27 Dec 2025 23:33:19 +0000 Subject: [PATCH] Replace CONSTRAINTS.md with frontend-specific constraints - Next.js, SSR boundaries, UI philosophy, forbidden patterns --- CONSTRAINTS.md | 74 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/CONSTRAINTS.md b/CONSTRAINTS.md index 4c0d286..94d7687 100644 --- a/CONSTRAINTS.md +++ b/CONSTRAINTS.md @@ -1,43 +1,43 @@ -# Constraints – zlh-grind +# ZeroLagHub – Frontend Constraints (ZLH Grind) -This repository is strictly for *decision tracking*, *constraints*, and *ground rules*. -It is not an implementation repo. +These constraints are **non-negotiable**. +They exist to prevent architectural drift, instability, and "demo-ware" UI patterns. ---- +## Runtime & Framework +- Node.js **22 LTS** +- Next.js **App Router** +- React 18 +- TypeScript +- Build once → run many +- No runtime builds +- No PM2 during active development -## Execution model constraints -- zlh-agent executes installer logic as **embedded scripts**. -- Embedded scripts must not rely on filesystem-relative paths (`$0`, `dirname`, etc.). -- Any shared logic must be executed in the **same shell session** as its callers. +## SSR & Client Boundaries +- Any file that touches: + - `window` + - `document` + - `location` + - WebSockets + - xterm / DOM refs + **MUST** be a client component with `"use client"` as the first line. +- No browser globals at module scope in server components. +- Prefer `useEffect` for browser-only logic. ---- +## UI Philosophy +- Control-plane first, not marketing gimmicks. +- Flat UI by default. +- Subtlety beats spectacle. +- Readability > novelty. -## Installer contract constraints -- Installers must be: - - deterministic - - artifact-driven - - idempotent - - strict (`set -euo pipefail`) -- All runtime installers require explicit environment projection: - - `RUNTIME_VERSION` is mandatory - - artifact naming may be customized via `ARCHIVE_PREFIX` -- Installers must not parse JSON or agent state files. +## Explicitly Forbidden +- Neon / RGB accent colors outside error states +- Scanline / CRT / HUD overlays +- Persistent 3D transforms or perspective UI +- Excessive glow stacking +- Clip-path bevel frames +- Continuous decorative animations ---- - -## Responsibility boundaries -- API declares *intent* (runtime, version, container type). -- Agent translates intent into: - - environment variables - - filesystem operations - - installer execution order -- Installers perform no orchestration or decision-making. - ---- - -## Anti-patterns (explicitly forbidden) -- Mega-installers that handle multiple runtimes via branching logic -- Package-manager–based installs (apt, nvm, pyenv, sdkman) -- Weakening installer strictness to accommodate agent bugs - ---- +## Branding +- Brand: **ZeroLagHub** +- Shorthand: **ZLH** +- Gaming heritage is acceptable, esports aesthetic is not.