TITLE: Category = Groupoid x Poset?
QUESTION [5 upvotes]: Is it possible to split a given category $C$ up into its groupoid of isomorphisms and a category that resembles a poset?
"Splitting up" should be that $C$ can be expressed as some kind of extension of a groupoid $G$ by a poset $P$ (or "directed category" $P$ the only epimorphisms in $P$ are the identities, all isomorphisms in $P$ are identities).

REPLY [4 votes]: In the finite, one-object case, Krohn-Rhodes theory gives a way to decompose a semigroup as a wreath product of finite simple groups and aperiodic semigroups, which are in some sense "as non-grouplike as possible", though in a different way from posets. There is an extension of the theory to categories due to Wells. I don't know much about this, but it is similar to the sort of decomposition you're asking for.