Run pnpm app-migrate check and pnpm app-migrate lint in the directory in src/ you wish to migrate. These commands will flag any potential lint rule violations that must be fixed before the code can be migrated.
Scaffold out a new app by running pnpm scaffold app. This will scaffold out the requisite files and directory structure for a new app.
Copy over the code from src/ using git mv to preserve the code's git history.
Run pnpm migrate-deps app/<appname> to automatically extract the dependencies your code requires and add the correct versions to the app's package.json. Run pnpm install once you've verified the dependencies are correct.