Not even humans can do that. Documentation needs to at least be reverse-engineered and understood before implementation.