If the piston shown above moves upwards a distance 1 m the shaft work (according to the textbook solution to a related problem) is 1334 J. Shouldn't the sign of work be negative because the shaft moves upward (positive z direction) and the force is negative? According to the sign convention used by the textbook, work input is negative and work output is positive but I don't see how to determine the sign from this information.
The sign for work depends on which version of the first law is used. For this version
$W$ is positive when the gas does work (expands). For this version
It is negative if the gas does work
The key is when the gas does work it reduces the internal energy. Both versions are consistent with that.
Your book appears to be using the first version of the first law.
Hope this helps