Skip to content

entitlement-service Alias Task

Agent workflow: follow README.md for Audit -> Investigate -> Code -> Test -> Fix; keep this pack's writable scope and verification commands authoritative.

Dispatch type: orchestrator

Owner: usage-service.

Canonical service name: usage-service.

Purpose:

The product language may say entitlement service, but the Go service is scaffolded as usage-service. This avoids split ownership between quota counters and entitlement checks.

This is not a coding pack. Route implementation work through docs/agents/service-tasks/usage-service.md. This alias pack is docs-only unless a later ADR renames usage-service.

Rules:

  • Do not create both services/usage-service and services/entitlement-service.
  • Put feature gates, usage counters, quota periods, and check/consume APIs in usage-service.
  • Billing emits plan entitlement events; usage-service materializes feature gates and quotas.
  • AI/import/file/question services call usage-service; they do not locally own plan logic.

Legacy source evidence:

  • /Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/src/modules/wallet/az-credit*.ts
  • quota and package limit callers under /Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/src/modules/**.

Writable files:

  • docs/agents/service-tasks/entitlement-service.md

Orchestrator-owned files:

  • Billing entitlement event contracts, wallet debit/grant orchestration, workload service integrations, gateway route cutovers, and shared deploy manifests.

Acceptance:

  • New quota/entitlement work extends services/usage-service unless a later architecture decision explicitly renames it.
  • Docs may mention entitlement as a concept, but task ownership routes to usage-service.
  • No duplicated quota/entitlement tables are introduced under another service.

Verification:

  • Foundation checks live in docs/agents/service-tasks/usage-service.md.
  • Agent ownership is usage-service; do not spawn a separate entitlement-service implementation worker unless a later architecture decision renames the service.

Go-platform documentation is generated from repository Markdown.