2.2 KiB
2.2 KiB
KriCreateNextApp Repository Rules
Repository Role and Contracts
- This repository provides the Node.js 20 TypeScript CLI
@kri/create-next-appand 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.
srcis authoritative.distis 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@latestand 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
DtoorDTO. - Generate
.agent/profile.yml,.agent/project.md, and harness line-ending policy for every project. Never copy a stale precomposedAGENTS.mdinto the template.
Harness Integration
- Generated projects default to
requested-project; allow the supported explicit project-type override without changing the fixedfrontendlayer. - When the central harness is available, register the project locally and run compose followed by verify. Central-harness absence must not prevent project creation.
AGENTS.mdandCLAUDE.mdin this repository are harness-generated outputs. Never edit either file directly; edit.agentsources 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 typecheckandnpm.cmd run buildon 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.