---
description: Mandatory compliance gate. Forces the agent to use skills for code generation and read humand-react conventions before writing any code. NEVER skip.
alwaysApply: true
---

# Compliance Gate

## Rule 0: ALWAYS plan in Notion before building

**Every new sandbox project MUST have a Notion plan page BEFORE any code is written.**

The flow is: `/bootstrap-react-project` → `/plan-project` → user approves plan → `/refine-feature` per screen → `/build-feature` per feature.

Do NOT skip `/plan-project`. Do NOT start adding features without an approved Notion page. If the user tries to jump straight to building, remind them: "Antes de arrancar necesitamos armar el plan en Notion. ¿Qué pantallas y flujos querés incluir?"

## Rule 1: NEVER create modules ad-hoc

**Creating or scaffolding files in `src/pages/` WITHOUT going through a skill is FORBIDDEN.**

When the agent needs to create a new module, page, or feature:
- **New feature** → invoke `/build-feature`
- **New project** → invoke `/bootstrap-react-project`

Do NOT create folders or files in `src/pages/` directly. The skills ensure correct structure, routing, nav registration, and convention compliance.

If the user asks "create a page for X" or "add a feature for Y", that is a trigger to invoke the skill — not to start writing files.

## Rule 2: Read conventions before writing ANY code

Before creating or modifying any `.ts` or `.tsx` file, the agent MUST read:

1. **From `humand-react` plugin** (`../../humand-react/rules/file-types/`):
   - `module-architecture.md` — folder structure, naming
   - `module-architecture-files.md` — how to write each file type
   - `module-architecture-hooks.md` — hook naming patterns
   - `react.md` — component patterns
   - `typescript.md` — type conventions
   - `forms.md` — form structure (only if feature has forms)
   - `react-styling.md` — styling patterns
   - `react-query.md` — query/mutation patterns (only if feature fetches data)

2. **From this plugin**: `sandbox.md`

If `humand-react` rules are not found, STOP: "This project requires the humand-react plugin."

## Rule 3: Follow the rules strictly

If a convention from these rules conflicts with what the user asks, follow the rules and explain why. The rules represent the agreed target state.

This gate exists because the agent has previously skipped reading rules and produced non-compliant code, causing rework.
