Luaspie is a 'clone' of Devil's Pie. Devil's Pie is "[a] window-matching utility, inspired by Sawfish's "Matched Windows" option and the lack of the functionality in Metacity."
Luaspie uses the Lua language instead of the S-Expressions that Devil's Pie uses and exposes a couple extra functins, actions, and events to the rule scripts.
Luaspie also now comes with a rule building utility appropriately called 'rulebuilder' it only allows access to a limited subset of the possible events and actions but should serve as a good basis for what the rule scripts look like, etc.