Simple Prisoner's Dilemma - you know that the other nations have signed a treaty against militarizing space, but why would you take anyone else at their word?
The answer is, you don't - you try as hard to militarize the hell out of space before anyone else, because you assume everyone else is doing the same.
The other answer is like the Nuclear Non-proliferation treaty and START I,II. Intrusive verification by international bodies with penalties for non-compliance. It hasn't been perfect, but so far the world hasn't ended.
Sorry by START II, I meant New Start. START II was cancelled before it went into effect in retaliation for George W. Bush cancelling the anti-ballistic missile (ABM) treaty.
The answer is, you don't - you try as hard to militarize the hell out of space before anyone else, because you assume everyone else is doing the same.