Can The Legislature Hire Its Own Lawyer?

In early January, California Senate President pro Tempore Kevin de León and Assembly Speaker Anthony Rendon jointly announced that the California Legislature had hired outside legal counsel to advise on potential legal challenges with the incoming administration of Donald Trump.  I found this interesting as I could not recall a prior circumstance in which the legislature had ever hired private legal counsel.  Apparently, I wasn't the only person whose curiosity was piqued.  Assemblymember Kevin Kiley has submitted the following legal opinion request to the California Attorney General:

May the California Legislature lawfully retain the services of private legal counsel?

In answering this question, I expect that the Attorney General will tackle the question of whether the retention of private counsel violates the California Constitution, which provides:

(a) The civil service includes every officer and employee of the State except as otherwise provided in this Constitution.

(b) In the civil service permanent appointment and promotion shall be made under a general system based on merit ascertained by competitive examination.

Art. VII, § 1.  Granted, there is no mention lawyers.  Nor is there a prohibition of any specified conduct.  Nonetheless, the California Supreme Court has perceived certain emanations from it.  More particularly, the Court found that the civil service mandate embodied in the predecessor to Art. VII, §1 forbids private contracts for work that the state itself can perform "adequately and competently." State Compensation Ins. Fund v. Riley, 9 Cal. 2d 126, 135 (1937).  Presumably, the legislature has retained legal counsel as an independent contractor.  However, the Supreme Court in Riley firmly rejected the idea that the services independent contractors perform are beyond the civil service mandate's reach.  Although it might be observed that the constitution doesn't mention professional services, the Supreme Court also answered that objection in Riley:

All types of service were included therein -- no distinction between professional and nonprofessional, or between temporary and permanent employment was made either in the constitutional provision or in the act. There can be no doubt that both the constitutional provision and the statute embrace within their terms professional as well as nonprofessional service.

One of the judicially established tests for whether contracting out is permissible is the nature of the services test.  Thus, hiring a private contractor is prohibited if the services are of a kind that persons selected through civil service could perform "adequately and competently".  Notably, the legislature already has a civil service law firm - the Office of Legislative Counsel.  Although the "Leg Counsel's Office" is best known for assisting legislators in drafting legislation and issuing legal opinions, it does represent the Senate and Assembly in litigation.  Assemblymember Kiley's letter points out that another civil service alternative exists - the Attorney General's Office.  Of course, there is an exquisite irony in asking an agency staffed with civil service attorneys whether it is constitutionally permissible to contract outside of the civil service.