
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 the complex number $z= \frac{(1+i)^{2}+3(1-i)}{2+i}$ (where $i$ is the imaginary unit), find:
- (I) the modulus of the complex number $z$ ($|z|$);
- (II) the values of $a$ and $b$ in the equation $z^{2}+az+b=1+i$ ($a,b \in \mathbb{R}$).

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