-
Notifications
You must be signed in to change notification settings - Fork 0
Migration Playbook
IntentFlow can be adopted feature by feature. Do not rewrite an app at once.
- Pick one painful feature.
- List current states.
- Convert UI actions into intents.
- Convert callbacks into events.
- Move transition decisions into a reducer.
- Move side effects into an effect handler.
- Keep existing UI as an adapter.
- Add tests.
- Add AI manifest only after the human contract is clear.
Move behavior out of view controllers.
| MVC Problem | IntentFlow Move |
|---|---|
| spinner state in controller | feature state plus projection |
| button handler owns network call | intent plus effect |
| callback pushes next screen | event plus route |
| controller stores workflow flags | explicit state enum |
Split overloaded ViewModels.
| ViewModel Responsibility | IntentFlow Destination |
|---|---|
@Published isLoading |
State.loading plus projection |
| button handlers | Intent |
| API callback handling | Event |
| service calls | EffectHandler |
| navigation closures | Route |
| parent callbacks | Output |
| display formatting | Projection |
The ViewModel can temporarily wrap FlowStore during migration.
Keep coordinators if they are useful as route interpreters.
IntentFlow changes where navigation decisions are made:
Reducer emits Route -> Coordinator interprets Route
The reducer decides that navigation should happen. The coordinator decides how.
Map carefully:
| VIPER | IntentFlow |
|---|---|
| Entity | Domain model |
| Interactor | Effect handler or capability |
| Presenter | Reducer plus projection |
| Router | Route interpreter |
| View | UI adapter |
IntentFlow reduces file ceremony while preserving responsibility boundaries.
Keep real use cases. Do not create use cases just to satisfy a diagram.
Common shape:
Flow -> Effect -> Capability Protocol -> Infrastructure
The mental model is close, but the vocabulary is split differently.
| TCA | IntentFlow |
|---|---|
| State | State |
| Action | Intent/Event split |
| Reducer | FlowReducer |
| Effect | EffectRequest plus FlowEffectHandler |
| Dependency | Capability |
| Navigation | Route |
| Delegate action | Output |
Start by modeling each interactor workflow as an IntentFlow feature.
Lifecycle mapping:
didBecomeActive -> .intent(.appear)
childFinished -> .event(.childCompleted)
detachChild -> .route(.closeChild)
Do not migrate more if:
- the first feature did not become easier to test
- the state list feels fake
- the team cannot name effects clearly
- UI still owns workflow behavior
Fix the modeling before scaling adoption.
IntentFlow for Android is a workflow-first, AI-ready architecture proposal. Start from behavior, keep reducers pure, keep effects explicit, and let UI adapt to the workflow.