261006_01_ENH: Spring 생성 템플릿에 에이전트 참조 구조 반영
This commit is contained in:
14
.agent-harness/references/kri-common/crypto-contract.md
Normal file
14
.agent-harness/references/kri-common/crypto-contract.md
Normal file
@@ -0,0 +1,14 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-common
|
||||
Source: .agent/consumer-references/crypto-contract.md
|
||||
-->
|
||||
|
||||
# KriCommon Crypto Contract
|
||||
|
||||
- Crypto APIs are under `com.kri.common.feature.crypto.*` and do not use a central key database.
|
||||
- AES uses PBKDF2-HMAC-SHA256 key derivation with salt and defaults to AES-256-GCM; callers may supply a master key, salt, IV, AAD, and detached or appended GCM tag representation for legacy interoperability.
|
||||
- `kri.crypto.aes.keys` and per-call master keys are supported operational compromises. Never log them or commit real values.
|
||||
- Per-call key material takes precedence over configured keys, and encrypted values retain key ID and KDF metadata for decryption compatibility.
|
||||
- AES-GCM always requires its authentication tag. Use `AES_256_CBC_PKCS5` only for explicitly identified legacy data that has no tag, and do not treat CBC as authenticated encryption.
|
||||
- `DigestService` supports SHA-256/SHA-512 plus legacy-only MD5/SHA-1. `AdaptiveHashService` uses BCrypt for short secrets; do not use MD5, SHA-1, or a fast digest for new password or secret storage.
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-common
|
||||
Source: .agent/consumer-references/platform-capabilities.md
|
||||
-->
|
||||
|
||||
# KriCommon Platform Capabilities
|
||||
|
||||
## Dependency and Configuration Boundary
|
||||
|
||||
- Include the matching Spring starter for any optional Web, Security, JPA, Redis, AOP, or Swagger integration the service enables; KriCommon intentionally declares many integrations as compile-only.
|
||||
- KriCommon configuration uses only `kri.*`. Established groups include `kri.auth.jwt`, `kri.auth.apikey`, `kri.crypto`, `kri.security`, `kri.swagger`, `kri.web`, `kri.web.mdc`, `kri.http.bypass`, `kri.redis`, `kri.scheduling`, and `kri.error.expose`.
|
||||
- Read the version-matched README and configuration-property classes before setting a property; do not infer a property name or default from an older service.
|
||||
- Supply production JWT secrets, API keys, credentials, allowlists, and service URLs through the consumer's approved secret and configuration system. Never rely on library example or default secrets in production.
|
||||
- Preserve consumer override points. KriCommon's default security chain is created only when the consumer does not provide one, and overridable beans should remain explicit.
|
||||
- Adding a path to API-key allowed paths scopes where API-key authentication is attempted; it does not make the path public or grant authorization.
|
||||
|
||||
## Optional Capabilities
|
||||
|
||||
- JWT and API-key authentication integrate with Spring Security. API-key JPA preload requires Spring Data JPA; a consumer-provided claims provider can be used without JPA.
|
||||
- Common Web may register error handling, tracing/MDC, request-user resolution, enum conversion, and CORS behavior. Check for overlap before defining consumer-local equivalents.
|
||||
- Swagger support requires springdoc and defines the shared Bearer/API-key schemes and grouped paths.
|
||||
- Redis and scheduling are opt-in through their `kri.*.enabled` settings and matching runtime dependencies.
|
||||
- HTTP bypass targets are server-configured. Never accept an arbitrary full target URL from a frontend; retain allowed-path checks and do not forward hop-by-hop headers.
|
||||
- The external API client returns response bodies as documented, while bypass responses preserve raw bytes and target `Content-Type`.
|
||||
- `ExternalApiClient` multipart requests generate their own boundary and ignore a caller-supplied `Content-Type`. Multipart headers and `formField` values use UTF-8, while file bodies preserve the supplied bytes.
|
||||
- Multipart filenames, including non-ASCII names, are sent unchanged in the quoted `filename` parameter as raw UTF-8. No ASCII fallback or `filename*` parameter is added; CR/LF rejection and quote/backslash escaping still apply.
|
||||
- `JsonUtil` requires the consumer's explicit `ObjectMapper`; shared date/time helpers define KST as `Asia/Seoul` and also expose UTC semantics.
|
||||
@@ -0,0 +1,13 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-common
|
||||
Source: .agent/consumer-references/upgrade-and-verification.md
|
||||
-->
|
||||
|
||||
# KriCommon Upgrade and Verification
|
||||
|
||||
- Review KriCommon release notes, README changes, configuration defaults, auto-configuration conditions, and affected public APIs before upgrading.
|
||||
- Commit dependency-lock or resolved-version changes according to the consumer repository's policy.
|
||||
- Run the consumer's focused compile and tests after an upgrade, including application-context startup tests when auto-configuration or security behavior is affected.
|
||||
- Keep `.agent/project.md` near 2-3 KiB as a routing document. Do not delete material rules to meet the budget; move conditional schema, query, API, and migration details to routed `.agent/references/` documents.
|
||||
- Do not modify KriCommon or another consumer repository unless it is explicitly included in the approved task scope.
|
||||
@@ -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.
|
||||
|
||||
29
.agent/references/repository-rules.md
Normal file
29
.agent/references/repository-rules.md
Normal 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.
|
||||
41
.agents/skills/attention-aware-communication/SKILL.md
Normal file
41
.agents/skills/attention-aware-communication/SKILL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: attention-aware-communication
|
||||
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/attention-aware-communication/SKILL.md
|
||||
-->
|
||||
# Attention-Aware Communication
|
||||
|
||||
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
|
||||
|
||||
## Default: Attention-kind
|
||||
|
||||
- Put the bottom line in the first sentence and use plain Korean.
|
||||
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
|
||||
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
|
||||
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
|
||||
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
|
||||
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
|
||||
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
|
||||
|
||||
## Progress and Completion: Rundown
|
||||
|
||||
Use Rundown formatting when a task has multiple steps or mixed states:
|
||||
|
||||
- Start with a one-line outcome that includes any blocker.
|
||||
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
|
||||
- Put each blocker or material risk on its own line.
|
||||
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
|
||||
- End with the next action or a small numbered choice only when the user must decide.
|
||||
|
||||
## Explicit-Only: Spartan
|
||||
|
||||
Use Spartan style only when the user explicitly asks for it:
|
||||
|
||||
- Lead with the complete answer in one sentence.
|
||||
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
|
||||
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
|
||||
- If the user also asks for depth, provide the full detail in short, separated blocks.
|
||||
37
.agents/skills/karpathy-guidelines/SKILL.md
Normal file
37
.agents/skills/karpathy-guidelines/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: karpathy-guidelines
|
||||
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/karpathy-guidelines/SKILL.md
|
||||
-->
|
||||
# Karpathy Guidelines
|
||||
|
||||
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
|
||||
|
||||
## Think Before Coding
|
||||
|
||||
- Inspect the relevant code and repository conventions before choosing a solution.
|
||||
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
|
||||
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
|
||||
|
||||
## Simplicity First
|
||||
|
||||
- Implement the smallest complete solution that satisfies the observable requirement.
|
||||
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
|
||||
- Prefer an existing repository pattern or standard-library capability over a new local framework.
|
||||
|
||||
## Surgical Changes
|
||||
|
||||
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
|
||||
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
|
||||
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
|
||||
|
||||
## Goal-Driven Execution
|
||||
|
||||
- Translate the request into observable success criteria before implementation.
|
||||
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
|
||||
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
|
||||
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.
|
||||
29
.agents/skills/project-reference-loader/SKILL.md
Normal file
29
.agents/skills/project-reference-loader/SKILL.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: project-reference-loader
|
||||
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/project-reference-loader/SKILL.md
|
||||
-->
|
||||
# Project Reference Loader
|
||||
|
||||
Use the repository's generated `AGENTS.md` as the routing entrypoint.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
|
||||
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
|
||||
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
|
||||
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
|
||||
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
|
||||
|
||||
## Change Handling
|
||||
|
||||
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
|
||||
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
|
||||
- Never edit generated `.agent-harness/references/` copies directly.
|
||||
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
|
||||
|
||||
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.
|
||||
38
.agents/skills/verification-before-completion/SKILL.md
Normal file
38
.agents/skills/verification-before-completion/SKILL.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: verification-before-completion
|
||||
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/verification-before-completion/SKILL.md
|
||||
-->
|
||||
# Verification Before Completion
|
||||
|
||||
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
|
||||
|
||||
## Verification Gate
|
||||
|
||||
Before making a success claim:
|
||||
|
||||
1. State the exact claim internally and identify which observable check can prove or disprove it.
|
||||
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
|
||||
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
|
||||
4. Compare the evidence with the claim and the approved acceptance criteria.
|
||||
5. Report only the status supported by that evidence.
|
||||
|
||||
## Evidence Rules
|
||||
|
||||
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
|
||||
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
|
||||
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
|
||||
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
|
||||
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
|
||||
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
|
||||
|
||||
## Reporting
|
||||
|
||||
- Cite the commands or inspections actually run and summarize their observed results.
|
||||
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
|
||||
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
|
||||
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.
|
||||
41
.claude/skills/attention-aware-communication/SKILL.md
Normal file
41
.claude/skills/attention-aware-communication/SKILL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: attention-aware-communication
|
||||
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/attention-aware-communication/SKILL.md
|
||||
-->
|
||||
# Attention-Aware Communication
|
||||
|
||||
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
|
||||
|
||||
## Default: Attention-kind
|
||||
|
||||
- Put the bottom line in the first sentence and use plain Korean.
|
||||
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
|
||||
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
|
||||
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
|
||||
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
|
||||
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
|
||||
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
|
||||
|
||||
## Progress and Completion: Rundown
|
||||
|
||||
Use Rundown formatting when a task has multiple steps or mixed states:
|
||||
|
||||
- Start with a one-line outcome that includes any blocker.
|
||||
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
|
||||
- Put each blocker or material risk on its own line.
|
||||
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
|
||||
- End with the next action or a small numbered choice only when the user must decide.
|
||||
|
||||
## Explicit-Only: Spartan
|
||||
|
||||
Use Spartan style only when the user explicitly asks for it:
|
||||
|
||||
- Lead with the complete answer in one sentence.
|
||||
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
|
||||
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
|
||||
- If the user also asks for depth, provide the full detail in short, separated blocks.
|
||||
37
.claude/skills/karpathy-guidelines/SKILL.md
Normal file
37
.claude/skills/karpathy-guidelines/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: karpathy-guidelines
|
||||
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/karpathy-guidelines/SKILL.md
|
||||
-->
|
||||
# Karpathy Guidelines
|
||||
|
||||
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
|
||||
|
||||
## Think Before Coding
|
||||
|
||||
- Inspect the relevant code and repository conventions before choosing a solution.
|
||||
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
|
||||
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
|
||||
|
||||
## Simplicity First
|
||||
|
||||
- Implement the smallest complete solution that satisfies the observable requirement.
|
||||
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
|
||||
- Prefer an existing repository pattern or standard-library capability over a new local framework.
|
||||
|
||||
## Surgical Changes
|
||||
|
||||
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
|
||||
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
|
||||
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
|
||||
|
||||
## Goal-Driven Execution
|
||||
|
||||
- Translate the request into observable success criteria before implementation.
|
||||
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
|
||||
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
|
||||
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.
|
||||
29
.claude/skills/project-reference-loader/SKILL.md
Normal file
29
.claude/skills/project-reference-loader/SKILL.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: project-reference-loader
|
||||
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/project-reference-loader/SKILL.md
|
||||
-->
|
||||
# Project Reference Loader
|
||||
|
||||
Use the repository's generated `AGENTS.md` as the routing entrypoint.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
|
||||
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
|
||||
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
|
||||
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
|
||||
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
|
||||
|
||||
## Change Handling
|
||||
|
||||
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
|
||||
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
|
||||
- Never edit generated `.agent-harness/references/` copies directly.
|
||||
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
|
||||
|
||||
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.
|
||||
38
.claude/skills/verification-before-completion/SKILL.md
Normal file
38
.claude/skills/verification-before-completion/SKILL.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: verification-before-completion
|
||||
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/verification-before-completion/SKILL.md
|
||||
-->
|
||||
# Verification Before Completion
|
||||
|
||||
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
|
||||
|
||||
## Verification Gate
|
||||
|
||||
Before making a success claim:
|
||||
|
||||
1. State the exact claim internally and identify which observable check can prove or disprove it.
|
||||
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
|
||||
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
|
||||
4. Compare the evidence with the claim and the approved acceptance criteria.
|
||||
5. Report only the status supported by that evidence.
|
||||
|
||||
## Evidence Rules
|
||||
|
||||
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
|
||||
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
|
||||
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
|
||||
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
|
||||
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
|
||||
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
|
||||
|
||||
## Reporting
|
||||
|
||||
- Cite the commands or inspections actually run and summarize their observed results.
|
||||
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
|
||||
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
|
||||
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.
|
||||
92
AGENTS.md
92
AGENTS.md
@@ -35,6 +35,13 @@ Later and more specific instructions may override earlier general instructions o
|
||||
- Lead with the result or decision, then provide only the detail needed to verify it.
|
||||
- Do not create or retain a full session transcript.
|
||||
|
||||
### Attention-Aware Response Style
|
||||
|
||||
- Use `attention-aware-communication` for substantive answers, progress updates, and completion reports.
|
||||
- Default to concise, bottom-line-first Korean without omitting a condition, risk, number, or uncertainty needed for a correct decision.
|
||||
- Give full detail when the user requests depth. Use Spartan style only when explicitly requested.
|
||||
- Presentation rules never reduce investigation, implementation, validation, or reporting obligations.
|
||||
|
||||
## Work Authorization
|
||||
|
||||
- The default workflow is discussion first and explicit execution approval second.
|
||||
@@ -152,6 +159,13 @@ Preferred human-facing tools:
|
||||
- If a possible secret is discovered, do not repeat it. Report only its location, type, and recommended containment action.
|
||||
- Do not rotate, revoke, copy, or otherwise modify credentials unless that exact action is explicitly authorized.
|
||||
|
||||
## Workflow Skills
|
||||
|
||||
- Use `project-reference-loader` before substantive repository analysis, planning, implementation, debugging, or review. Read only the current project and shared references routed for that task, and reread them for each related task even if they were loaded earlier in the session.
|
||||
- Use `karpathy-guidelines` when implementing, refactoring, or reviewing code. It keeps assumptions visible, changes surgical, and success criteria verifiable.
|
||||
- Use `verification-before-completion` before claiming that work is complete, fixed, passing, ready, or safe to commit or publish.
|
||||
- A skill does not expand task scope or authorize Git publication, database execution, deployment, destructive actions, or external communication.
|
||||
|
||||
## Validation
|
||||
|
||||
- Discover supported build, test, lint, type-check, and formatting commands from repository files and project instructions. Do not invent commands.
|
||||
@@ -226,66 +240,38 @@ When implementation is complete, report in Korean:
|
||||
|
||||
## KriCommon Consumer Contract
|
||||
|
||||
### Dependency and API Boundary
|
||||
|
||||
- Consume KriCommon as `com.kri.common:starter:<approved-version>` using the consumer repository's established Gradle dependency and version-management conventions.
|
||||
- Import service-facing APIs from `com.kri.common.feature.*`. Treat `com.kri.common.runtime.*` as internal and do not bind application code to it unless no public API exists and the exception is explicitly documented.
|
||||
- Include the matching Spring starter for any optional Web, Security, JPA, Redis, AOP, or Swagger integration the service enables; KriCommon intentionally declares many integrations as compile-only.
|
||||
- Prefer the shared feature or an approved extension point over duplicating authentication, HTTP, error, enum, Excel, Redis, JSON, date/time, JPA, or utility behavior locally.
|
||||
|
||||
### Configuration and Overrides
|
||||
|
||||
- KriCommon configuration uses only `kri.*`. Established groups include `kri.auth.jwt`, `kri.auth.apikey`, `kri.security`, `kri.swagger`, `kri.web`, `kri.web.mdc`, `kri.http.bypass`, `kri.redis`, `kri.scheduling`, and `kri.error.expose`.
|
||||
- Read the version-matched README and configuration-property classes before setting a property; do not infer a property name or default from an older service.
|
||||
- Supply production JWT secrets, API keys, credentials, allowlists, and service URLs through the consumer's approved secret and configuration system. Never rely on library example or default secrets in production.
|
||||
- Preserve consumer override points. KriCommon's default security chain is created only when the consumer does not provide one, and overridable beans should remain explicit.
|
||||
- Adding a path to API-key allowed paths scopes where API-key authentication is attempted; it does not make the path public or grant authorization.
|
||||
|
||||
### Major Optional Capabilities
|
||||
|
||||
- JWT and API-key authentication integrate with Spring Security. API-key JPA preload requires Spring Data JPA; a consumer-provided claims provider can be used without JPA.
|
||||
- Common Web may register error handling, tracing/MDC, request-user resolution, enum conversion, and CORS behavior. Check for overlap before defining consumer-local equivalents.
|
||||
- Swagger support requires springdoc and defines the shared Bearer/API-key schemes and grouped paths.
|
||||
- Redis and scheduling are opt-in through their `kri.*.enabled` settings and matching runtime dependencies.
|
||||
- HTTP bypass targets are server-configured. Never accept an arbitrary full target URL from a frontend; retain allowed-path checks and do not forward hop-by-hop headers.
|
||||
- The external API client returns response bodies as documented, while bypass responses preserve raw bytes and target `Content-Type`.
|
||||
- `ExternalApiClient` multipart requests generate their own boundary and ignore a caller-supplied `Content-Type`. Multipart headers and `formField` values use UTF-8, while file bodies preserve the supplied bytes.
|
||||
- Multipart filenames, including non-ASCII names, are sent unchanged in the quoted `filename` parameter as raw UTF-8. No ASCII fallback or `filename*` parameter is added; CR/LF rejection and quote/backslash escaping still apply.
|
||||
- `JsonUtil` requires the consumer's explicit `ObjectMapper`; shared date/time helpers define KST as `Asia/Seoul` and also expose UTC semantics.
|
||||
|
||||
### Upgrade and Verification
|
||||
|
||||
- Review KriCommon release notes, README changes, configuration defaults, auto-configuration conditions, and affected public APIs before upgrading.
|
||||
- Commit dependency-lock or resolved-version changes according to the consumer repository's policy.
|
||||
- Run the consumer's focused compile and tests after an upgrade, including application-context startup tests when auto-configuration or security behavior is affected.
|
||||
- Consume KriCommon as `com.kri.common:starter:<approved-version>` through the repository's established Gradle version-management convention.
|
||||
- Import service-facing APIs from `com.kri.common.feature.*`; treat `com.kri.common.runtime.*` as internal.
|
||||
- Prefer a shared feature or approved extension point over duplicating authentication, HTTP, error, enum, Excel, Redis, JSON, date/time, JPA, crypto, or utility behavior locally.
|
||||
- Do not modify KriCommon or another consumer repository unless it is explicitly included in the approved task scope.
|
||||
|
||||
## KriCreateSpringApp Repository Rules
|
||||
### Required Shared References
|
||||
|
||||
### Repository Role and Contracts
|
||||
Before each related task, read the current contents of every matching reference, even if it was read earlier in the session.
|
||||
|
||||
- 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.
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Dependency, configuration, security, Web, Swagger, Redis, scheduling, HTTP, JSON, or date/time behavior | `.agent-harness/references/kri-common/platform-capabilities.md` |
|
||||
| Encryption, hashing, key material, or legacy crypto interoperability | `.agent-harness/references/kri-common/crypto-contract.md` |
|
||||
| KriCommon version upgrade or consumer verification | `.agent-harness/references/kri-common/upgrade-and-verification.md` |
|
||||
|
||||
### Generated Backend Invariants
|
||||
If a task spans multiple scopes, read every matching reference. Generated files under `.agent-harness/references/` are read-only copies; edit KriCommon's `.agent/consumer.md` or `.agent/consumer-references/` and recompose instead.
|
||||
|
||||
- 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.
|
||||
# KriCreateSpringApp Project Instruction Router
|
||||
|
||||
### Harness Integration
|
||||
## Required Project References
|
||||
|
||||
- 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.
|
||||
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
|
||||
|
||||
### Verification and Publication
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
|
||||
|
||||
- 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.
|
||||
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
|
||||
|
||||
## Harness Workflow
|
||||
|
||||
- `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.
|
||||
|
||||
@@ -74,7 +74,7 @@ npx @kri/create-spring-app sample-server
|
||||
|
||||
## Agent Harness
|
||||
|
||||
생성 프로젝트에는 `.agent/profile.yml`, `.agent/project.md`, `.gitattributes`가 항상 포함됩니다.
|
||||
생성 프로젝트에는 `.agent/profile.yml`, 라우팅 전용 `.agent/project.md`, 상세 규칙용 `.agent/references/repository-rules.md`, `.gitattributes`가 항상 포함됩니다.
|
||||
|
||||
중앙 하네스는 다음 순서로 탐색합니다.
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@kri/create-spring-app",
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@kri/create-spring-app",
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"license": "UNLICENSED",
|
||||
"bin": {
|
||||
"kri-create-spring-app": "dist/cli.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kri/create-spring-app",
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"description": "Create a KRI standard Spring Boot application",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
@@ -76,6 +76,6 @@ kri:
|
||||
|
||||
- 프로젝트 ID: `__AGENT_PROJECT_ID__`
|
||||
- 프로젝트 유형: `__AGENT_PROJECT_TYPE__`
|
||||
- 권위 원본: `.agent/profile.yml`, `.agent/project.md`
|
||||
- 권위 원본: `.agent/profile.yml`, `.agent/project.md`, `.agent/references/*.md`
|
||||
|
||||
`AGENTS.md`와 `CLAUDE.md`는 중앙 Agent Harness가 합성합니다. 두 파일을 직접 수정하지 않습니다.
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
## Generated Spring Boot Repository Rules
|
||||
# __PROJECT_NAME__ Project Instruction Router
|
||||
|
||||
- This backend application was generated by `@kri/create-spring-app` with Java 17 and Spring Boot 3.5.7.
|
||||
- Consume KriCommon through `com.kri.common:starter:beta.1.6.4`; do not change that approved version or duplicate shared behavior without explicit approval.
|
||||
- The selected primary database is `__DATABASE__`. Preserve its configured dialect, driver, transaction, schema, and migration conventions.
|
||||
- Keep controllers thin and preserve the generated service, DTO, persistence, configuration, QueryDSL, JDBC, and optional MyBatis boundaries.
|
||||
- `AGENTS.md` and `CLAUDE.md` are central-harness generated outputs. Never edit them directly; update `.agent/profile.yml` or `.agent/project.md` and recompose.
|
||||
- Use the repository Gradle Wrapper and run `.\gradlew.bat compileJava` followed by focused tests for relevant changes.
|
||||
## Required Project References
|
||||
|
||||
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
|
||||
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
|
||||
|
||||
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
|
||||
|
||||
## Harness Workflow
|
||||
|
||||
- `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.
|
||||
|
||||
8
templates/base/_agent/references/repository-rules.md
Normal file
8
templates/base/_agent/references/repository-rules.md
Normal file
@@ -0,0 +1,8 @@
|
||||
## Generated Spring Boot Repository Rules
|
||||
|
||||
- This backend application was generated by `@kri/create-spring-app` with Java 17 and Spring Boot 3.5.7.
|
||||
- Consume KriCommon through `com.kri.common:starter:beta.1.6.4`; do not change that approved version or duplicate shared behavior without explicit approval.
|
||||
- The selected primary database is `__DATABASE__`. Preserve its configured dialect, driver, transaction, schema, and migration conventions.
|
||||
- Keep controllers thin and preserve the generated service, DTO, persistence, configuration, QueryDSL, JDBC, and optional MyBatis boundaries.
|
||||
- `AGENTS.md` and `CLAUDE.md` are central-harness generated outputs. Never edit them directly; update `.agent/profile.yml` or `.agent/project.md` and recompose.
|
||||
- Use the repository Gradle Wrapper and run `.\gradlew.bat compileJava` followed by focused tests for relevant changes.
|
||||
@@ -4,4 +4,5 @@
|
||||
/AGENTS.md text eol=lf
|
||||
/CLAUDE.md text eol=lf
|
||||
/.agent/*.md text eol=lf
|
||||
/.agent/**/*.md text eol=lf
|
||||
/.agent/*.yml text eol=lf
|
||||
|
||||
Reference in New Issue
Block a user