Skip to content

Single-source requirement and traceability enums across backend, frontend, and MCP #433

@Brad-Edwards

Description

@Brad-Edwards

Raised from the 2026-03-28 full-codebase architecture and code-quality review.

Problem

Backend enums, MCP enums, and frontend enums are not single-sourced. The frontend currently exposes unsupported values for requirement type, artifact type, and link type.

Evidence

Backend/MCP agree:

  • backend/src/main/java/com/keplerops/groundcontrol/domain/requirements/state/RequirementType.java
  • backend/src/main/java/com/keplerops/groundcontrol/domain/requirements/state/ArtifactType.java
  • backend/src/main/java/com/keplerops/groundcontrol/domain/requirements/state/LinkType.java
  • mcp/ground-control/lib.js

Frontend drift:

  • frontend/src/types/api.ts
  • frontend/src/components/requirement-form.tsx
  • frontend/src/components/traceability-form.tsx
  • frontend/src/pages/analysis.tsx
  • frontend/src/pages/requirements.tsx
  • frontend/src/components/ui/badge.tsx

Why this matters

The UI currently offers impossible states like PERFORMANCE, SECURITY, DATA, GITHUB_PR, TRACES_TO, and DERIVED_FROM. This causes avoidable runtime failures and guarantees contract drift will recur.

Definition of done

  • Establish one source of truth for API enums and request contracts.
  • Remove unsupported enum values from the frontend.
  • Align create/edit form validation with backend-required fields.
  • Add a contract check so backend/frontend/MCP enum drift fails fast in CI.
  • Add a regression test covering the current mismatch class.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions