# Silent `Math.random()` REPLACE Batch Plan (V1-P2-3402)

Generated by `scripts/p2/gen-replace-plan.py` from
`docs/releases/p2/silent-random-classification.md`.

Each REPLACE candidate from V1-P2-3401 has been grouped into a "batch" of ≤5
files (one logical commit / PR-equivalent unit). Batches are routed to the §41.2
per-domain atomic item that owns the actual REPLACE work — that is the worksheet
a contributor picks up. This plan is the scheduling layer; the §41.2 items are
the implementation layer.

## Summary

- 735 REPLACE candidates
- 51 unique files
- 17 logical batch units (≤5 files each)
- 14 domains

## Batches by Domain

Within each domain, batches are ordered by site density (densest first). Each
batch lists its files, the per-file site count, and a suggested
conventional-commit subject.

### `apps/aphrodite` → owned by V1-P2-3410

624 REPLACE site(s) across 15 file(s), split into 3 batch(es).

#### Batch B1: V1-P2-3410.1

- **Files** (5, 349 site(s)):
  - `apps/aphrodite/admin-bi-dashboard/src/routes/content.ts` — 91 site(s)
    (lines: 56, 57, 59, 66, 67, 68, 92, 94, 95, 154...)
  - `apps/aphrodite/admin-bi-dashboard/src/routes/compliance.ts` — 89 site(s)
    (lines: 55, 56, 57, 58, 206, 207, 209, 213, 225, 226...)
  - `apps/aphrodite/admin-bi-dashboard/src/routes/users.ts` — 82 site(s) (lines:
    55, 56, 57, 58, 59, 60, 61, 64, 65, 66...)
  - `apps/aphrodite/analytics-dashboard/src/routes/engagement.ts` — 51 site(s)
    (lines: 79, 85, 86, 87, 94, 99, 108, 123, 138, 139...)
  - `apps/aphrodite/analytics-dashboard/src/routes/dashboards.ts` — 36 site(s)
    (lines: 113, 114, 115, 116, 130, 132, 145, 147, 148, 159...)
- **Suggested commit**:
  `feat(aphrodite): replace silent math.random with real computation in aphrodite batch B1 (v1-p2-3402)`
- **Rules in batch**: `analytics-fake-metric`, `fake-confidence-score`
- **Rationale**: Analytics/BI/compliance/revenue route synthesizes a metric
  value

#### Batch B2: V1-P2-3410.2

- **Files** (5, 170 site(s)):
  - `apps/aphrodite/analytics-dashboard/src/websocket/handler.ts` — 35 site(s)
    (lines: 279, 280, 281, 282, 283, 289, 290, 291, 292, 295...)
  - `apps/aphrodite/admin-bi-dashboard/src/routes/platform.ts` — 34 site(s)
    (lines: 54, 55, 57, 58, 59, 60, 63, 68, 69, 70...)
  - `apps/aphrodite/analytics-dashboard/src/routes/revenue.ts` — 34 site(s)
    (lines: 113, 114, 115, 116, 117, 118, 139, 140, 164, 295...)
  - `apps/aphrodite/analytics-dashboard/src/routes/viewers.ts` — 34 site(s)
    (lines: 83, 193, 217, 285, 331, 332, 466, 560, 569, 585...)
  - `apps/aphrodite/analytics-dashboard/src/routes/trends.ts` — 33 site(s)
    (lines: 103, 108, 120, 125, 137, 142, 154, 159, 171, 176...)
- **Suggested commit**:
  `feat(aphrodite): replace silent math.random with real computation in aphrodite batch B2 (v1-p2-3402)`
- **Rules in batch**: `analytics-fake-metric`, `fake-confidence-score`
- **Rationale**: Analytics/BI/compliance/revenue route synthesizes a metric
  value

#### Batch B3: V1-P2-3410.3

- **Files** (5, 105 site(s)):
  - `apps/aphrodite/admin-bi-dashboard/src/routes/revenue.ts` — 32 site(s)
    (lines: 56, 75, 76, 99, 101, 170, 173, 174, 175, 176...)
  - `apps/aphrodite/analytics-dashboard/src/routes/predictions.ts` — 27 site(s)
    (lines: 584, 585, 592, 611, 612, 614, 615, 623, 624, 633...)
  - `apps/aphrodite/analytics-dashboard/src/routes/exports.ts` — 23 site(s)
    (lines: 49, 50, 110, 111, 205, 206, 207, 208, 209, 210...)
  - `apps/aphrodite/analytics-dashboard/src/routes/alerts.ts` — 14 site(s)
    (lines: 249, 252, 254, 259, 262, 263, 264, 292, 295, 581...)
  - `apps/aphrodite/analytics-dashboard/src/routes/health.ts` — 9 site(s)
    (lines: 84, 93, 94, 98, 99, 103, 116, 117, 118)
- **Suggested commit**:
  `feat(aphrodite): replace silent math.random with real computation in aphrodite batch B3 (v1-p2-3402)`
- **Rules in batch**: `analytics-fake-metric`
- **Rationale**: Analytics/BI/compliance/revenue route synthesizes a metric
  value

### `libs/iris` → owned by V1-P2-3411

30 REPLACE site(s) across 10 file(s), split into 2 batch(es).

#### Batch B4: V1-P2-3411.1

- **Files** (5, 25 site(s)):
  - `libs/iris/multimodal/vision/understanding/src/image-analyzer.ts` — 9
    site(s) (lines: 235, 410, 479, 781, 803, 825, 913, 1006, 1017)
  - `libs/iris/multimodal/vision/documents/src/document-parser.ts` — 7 site(s)
    (lines: 260, 512, 683, 723, 849, 868, 1062)
  - `libs/iris/multimodal/vision/video/src/video-analyzer.ts` — 4 site(s)
    (lines: 399, 824, 859, 1968)
  - `libs/iris/testing/src/regression/tests.ts` — 3 site(s) (lines: 232,
    270, 308)
  - `libs/iris/multimodal/voice/recognition/src/speaker/speaker-diarization.ts`
    — 2 site(s) (lines: 119, 465)
- **Suggested commit**:
  `feat(iris): replace silent math.random with real computation in iris batch B4 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

#### Batch B5: V1-P2-3411.2

- **Files** (5, 5 site(s)):
  - `libs/iris/agents/multi-agent/src/orchestrator.ts` — 1 site(s) (lines: 522)
  - `libs/iris/integrations/sophia/src/agents/research-assistant-agent.ts` — 1
    site(s) (lines: 536)
  - `libs/iris/integrations/sophia/src/research/research-assistant-service.ts` —
    1 site(s) (lines: 264)
  - `libs/iris/multimodal/spatial/src/spatial-impl.ts` — 1 site(s) (lines: 957)
  - `libs/iris/testing/src/mocks/voice-provider.ts` — 1 site(s) (lines: 683)
- **Suggested commit**:
  `feat(iris): replace silent math.random with real computation in iris batch B5 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `apps/aja` → owned by V1-P2-3416

27 REPLACE site(s) across 4 file(s), split into 1 batch(es).

#### Batch B6: V1-P2-3416.1

- **Files** (4, 27 site(s)):
  - `apps/aja/svc-reference-video/src/scene-detection.ts` — 16 site(s) (lines:
    263, 284, 285, 286, 289, 290, 291, 321, 324, 726...)
  - `apps/aja/cli/src/commands/inspect.ts` — 5 site(s) (lines: 341, 342, 343,
    344, 345)
  - `apps/aja/svc-motion-ai/src/live-motion-capture/realtime-pose-estimation.ts`
    — 5 site(s) (lines: 1163, 1194, 1201, 1259, 1260)
  - `apps/aja/svc-reference-video/src/metadata-extraction.ts` — 1 site(s)
    (lines: 526)
- **Suggested commit**:
  `feat(aja): replace silent math.random with real computation in aja batch B6 (v1-p2-3402)`
- **Rules in batch**: `cv-fake-pipeline-metric`
- **Rationale**: File is in an Aja CV pipeline (scene-detection / motion /
  inspect

### `yaa/packages` → owned by V1-P2-3429

21 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B7: V1-P2-3429.1

- **Files** (1, 21 site(s)):
  - `yaa/packages/social/analytics-dashboard/src/mock-datasource.ts` — 21
    site(s) (lines: 163, 166, 167, 168, 169, 171, 172, 173, 174, 175...)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in packages batch B7 (v1-p2-3402)`
- **Rules in batch**: `analytics-fake-metric`
- **Rationale**: Analytics/BI/compliance/revenue route synthesizes a metric
  value

### `libs/aphrodite` → owned by V1-P2-3410

12 REPLACE site(s) across 5 file(s), split into 1 batch(es).

#### Batch B8: V1-P2-3410.1

- **Files** (5, 12 site(s)):
  - `libs/aphrodite/thumbnail-generation/src/frame-analyzer.ts` — 5 site(s)
    (lines: 583, 1020, 1068, 1118, 1161)
  - `libs/aphrodite/ar-overlays/src/index.ts` — 4 site(s) (lines: 355, 398,
    417, 418)
  - `libs/aphrodite/biometric-engine/src/mediapipe/mediapipe.ts` — 1 site(s)
    (lines: 1567)
  - `libs/aphrodite/content-tagging/src/content-tagger.ts` — 1 site(s)
    (lines: 146)
  - `libs/aphrodite/vod-chaptering/src/index.ts` — 1 site(s) (lines: 355)
- **Suggested commit**:
  `feat(aphrodite): replace silent math.random with real computation in aphrodite batch B8 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `apps/lilith` → owned by V1-P2-3412

8 REPLACE site(s) across 5 file(s), split into 1 batch(es).

#### Batch B9: V1-P2-3412.1

- **Files** (5, 8 site(s)):
  - `apps/lilith/svc-ai/src/agent-coordination.ts` — 4 site(s) (lines: 273, 292,
    367, 405)
  - `apps/lilith/svc-ai/src/agent-executor.ts` — 1 site(s) (lines: 656)
  - `apps/lilith/svc-ai/src/domain-agents.ts` — 1 site(s) (lines: 820)
  - `apps/lilith/svc-ai/src/rpg-political-intrigue/political-intrigue-service.ts`
    — 1 site(s) (lines: 794)
  - `apps/lilith/svc-media/src/transcripts/transcript-processor.ts` — 1 site(s)
    (lines: 346)
- **Suggested commit**:
  `feat(lilith): replace silent math.random with real computation in lilith batch B9 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `libs/psyche` → owned by V1-P2-3415

4 REPLACE site(s) across 2 file(s), split into 1 batch(es).

#### Batch B10: V1-P2-3415.1

- **Files** (2, 4 site(s)):
  - `libs/psyche/avatar-training/src/preprocessing.ts` — 2 site(s) (lines:
    727, 746)
  - `libs/psyche/tavus-conversation/src/transcripts.ts` — 2 site(s) (lines:
    655, 672)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in psyche batch B10 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `apps/oshun` → owned by V1-P2-3423

2 REPLACE site(s) across 2 file(s), split into 1 batch(es).

#### Batch B11: V1-P2-3423.1

- **Files** (2, 2 site(s)):
  - `apps/oshun/web/src/components/domains/arete/AreteGoalSystem.tsx` — 1
    site(s) (lines: 1658)
  - `apps/oshun/web/src/lib/arete/arete-simulation-data.ts` — 1 site(s)
    (lines: 1974)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in oshun batch B11 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `libs/oya` → owned by V1-P2-3420

2 REPLACE site(s) across 2 file(s), split into 1 batch(es).

#### Batch B12: V1-P2-3420.1

- **Files** (2, 2 site(s)):
  - `libs/oya/core/src/advanced-pose-estimation.ts` — 1 site(s) (lines: 3328)
  - `libs/oya/core/src/sam-integration.ts` — 1 site(s) (lines: 4321)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in oya batch B12 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `apps/arete` → owned by V1-P2-3429

1 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B13: V1-P2-3429.1

- **Files** (1, 1 site(s)):
  - `apps/arete/web/src/pages/vision/VisionPage.tsx` — 1 site(s) (lines: 363)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in arete batch B13 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `libs/mnemosyne` → owned by V1-P2-3429

1 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B14: V1-P2-3429.1

- **Files** (1, 1 site(s)):
  - `libs/mnemosyne/aesthetics/src/aesthetics.ts` — 1 site(s) (lines: 597)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in mnemosyne batch B14 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `libs/saraswati` → owned by V1-P2-3429

1 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B15: V1-P2-3429.1

- **Files** (1, 1 site(s)):
  - `libs/saraswati/drones/src/delivery/delivery.ts` — 1 site(s) (lines: 813)
- **Suggested commit**:
  `feat(saraswati): replace silent math.random with real computation in saraswati batch B15 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `libs/veritas` → owned by V1-P2-3414

1 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B16: V1-P2-3414.1

- **Files** (1, 1 site(s)):
  - `libs/veritas/newsletter/src/newsletters.ts` — 1 site(s) (lines: 1083)
- **Suggested commit**:
  `feat(shared): replace silent math.random with real computation in veritas batch B16 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;

### `scripts/lilith` → owned by V1-P2-3429

1 REPLACE site(s) across 1 file(s), split into 1 batch(es).

#### Batch B17: V1-P2-3429.1

- **Files** (1, 1 site(s)):
  - `scripts/lilith/comprehensive-todos-implementation.ts` — 1 site(s)
    (lines: 687)
- **Suggested commit**:
  `feat(lilith): replace silent math.random with real computation in lilith batch B17 (v1-p2-3402)`
- **Rules in batch**: `fake-confidence-score`
- **Rationale**: `confidence`/`score`/`accuracy`/etc. assigned from Math.random;
