Context
Specs client:dto-* require DTO types to be imported from a shared package or generated from the same schema source as @specd/api / OpenAPI. Today @specd/api and @specd/client maintain hand-written parallel interfaces (e.g. GraphStatusDto, ProjectGraphSummaryDto, GraphHealthWarningDto).
Parity is enforced today by TypeScript compile + presenter/integration tests, but manual duplication risks silent drift when one side changes without the other.
Problem
- Two sources of truth for wire shapes (
packages/api/src/delivery/http/dto/* vs packages/client/src/dto/*)
- New fields (like
warnings[], fingerprintMismatch) must be updated in both places
- Spec wording expects single-source or codegen, not mirror-by-convention
Proposed directions (pick one in design)
- OpenAPI → client codegen — generate or re-export client types from the same OpenAPI/Zod schemas that feed API presenters
- Shared
@specd/dto (or similar) — move wire DTOs to a small package consumed by both api and client
- Client re-exports API types — if dependency direction allows (may conflict with current layering)
Acceptance criteria
References
- Change:
studio-graph-health-warnings
- Compliance report:
specd-sdd/changes/20260701-090344-studio-graph-health-warnings/reports/20260701-163015/specs-compliance-change-studio-graph-health-warnings-20260701-163015.md
- Related specs:
api:dto-graph-status, api:dto-project-status, client:dto-graph-status, client:dto-project-status
Priority
Low / tech debt — no production defect identified; follow-up after graph health warnings ships.
Context
Specs
client:dto-*require DTO types to be imported from a shared package or generated from the same schema source as@specd/api/ OpenAPI. Today@specd/apiand@specd/clientmaintain hand-written parallel interfaces (e.g.GraphStatusDto,ProjectGraphSummaryDto,GraphHealthWarningDto).Parity is enforced today by TypeScript compile + presenter/integration tests, but manual duplication risks silent drift when one side changes without the other.
Problem
packages/api/src/delivery/http/dto/*vspackages/client/src/dto/*)warnings[],fingerprintMismatch) must be updated in both placesProposed directions (pick one in design)
@specd/dto(or similar) — move wire DTOs to a small package consumed by bothapiandclientAcceptance criteria
client:dto-*spec scenarios for "types are shared or generated" satisfied without advisory caveatReferences
studio-graph-health-warningsspecd-sdd/changes/20260701-090344-studio-graph-health-warnings/reports/20260701-163015/specs-compliance-change-studio-graph-health-warnings-20260701-163015.mdapi:dto-graph-status,api:dto-project-status,client:dto-graph-status,client:dto-project-statusPriority
Low / tech debt — no production defect identified; follow-up after graph health warnings ships.