From 6179812519fa5730062b2570933e5e93e34b8e5b Mon Sep 17 00:00:00 2001 From: jester Date: Sat, 27 Dec 2025 23:34:20 +0000 Subject: [PATCH] Replace ANTI_DRIFT_GUARDRAIL.md with frontend-specific guardrails for AI agents - control surface mentality, terminal isolation --- ANTI_DRIFT_GUARDRAIL.md | 63 ++++++++++++----------------------------- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/ANTI_DRIFT_GUARDRAIL.md b/ANTI_DRIFT_GUARDRAIL.md index 50ca779..4b30b21 100644 --- a/ANTI_DRIFT_GUARDRAIL.md +++ b/ANTI_DRIFT_GUARDRAIL.md @@ -1,52 +1,25 @@ -# Anti-Drift Guardrail – zlh-grind +# ZLH Frontend Guardrails -This document exists to prevent "helpful" changes that cause operational drift. +This file is intended for Codex / AI agents and human contributors. ---- - -## Purpose -Protect working pipelines by enforcing hard rules: -- Keep step visibility -- Preserve contracts -- Avoid unnecessary template churn -- Don't silently change wire formats - ---- +## Primary Objective +ZeroLagHub's frontend is a **control surface**, not a game UI. ## Guardrails +- Prefer boring, predictable UI over clever abstractions +- Do not introduce new visual metaphors without removing an old one +- No "sci-fi" effects unless strictly informational +- Avoid abstractions that hide client/server boundaries -### 1) Preserve provisioning step output -The step-by-step orchestration logs are required. -Do not remove, collapse, or reorder them casually. +## Terminal & Realtime UI Rules +- Terminal components must be isolated and client-only +- No terminal logic in shared utilities +- No implicit socket initialization at import time -### 2) Single-template is intentional -We use exactly one base template (`AGENT_TEMPLATE_VMID`). -The agent installs roles at runtime based on payload. +## When Unsure +Default to: +- Removing code +- Leaving a comment +- Asking for review -### 3) Template churn is expensive -In this workflow: -- Changing zlh-agent requires building + copying into the template container. -- That means "agent change" effectively becomes a template rev. - -Therefore: -- Prefer API-side compatibility fixes unless we intentionally plan a template update. - -### 4) Wire contract is explicit -Agent currently expects: -- `container_type` (snake_case) on JSON decode - -Until the next intentional template rev: -- API must emit `container_type` -- Do not switch to `containerType` / `ctype` on the wire - ---- - -## Allowed Changes Here -- Session logs -- Open threads -- Constraints / guardrails -- Upstream pointers - -Not allowed: -- "Better architecture" rewrites -- Re-documenting canonical upstream specs +Silence is better than instability.