# Workflow

A Swift and Kotlin library for making composable state machines, and UIs driven by those state machines.

Repository: https://github.com/square/workflow
Canonical: https://ross.abutalabs.com/products/workflow
Homepage: https://square.github.io/workflow
Language: Shell
License: Apache-2.0
License Family: permissive
Topics: reactive, ui, state-machine, kotlin, android, swift, ios, workflow
Last push: 2026-08-21T06:39:00+00:00
Link (homepage): https://square.github.io/workflow

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 8, longevity 100
- inputs: {"age_days": 2848, "days_push": 12, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1166, forks 73 (observed 2026-08-28T04:03:50.214400+00:00)

## What it is
Workflow is a unidirectional data flow library by Square that lets developers model business logic and navigation as composable state machines in Kotlin and Swift. It includes UI binding frameworks for Android and iOS plus a testing framework for validating workflow logic.

## Use cases
- manage app state with unidirectional data flow on Android and iOS
- model complex navigation flows as composable state machines
- write unit-testable business logic for mobile apps
- build scalable multi-screen mobile features with recursive workflows
- share architectural patterns between Kotlin and Swift teams

## When to choose
- building Android or iOS apps that benefit from strict unidirectional data flow
- you need navigation treated as managed presenter state rather than a separate concern
- you want a testing framework for state machine business logic
- you prefer a TCA-like architecture in Kotlin or Swift

## When to avoid
- building web or desktop applications, since it targets mobile UI frameworks
- you want a lightweight state container without an opinionated navigation model
- your team prefers Jetpack Compose state hoisting or SwiftUI-native patterns without extra abstraction

## Facets
- artifact type: library
- maturity: active
- function: state-management, ui-components, testing
- domain: mobile-development, frontend, developer-tools
- platform: jvm
- tags: unidirectional-data-flow, state-machine, navigation, reactive, composable-architecture, android, ios, swift, mobile

## Member repositories
- square/workflow (main) score 67
- square/workflow-kotlin (mirror) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:50.214400+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:57.866394+00:00, confidence not recorded.
  - readme: https://github.com/square/workflow (fetched 2026-08-28T04:03:50.214400+00:00, sha 978c1148c4aa)
  - homepage: https://square.github.io/workflow (fetched 2026-08-29T12:35:01.126265+00:00, sha de3aac681a0e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
