Let $L$ be a nilpotent Lie algebra (over a field of char 0) and $CE^{\bullet}(L)$ be its Chevalley-Eilenberg dg-algebra. By homotopy transfer, there exists a structure of an $A_{\infty}$-algebra on the cohomology $H^{\bullet}(L)$ of $CE^{\bullet}(L)$. I'm asking for the more or less direct way of reconstructing $L$ from this $A_{\infty}$-structure.

One way of do this is to take the bar-cobar construction of $H^{\bullet}(L)$, obtaining the dg-algebra which is quasi-isomorphic to the $H^{\bullet}(L)$, and then take its Sullivan minimal model. By uniqueness of the minimal model, we'll get precisely $CE^{\bullet}(L)$, and the reconstruction of a Lie algebra from its Chevalley-Eilenberg complex is a triviality.

However, bar-cobar construction is huge, so this is more of a proof that the reconstruction is possible, than a reconstruction itself. I'm looking for probably not so canonical, but simpler ways of describing the Lie algebra with given cohomology.

Here is the simplest case of the problem: suppose we are given the graded algebra with the basis $\{1,p,q,ph,qh,pqh\}$, the obvious multiplication and the $m_3$ operation given by $m_3(p,p,q)=ph$ and so on. It is very easy to guess that the Lie algebra with this cohomology is the 3-dimensional Heisenberg, but I do not know how to obtain this answer *algorithmically*.

Thanks in advance!

**UPD:** As Pavel said in comments, since $CE^{\bullet}(L)$ is commutative, one could consider the Harrison construction (the free
Lie algebra on $H^{\bullet}$ with the differential depending on $m_i$'s) instead
of the full bar-construction. Since we have the a posteriori knowledge of
what the cohomology of $Har^{\bullet}(H^{\bullet})$ is --- it should
be $L$ in degree zero and 0 in higher degrees --- and since $Har^{<0}(H^{>0})$ is zero, we have a very simple description of lower central factors. Concretely, the factor $L^{k-1}/L^k \otimes \mathbb{Q}$ is isomorphic (or dual) to the kernel of the operation $m_k: Lie^k(H^1) \rightarrow H^2$. Maybe I'm making a mistake with how the grading in
the Harrison complex is defined, but at least for the Heisenberg and some
other simple nilpotent algebras this gives the right answer.

Two remarks:

This is only true when $k \le n+1$, where $n$ is the nilpotency depth of $L$. It seems that from carefully inspecting homotopy transfer formulas one can conclude that the highest arity of a non-zero operation is equal to $n+1$ if and only if the nilpotency depth is equal to $n$. I haven't checked this enough times to be sure, though.

Since the natural map from the group $G$ to its Malcev completion $G \otimes \mathbb{Q}$ induces the isomorphism on the first rational cohomology $H^1$ and the surjection on the $H^2$, it seems that the same procedure gives the right answer for lower central factors of all groups, not only nilpotent ones.