I've written / modified a couple custom snippets via the Ruby bundles (Ugh, Yuck!) but I'd like to get a little more complex...
a) Can I parse / modify the current document? (usually JavaScript)
b) Can I get at the tree of project files and read the contents?
c) Is it possible to write commands in not-Ruby? JavaScript or Python for example?
Specifically, I'd like to write something that automatically manages imports (something I miss from ActionScript editors) to cut down on manually typing: var MyClass = require('path/to/MyClass'); and then manually sorting them over and over and over...
You can do anything you like that you could do using Java/Eclipse. Unfortunately, no other languages are supported yet natively (i.e. JavaScript or Python), though you might try looking at some of the related pages here: http://code.google.com/p/jrfonseca/wiki/PythonMonkey
To your points, I would investigate https://wiki.appcelerator.org/display/tis/Interacting+with+Eclipse+or+Java as that will give some information on how to call Java classes from within Ruby.
For projects, I would look at the navigator framework.
For parsing/AST, I would suggest looking at the JavaScript parser/editor in the Aptana source code on github: https://github.com/aptana/studio3/tree/development/plugins/com.aptana.editor.js