
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 sum of the binomial coefficients of all terms in the expansion of ${(a{x}^{2}+\frac{1}{x})}^{n}$ is $128$, and the sum of all coefficients is $-1$.<br/>$(1)$ Find the values of $n$ and $a$;<br/>$(2)$ Find the constant term in the expansion of $(2x-\frac{1}{{x}^{2}}){(a{x}^{2}+\frac{1}{x})}^{n}$.

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