1) If that's the case, it should probably be somewhere in the codex entry.
2) That does not solve the problem or even make it easier. In order for this AI to be patching loopholes, it would need to know what was and wasn't a loophole, which would require you to provide it an already-perfected...