Files
contact-server/.agent/references/repository-rules.md

31 lines
2.8 KiB
Markdown

## KriContact Server Repository Rules
### Product Purpose and Current Phase
- This is the launched Java 17 and Spring Boot backend for KRI contact operations. Preserve first-release API and data behavior while delivering approved follow-up features.
- The domain includes projects, contact lists and headers/items, uploads and downloads, assignments, call sessions, call/event/update histories, progress, scenarios and images, result codes, users, companies, roles, message templates, reservations, SMS, and email workflows.
- Prefer domain correctness, operational safety, and backward-compatible evolution over broad refactoring.
### Domain Invariants and API Compatibility
- Preserve company, project, role, and user authorization boundaries for every query and mutation.
- Treat list schemas, uploaded columns, item values, filtering, reset/update operations, assignments, and all history records as one coordinated consistency boundary.
- Make call start, close, and hang-up state transitions explicit and idempotent where retries or duplicate requests are possible.
- Preserve external-list endpoint request, response, authentication, error, and pagination behavior as a consumer contract.
- Validate file names, paths, sizes, content handling, storage lifecycle, and cleanup scheduling at boundaries. Do not expose server paths or retain files beyond the approved lifecycle.
- Do not send real SMS or email, initiate real calls, or invoke production business integrations during development or validation.
### Shared Library and Integrations
- Consume `com.kri.common:starter:beta.1.6.3`. Do not change this approved version or duplicate an available KriCommon feature without separate explicit approval.
- Import public KriCommon APIs from `com.kri.common.feature.*` and keep application code out of KriCommon runtime internals.
- Treat IntranetExtension, NotiHub, ShortUrl, CTI, file storage, and other external dependencies as explicit boundaries with validated inputs, timeouts, error mapping, retry/idempotency decisions, and safe rollback behavior.
- Never log API keys, credentials, full message bodies, telephone numbers in bulk, uploaded list contents, or unrestricted personal information.
### Persistence and Verification
- Preserve MySQL transaction boundaries, QueryDSL/JPA ownership, locking, ordering, null, date/time, and generated-key behavior.
- Do not edit generated QueryDSL sources directly. Change source entities and regenerate only through the repository workflow when required.
- `AGENTS.md` and `CLAUDE.md` are generated. Edit `.agent/profile.yml` or `.agent/project.md`, then recompose instead of editing generated files.
- Use the Gradle Wrapper and run the narrowest safe compile and focused tests. Do not start the service, connect to a real database, or call external integrations without separate approval.