Example 7 Let $n$ be a given positive integer, $X=\{1,2,3, \cdots, n\}, A$ be a subset of $X$, and for any $x<y<z, x, y, z \in A$, there exists a triangle with side lengths $x, y, z$. Let $|A|$ denote the number of elements in the set $A$. Find the maximum value of $|A|$. (Original problem)
Let $A=\left\{a_{1}, a_{2}, \cdots, a_{r}\right\}$ be a subset that meets the conditions, where $a_{1}2 k \geqslant z$, thus there exists a triangle with sides $x$, $y$, and $z$, and $|A|=k+1=\frac{n}{2}+1=\frac{n+2}{2}=\left[\frac{n+2}{2}\right]$.

If $n=2 k+1$, then let $A=\{k+1, k+2, \cdots, 2 k+1\}$, at this point, for any $x2 k+1 \geqslant z$, thus there exists a triangle with sides $x$, $y$, and $z$, and $|A|=k+1=\frac{n-1}{2}+1=\frac{n+1}{2}=\left[\frac{n+2}{2}\right]$.
(Note: The above construction can be combined as $A=\left\{\left[\frac{n+1}{2}\right],\left[\frac{n+1}{2}\right]+1,\left[\frac{n+1}{2}\right]+2, \cdots, n\right\}$) Therefore, the maximum value of $|A|$ is $\left[\frac{n+2}{2}\right]$.