Solution (source code)

= Solution

Use the sign convention
$$
R(X,Y)Z=\nabla_X\nabla_YZ-\nabla_Y\nabla_XZ-\nabla_{[X,Y]}Z.
$$
For the <Levi-Civita connection> this is the <Riemannian curvature two-form>, an element of $\Omega^2(M;\operatorname{End}(TM))$: $R(X,Y)$ is an endomorphism of the <tangent bundle>, alternating in $X,Y$, and the expression has <tensoriality> in all arguments. It is the <curvature form of a connection> for the tangent-bundle connection.

For the <first Bianchi identity>, take the cyclic sum in $X,Y,Z$. Torsion-freeness says $\nabla_YZ-\nabla_ZY=[Y,Z]$, so the double-derivative terms combine to $\sum_{\mathrm{cyc}}\nabla_X[Y,Z]$. The remaining terms may be cyclically relabelled as $-\sum_{\mathrm{cyc}}\nabla_{[Y,Z]}X$. Using torsion-freeness once more, followed by the <Jacobi identity> for <vector fields>, gives
$$
\boxed{\sum_{\mathrm{cyc}}R(X,Y)Z
=\sum_{\mathrm{cyc}}[X,[Y,Z]]=0.}
$$
The <Ricci curvature> is the trace
$$
\operatorname{Ric}(Y,Z)=\sum_{a=1}^n\langle R(e_a,Y)Z,e_a\rangle
$$
for any <orthonormal basis>. The <sectional curvature> of the two-plane spanned by independent $u,v$ is
$$
K(u,v)=\frac{\langle R(u,v)v,u\rangle}{\|u\|^2\|v\|^2-\langle u,v\rangle^2}.
$$
These conventions give positive curvature on a round sphere. In dimension three, put $K_{ij}=K(e_i,e_j)$ and $r_i=\operatorname{Ric}(e_i,e_i)$. Curvature symmetries give
$$
r_1=K_{12}+K_{13},\qquad r_2=K_{12}+K_{23},\qquad r_3=K_{13}+K_{23}.
$$
Solving this linear system yields the <sectional curvatures from Ricci curvature in dimension three> formula
$$
\boxed{K_{ij}=\frac{r_i+r_j-r_k}{2}
=r_i+r_j-\frac{\operatorname{Scal}}2\quad(\{i,j,k\}=\{1,2,3\}).}
$$
Here $\operatorname{Scal}=r_1+r_2+r_3$ is the <scalar curvature>. The chosen <orthonormal basis> need not diagonalize Ricci; its diagonal evaluations already determine these three sectional curvatures.