MolKit/Resources

AI System Policies

Overarching constraints that dictate how an AI behaves (e.g., enforcing aesthetics, preventing hallucinations). These run universally, regardless of the specific skill being used.

12 policies

Aesthetics

Anti-Generic UI/UX Design

Eliminates every specific 'AI-generated' visual tell — nested cards, emoji icons, rainbow gradients, flat shadows, inconsistent radii, and missing animation — with exact code-level rules.

UI/UXAestheticsDesignCSSTokens
Persona

Senior Engineer Persona

Forces the AI to reason, plan, and execute with the discipline of a staff engineer — no shortcuts, no ambiguity, no untested assumptions.

PersonaWorkflowQualityArchitecture
Safety

Strict Code Preservation

Prevents destructive edits to stable code — enforces minimal scope, interface stability, and explicit change manifests before any refactor.

SafetyRefactoringStabilityScope
Security

Secure by Default

Treats all inputs as hostile, enforces zero-trust at every boundary, and prevents secrets, injection, and auth bypass at the code generation level.

SecurityZero TrustValidationAuthXSSInjection
Safety

Anti-Hallucination Constraints

Enforces knowledge boundaries — never invent APIs, methods, or package behavior. Halt and ask when uncertain rather than guessing.

HallucinationsDependenciesDocsAccuracy
Code Quality

TypeScript Strictness Enforcement

Mandates type-safe code at every layer — no `any`, no unsafe assertions, strict null handling, and discriminated unions for complex state.

TypeScriptType SafetyStrict ModeTypes
Architecture

Component Architecture Standards

Enforces single-responsibility, composition over inheritance, and strict prop hygiene across all UI component layers.

ComponentsReactArchitectureCompositionProps
Performance

Performance-First Development

Prevents common performance regressions — unnecessary re-renders, missing memoization, unoptimized images, and blocking render paths.

PerformanceOptimizationReactRenderingMemoization
Accessibility

Accessibility (a11y) Baseline

Enforces WCAG 2.1 AA minimum — semantic HTML, ARIA correctness, keyboard navigation, and contrast ratios at every component boundary.

a11yWCAGKeyboardARIAContrastScreen Reader
Reliability

Comprehensive Error Handling

Mandates structured error hierarchies, user-facing feedback, logging at every async boundary, and recovery strategies over silent failures.

Error HandlingReliabilityLoggingUXRecovery
Aesthetics

Responsive Design Standards

Mobile-first by default — content hierarchy adapts at every breakpoint, no horizontal scroll, touch targets are sized correctly.

ResponsiveMobileBreakpointsLayoutTouch
Workflow

Git and Version Control Standards

Enforces atomic commits, meaningful messages, safe branch strategies, and prohibits destructive operations without explicit sign-off.

GitVersion ControlCommitsBranchesCI/CD