# Agent ergonomics ## Why a consumer skill? LLM agents default to `string` types and inline regex. The catalog exists precisely to prevent that drift. The skill at `skills/smart-value-objects-consumer/` is shipped in the npm tarball so agents load consistent rules. ## Install for Cursor After `npm install smart-value-objects`: ```bash cp -r node_modules/smart-value-objects/skills/smart-value-objects-consumer .cursor/skills/ ``` Or symlink for monorepos. ## What agents must do 1. Load `smart-value-objects-consumer/SKILL.md` when editing consumer apps. 2. Import catalog types from `smart-value-objects`. 3. Use `tryCreate` / `validateRecord` at boundaries. 4. Read `X.constraints` for UI limits. ## Anti-patterns for agents | Anti-pattern | Fix | |--------------|-----| | `email: string` in domain | `email: EmailAddress` or parse at boundary | | Copy regex from README | `EmailAddress.tryCreate` | | `maxLength={255}` for title | `Title.constraints.maxLength` | | Import `User` from library | Build your own entity; use catalog VOs only | | Re-implement `validateRecord` | Import from `smart-value-objects` | ## Maintainer note Field standards live in `docs/field-standards.md`. The skill references that file — update docs first, then sync the skill copy.