
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
Let the function be $f(x)= \dfrac {(1-a)x^{2}-ax+a}{e^{x}}$  
$(1)$ When $a=1$, find the equation of the tangent line to the curve $f(x)$ at the point $(1,f(1))$;  
$(2)$ When $x\geqslant 0$, the maximum value of $f(x)$ is $a$, find the range of $a$.

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