docs: add agent harness instructions

This commit is contained in:
2026-08-07 11:18:59 +09:00
parent a78b0d03ef
commit 76abe88db0
5 changed files with 337 additions and 0 deletions

34
.agent/profile.yml Normal file
View File

@@ -0,0 +1,34 @@
schema_version: 1
project:
id: kart-api-newssak
name: KART API NEWSSAK
type: internal-service
layer: backend
legacy: true
stack:
- dotnet-csharp
databases:
- id: kart
engine: mssql
role: kart-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
- id: newssak
engine: mysql
role: newssak-survey-data
migration:
status: planned
target_stack:
- java-springboot
strategy: staged

26
.agent/project.md Normal file
View File

@@ -0,0 +1,26 @@
## KART API NEWSSAK Repository Rules
### Repository Role and Boundaries
- This .NET 8 Web API processes and aggregates NEWSSAK survey data and integrates with KART, KON, KIWI, and intranet data sources.
- Treat endpoint contracts, report shapes, Excel output, calculation results, and operational behavior as current compatibility contracts.
- Keep MySQL and MSSQL access paths, SQL dialects, connection selection, result shapes, and transaction assumptions separate. Do not move a query between DAL implementations merely because its result looks similar.
### 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 for genuinely dynamic survey dimensions or question keys.
- 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 or cross-database behavior 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.