Files
front-create-next-app/.agent/project.md

30 lines
2.3 KiB
Markdown

## KriCreateNextApp Repository Rules
### Repository Role and Contracts
- This repository provides the Node.js 20 TypeScript CLI `@kri/create-next-app` and the template used to create KRI Next.js frontend applications.
- Treat command names, flags, prompts, defaults, generated paths, dependency policy, template structure, and validation order as public contracts.
- `src` is authoritative. `dist` is ignored build output and must not be edited or committed directly.
- Keep the CLI implementation, help text, README, and templates synchronized whenever generated behavior changes.
### Generated Frontend Invariants
- Generated applications use TypeScript, React, Next.js, `@kri/common`, shadcn, and the KRI UI Registry contract declared by this repository profile.
- Install `@kri/common@latest` and record the resolved dependency as an exact version using the existing npm workflow.
- Prefer shadcn and approved KRI UI Registry components over new local primitives when a suitable component exists.
- Do not introduce new frontend type or interface names ending in `Dto` or `DTO`.
- Generate `.agent/profile.yml`, `.agent/project.md`, and harness line-ending policy for every project. Never copy a stale precomposed `AGENTS.md` into the template.
### Harness Integration
- Generated projects default to `requested-project`; allow the supported explicit project-type override without changing the fixed `frontend` layer.
- When the central harness is available, register the project in shared `workspace.yml` by default and run compose followed by verify. Allow an explicit local-registration override, and do not perform Git commits. Central-harness absence must not prevent project creation.
- `AGENTS.md` and `CLAUDE.md` in this repository are harness-generated outputs. Never edit either file directly; edit `.agent` sources and recompose.
- Do not commit user-specific absolute harness paths or credentials. Explicit paths are runtime inputs only.
### Verification and Publication
- Run `npm.cmd run typecheck` and `npm.cmd run build` on Windows for CLI changes.
- Validate template changes by generating into a disposable directory without network installation first, then inspect unresolved placeholders, encoding, and harness composition.
- Package publication, registry access, and network installation require separate explicit approval.