# Schema Constraints

Rules enforced by `erp-kit app check`. **Never recommend changes that violate them.**

## H1 Heading Rules

| Doc Type      | H1 Rule                                              | Example                                                  |
| ------------- | ---------------------------------------------------- | -------------------------------------------------------- |
| README.md     | Must be `# README` (literal)                         | `# README`                                               |
| Actor         | Slug must match filename                             | `admin.md` → `# Admin`, `sales-rep.md` → `# Sales Rep`  |
| Business Flow | Kebab-case matching folder name (`[a-zA-Z0-9_\-]+`)  | `employee-onboarding/README.md` → `# employee-onboarding` |
| Story         | Slug matches filename after actor prefix removal     | `admin--create-user.md` → `# Create User`               |

## Requirements Structure

The `## Industry Context` section contains `### Target Industry` and `### Domain Terminology` subsections. Requirements are bare list items under `### Domain Terminology` — do **not** add a separate `## Requirements` heading.

## Naming Conventions

- Files: kebab-case (e.g., `sales-representative.md`)
- Business flow H1 headings are kebab-case — do **not** flag them as inconsistent with title-case actor headings. They follow different schemas.

## Validation Notes

- `app check` outputs "No matching files found" for doc types that don't exist yet (e.g., stories at Tier 2, screens at Tier 3). This is expected.
