feat: initialize AI agent harness

This commit is contained in:
2026-08-06 12:27:34 +09:00
commit 358d83df57
38 changed files with 34045 additions and 0 deletions

12
sources/stacks/ai-llm.md Normal file
View File

@@ -0,0 +1,12 @@
## AI and LLM Workloads
- Treat prompts, schemas, model routing, retrieval, pre-processing, post-processing, thresholds, and evaluations as source-controlled behavior.
- Explain the behavioral impact before changing a provider, model, embedding, prompt, threshold, chunking, or ranking strategy.
- Do not call paid model, embedding, transcription, vision, or other metered APIs without separate explicit approval.
- Do not send proprietary, personal, customer, survey, receipt, transcript, or other sensitive data to an external model or service without exact authorization for that data and destination.
- Prefer mocks and sanitized deterministic fixtures for development and tests.
- Validate structured model output before business use and handle refusals, malformed output, timeouts, rate limits, and provider failures explicitly.
- Keep API keys and provider credentials in the repository's approved secret mechanism, never in source, prompts, fixtures, logs, or committed configuration.
- Redact sensitive prompt, response, token, trace, and provider-error content from logs and reports.
- Separate deterministic business rules from probabilistic model behavior so critical rules remain testable.
- Compare representative evaluation results before and after behavioral changes, and report material quality, cost, latency, privacy, and reproducibility tradeoffs.

View File

@@ -0,0 +1,17 @@
## Classic ASP
- Prioritize behavior preservation. Do not modernize syntax, includes, data access, error handling, or page structure outside the approved scope.
- Trace the full include chain and relevant application/session/configuration dependencies before changing shared ASP behavior.
- Preserve `Response.CodePage`, `Response.CharSet`, page directives, response headers, and the existing browser/server encoding contract.
- Parameterize ADO commands and preserve the expected command type, parameter order, data types, sizes, directions, result sets, and transaction behavior.
- Close and release recordsets, commands, connections, streams, and other COM resources on every applicable path.
- Preserve the established `On Error Resume Next` and error propagation pattern; do not suppress newly introduced failures.
### Legacy Text File Safety
- Treat each existing Classic ASP text file's byte encoding, BOM state, and line endings as part of its contract.
- Detect those properties before editing and preserve them exactly unless an encoding conversion is explicitly approved.
- Do not assume UTF-8. Existing files may use UTF-8 with or without BOM, EUC-KR/CP949, or another legacy encoding.
- Keep Korean comments, literals, SQL, HTML, JavaScript, and error messages byte-safe. Stop if the source encoding cannot be identified confidently.
- Avoid formatters or bulk rewrites that normalize encoding or line endings across the file.
- After editing, run the harness encoding check and inspect the diff for replacement characters, mojibake, unexpected BOM changes, or whole-file churn.

View File

@@ -0,0 +1,10 @@
## .NET and C#
- Treat the configured target framework, SDK, language version, nullable mode, application model, package versions, and solution layout as authoritative.
- Do not use APIs unavailable to the target framework or perform framework, project-format, or package migrations outside the approved scope.
- Preserve the repository's dependency-injection, configuration, logging, exception, serialization, and data-access conventions.
- Use async APIs for asynchronous I/O and avoid sync-over-async blocking such as `.Result` and `.Wait()`.
- Dispose `IDisposable` and `IAsyncDisposable` resources deterministically.
- For WinForms, preserve designer ownership, UI-thread access, event lifecycle, and the existing separation between generated designer code and hand-written code.
- Keep secrets and environment-specific endpoints out of source and committed configuration.
- Run the narrowest relevant restore, build, test, and analyzer commands supported by the repository and target framework.

View File

@@ -0,0 +1,12 @@
## Java and Spring Boot
- Treat the configured JDK, Spring Boot, Gradle, plugin, dependency, and package versions as authoritative.
- Use the repository's Gradle Wrapper. Do not substitute a machine-global Gradle installation.
- Preserve the established package layout and controller, application/service, domain, and persistence boundaries.
- Keep controllers thin, place business rules in the established service/domain layer, and prefer constructor injection.
- Apply request and configuration validation at boundaries and preserve the project's exception and response conventions.
- Make transaction boundaries explicit and narrow; do not add broad transactions to hide lifecycle or query problems.
- Preserve authentication, authorization, auditing, logging, and secret-management conventions.
- Do not edit generated QueryDSL or other generated sources. Change their source definitions and regenerate only when the repository workflow requires it.
- Use the approved KriCommon contract when the project profile includes it; do not duplicate shared backend behavior locally.
- Run the narrowest relevant Gradle compile, test, static-analysis, and build tasks.

10
sources/stacks/mssql.md Normal file
View File

@@ -0,0 +1,10 @@
## Microsoft SQL Server
- Use T-SQL syntax and behavior only for data sources whose declared engine is `mssql`.
- Preserve the configured SQL Server version, database and schema names, collation, naming, migration, and access conventions.
- Parameterize values. Do not build SQL by concatenating untrusted input.
- Preserve Unicode behavior and use the repository's established `nvarchar`/`nchar` and parameter conventions where Korean or other Unicode text is possible.
- Treat stored-procedure parameters, result sets, return values, transaction behavior, and error behavior as public contracts.
- Consider indexes and actual execution characteristics for changed filters, joins, ordering, grouping, and pagination.
- Do not introduce MySQL or other dialect syntax into MSSQL paths.
- Keep read-only legacy integrations read-only. A source-code change approval authorizes SQL analysis and script drafting only; execution requires separate explicit approval and the declared data-source access level.

9
sources/stacks/mysql.md Normal file
View File

@@ -0,0 +1,9 @@
## MySQL
- Use MySQL syntax and behavior only for data sources whose declared engine is `mysql`.
- Preserve the configured version, schema, character set, collation, time zone, naming, migration, and access conventions.
- Parameterize values. Do not build SQL by concatenating untrusted input.
- Consider indexes and execution plans for changed filters, joins, ordering, grouping, and pagination without guessing from small data sets.
- Preserve transaction, locking, null, date/time, decimal, and generated-key semantics.
- Do not introduce MSSQL or other dialect syntax into MySQL paths.
- A source-code change approval authorizes SQL analysis and migration drafting only. Execute DDL, DML, procedures, or migrations only with separate explicit approval and the declared data-source access level.

11
sources/stacks/nextjs.md Normal file
View File

@@ -0,0 +1,11 @@
## Next.js
- Treat the repository's current Next.js and React versions, routing model, rendering model, and package manager as authoritative.
- Preserve server and client component boundaries. Add `use client` only when browser APIs, state, effects, or client-only libraries require it.
- Keep secrets, privileged data access, and server-only modules out of client bundles.
- Preserve established route, layout, middleware, authentication, authorization, caching, revalidation, and error-handling conventions.
- Validate request parameters, payloads, headers, cookies, and external responses at runtime.
- Do not create new frontend TypeScript type or interface names ending in `Dto` or `DTO`. Use domain- or purpose-specific names such as `User`, `UserInput`, `UserRequest`, or `UserResponse`; do not rename existing types solely to enforce this rule outside the approved scope.
- Use the approved KRI frontend and UI contracts when the project profile includes them; do not copy shared implementations into an application.
- Avoid incidental routing-model or rendering-strategy migrations.
- Run the repository's focused lint, type-check, test, and production build commands as applicable.

12
sources/stacks/python.md Normal file
View File

@@ -0,0 +1,12 @@
## Python
- Detect and preserve the repository's interpreter version, virtual environment, dependency mechanism, formatter, linter, type checker, and test runner.
- Use the project-local environment. Do not install packages globally or alter unrelated environments.
- Preserve the existing dependency-file strategy; do not broadly regenerate or reorder requirement files for a narrow change.
- Preserve file encoding and line endings, especially in Korean source, prompts, fixtures, and documents.
- Follow the repository's import, typing, Pydantic/model, exception, logging, and entry-point conventions.
- Use explicit paths and encodings for file I/O, and clean up temporary resources deterministically.
- Avoid broad exception handling unless it is an intentional application boundary with actionable diagnostics.
- Keep credentials, tokens, model keys, and environment-specific endpoints out of source and committed configuration.
- Use sanitized, minimal fixtures instead of production survey, receipt, transcript, customer, or internal documents.
- Run the narrowest relevant pytest, lint, type-check, and application smoke checks available in the repository.

9
sources/stacks/react.md Normal file
View File

@@ -0,0 +1,9 @@
## React
- Treat the current React version, component style, state management, routing, styling, and test approach as authoritative.
- Do not perform unrelated class-to-hook, JavaScript-to-TypeScript, state-library, styling-system, or React-to-Next.js migrations.
- Keep components focused and follow the repository's established split between presentation, state, data access, and side effects.
- Keep effects dependency-correct and clean up subscriptions, timers, listeners, and in-flight work where applicable.
- Use stable semantic keys and preserve accessibility, loading, empty, error, disabled, and success states.
- Preserve public component props and shared UI contracts unless a coordinated breaking change is explicitly approved.
- Treat any planned Next.js migration as a separate policy and task; the current React application remains authoritative until that migration slice is approved.

View File

@@ -0,0 +1,9 @@
## TypeScript
- Treat the repository's current TypeScript version, `tsconfig` files, module system, path aliases, and package manager as authoritative.
- Preserve or strengthen existing strictness. Do not weaken compiler options or hide errors with broad `any`, `@ts-ignore`, or unsafe assertions.
- Prefer narrow domain types, discriminated unions, and explicit boundary types over duplicated or overly generic shapes.
- Validate untrusted runtime input even when a compile-time type exists.
- Keep imports, exports, aliases, and generated-code boundaries consistent with the repository.
- Do not introduce a JavaScript-to-TypeScript conversion outside the approved scope.
- Run the repository's focused type-check, lint, test, and build commands as applicable.