Files
clean-architecture-backend-…/src/shared-contract/CLAUDE.md
T
donghyeon-ka bbccccc195 merge: integrate messaging R2 polling producer
# Conflicts:
#	docs/superpowers/specs/2026-07-28-messaging-production-capability-design.md
#	src/app-bootstrap/gradle.lockfile
#	src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/architecture/ArchitectureViolationFixtureTest.java
#	src/build.gradle
2026-08-01 00:04:02 +09:00

2.2 KiB

shared-contract — skeleton-wide operational contract

Registered identity

  • Module ID: shared-contract
  • Gradle path: :shared-contract
  • Focused test (derived from Gradle path): ./gradlew :shared-contract:test --console=plain
  • Runtime baseline: Java 21; repository framework baseline: Spring Boot 4.0.0.
  • Registry SSOT: src/config/architecture/modules.json.

Package root: dev.caskeleton.shared.

Design decisions previously kept as code comments (error-code classification, response envelope shape, metric cardinality bounds, tracing seam, domain-context propagation) live in README.md. This file stays the SSOT for module rules.

Responsibility

  • Response envelope (response/Envelope, response/ApiError, response/BulkEnvelope, response/BulkItemResult).
  • Error code contract (error/ApiErrorCode interface, error/OperationalError enum).
  • Cross-cutting mapper sentinel (error/MappingException).
  • Request value contract (request/Patch).
  • Framework-neutral Redis operational snapshot (health/RedisHealthSnapshotProvider) used by adapters and bootstrap health composition without leaking Actuator or native client types.
  • Tracing contract types (tracing/TraceParent, tracing/BaggageAllowlist, tracing/SpanErrorRecorder) — W3C traceparent value type, baggage allowlist, and the span-error-recording seam (feature-distributed-tracing-contract; the OTel tracer runtime is a fork-activated seam, so these stay Java-stdlib-only).
  • Generic messaging envelope schema resources under contracts/messaging/envelope/. They own transport-neutral envelope metadata only; feature payload schemas remain in their feature-owner modules. Resource presence is not runtime discovery or registration.

Allowed

  • Java standard library ONLY. No Spring, no Jackson, no JPA imports.

Forbidden

  • business/domain concept (domain error codes belong in the consuming module).
  • framework imports (HTTP status is expressed as transport-neutral int; the web module maps it).
  • claiming Draft 2020-12 validator compatibility before the messaging adapter's Task 6 validator qualification exists.

Test

cd src
./gradlew :shared-contract:test