Eve library

ADR-0003: Stub Service Remediation Decisions

ADR

Revision 1

On this page

Status#

Accepted

Context#

Several services were shipping placeholder logic that blocks realistic validation and rollout confidence:

  • spiritual-embeddings: returns a static [0.42, 0.84, 0.21] vector for every request.
  • token-verification: treats any token starting with valid- as authentic.
  • meditation-generation: has basic script/LLM/TTS plumbing but lacks safeguards around generation quality.
  • spiritual-guidance: returns a single canned guidance string regardless of input.
  • yoga-practice: mostly functional but needs consistency checks across pose library, sequences, and posture analysis.

We need to decide whether to keep or remove these services and how to mature them.

Decision#

  • Keep all five services and move them toward production-grade implementations rather than removing them.
  • Service-specific direction:
    • spiritual-embeddings: replace static vectors with a pluggable embedding provider interface (CPU fallback + remote provider), add dimension/model metadata validation, and emit trace IDs for downstream correlation.
    • token-verification: perform proper JWT/signature validation (issuer/audience/scope checks), enrich responses with rotation and risk signals, and add replay detection hooks.
    • meditation-generation: keep service; add guardrails (content filters, duration pacing, latency budget enforcement) and persist generated scripts for observability.
    • spiritual-guidance: keep service; introduce prompt templating with configurable personas plus content safety filters, and stream guidance chunks when available.
    • yoga-practice: keep service; harden pose/sequence validation, ensure posture analysis handles empty or noisy keypoints, and add coverage for injury-aware sequences.

Consequences#

  • No service directories are removed; workspace manifests remain unchanged.
  • Each service now requires incremental implementation work to meet the outlined direction above.
  • Additional tests and health/observability hooks must be added as part of the implementation effort.

Next Steps#

  • Add provider interfaces and tests for spiritual-embeddings and token-verification to replace the current shortcuts.
  • Expand meditation-generation and spiritual-guidance with safety/quality guardrails and streaming or persistence where applicable.
  • Add validation and regression tests for yoga-practice sequences and posture analysis paths.