25 lines
2.0 KiB
Markdown
25 lines
2.0 KiB
Markdown
## KriUiRegistry Repository Rules
|
|
|
|
### Repository Role and Sources
|
|
|
|
- This repository is the internal shadcn registry named `kri`, published from `https://ui-registry.kric.com`.
|
|
- `registry.json`, `registry/components/registry.json`, and the files under `registry/` are source inputs. `dist/r` is generated output and must not be edited directly.
|
|
- Treat registry item names, targets, dependencies, registry dependencies, component props, behavior, styling tokens, and the public registry URL as consumer-facing contracts.
|
|
- Preserve shadcn registry schema compatibility and keep every item self-contained enough for the shadcn CLI to install it into a consumer project.
|
|
|
|
### Component and Metadata Rules
|
|
|
|
- Prefer accessible shadcn/Radix composition and the registry's existing component patterns before introducing a new abstraction.
|
|
- Keep project-specific business rules, API clients, routes, credentials, and environment assumptions out of registry components.
|
|
- Use portable design tokens and styles. Do not introduce project-only `content-text-*` classes or imports from `@kri/common/ui`; the repository verifier rejects them.
|
|
- Declare all package dependencies and registry dependencies accurately. Keep item file targets stable unless an approved migration covers consumers.
|
|
- Preserve loading, empty, error, disabled, keyboard, focus, and screen-reader behavior when changing an interactive component.
|
|
- Avoid embedding generated files or consumer-local configuration in registry source items.
|
|
|
|
### Verification and Release Boundary
|
|
|
|
- Use the committed lockfile and run `npm run build`, followed by `npm run verify`, for registry changes.
|
|
- Inspect the generated item JSON when changing files, dependencies, item names, or targets.
|
|
- Update `.agent/consumer.md` and human documentation in the same approved change when installation or component-selection behavior changes.
|
|
- Registry publication, deployment, version changes, and consumer-repository updates require separate explicit approval.
|