I use the https://en.wikipedia.org/wiki/Fitch_notation, or fitch notation, for logical deduction systems.
I don't know how to derive a contradiction in the other half of the biconditional where $X \to \lnot X$. In this proof, the goal is show that one could derive $((\lnot X \leftrightarrow X ) \lor X )$ from $X$.
$X$ (premise)
| $\lnot X$ (subproof 1)
| $X$ Reiterate line 1
- | $X$ (subproof 2)
- . . . (need to reach a contradiction for negated $X$)
If I were to indirectly prove this, it would ultimately result in the same path as trying to find a contradiction for the biconditional.
Here is a Fitch proof that proves the equivalence: