The absolute laws that govern how we write code in the Sovereign OS ecosystem. These rules ensure consistency, maintainability, and scalability across all applications.
Zero Tolerance Policy
Violations of these standards result in immediate code rejection. No exceptions, no shortcuts, no mercy.
Common Violations
ZERO CSS CREATIVITY
Hardcoded colors, inline styles, or custom CSS outside globals.css
ā bg-[#FF6B35] or style={{color: "red"}}ZERO RELATIVE PATHS
Using ../ imports instead of scoped aliases
ā import { Button } from "../../../components/ui/button"NO INLINE STYLES
Using style={{...}} instead of Tailwind utilities
ā style={{ backgroundColor: "blue" }}Complete Standards
title: THE STANDARDS - SOVEREIGN OS CONSTITUTION version: 2.1.0 enforced: ABSOLUTE
š THE STANDARDS
āļø THE ABSOLUTE LAWS (ZERO TOLERANCE)
1. ZERO CSS CREATIVITY š«
LAW: It is STRICTLY FORBIDDEN to create new CSS files at the component level or "innovate" using non-standard inline styles.
ENFORCEMENT:
- ā FORBIDDEN:
<div style={{color: '#FF6B35'}}> - ā FORBIDDEN:
className="text-[#FF6B35]" - ā FORBIDDEN: Creating new CSS files in component folders
- ā
ALLOWED:
className="text-accent"(using CSS variables) - ā
ALLOWED:
className="bg-primary hover:bg-primary/90"
PUNISHMENT: Immediate code rejection. No exceptions.
2. GLOBAL STYLING TRUTH šØ
LAW: All styling MUST use Tailwind utility classes referencing globals.css and @shared/config/tailwind.
SINGLE SOURCE OF TRUTH:
apps/[app-name]/src/app/globals.css ā CSS Variables Declaration
ā
packages/shared/config/tailwind ā Tailwind Config Extension
ā
All Components ā Consume via utility classes
ENFORCEMENT:
- All color values MUST use CSS variables (
--primary,--accent, etc.) - All spacing MUST use Tailwind scale (
p-4,gap-6, etc.) - All typography MUST use defined font families
3. ZERO RELATIVE PATHS š
LAW: Must use Scoped Aliases (e.g., @core/auth, @ui/button). Using ../ is forbidden.
ENFORCEMENT:
- ā FORBIDDEN:
import { Button } from '../../../components/ui/button' - ā
ALLOWED:
import { Button } from '@ui/button' - ā
ALLOWED:
import { useAuth } from '@core/auth'
RATIONALE: Relative paths break during refactoring. Aliases are refactor-proof.
4. SAFE COEXISTENCE š¤
LAW: It is forbidden to delete or replace existing files destructively. Build infrastructure in parallel.
ENFORCEMENT:
- Never delete existing CSS files.
- Create new standardized files alongside legacy ones.
- Gradually migrate components to the new system.
- Document the migration path in
MIGRATION.md.
EXAMPLE:
ā
CORRECT:
apps/tripos/src/app/globals.css (existing)
apps/tripos/src/styles/sovereign.css (new standard)
ā WRONG:
Delete globals.css and force migration
5. CENTRALIZED BARREL EXPORTS š¦
LAW: Every module must have an index.ts as a Gatekeeper.
ENFORCEMENT:
// ā
CORRECT: packages/ui/button/index.ts
export { Button } from "./button";
export type { ButtonProps } from "./button";
// Consumer
import { Button } from "@ui/button"; // Clean!
// ā WRONG: Direct file import
import { Button } from "@ui/button/button.tsx"; // Leaky abstraction
6. ZOD DNA š§¬
LAW: Validation is mandatory at every layer (Entities, tRPC, & T3-Env).
ENFORCEMENT:
- All API inputs MUST be validated with Zod.
- All environment variables MUST use T3-Env.
- All form data MUST be validated before submission.
- All database entities MUST have Zod schemas.
EXAMPLE:
// ā
CORRECT
const TripSchema = z.object({
name: z.string().min(3),
start_date: z.string().datetime(),
});
const validated = TripSchema.parse(formData);
// ā WRONG
const name = formData.get("name"); // No validation!
7. CENTRALIZED ERROR DICTIONARY š
LAW: Hardcoding error messages is forbidden. All error messages MUST be centralized in @shared/i18n.
SINGLE SOURCE OF TRUTH: @shared/i18n/errors/*.json
ENFORCEMENT:
- ā FORBIDDEN:
throw new Error("User not found") - ā
ALLOWED:
throw new Error(ERROR_MESSAGES.DB.NOT_FOUND) - ā
ALLOWED:
StandardResponse.error(ERROR_MESSAGES.AUTH.UNAUTHORIZED)
RATIONALE:
- Instant tone-of-voice updates across all apps.
- Centralized translation management.
- Consistent user experience.
8. UNIFORM RESPONSE STRUCTURE š
LAW: Sending manual JSON responses is forbidden. Must use the StandardResponse helper from @shared/utils.
ENFORCEMENT:
- ā FORBIDDEN:
res.json({ error: "Something went wrong" }) - ā
ALLOWED:
res.json(StandardResponse.error(ERROR_MESSAGES.GENERAL.UNEXPECTED)) - ā
ALLOWED:
res.json(StandardResponse.success(data))
RATIONALE:
- Guarantees predictable API contracts for all clients.
- Simplifies frontend error handling logic.
- Prevents data leaks via inconsistent error implementation.
šÆ STYLING HIERARCHY (THE PYRAMID)
Level 1: CSS Variables (globals.css)
ā
Level 2: Tailwind Config (@shared/config/tailwind)
ā
Level 3: Utility Classes (Tailwind)
ā
Level 4: Component Composition
NEVER SKIP LEVELS. Always flow from top to bottom.
šØ VIOLATION CONSEQUENCES
Minor Violations (Warning)
- Using hex codes in className (e.g.,
text-[#FF6B35]) - Relative imports in same package
- Missing TypeScript types
ACTION: Code review comment, must fix before merge.
Major Violations (Rejection)
- Creating inline styles with hardcoded values
- Bypassing CSS variables
- Deleting existing infrastructure
- Skipping Zod validation
ACTION: PR rejected immediately. No discussion.
Critical Violations (Ban)
- Pushing to
mainwithout approval - Overriding global styles without documentation
- Breaking existing apps
ACTION: Revert commit, escalate to user.
š REQUIRED READING
Before writing ANY code, read in order:
.agent/blueprints/directory-map.md- Understand structure.agent/blueprints/pillars.md- The architectural index.agent/workflows/- Check for relevant workflows
š¤ AI AGENT OATH
"I, Antigravity, solemnly swear to:
- Never create CSS outside of
globals.css - Always use CSS variables for theme-able values
- Reject any request that violates THE STANDARDS
- Build infrastructure in parallel, never destructively
- Validate everything with Zod
- Use scoped aliases exclusively"
Signed: Antigravity v2.0 (Sovereign OS Edition)
Date: 2026-01-16
Witnessed By: The Blueprint š”ļø
š AMENDMENT PROCESS
This protocol can ONLY be amended by:
- User explicit approval
- Documentation in
CHANGELOG.md - Migration guide for affected code
NO EXCEPTIONS. NO SHORTCUTS. NO MERCY. š”ļø
AI Agent Oath
"I, Antigravity, solemnly swear to never create CSS outside of globals.css, always use CSS variables for theme-able values, reject any request that violates THE STANDARDS, build infrastructure in parallel never destructively, validate everything with Zod, and use scoped aliases exclusively."