# Aglaea — Systems Deep Dive

> The `libs/aglaea/` area: 93 Nx libraries that make up Aglaea, the AI-powered
> fashion, beauty, skincare, haircare and personal-styling domain — a TypeScript
> foundation tier plus dozens of focused analysis, recommendation, try-on,
> commerce and engagement engines.

## What this area is

Aglaea (named for the Grace of beauty and adornment) is a single domain split
into many small, sharply-scoped Nx libraries rather than one monolith. Every
project lives under `libs/aglaea/<name>/` and publishes as `@aglaea/<name>`;
each is a normal buildable TypeScript library with a `src/` barrel (`index.ts`),
usually a `types.ts` (`database` and `testing` organize theirs differently), and
one or more engine modules, plus a colocated `*.spec.ts` / `*.test.ts`. There
are no empty scaffolds in this area — the smallest package is ~750 LOC and the
largest (`@aglaea/skin-analysis`) is over 10,000 LOC across 49 files. The README
at `libs/aglaea/README.md` is the canonical map of the area.

The libraries fall into a few tiers. A **foundation tier** (`core`, `database`,
`sdk`, `events`, `ai-orchestrator`, `testing`, `api-services`) owns shared
types, persistence, the client SDK, the event bus, model orchestration and
contract definitions. On top of it sit **analysis engines** (skin, body, hair,
face, nail, color, fabric) that turn images/measurements into structured
profiles; **recommendation/curation engines** (outfit, occasion, trend,
accessory families) that turn profiles into suggestions; **virtual try-on /
visualization** engines that produce render instructions; **commerce** libraries
(shopping assistants, retailer API, product passport); **personalization**
libraries (preference learning, unified profile, conversation);
**sustainability/care** libraries; **social/engagement** libraries; and
**device/integration** libraries.

The implementation style across the area is domain-specific and
science-grounded, not generic CRUD: `@aglaea/makeup-recommendation` matches
foundation shades in CIE L\*a\*b\* with Delta E, `@aglaea/weather-service`
computes PMV/PPD thermal comfort and WBGT, `@aglaea/laundry-integration` encodes
ISO 3758 care symbols, `@aglaea/ethical-ai` computes equalized-odds and
demographic-parity fairness metrics, and `@aglaea/enhanced-hair-analysis`
implements a SALT-score trichoscopy model. Most engines are pure functions and
plain data tables (the `CLASSES` surface is small); the stateful infrastructure
(caching, queues, registries, clients) is concentrated in the foundation tier.

## How it fits the wider system

The foundation tier is the hub: nearly every leaf engine depends on
`@aglaea/core` for shared types, color science, validation and cross-cutting
infra. `@aglaea/database` owns the Prisma-style schema and migrations all
persisted entities map to; `@aglaea/events` defines the domain event taxonomy
that `@aglaea/api-services` and engines emit; `@aglaea/sdk` is the typed client
external consumers use; `@aglaea/ai-orchestrator` is the seam through which
engines that need model inference route their calls (with A/B testing, fallback
and cost tracking). `@aglaea/sophia-integration` is the seam designed for
cross-domain style Q&A — a self-contained query-router over supplied knowledge
entries, intended to front a Sophia knowledge base (not an actually-wired edge).
The analysis engines are upstream of the recommendation and try-on engines (a
skin or body profile feeds outfit, makeup and fit suggestions), which in turn
feed the commerce and engagement layers. Walk the "used by" edges on any node
below to see the exact composition.

## Entity reference

### @aglaea/core

The domain foundation (`libs/aglaea/core/src`, ~10.7K LOC across 21 modules):
the shared `types.ts`/`constants.ts`, the algorithmic cores (`color-science.ts`,
`skin-analysis.ts`, `body-analysis.ts`, `hair-analysis.ts`,
`fabric-intelligence.ts`, `fashion-taxonomy.ts`, `fragrance-profiling.ts`,
`style-profiling.ts`, `trend-analysis.ts`, `recommendation-engine.ts`), plus
cross-cutting infrastructure used domain-wide —
`LRUCache`/`AglaeaCacheKeyBuilder`, `AglaeaLogger`, `ConfigManager`, the typed
`AglaeaError` hierarchy, `TokenBucketLimiter`/`SlidingWindowLimiter`,
`FeatureFlagManager` and `validation.ts`. This is the most-depended-on package
in the area.

### @aglaea/database

The persistence layer (`libs/aglaea/database/src`): per-entity schema modules
under `schema/` (`profiles`, `products`, `wardrobe`, `outfits`,
`recommendations`, `skin-analysis`, `fabrics`, `ingredients`, `trends`,
`brands`, `body-measurements`, `social`, `audit`, `feedback`, `preferences`,
`common`), a set of timestamped `migrations/`, and operational helpers
`connection-pool.ts`, `read-replica.ts` (`ReplicaRouter`) and `backup.ts`.

### @aglaea/sdk

The unified TypeScript client for external consumers (`libs/aglaea/sdk/src`):
`AglaeaClient` over an `AglaeaHttpClient`, plus `AglaeaWebSocket`, auth
providers (`ApiKeyAuthProvider`/`TokenAuthProvider`), `RetryHandler`,
`InterceptorManager`, `BatchProcessor`, `FileUploader` and the `AglaeaAPIError`
type.

### @aglaea/events

The typed domain event system (`libs/aglaea/events/src`): event type definitions
plus an in-memory transport — `InMemoryEventPublisher`, `EventConsumer`,
`InMemoryEventStore`, `DeadLetterQueue`, `EventReplayer` and `EventAnalytics`,
with `helpers.ts` for constructing/validating payloads.

### @aglaea/ai-orchestrator

Model management and inference orchestration (`libs/aglaea/ai-orchestrator/src`,
12 modules): `ModelRegistry`, `ABTestManager`, fallback strategies
(`FallbackChain`, `CachedFallback`, `DegradedFallback`), `InferenceQueue`,
`BatchInferenceProcessor`, `CostTracker`, `ModelMonitor`,
`EdgeDeploymentManager`, `ModelWarmer`, composed by the `AIOrchestrator` facade
— the seam other engines route model calls through.

### @aglaea/testing

Self-contained test utilities for the domain (`libs/aglaea/testing/src`): mock
factories, fixtures, `mock-images`, anonymization, integration helpers, plus a
`BenchmarkRunner`, `ChaosMonkey`, `SnapshotManager` and `TestContext`.

### @aglaea/api-services

The API contract/registry layer (`libs/aglaea/api-services/src`, 14 modules): a
barrel of endpoint definitions (analysis, conversation, profile, recommendation,
trends, try-on, wardrobe), their event definitions (analysis/recommendation/
social/wardrobe events) and an `api-registry`. It is contract types + endpoint/
event definitions, not a running HTTP server.

### @aglaea/skin-analysis

The flagship computer-vision skin engine (`libs/aglaea/skin-analysis/src`, 49
files, ~10.4K LOC). Biomarker detectors span acne, pores, wrinkles (forehead,
glabellar, crow's-feet, nasolabial, marionette, neck), pigmentation (melasma,
sun-spot, freckle, post-inflammatory, hypopigmentation), redness/rosacea/
inflammation, hydration/barrier, oiliness, texture, undertone, Fitzpatrick and
UV damage — over the preprocessing pipeline (`SkinImagePreprocessor`,
`face-detection`, `segmentation`, `lighting`, `quality-validation`) and a
temporal layer (`progress-comparison`, `significance-testing`,
`milestone-detection`).

### @aglaea/enhanced-skin-analysis

Advanced skin tracking layered on the base engine
(`libs/aglaea/enhanced-skin-analysis/src`): an `AdvancedBiomarker` database,
`MultiAngleFusion` (combining multiple `AngleCapture`s with quality-weighted
fusion), a `SkinAtlasEntry` reference set, and a `privacy-engine` for
sensitive-image handling.

### @aglaea/color-analysis

Personal color analysis (`libs/aglaea/color-analysis/src`, 11 modules): seasonal
classification (12 subtypes), undertone analysis, contrast analysis, palette
generation, and downstream `makeup-matching` / `hair-color-matching` /
`color-application`, built on `color-utils.ts`.

### @aglaea/body-analysis

Body-type intelligence (`libs/aglaea/body-analysis/src`): a `shape-classifier`,
`measurement-system`, `proportion-analysis`, `posture-analysis`,
`size-prediction` and `styling-recommendations`, composed into a
`body-analysis-report`.

### @aglaea/enhanced-body-measurement

A precision measurement pipeline (`libs/aglaea/enhanced-body-measurement/src`):
`MEASUREMENT_DEFINITIONS` with `getTypicalRange`/`validateMeasurement`, plus
pose-validation (`validatePose`, `checkPoseCoverage`) over a
`measurement-engine`.

### @aglaea/face-shape-analysis

Face-geometry analysis (`libs/aglaea/face-shape-analysis/src`): landmark
detection, a `face-shape-classifier`, `feature-analysis` and
`proportion-analysis`, producing `style-recommendations` (for hairstyle/
eyewear/accessory matching) and a `face-analysis-report`.

### @aglaea/hair-analysis

Hair profiling (`libs/aglaea/hair-analysis/src`): a `hair-type-classifier`,
`hair-properties` (texture/porosity), `scalp-analysis`, `hair-color-analysis`
and `care-recommendations`, composed into a `hair-analysis-report`.

### @aglaea/enhanced-hair-analysis

Advanced hair diagnostics (`libs/aglaea/enhanced-hair-analysis/src`):
`classification-scales`, `trichoscopy` (density mapping and miniaturization
ratios), `hair-shaft-analysis` (diameter classification against
`HAIR_DIAMETER_THRESHOLDS` and coefficient-of-variation thresholds, plus a
simulated pull test and `calculateSALTScore` for alopecia) and
`treatment-guidance`.

### @aglaea/nail-analysis

Nail health and style analysis (`libs/aglaea/nail-analysis/src`): a
`nail-shape-classifier`, `nail-health`, `nail-care`, composed into a
`nail-analysis-report`.

### @aglaea/fabric-identification

Textile identification (`libs/aglaea/fabric-identification/src`) grounded in
fiber characteristics and weave structures: a `fiber-identifier`,
`weave-detector`, `texture-analyzer` and an aggregate `fabric-classifier`.

### @aglaea/fabric-properties

Fabric performance and comfort data (`libs/aglaea/fabric-properties/src`): a
scientifically-grounded `performance-database` (40+ fabrics) and a
`comfort-scorer`.

### @aglaea/fit-prediction

Size and fit prediction (`libs/aglaea/fit-prediction/src`): a `size-engine`,
`fit-simulation`, `fit-issues` detection and an `alteration-engine`, composed
into a `fit-report`.

### @aglaea/comfort-prediction

Climate-aware fabric comfort prediction (`libs/aglaea/comfort-prediction/src`):
`climate-comfort` (how a fabric performs in given weather) and
`sensitivity-matching` for sensitive-skin wearers.

### @aglaea/style-taxonomy

The fashion style vocabulary (`libs/aglaea/style-taxonomy/src`):
`attribute-detection`, an `archetype-classifier` and an `occasion-classifier`
for garment feature classification and style-archetype analysis.

### @aglaea/style-evolution

Personal-style change tracking over time (`libs/aglaea/style-evolution/src`): an
`evolution-tracker` (phases/milestones), `growth-metrics`, and an
`evolution-report` with goal setting.

### @aglaea/style-history

Fashion-history intelligence (`libs/aglaea/style-history/src`): a
`decade-database`, `era-analyzer`, `revival-detector` (nostalgia/cyclical-trend
detection) and a `style-history-report`.

### @aglaea/outfit-recommendation

AI outfit generation (`libs/aglaea/outfit-recommendation/src`): a
`context-recommender` (wardrobe filtering), `look-assembler`,
`mix-match-optimizer` and an `explanation-engine` for scored, explained outfits.

### @aglaea/wardrobe-management

The digital wardrobe (`libs/aglaea/wardrobe-management/src`): `digitization`,
`organization`, `optimization` (gap analysis) and `analytics`.

### @aglaea/occasion-engine

Context-aware occasion styling (`libs/aglaea/occasion-engine/src`): expert
`event-styling` guidance for 20+ event types and a `travel-packing` algorithm.

### @aglaea/trend-forecasting

Trend detection and lifecycle modeling (`libs/aglaea/trend-forecasting/src`): a
`social-media-analyzer`, `runway-analyzer`, `trend-aggregator`,
`lifecycle-model` and a `personalized-filter`.

### @aglaea/material-trends

Material-innovation tracking (`libs/aglaea/material-trends/src`): an
`innovation-database` (25+ real material innovations with readiness levels) and
a `trend-tracker`.

### @aglaea/celebrity-style

Celebrity look matching (`libs/aglaea/celebrity-style/src`, ~5.2K LOC): a
`celebrity-database`, `style-matcher`, `affordable-alternatives` (budget
recreation) and a `style-guide-generator`.

### @aglaea/cultural-adaptation

Culture-aware styling (`libs/aglaea/cultural-adaptation/src`, ~6.3K LOC): a
`dress-code-engine`, `modest-fashion` profiling, `regional-codes` of dress norms
and a `sensitivity-checker`.

### @aglaea/inclusive-fashion

Size-inclusive and adaptive styling (`libs/aglaea/inclusive-fashion/src`):
`extended-sizes`, `adaptive-fashion` (for disability/accessibility) and
`gender-inclusive` modules.

### @aglaea/skincare-routine

Personalized skincare regimens (`libs/aglaea/skincare-routine/src`) with real
dermatological knowledge: a `routine-builder` (product layering/ingredient
interactions), `concern-recommendations` and `seasonal-adaptation`.

### @aglaea/hair-routine

Hair-care routine building for all types 1A–4C (`libs/aglaea/hair-routine/src`):
`wash-optimization`, `styling-routine` and a `treatment-scheduler`.

### @aglaea/nail-care

Nail-care intelligence (`libs/aglaea/nail-care/src`): a `nail-care-routine`,
`nail-color-recs` and a `nail-art-guide`.

### @aglaea/ingredient-intelligence

Cosmetic-chemistry knowledge (`libs/aglaea/ingredient-intelligence/src`, ~4K
LOC): a 100+-ingredient `ingredient-database` with INCI data, pH ranges and
comedogenic ratings, plus `ingredient-analysis` and an `interaction-engine`.

### @aglaea/ingredient-scanner

Product-label scanning (`libs/aglaea/ingredient-scanner/src`): INCI-list parsing
with `correctOcrErrors`, a `BarcodeLookup`, an `INGREDIENT_DATABASE`, and a
`ScanResult`/`SafetyAlert` surface checked against a `UserSensitivityProfile`.

### @aglaea/beauty-calendar

Beauty-routine scheduling (`libs/aglaea/beauty-calendar/src`): a
`treatment-scheduler` and `product-management` (expiry/usage tracking).

### @aglaea/wellness-beauty

Holistic wellness–beauty connections (`libs/aglaea/wellness-beauty/src`):
`nutrition-beauty` and `lifestyle-beauty` evidence-based guidance.

### @aglaea/aging-trajectory

Skin-aging prediction and prevention (`libs/aglaea/aging-trajectory/src`): an
`aging-predictor`, a `progression-model` and evidence-based
`prevention-scoring`.

### @aglaea/aesthetic-treatments

Non-invasive treatment intelligence (`libs/aglaea/aesthetic-treatments/src`): a
`treatment-database` and a `treatment-planner` for information, planning and
comparison.

### @aglaea/fragrance-intelligence

Scent intelligence (`libs/aglaea/fragrance-intelligence/src`): a `scent-profile`
model, `fragrance-matching` and an `application-guide` (layering/occasion).

### @aglaea/makeup-recommendation

Makeup matching (`libs/aglaea/makeup-recommendation/src`, ~4.2K LOC):
`foundation-matching` using CIE L\*a\*b\* and Delta E over a 100+-shade
database, plus `color-cosmetics` compatibility and `technique-guidance`.

### @aglaea/makeup-looks

Complete-look generation (`libs/aglaea/makeup-looks/src`): a curated
`look-generator` and a `look-customizer` that adapts looks to the user.

### @aglaea/hairstyle-recommendation

Hairstyle suggestion (`libs/aglaea/hairstyle-recommendation/src`):
`cut-recommendations`, `color-recommendations` and `styling-recommendations`.

### @aglaea/shoe-recommendation

Footwear matching (`libs/aglaea/shoe-recommendation/src`): a `shoe-engine`
covering occasion, outfit formality, body type, foot concerns, climate and heel
guidance.

### @aglaea/bag-recommendation

Handbag/bag styling (`libs/aglaea/bag-recommendation/src`): a `bag-engine` that
matches by occasion, body proportion, style preference and functional need
(including size-by-body-type).

### @aglaea/jewelry-recommendation

Jewelry matching (`libs/aglaea/jewelry-recommendation/src`): a `jewelry-engine`
keyed on face shape, neck length, skin undertone, occasion and metal matching.

### @aglaea/advanced-jewelry

Fine-jewelry/gemstone intelligence (`libs/aglaea/advanced-jewelry/src`): a
`jewelry-engine` over a `GEMSTONE_DATABASE` and `WATCH_DATABASE`, with
`InvestmentAnalysis` and `AuthenticityCheck` (gemstone hardness, provenance).

### @aglaea/watch-recommendation

Horological recommendation (`libs/aglaea/watch-recommendation/src`, ~5.2K LOC):
a `watch-database` (30+ real watches), `movement-guide`, `brand-heritage`,
`investment-analysis`, `wrist-fitting` and `watch-care`, composed by a
`watch-engine`.

### @aglaea/eyewear-recommendation

Eyewear matching (`libs/aglaea/eyewear-recommendation/src`): an `eyewear-engine`
selecting frames by face shape, measurements, style and color profile.

### @aglaea/hat-recommendation

Headwear styling (`libs/aglaea/hat-recommendation/src`) with real millinery
knowledge: a `hat-database` (32 styles), `face-shape-matching`, `hat-sizing`,
`hat-etiquette` and `hat-care`, composed by a `hat-engine`.

### @aglaea/belt-styling

Belt coordination (`libs/aglaea/belt-styling/src`, ~4K LOC): a
`buckle-taxonomy`, `leather-grading`, `belt-sizing`, `body-shape-belting`,
`belt-outfit-coordination` and `belt-care`, composed by a `belt-engine`.

### @aglaea/scarf-styling

Scarf/wrap styling (`libs/aglaea/scarf-styling/src`, ~4.3K LOC): 30+
`tying-techniques`, a `scarf-database` (25+ types), `fabric-pairing`,
`color-coordination` and `scarf-care`, composed by a `scarf-engine`.

### @aglaea/virtual-tryon-fashion

Garment virtual try-on (`libs/aglaea/virtual-tryon-fashion/src`): `body-mapping`
(mesh) and `garment-visualization` producing overlay/drape/fit render
instructions.

### @aglaea/virtual-tryon-makeup

Makeup virtual try-on (`libs/aglaea/virtual-tryon-makeup/src`): a `face-mesh`
generator and a `makeup-renderer` producing layered makeup render specs.

### @aglaea/virtual-tryon-hair

Hairstyle virtual try-on (`libs/aglaea/virtual-tryon-hair/src`):
`hair-color-viz` and `hair-style-viz` producing color/style render parameters.

### @aglaea/virtual-tryon-nails

Nail-art virtual try-on (`libs/aglaea/virtual-tryon-nails/src`, ~5.4K LOC):
`nail-shape-geometry`, `finish-rendering`, a `nail-art-renderer`,
`hand-detection` and `color-accuracy`.

### @aglaea/virtual-tryon-accessories

Accessory virtual try-on (`libs/aglaea/virtual-tryon-accessories/src`, ~5.4K
LOC): an `accessory-renderer` with per-category overlays (jewelry, eyewear, hat,
bag), `material-rendering` and `scale-proportion`.

### @aglaea/avatar-creation

Digital-avatar generation (`libs/aglaea/avatar-creation/src`): an
`avatar-generator` (from measurements/presets) and an `avatar-customizer` with
30+ adjustable parameters.

### @aglaea/before-after

Transformation preview/timeline (`libs/aglaea/before-after/src`, ~3.8K LOC): a
`transformation-engine`, `progress-curves`, `plateau-detection`,
`regression-monitor`, `seasonal-adjustment` and a `gallery-curator`.

### @aglaea/personal-shopper-ai

AI personal shopping (`libs/aglaea/personal-shopper-ai/src`): a
`SessionManager`, `intent-classifier`, `style-advisor` and `response-generator`.

### @aglaea/shopping-assistant

Product discovery and comparison (`libs/aglaea/shopping-assistant/src`):
`product-search`, a `comparison-engine`, `deal-detector`, `budget-optimizer` and
`purchase-advisor`.

### @aglaea/shopping-concierge

A premium concierge service (`libs/aglaea/shopping-concierge/src`): the
`shopping-concierge` module orchestrating high-touch styling/sourcing requests.

### @aglaea/agentic-shopping

An autonomous shopping agent (`libs/aglaea/agentic-shopping/src`): an
`agent-engine` driving a `ShoppingAgent` over `AgentAction`s, routing to
`SPECIALIST_MODELS` (`scoreSpecialistMatch`) and carrying a `StylePassport`
across a `ShoppingSession`.

### @aglaea/product-matching

Product similarity and dupe-finding (`libs/aglaea/product-matching/src`): a
`skin-profile-matcher` (scoring products against skin
type/concerns/sensitivities/ allergies) and a `dupe-finder`.

### @aglaea/retailer-api

The retailer integration layer (`libs/aglaea/retailer-api/src`): a retailer
adapter pattern with product search, price monitoring, affiliate-link generation
and inventory status.

### @aglaea/digital-product-passport

Product provenance and ESPR compliance
(`libs/aglaea/digital-product-passport/src`, ~4.4K LOC): a `dpp-engine` plus
`espr-compliance`, `blockchain` anchoring, `data-carriers`, `supply-chain`,
`repair-score`, `end-of-life` and `green-claims` verification, with
circularity/MCI scoring helpers.

### @aglaea/preference-learning

The preference ML pipeline (`libs/aglaea/preference-learning/src`):
`explicit-capture`, `implicit-detection`, a `TasteGraph`, a
`collaborative-filter`, `cold-start` handling and `feedback-loops`.

### @aglaea/lifestyle-profiler

Lifestyle analysis for styling (`libs/aglaea/lifestyle-profiler/src`): an
`activity-profiler`, `budget-profiler` and `style-personality` assessment,
composed into a `lifestyle-report`.

### @aglaea/unified-profile

Cross-module profile aggregation (`libs/aglaea/unified-profile/src`): a
`profile-aggregator`, `cross-analysis` insights, a `recommendation-router` and a
`profile-sync` manager.

### @aglaea/memory-system

Interaction memory and context (`libs/aglaea/memory-system/src`): the
`memory-system` module that stores and recalls user interaction context for
continuity across consultations.

### @aglaea/conversation-engine

Natural-language style consultation (`libs/aglaea/conversation-engine/src`,
~3.2K LOC): `intent-classification`, `entity-extraction`, `dialogue-state`,
`conversation-flow` and `response-generation`.

### @aglaea/multi-modal-input

Multi-modal input processing (`libs/aglaea/multi-modal-input/src`): the
`multi-modal-input` module handling voice, image and text input.

### @aglaea/sustainability-scoring

Fabric-level sustainability scoring (`libs/aglaea/sustainability-scoring/src`):
LCA-based `fabric-scoring` (fiber lifecycle data) and `supply-chain` assessment.

### @aglaea/sustainable-fashion

Eco-fashion intelligence (`libs/aglaea/sustainable-fashion/src`): an
`impact-calculator`, a `certification-verifier`, `circular-economy` features and
a `sustainability-report`.

### @aglaea/care-intelligence

Garment-care intelligence (`libs/aglaea/care-intelligence/src`): a `care-guide`
with expert instructions for 40+ fabrics and a `longevity-estimator`.

### @aglaea/laundry-integration

Textile-care science (`libs/aglaea/laundry-integration/src`, ~5.6K LOC): ISO
3758 `care-symbols` interpretation, evidence-based `stain-treatment`,
`detergent-matching`, `load-optimization`, `hygiene-science` and
`seasonal-care`.

### @aglaea/generative-design

AI fashion-design generation (`libs/aglaea/generative-design/src`): a
`design-engine` that parses a `DesignPrompt` into `ParsedDesignAttributes`,
producing a `GeneratedDesign`, `MoodBoard` and `VisualizationSpec` (design
description/spec output, not pixel rendering).

### @aglaea/style-coaching

AI style coaching and education (`libs/aglaea/style-coaching/src`): a
`coaching-plan` builder over a `lesson-database`.

### @aglaea/style-communities

Social style communities (`libs/aglaea/style-communities/src`): community/
membership management, challenges, content moderation and trending detection.

### @aglaea/outfit-sharing

Outfit sharing (`libs/aglaea/outfit-sharing/src`): post creation,
platform-specific formatting, share-analytics tracking and an outfit-tagging
system.

### @aglaea/inspiration-feed

The style inspiration feed (`libs/aglaea/inspiration-feed/src`, ~4.6K LOC):
`feed-algorithms`, `content-sources` aggregation (with a `SourceRateLimiter`), a
`personalization-engine`, `content-scoring` and a `diversity-engine`.

### @aglaea/expert-network

The human-stylist marketplace (`libs/aglaea/expert-network/src`): expert
profiling, matching, consultation scheduling and a review system.

### @aglaea/family-features

Family/group styling (`libs/aglaea/family-features/src`, ~3.3K LOC): a
`family-engine`, `growth-tracking` (height percentiles, `predictHeight6Months`,
`heightToChildSize`, next-size-up date prediction), `hand-me-down` planning,
`child-safety` and `family-coordination`.

### @aglaea/event-prep

Event-specific styling preparation (`libs/aglaea/event-prep/src`): the
`event-prep` module that builds preparation plans for a specific event.

### @aglaea/calendar-integration

Calendar-aware styling (`libs/aglaea/calendar-integration/src`): event
extraction, dress-code inference, outfit-reminder scheduling and packing-list
generation from calendar/travel events.

### @aglaea/gamification

Style gamification (`libs/aglaea/gamification/src`): achievements, badges,
challenges, streaks, a point system and leaderboards.

### @aglaea/smart-mirror

Smart-mirror integration (`libs/aglaea/smart-mirror/src`, ~4.4K LOC): a
`mirror-protocol` with session/capability negotiation, AR-overlay generation,
`hardware-profiles`, a `lighting-engine`, an `interaction-engine` and a
`widget-system`.

### @aglaea/smart-device

IoT/wearable closet ecosystem (`libs/aglaea/smart-device/src`): `rfid-tracking`
of garments, `environment-monitor` (textile science), `body-composition`,
`wearable-integration` and `mirror-lighting`.

### @aglaea/biometric-integration

Health-data personalization (`libs/aglaea/biometric-integration/src`): a
`biometric-collector`, `appearance-impact` assessment and `trend-analysis` over
collected metrics.

### @aglaea/weather-service

Weather-aware styling (`libs/aglaea/weather-service/src`, ~3.7K LOC): thermal
comfort modeling (PMV/PPD), wind chill, heat index and WBGT in
`thermal-calculations`, plus a `layering-system`, `precipitation-gear`,
`uv-protection`, `air-quality` and an `outfit-planner`.

### @aglaea/sophia-integration

Cross-domain knowledge integration (`libs/aglaea/sophia-integration/src`, ~5K
LOC): `query-routing` of style Q&A over supplied knowledge entries, a
`citation-engine`, `knowledge-domains` mapping and `research-enhancement` of
recommendations. This is the seam designed to front a Sophia knowledge base —
self-contained, not an actually-wired cross-domain edge.

### @aglaea/ethical-ai

Bias detection and fairness (`libs/aglaea/ethical-ai/src`, ~3.5K LOC): a
`fairness-metrics` module computing demographic parity, equalized odds, equal
opportunity, predictive parity, calibration and treatment equality
(`runComprehensiveFairnessAudit`), plus a `bias-engine`, `intersectional-bias`,
`inclusive-language`, `database-gaps`, `remediation` and `model-card`
generation.
