26 / 139 · 13 Browser Automation with Playwright · Quick Start Preparation: Turn Discovery into a Scaffolding-Ready Package← prev⊞ allnext →☰ Read as one page
2.6Step 2 — Normalize naming before scaffolding
The scaffolding phase gets much better when naming is normalized first.
Normalize these categories
Page names
Choose one canonical name per page or screen.
Examples:
CheckoutPageOrderHistoryPageAccountSettingsPage
Avoid drift like:
- “Account Page”
- “Settings”
- “Profile screen”
- “User settings page”
if they really mean the same thing.
API client domains
Choose one canonical name per endpoint family.
Examples:
AuthClientOrdersClientCatalogClientUsersClient
Flow names
Choose names that represent business behavior.
Examples:
checkout.flow.tslogin.flow.tsaccount-recovery.flow.ts
Component object names
Use these only where repeated UI fragments justify them.
Examples:
Header.tsSidebar.tsToast.tsCartDrawer.ts
Why this matters
If names are unstable during scaffolding, the repo will start with drift and future agents will amplify it.