
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 function $y=\left(a+3\right){x}^{{a}^{2}+a-4}+\left(a+2\right)x+3$.  
$(1)$ For what values of $a$ is $y$ a quadratic function of $x$?  
$(2)$ For what values of $a$ is $y$ a linear function of $x$?

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