This means that the person referred to was not completely prepared before they acted
. Going off "half-cocked" usually meant that the effort would fail through insufficient planning.
The term comes from antique firearms. Once upon a time, when you loaded your trusty musket, the last thing you did was fill the priming pan with gunpowder so the burning match or spark from flint would catch on something to ignite the charge in the weapon through the touch hole.
(Long aside here) It was called a touch hole from early guns that had to have the fire placed directly on the hole drilled into the gun to carry the igniting charge to the powder inside. This fire was provided via a burning rope on a stick that the gunner touched to the firing hole. The gunner's hand was replaced by a lever eventually for more consistent operation, apan was added to improve ignition, and the rope was replaced by a piece of flint for safer operation. It is from flintlocks specifically that we get the term. (Aside over)
There was a small cover over the pan to prevent all of the powder there from falling out until the soldier needed to fire. Then the cover would swing out of the way to expose the powder, and provided dual duty by then becoming the steel striker for the flint. As the cover was linked to the firing mechanism, the gunner had to cock the weapon to move the pan cover out of the way.
As loading a cocked weapon is an invitation to hurt yourself, a provision in the cocking mechanism allowed the gunner to half-cock the weapon enough to get the cover out of the way to prime the firing pan. If it accidentally engaged while you were loading it, the impact wouldn't be hard enough to strike a spark, and you wouldn't prematurely fire your weapon and waste a shot. (Even the best gunners took about 20 seconds to reload.)
This also meant that if you forgot to completely cock your weapon, it wouldn't work properly. (Nothing is worse than expecting a gun to fire and having it not work.) So leaving your weapon half-cocked means that you are unprepared to fire, and will not perform as expected.
reminded me of the linkage to the term flash in the pan
Riverrun says, "By George, you've uncovered a metaphor describing our entire foreign policy."