How can I disable commands after enabling adventure mode?

Solution 1:

No, this is not possible in an un-modded, single-player game. There's certainly nothing you can do to a map file to force constraints on the player playing it.

Given that people have been playing adventure maps for ages without the special mode, trust has worked very effectively up to this point :-)

Solution 2:

As legacy points out, there is no built-in command to disable commands in the Minecraft snapshots. However, you can use NBTedit to retroactively disable commands when you're ready to release you map.

Simply open your level.dat file in NBTedit and change the value of allowCommands to 0.

NBTedit