Eigenpoll : Best Practices for Software Development : Design scripting early 

All good software should be drivable by other software in ad-hoc, unanticipated ways.

Deciding how your system's functionality is exposed in the absence of a user interface focuses attention on business rule layers and below --- UI design should come after the functional behavior is agreed with the user.