Thanks, this is good feedback. I think the difficulty lies not so much in code generation, but determining what a user would expect. If I click the "align bottom" button, I would be surprised if
\begin{tikzpicture}
\draw (0,2) rectangle (1,1);
\draw (1.5,2) rectangle (2.5,1);
\end{tikzpicture}
suddenly were to get a new randomly named \coordinate and relative coordinate notation. On the other hand, if you start out with "nice" code, the app will in many cases refuse to let you drag things since it doesn't know (and in many cases can't know) what the drag should mean (do you change the named coordinate or change the offset to the coordinate etc).Elsewhere in this discussion, we talked about positioning like "right of", and some good suggestions were made (https://news.ycombinator.com/item?id=48647683).
A follow-up comment: when dragging, you could perhaps offer a 'sticky' mode (toggle/enable with Shift/Alt/Ctrl key?) that locks nodes to TikZ's default alignment features, and display a tooltip with the anchor position in question. Contrary to most drawing apps, this could be the default mode, and the toggle key could switch to absolute, freeform positioning.
That's true for two `rectangle` paths, but for two nodes that's what I would expect as a user. Anyway, not an easy problem for sure.