Skip to main content
Mobile Launcher
Learning & TutorialsAdvanced AI Engineering

Custom Rules & Verification

Enforcing coding standards with Agentic AI

Custom Rules & Verification

This project uses U-AMOS 2.0 (Universal AI Memory Operating System) to enforce strict coding standards.

1. The .cursorrules File

Located at the root of the project, this file is the "Constitution" for the AI. It defines the core constraints that must never be violated.

Real Example from our Project:

Markdown
## 🔒 Core Constraints (Never Violate)

### Architecture
- **Feature-first**: All business logic in `src/features/`, never in `src/ui/` or `src/services/`
- **Service layer**: Services are stateless, never render UI or navigate
- **Component hierarchy**: Check `src/ui/README.md` before creating components

### Code Style
- **No inline styles**: Use UI tokens from `src/ui/style/theme.ts`
- **No hardcoded text**: Use `t('key')` for all user-facing strings
- **No console.log**: Use `logger.*` from `src/services/logging/`

2. The agents.md File

This file defines the Mandatory Startup Sequence that every AI agent must follow before writing a single line of code.

The Startup Sequence:

  1. Read Rules Index: Understand the project structure.
  2. Load Hot Memory: Read .memory/40-active.md to know what you were working on.
  3. Anti-Hallucination: Verify files exist before importing them.
  4. Context Map: Load the map of the codebase to navigate efficiently.
Markdown
## 🛑 MANDATORY STARTUP SEQUENCE (Execute First)

1. **Read the Rules Index**:
   - `read_file` -> `ai_rules/globalRules.md` (Master Index)

2. **Load Hot Memory Tier**:
   - `read_file` -> `.memory/40-active.md` (Current Focus)

3. **Check Anti-Hallucination Checklist**:
   - `read_file` -> `ai_rules/rules/context_management.md`

3. How to Modify Rules

To change these rules:

  1. Edit .cursorrules for high-level constraints.
  2. Edit ai_rules/rules/*.md for specific domain rules (e.g., Testing, UI).
  3. The AI will automatically pick up the changes in the next session.