261006_01_ENH: Spring 생성 템플릿에 에이전트 참조 구조 반영

This commit is contained in:
2026-10-06 10:19:15 +09:00
parent 444ddb35e6
commit faa710121e
21 changed files with 456 additions and 88 deletions

View File

@@ -1,29 +1,18 @@
## KriCreateSpringApp Repository Rules
# KriCreateSpringApp Project Instruction Router
### Repository Role and Contracts
## Required Project References
- 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.
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
### Generated Backend Invariants
| Task scope | Required reference |
|---|---|
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
- Generated applications use Java 17, Spring Boot 3.5.7, the repository Gradle Wrapper, and `com.kri.common:starter:beta.1.6.4`.
- 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.
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
### Harness Integration
## Harness Workflow
- 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 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 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.
- `AGENTS.md` and `CLAUDE.md` are generated outputs. Never edit them directly.
- Edit `.agent/project.md` only when routing changes. Store durable project detail in `.agent/references/`.
- A reference-only content change does not require recomposition when its route is unchanged. Run harness verification to validate routing and UTF-8.
- Recompose and verify after changing `.agent/project.md`, `.agent/profile.yml`, or another composed instruction source.

View File

@@ -0,0 +1,29 @@
## 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.4`.
- 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 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 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.