30 lines
2.2 KiB
Markdown
30 lines
2.2 KiB
Markdown
## KriCreateSpringApp Repository Rules
|
|
|
|
### Repository Role and Contracts
|
|
|
|
- This repository provides the Node.js 20 TypeScript CLI `@kri/create-spring-app` and the template used to create KRI Spring Boot backend applications.
|
|
- Treat command names, flags, prompts, defaults, generated paths, dependency versions, database choices, 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 Backend Invariants
|
|
|
|
- Generated applications use Java 17, Spring Boot 3.5.7, the repository Gradle Wrapper, and `com.kri.common:starter:beta.1.6.3`.
|
|
- Keep the approved KriCommon version exact. Do not restore `latest.release` or another dynamic version.
|
|
- Preserve the selected MySQL or MSSQL driver, profile configuration, JPA/QueryDSL structure, and optional MyBatis template behavior.
|
|
- 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 `backend` layer.
|
|
- Include the selected database in the generated profile and declare consumption of the KriCommon contract.
|
|
- 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.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 with `--skip-build`, then inspect unresolved placeholders, encoding, and harness composition.
|
|
- A full generated Gradle build, package publication, registry access, and other network operations require separate explicit approval.
|