# FSD Final Cleanup Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development to implement task-by-task. **Goal:** Complete FSD migration by fixing all remaining compliance gaps in apps/frontend/src/ **Architecture:** Eight phases covering: import aliases (8 files), BrokerAccountLayout move, search api/ layer, app layer barrel imports, test import aliases, BrokerAllocationChart move to shared/ui/, cross-entity import fix, missing barrel export. --- ## Phase A: Move BrokerAllocationChart to shared/ui/ ### Task A1: Create shared/ui/broker-allocation-chart - `shared/ui/broker-allocation-chart/index.ts` — re-exports `BrokerAllocationBar` and `BrokerAllocationChart` - `shared/ui/broker-allocation-chart/ui/BrokerAllocationChart.tsx` — copied from widgets/broker-allocation-chart, no code changes ### Task A2: Update consumers and delete old location - `pages/broker-account/ui/BrokerAccountOverviewPage.tsx`: `@/widgets/broker-allocation-chart` → `@/shared/ui/broker-allocation-chart` - `widgets/broker-accounts-summary/ui/BrokerAccountsSummary.tsx`: same change - `widgets/broker-account-card/ui/BrokerAccountCard.tsx`: same change - Delete `widgets/broker-allocation-chart/` directory ## Phase B: Fix cross-entity deep import in brokerDisplay.ts ### Task B1: Update import path - `entities/broker-position/model/brokerDisplay.ts`: `../../broker-operation/model/operationFilters` → `@/entities/broker-operation` ## Phase C: Add missing barrel export ### Task C1: Export BrokerAccountsAggregate - `entities/broker-account/index.ts`: add `type BrokerAccountsAggregate` export ### Task C2: Update consumer to use barrel - `widgets/broker-accounts-summary/ui/BrokerAccountsSummary.tsx`: `@/entities/broker-account/model/...` → `@/entities/broker-account` ## Verification ### Task D1: Run tests, lint, build - `npm run lint -w apps/frontend` - `npm run test -w apps/frontend` - `npm run build -w apps/frontend`