You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Flowr-Core is the engine that manages the execution and definition of software engineering workflows. It handles the loading of flow definitions from YAML, tracks the current state of a session, and manages transitions between states.
Entities
Name
Type
Purpose
Aggregate Root?
Flow
Entity
Top-level definition of a workflow, containing states, params, and exits
Yes
State
Entity
A node in the workflow with transitions, attributes, and optional subflow links
No
Transition
Entity
A mapping from a trigger to a target state, potentially guarded by conditions
No
Session
Entity
Tracks the current progress of a user through a flow, including the call stack for subflows
Yes
Param
Value Object
A parameter declaration with an optional default value
—
GuardCondition
Value Object
A mapping of evidence keys to condition expressions
—
Relationships
Subject
Relation
Object
Cardinality
Notes
Flow
contains
State
1:N
State
has
Transition
1:N
Transition
targets
State
N:1
Session
tracks
Flow
1:1
Session
current
State
1:1
Session
has
SessionStackFrame
1:N
Used for subflow nesting
Aggregate Boundaries
Aggregate
Root Entity
Why Grouped
See
FlowDefinition
Flow
Ensuring consistency of states and transitions within a single flow
### Invariants
SessionState
Session
Atomic updates to current state and stack frames
### Invariants
Data Shapes
Flow
Field
Type
Required
Constraints
flow
string
Yes
version
string
Yes
exits
list[str]
Yes
states
list[State]
Yes
params
list[Param]
No
Session
Field
Type
Required
Constraints
flow
string
Yes
state
string
Yes
name
string
Yes
stack
list[SessionStackFrame]
Yes
params
dict
Yes
Integration Points
Technology Requirements
Context
Requirement
Verification
Flowr-Core
YAML Loading
check flowr.domain.loader
Flowr-Core
Atomic Session Storage
check flowr.infrastructure.session_store
External Contracts
CLI: flowr check
Actor: User
Trigger: CLI invocation
Input: {flow: string, state: string}
Output: {attrs: dict, transitions: list}
Side Effects: None (read-only)
CLI: flowr transition
Actor: User
Trigger: CLI invocation
Input: {trigger: string, session: string}
Output: {from: string, to: string}
Side Effects: Updates session state in store.
Viz-Server
Context
The Viz-Server provides a visual interface for inspecting and editing flow definitions. It acts as a bridge between the raw YAML flow files and a web-based visualization tool.
Entities
Name
Type
Purpose
Aggregate Root?
VizServerConfig
Value Object
Configuration for the server (host, port, path)
—
FlowDefinition
Entity
A representation of a flow state machine read from disk
The Viz-Server uses a "last-write-wins" strategy for flow persistence. There is no distributed locking or optimistic concurrency control (e.g., ETags). If multiple users edit the same flow, the final state is determined by the last PUT/POST request processed by the server.