At first, consider the following example:
Suppose, you have thrown a ball(mass=##m##) from ground to the sky with velocity ##v##;
So the ball has a kinetic energy = ##\frac{1}{2}mv^2## ;
After that, the net force on the ball is just the gravitational force which is opposite to the displacement;
So, the work is now negative, which means, the kinetic energy is decreasing and the potential energy is increasing.
Negative work means decreasing of kinetic energy and increasing of potential energy.
Just look at the mathmetical calculation:
##W = Fs##, where ##W## is work, ##F## is force, ##s## is displacement;
## =mas##, ##a## is accelaration,as ##F=ma##
## =\frac{1}{2}m*2as
=\frac{1}{2}m*(v^2 - u^2)##, ##u## is the initial velocity; and we know, ##v^2 = u^2 + 2as##
## =\frac{1}{2}m*v^2 - \frac{1}{2}m*u^2##
=final kinetic energy - initial kinetic energy
=change of kinetic energy
so, if the change of kinetic energy is negative, the potential energy will increase to conserve energy.
When the ball reaches the highest level, the velocity is then 0 ; and the potential energy is ##mgh##, ##h## is the height;
After that the ball will fall downward in the direction of gravitational force, so the work is positive and the kinetic energy will increase.
Now come to your case.
If you suppose, the rope is frictionless, then the case is:
At first, you have to apply some force upward on the rope (which is greater then m*g);
as, the force is greater than the gravitational force, the bucket will have net force upward;
the displacement is in the direction of net force, so there will be a positive work;
the velocity of the bucket will be increasing(upward) for a little bit of time, the kinetic energy will also increase;
and then you will just pull the rope with only the force equal to gravitational force; and the net force is equal to 0; so 0 work; there is no accelaration; no increase or decrease of velocity; so, no change of kinetic energy;
at last you don't apply any force on the rope (for a little bit of time), and there is a net force downward (equal to gravitational force) opposite to the direction of displacement; negative work; decrease of velocity and kinetic energy; increase of potetial energy;
when the bucket stops (velocity = 0), then you have to exert a force equal to gravitational force upward so that the net force is 0;
Got it?