It has a very poorly specified api.
Here is a plugin template: http://github.com/phausler/XcodeAPI/tree/master/Xcode%20Plug...
Here is a (pretty detailed) description of what API there is: http://xcodeapi.versv.com/
Interesting! It looks like the main thrust is for additional languages but there seems to be a way to do extra code completion: http://www.obdev.at/products/completion-dictionary/index.htm...
I agree this is the way that the code autocompletion should be though.