
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given that the complex number $z$ and $\left(z+2\right)^{2}+8i$ are both purely imaginary.<br/>$(1)$ Find $z$;<br/>$(2)$ If $z-1$ is a root of the equation $2x^{2}+px+q=0$ with respect to $x$, find the values of real numbers $p$ and $q$.

Present the answer in LaTex format: \boxed{Your answer}
user