Use the narrative brief first, then execute the step summary in order.
When to use this workflow
Use this workflow after Bolt gets the app running but before the repository becomes the source of truth for a team. The cleanup should make the project easier to reason about without changing what users see.
Cleanup prompt
This is a Bolt-generated app. Start with read-only inspection.
Return an inventory of:
- Framework and routing
- State/data flow
- Styling system
- Environment variables and external services
- Duplicate components or dependencies
- Build/test commands
Then propose the smallest cleanup branch that preserves behavior.Safe cleanup sequence
Run cleanup in passes:
- Commit the raw generated state.
- Delete unreachable files only after import search confirms they are unused.
- Consolidate duplicated components that have identical behavior.
- Move mocked data and API adapters behind named modules.
- Run build after each meaningful pass.
Risk areas
Bolt projects often hide risk in package sprawl, generated environment access, and client-only assumptions. Claude Code should explicitly check for secrets in frontend code, unused packages, and routes that only work in the dev server.
Done criteria
The cleanup is done when the app still behaves like the Bolt baseline, the project structure is explainable, dependency risk is lower, and the next production task has a clear owner.