Skip to content

architecture: ensure business rules live in data layer with web UX and agentic parity #741

@Sealjay

Description

@Sealjay

Context

Business rules (game mechanics, validation, state transitions) should be enforced at the data/service layer, not duplicated across the web frontend and agentic interfaces. Both the web UX and the agentic layer should be thin clients over the same business logic.

Tasks

  • Audit where business rules currently live — identify rules duplicated in frontend, backend routes, and agent code
  • Refactor business rules into the service/data layer so they are enforced regardless of access method
  • Ensure the web UX and agentic layer have feature parity — anything doable via the UI should be doable via agent API
  • Create a feature matrix mapping UI features to API endpoints to agent capabilities
  • Identify any features that exist in only one layer and plan convergence

Why

If business rules are scattered across layers, the web UI and agent can produce inconsistent results. A single source of truth in the data/service layer ensures correctness regardless of how the system is accessed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions