In theory, a great idea. In practice, its *really hard* to basically invent a programming language that 'speaks' the game, then implement it, test it, document it a.s.o.
What *might* be doable is to use the data structures already present in the client, but have them not interface with a human player, but javascript code that makes the decisions required. I assume that's how it works with the current AI, as initially it had a few cases where bots can get stuck (Lurker used to be such a case), which I think is the AI just giving no or an illegal answer.
If I understand you correctly, you want say one player write an AI that uses Village and Smithy, which cam then be expanded by other player to include more Villages-likes and Smithy-likes. The problem I see is that that needs to be able to 'deal with' (on a technical level, not just for playing well) all cards an opponent can use against it. If you only know about the base cards and Village/Smithy, what is the AI supposed to do when it has to do something for Militia, or Contraband or any number of cards that require a decision for the game to continue?