
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 $f(x)=-a\ln x+\frac{1}{2}x^{2}+(a-1)x+1$ $(a\in\mathbb{R})$.

  (I) If the function $f(x)$ has an extremum at $x=2$, find the real number $a$;

  (II) If $a < 0$, discuss the monotonicity of the function $f(x)$ within its domain.

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