docs: add agent harness instructions

This commit is contained in:
2026-08-07 11:19:01 +09:00
parent ca84dd7d21
commit 1d310e1fb3
5 changed files with 324 additions and 0 deletions

31
.agent/profile.yml Normal file
View File

@@ -0,0 +1,31 @@
schema_version: 1
project:
id: kart-api-kon
name: KART API KON
type: internal-service
layer: backend
legacy: true
stack:
- dotnet-csharp
databases:
- id: report
engine: mssql
role: reporting-data
- id: kon
engine: mssql
role: kon-survey-data
- id: kiwi
engine: mssql
role: kiwi-survey-data
- id: intranet
engine: mssql
role: intranet-reference-data
migration:
status: planned
target_stack:
- java-springboot
strategy: staged

26
.agent/project.md Normal file
View File

@@ -0,0 +1,26 @@
## KART API KON Repository Rules
### Repository Role and Boundaries
- This .NET 8 Web API processes and aggregates survey data for KON reporting. Treat its endpoints, report shapes, Excel output, calculation results, and operational behavior as current compatibility contracts.
- Preserve the established separation among controllers, services, utilities/DAL code, DTOs, and statistics helpers while the current implementation remains active.
- The application reads from several MSSQL data sources. Keep connection selection, SQL dialect, result shapes, and cross-source assumptions explicit; do not infer that similarly shaped sources are interchangeable.
### DataTable and Statistics Improvement
- Excessive `DataTable` and `DataSet` usage in project, report, common, and DAL services is a primary migration concern.
- Do not mechanically replace a fixed schema with `Map<String, Object>`. Prefer a specific DTO or record and `List<SpecificDto>`; use a typed `Map<Key, Value>` only when survey dimensions or question keys are genuinely dynamic.
- Separate database retrieval, row normalization, statistical calculation, report shaping, and Excel serialization before changing frameworks.
- Treat weighting, respondent base, missing values, multiple responses, grouping, ordering, decimal precision, rounding, totals, and significance/statistical outputs as behavior contracts.
- Establish representative golden-master inputs and outputs before replacing a DataTable or Accord-based calculation. Compare correctness and performance before removing the old path.
### Java Migration Direction
- The approved destination is a Gradle-based Spring Boot backend migrated in bounded vertical slices.
- Introduce typed Java boundary and domain models rather than reproducing DataTable semantics. Preserve external response compatibility while callers remain on the current contract.
- Do not combine framework migration with an unapproved statistical-method change.
### Harness and Verification
- `AGENTS.md` and `CLAUDE.md` are generated. Edit `.agent/profile.yml` or `.agent/project.md`, then recompose instead of editing generated files.
- Use the solution's existing narrow build and test workflow. Do not connect to real databases or regenerate production reports during validation without separate approval.