Automated legal advice: rules, responsibility and risk allocation