Placing items correctly automatically is definitely a challenging task; you can see this in how the dungeons aren't always properly connected, with useless stairs and weird connections between rooms. Also the reason why the chests are just in the middle of a random room is that the only thing this mod gets from dungeon creation is a list of positions, each being the center of the floor of a room. Moving the chests to against a wall would be pretty simple, but it quickly gets more complex.
So if the dungeon gen would store/return more information about the dungeons, mods would be much more efficient because they don't need to parse the map to find out what is what.
In the case of dungeons I would expect things like # of rooms, dungeon type (mossy cobble, sandstone...), coordinates/size of the rooms, a list of rooms ordered by size, largest first.
With this informations a mod has it easier to add stuff to a dungeon.
Also functions like find_neares_dungeon(type, mindepth, minsize) might be useful.
So these informations should really be stored in the database, not only thrown out on generate