[guided]Now assume $X$ is compact and let
\begin{align*}
\Delta_d: \Omega^k(X;\mathbb{C}) \to \Omega^k(X;\mathbb{C})
\end{align*}
be the Hodge Laplacian of the Kähler metric. A form is harmonic precisely when it lies in the kernel of $\Delta_d$.
The compatibility with harmonic forms rests on the Kähler identities. These identities imply the commutation relations
\begin{align*}
[\Delta_d,L]=0,
\qquad
[\Delta_d,\Lambda]=0
\end{align*}
(citing a result not yet in the wiki: Kähler identities and commutation of the Lefschetz operators with the Hodge Laplacian). Since
\begin{align*}
H=[\Lambda,L],
\end{align*}
the Jacobi identity for commutators gives
\begin{align*}
[\Delta_d,H]=0.
\end{align*}
The projections $\Pi_{k,r}$ used above are universal polynomials in $L$, $\Lambda$, and $H$. Because $\Delta_d$ commutes with each of these three operators, it commutes with every polynomial built from them:
\begin{align*}
[\Delta_d,\Pi_{k,r}]=0.
\end{align*}
Let $\alpha \in \Omega^k(X;\mathbb{C})$ be harmonic. Then $\Delta_d\alpha=0$. Applying the projection $\Pi_{k,r}$ and commuting it past the Laplacian gives
\begin{align*}
\Delta_d(\Pi_{k,r}\alpha)
=
\Pi_{k,r}(\Delta_d\alpha)
=
0.
\end{align*}
Therefore each projected Lefschetz summand is harmonic. Since
\begin{align*}
\Pi_{k,r}\alpha=L^r\alpha_r,
\end{align*}
we still need to prove that the primitive factor $\alpha_r$ is harmonic.
Let $s:=k-2r$. If $\theta$ is a primitive $s$-form, then $\Lambda\theta=0$ and $H\theta=(n-s)\theta$. Using the corrected commutator convention $[H,L]=-2L$, we compute for $1\le m\le r$:
\begin{align*}
\Lambda L^m\theta
&=
L^m\Lambda\theta+[\Lambda,L^m]\theta \\
&=
\sum_{j=0}^{m-1}L^jHL^{m-1-j}\theta \\
&=
\sum_{j=0}^{m-1}(n-s-2(m-1-j))L^{m-1}\theta \\
&=
m(n-s-m+1)L^{m-1}\theta.
\end{align*}
Here the first term vanishes because $\theta$ is primitive. Applying this formula successively gives
\begin{align*}
\Lambda^rL^r\theta
=
c_{s,r}\theta,
\qquad
c_{s,r}:=r!\prod_{m=0}^{r-1}(n-s-m).
\end{align*}
The Lefschetz index range gives $r\le n-s$, hence $c_{s,r}\ne0$. Applying this to $\theta=\alpha_r$ gives
\begin{align*}
\alpha_r=c_{s,r}^{-1}\Lambda^r(L^r\alpha_r).
\end{align*}
Because $\Lambda$ commutes with $\Delta_d$ and $L^r\alpha_r$ is harmonic,
\begin{align*}
\Delta_d\alpha_r
=
c_{s,r}^{-1}\Delta_d\Lambda^r(L^r\alpha_r)
=
c_{s,r}^{-1}\Lambda^r\Delta_d(L^r\alpha_r)
=
0.
\end{align*}
Thus every primitive factor $\alpha_r$ is harmonic, so the decomposition of a harmonic form is a decomposition into harmonic primitive Lefschetz summands.[/guided]