
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 functions $f(x)=a\ln x-x^2+x,\quad g(x)=(x-2)e^{x}-x^2+m$,

(I) Discuss the monotonicity of the function $f(x)$ when $a\leqslant 0$.

(II) When $a=-1,x\in(0,1]$, find the maximum value of the positive integer $m$ such that $f\left(x\right) > g\left(x\right)$ always holds.

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