feat: assign flow obj to the root scope, tests added
chore: updated docs