-
Notifications
You must be signed in to change notification settings - Fork 0
Start Here
This page is the shortest useful path through IntentFlow.
git clone https://github.com/emrecanozturk/intentflow-ios.git
cd intentflow-ios
swift test
swift run intentflow validate .intentflow/login.intentflow.yamlFor the full local release check:
./scripts/check.shIntentFlow models a feature as:
State + Intent/Event -> Next State + Effects + Outputs + Routes
If a feature cannot be explained through that sentence, the workflow contract is probably not clear enough yet.
Good first candidates:
- login with two-factor recovery
- checkout with payment retry
- upload with progress and cancellation
- permission request with fallback
- device connection with trust and recovery
- onboarding with branching routes
Avoid starting with a simple static screen. IntentFlow is most useful when behavior is doing real work.
Before writing UI, list:
- states
- user intents
- external events
- effect requests
- routes
- parent outputs
- invariants
- acceptance traces
Example:
idle + submit -> validating + validateCredentials effect
validating + credentialsValid -> requestingToken + requestToken effect
requestingToken + tokenRequiresTwoFactor -> waitingForTwoFactor
requestingToken + tokenReceived -> authenticated + completed output
Core mode:
swift run intentflow feature Profile --mode core --ui none --output ./Sources/FeaturesAI mode:
swift run intentflow feature Checkout --mode ai --ui swiftui --output ./Sources/FeaturesThe reducer is pure. Test transitions before wiring UI:
let trace = LoginFlow().trace(
initialState: .idle,
signals: [
.intent(.submit(email: "user@example.com", password: "secret")),
.event(.credentialsValid)
]
)SwiftUI views and UIKit view controllers should adapt to projected state and send intents. They should not own workflow rules.
For AI mode, generate a compact context file:
swift run intentflow ai-context .intentflow/login.intentflow.yaml --tool codexGive the agent that output plus a small task. Do not ask an agent to infer the whole architecture from the repository.
IntentFlow for iOS is a workflow-first, AI-ready architecture proposal. Start from behavior, keep reducers pure, keep effects explicit, and let UI adapt to the workflow.