_JjThe district attorney appeals the trial judge’s decision to quash the bill of information charging Herman Franklin with public payroll fraud. While employed as an officer with the New Orleans Police Department, Mr. Franklin also performed private duty work for Walgreens. Following his initial arrest but prior to the institution of the instant formal charges, Mr. Franklin was accepted into the former district attorney’s pre-trial diversion program and successfully completed that program under the supervision of the succeeding, now-current district attorney.
Despite the resultant “dismissal” of the charges, the successor district attorney later resuscitated the investigation of Mr. Franklin and, after concluding that his payroll transgressions were more extensive than initially discovered, instituted the instant prosecution. Mr. Franklin subsequently moved to quash this bill of information, claiming that the district attorney was precluded from instituting these formal charges by principles of contract law as such action contravened their prior agreement that he would not be prosecuted.1 At the [^conclusion of an evidentiary hearing, the trial judge, finding that the district attorney was “hiding the ball” and that “[a] deal is a deal,” sustained the motion and quashed the bill of information.
We review the trial judge’s ruling under an abuse-of-discretion standard and decline to disturb his finding that a binding agreement existed between Mr. Franklin and the former district attorney. That agreement provided that, if Mr. Franklin successfully completed the district attorney’s pre-trial diversion program, no prosecution for public payroll fraud would be instituted. After Mr. Franklin fulfilled that condition, the current district attorney breached their agreement by instituting the instant prosecution, entitling Mr. Franklin to seek judicial enforcement by quashal of the bill of information.
Accordingly, we hold that the trial judge did not abuse his discretion and affirm his decision to sustain Mr. Franklin’s motion to quash and dismiss the underlying charges. We explain our decision in greater detail below.
I
In this Part we set forth the facts pertinent to our review of the trial judge’s ruling on Mr. Franklin’s motion to quash.2
As previously stated, Mr. Franklin was employed as an officer with the NOPD. Apparently stemming from an anonymous complaint filed with the Public Integrity Bureau, the police initiated an internal investigation into Mr. Franklin’s private duty work with Walgreens. Sergeant Daniel Wharton prepared and submitted a report documenting the results of this investigation to the district | .¡attorney's office in February of 2008. The report indicated that public payroll fraud occurred from August 1st through September 25th of 2007 and identified several specific time periods, varying in length from hours to minutes, in which Mr. Franklin’s work *236overlapped in the payroll records of Wal-greens and the NOPD. During the district attorney’s subsequent screening procedures regarding this case, an internal memorandum was drafted finding that the NOPD’s payroll procedures at that time were “extremely flawed and did not accurately reflect the specific hours worked.” The memorandum continued: “[S]upervi-sors ... submit hours worked only as a recognition that the officer worked that particular day and do not reflect the actual hours of work.”
At that point, the District Attorney for Orleans Parish, Eddie Jordan, chose not to pursue formal charges for public payroll fraud and instead allowed Mr. Franklin to enter into his pre-trial diversion program. On February 6, 2009, after Leon Cannizza-ro, Jr. had succeeded Mr. Jordan, the district attorney’s office issued a letter to Mr. Franklin which, without reservation, read: “Congratulations. You have successfully completed the Diversionary Program of the District Attorney’s Office. The Office will now dismiss the case.” The letter specifically referenced La. R.S. 14:138, but did not contain any limiting language or conditions as to when the offenses covered by this agreement occurred.3
Eight months later, on November 10, 2009, the district attorney ordered Lieutenant James Wiloem to investigate further into this matter. After examining Mr. Franklin’s 2007 payroll records, Lieutenant Wiloem identified several Ladditional overlaps — none of which involved different employers or occurred after those incidences previously documented by Sergeant Wharton. On April 15, 2010, the district attorney, relying on this new investigation, filed a bill of information formally charging Mr. Franklin with committing public payroll fraud between January 1st and September 12th of 2007.
At an evidentiary hearing, Mr. Franklin’s counsel argued, “[T]here has to be some sort of rule of law that says when I ... complete a Diversionary Program that involves a specific allegation, and in this instance payroll fraud, and we complete it successfully, which we clearly did, then that ends the matter.” Defense counsel also informed the trial judge that Mr. Franklin had paid $575,000 in fees and restitution to the district attorney’s office in order to successfully complete the diversionary program. The assistant district attorney, responding to defense counsel’s argument “as being one of contract law that [we should be barred] from prosecuting him for these other crimes because he entered into Diversion,” contended, “[Mr. Franklin] entered into Diversion with regards to specific allegations for specific dates as a result of Sergeant Wharton’s report. The State has subsequently learned that the Defendant engaged in other criminal conduct ... that is the subject of this prosecution.” At the conclusion of this hearing, the trial judge granted Mr. Franklin’s motion to quash, finding that the district attorney was “hiding the ball” and that “[a] deal is a deal.”
II
In this Part we discuss the parameters of the district attorney’s prosecutorial discretion, which is vast but which has limits in the context of this and similar case.
*237|RThe district attorney has authority over every criminal prosecution instituted by the State of Louisiana in his district. See La. Const. art. 5, § 26(B), but see La.C.Cr.P. art. 61 (noting that the district attorney’s decision-making is “[s]ubject to the supervision of the attorney general, as provided in Article 62 ... ”).4 The bounds of this discretion extend to determinations of “whom, when, and how [the district attorney] shall prosecute.” La.C.Cr.P. art. 61 (emphasis added). See also Bd. of Comm’rs of Orleans Levee Dist. v. Connick, 94-3161, p. 14 (La.3/9/95), 654 So.2d 1073, 1080 (“The constitutional role of the district attorney is incipient to the criminal process; [the] decision to file charges in a court of criminal jurisdiction is the event which incites a trial court’s exercise of that jurisdiction.”). This authority also includes the “‘broad discretionary power’ not to institute a prosecution,” which can be exercised in numerous constitutionally-permissible ways. See State v. Hayes, 10-1538, p. 6 (La.App. 4 Cir. 9/1/11), 75 So.3d 8, 13 (emphasis added), quoting Briede v. Orleans Parish Dist. Attorney’s Office, 04-1773, p. 5 (La.App. 4 Cir. 6/22/05), 907 So.2d 790, 793.
The district attorney can choose not to obtain any concessions or conditions in return from a defendant by, for example, never instituting formal charges, dismissing an already-commenced prosecution by entering a nolle prosequi, or allowing the time limitations for the commencement of trial to expire. See La.C.Cr.P. arts. 382, 691, 578. The district attorney may also reach agreements with criminal defendants in which further prosecution or trial for a particular offense is forgone in exchange for the fulfillment of certain conditions by that defendant. These agreements are usually categorized as plea bargains or agreements not to | ¿prosecute. Plea bargains are agree-ments wherein defendants traditionally waive their right to plead not guilty to certain charges in exchange for possible or certain leniency in sentencing or other considerations. See Corbitt v. New Jersey, 439 U.S. 212, 223-224, 99 S.Ct. 492, 58 L.Ed.2d 466. See also La.C.Cr.P. art. 552. An agreement not to prosecute is generally formed when the district attorney offers to refrain from instituting prosecution for certain charges upon a defendant’s successful completion of a pre-trial diversion program. See State v. Cardon, 06-2305, p. 1 (La.1/12/07), 946 So.2d 171, 171-172 (per curiam); State v. Louis, 94-0761, pp. 10-11 (La.11/30/94), 645 So.2d 1144, 1149.
The conditions that a defendant must fulfill in order to complete a pre-trial diversion program may vary immensely, but those terms must be explicit and enumerated in the agreement. See, e.g., In re Bertucci, 08-1349, p. 2 (La.9/26/08), 990 So.2d 1275, 1276 (per curiam); In re An-sell, 00-2662, p. 1 (La.5/25/01), 788 So.2d 1172, 1172 n. 1 (per curiam). In determining the conditions of any agreement to divert a defendant from the processes of prosecution, the district attorney is at the outset of the agreement free of judicial interference or coercion. See State v. Thomas, 00-0129, p. 1 (La.1/26/01), 778 So.2d 1126, 1126-1127 (per curiam) (holding that a trial court lacks the authority to compel a defendant’s admission into a drug diversion probation program in the absence of a recommendation by the district attorney).
*238A defendant’s compliance with the terms and conditions established by the district attorney and provided for in the pre-trial diversion program ensures the district attorney’s reciprocal promise to refrain from or to no longer pursue prosecuting that defendant for a certain offense. See, e.g., Bertucci, 08-1349, p. 2, |7990 So.2d at 1276. See also State in the Interest of L.T., 09-1200 (La.App. 4 Cir. 2/3/10), 30 So.3d 1136.
These types of agreements are not only constitutionally-permissible, but have also been heralded as essential to the proper functioning of our justice system. See Bordenkircher v. Hayes, 434 U.S. 357, 364, 98 S.Ct. 663, 54 L.Ed.2d 604 (1978), quoting Oyler v. Boles, 368 U.S. 448, 456, 82 S.Ct. 501, 7 L.Ed.2d 446 (1962) (“Within the limits set by the legislature’s constitutionally valid definition of chargeable offenses, ‘the conscious exercise of some selectivity is not in itself a federal constitutional violation....’”); Santobello v. New York, 404 U.S. 257, 260, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971) (“The disposition of criminal charges by agreement between the prosecutor and the accused ... is an essential component of the administration of justice.... If every criminal charge were subjected to a full-scale trial, the States and the Federal Government would need to multiply by many times the number of judges and court facilities.”). Courts encourage the formation of these extra-judicial compacts. See id. at 260-261, 92 S.Ct. 495. We promote the use of these agreements by holding a defendant’s admission into a pre-trial diversion program interrupts the tolling of time in which the district attorney must commence trial under La.C.Cr.P. art. 578 so that the district attorney is not disadvantaged in commencing prosecution if the accused fails to successfully complete the diversionary program. See State v. Jones, 12-0653, p. 8 (La.App. 4 Cir. 2/6/13), 107 So.3d 1285, 1290; La.C.Cr.P. art. 579 A(2).
Upon a defendant’s fulfillment of the conditions contained in an agreement, however, the breadth of the previously-discussed prosecutorial discretion contracts significantly; the district attorney is obligated to comply with the terms of his agreement. See Id. at 262 (holding that these agreements “must be attended by safeguards to insure [sic] the defendant what . is reasonably due in the | scircumstances”); Cardon, 06-2305, p. 1-2, 946 So.2d at 171-172 (ruling that a trial judge may order the district attorney to refrain from instituting and pursuing prosecution after a defendant substantially complied with the terms contained in an agreement not to prosecute). The district attorney can thus be rendered bound to the terms of these agreements, and defendants may seek judicial enforcement upon the district attorney’s breach. This will be discussed further in Part IV, post.
Ill
In this Part we highlight that a motion to quash is the proper mechanism through which to seek judicial enforcement of an agreement not to prosecute. We then discuss the abuse-of-discretion standard with which we review the trial judge’s decision to grant this particular motion to quash.
A
We begin by examining whether judicial enforcement of an agreement not to prosecute is properly sought through the filing of a motion to quash.
A motion to quash is a mechanism whereby pre-trial pleas are urged, i.e., pleas which do not go to the merits of the charge. See State v. Clark, 12-1296, p. 3 (La.5/7/13), 117 So.3d 1246, 1249 (per curiam); State v. Franklin, 13-0488, p. 3 *239(La.App. 4 Cir. 10/9/13), 126 So.3d 663, 666. See also La.C.Cr.P. art. 531 (“All pleas or defenses raised before trial, other than mental incapacity to proceed, or pleas of ‘not guilty’ and of ‘not guilty and not guilty by reason of insanity,’ shall be urged by a motion to quash.”). Articles 532 and 534 of the Louisiana Code of Criminal Procedure set forth grounds upon which motions to quash bills of information may be based — the enforcement of agreements not to prosecute is not included. See La.C.Cr.P. arts. 532, 534. These statutorily-provided examples, however, are merely illustrative and far from exhaustive. See State v. Marcelin, 13-0893, p. 4 (La.App. 4 Cir. 12/18/13), 131 So.3d 427, 430, citing State v. Tanner, 425 So.2d 760, 762 (La. 1983).
In determining whether a given issue is properly raised through a motion to quash, a court should decide “whether ‘it is a defense which, if successful, requires dismissal of the ... bill of information regardless of the merits of the charge and which by its nature must be available before trial’.” Marcelin, 13-0893, p. 5, 131 So.3d at 430, citing State v. Reaves, 376 So.2d 136, 138 (La.1979) (internal punctuation omitted). Thus, we must undertake a two-part analysis. First, we must decide whether this plea is properly determined prior to a trial on the merits. Second, we must determine whether success on this motion mandates that the challenged bill of information be quashed and the underlying charges dismissed.
Mr. Franklin contends that judicial enforcement of this agreement not to prosecute was properly sought through the filing of a motion to quash. We agree. First, this matter should be considered prior to Mr. Franklin’s trial for public payroll fraud as rendering a decision on this motion does not reach the merits of that charge. Though factual findings must be made to properly rule on this motion, a judicial determination of this matter prior to trial is not precluded. See La.C.Cr.P. art. 537. Furthermore, a fact-finder could likely not consider this matter at trial as such considerations extend far beyond the scope of relevant argumentation. See La. C.Cr.P. art. 531; La. C.E. arts. 401, 402. Second, once the trial judge granted Mr. Franklin’s motion, the enforcement of that agreement not to prosecute required that the bill of information filed against Mr. Franklin be quashed. This stems from the nature of the agreement undertaken by the district attorney and the proper remedy for such obligations. This issue will be more thoroughly discussed in Part IV D, post.
ImThe Supreme Court has also endorsed the use of motions to quash to assert this defense. See Cardon, 06-2305, p. 2, 946 So.2d at 172 (remanding a case with orders to grant a defendant’s motion to quash a bill of information filed in connection with a criminal matter for which the defendant was previously placed in diversion); Louis, 94-0761, p. 1, 645 So.2d at 1145 (reviewing atrial judge’s denial of a defendant’s motion to quash seeking enforcement of an agreement to forgo prosecution). Thus, we hold that Mr. Franklin properly sought enforcement of the terms of his agreement with the district attorney through the filing of a motion to quash. After the trial judge granted Mr. Franklin’s motion, the district attorney properly sought our review of that adverse judgment through a motion for appeal. See La C.Cr.P. arts. 912 B (l), 914.
B
We next set forth the legal precepts that guide our review of the trial judge’s decision to grant this motion to quash.
*240We review trial judges’ rulings on motions to quash which involve determinations of mixed questions of law and fact under an abuse-of-discretion standard. See Hayes, 10-1538, p. 11, 75 So.3d at 15 (“A case-specific resolution by a trial judge of these fact-intensive countervailing considerations may be entitled to our deference under an abuse-of-discretion standard.”); State v. Tran, 12-1219, p. 2 (La.App. 4 Cir. 4/24/13), 115 So.3d 672, 673 n. 3.5 See, e.g., State v. Love, 00-3347, pp. 7-10 (La.5/23/03), 847 So.2d 1198, 1205-1207 (violation of the constitutional right to a speedy trial); State v. Batiste, 05-1571, pp. 8-9 (La.10/17/06), 939 So.2d 1245, 1251 (violation of the statutory right to a speedy trial); In Tran, 12-1219, p. 2, 115 So.3d at 673 (claiming a valid prescription for a substance after being charged with a violation of the Uniform Controlled Dangerous Substances Law). To determine whether an agreement not to prosecute bars the institution of prosecution for certain formal charges, a trial judge must first make findings of fact as to the terms of and the conditions surrounding that agreement and then apply those findings to principles of contract and constitutional law. See, e.g., Cardon, 06-2305, pp. 1-2, 946 So.2d at 171-172; Louis, 94-0761, pp. 2-7, 645 So.2d at 1145-1148. Thus, a proper ruling on this issue necessitates the determination of a mixed question of law and fact, and, as such, we review the trial judge’s ruling on this motion to quash under an abuse-of-discretion standard.
In our review, we give great deference to findings of fact made by the trial judge while ruling on a petitioner’s motion to quash. We will “not overturn those findings unless there is no evidence to support [them].” State v. Wells, 08-2262, p. 4 (La.7/6/10), 45 So.3d 577, 580 (emphasis added), but see State v. Byrd, 96-2302, p. 18 (La.3/13/98), 708 So.2d 401, 411; La.C.Cr.P. art. 531(holding that, when ruling on a motion to quash, findings of fact may reach issues properly raised pre-trial, but not defenses on the merits of the pending charge). Our extremely-heightened deference stems from the constitutional limitation on our appellate jurisdiction: “In criminal cases [an appellate court’s] jurisdiction extends only to questions of law.” La. Const, art. 5, § 10(B). This limited scope of review also aligns with the “complementary role of trial courts and appellate courts,” Love, 00-3347, p. 9, 847 So.2d at 1206, because trial judges have the unique “opportunity to | ^observe the witnesses and weigh the credibility of their testimony.” Wells, 08-2262, p. 5, 45 So.3d at 581.
We then review the trial judge’s application of those factual findings to principles of law. A trial court necessarily abuses its discretion if its ruling is based on an erroneous view or application of the law. See Cooter & Gell v. Hartmax Corp., 496 U.S. 384, 405, 110 S.Ct. 2447, 110 L.Ed.2d 359 (1990). See also United States v. Taylor, 487 U.S. 326, 336, 108 S.Ct. 2413, 101 L.Ed.2d 297 (1988) (noting that “discretionary choices are not left to a court’s inclination, but to its judgment, [which is] guided by sound legal principles”) (internal punctuation omitted). In that instance, the trial judge’s ruling is not entitled to our deference. See State v. Dillon, 11-0188, p. 4 (La.App. 4 Cir. 8/24/11), 72 So.3d 473, 476.
*241IV
In this Part we review the trial judge’s decision to grant Mr. Franklin’s motion to quash. We find the trial judge correctly held that a binding agreement existed between the parties, that the terms of that agreement precluded the institution of the instant prosecution, that the district attorney breached that agreement, and that the proper remedy for enforcing the terms of that agreement was to grant Mr. Franklin’s motion to quash. As such, we necessarily conclude that the trial judge did not abuse his discretion.
In reviewing these types of claims, we generally refer by analogy to commercial contract principles. See Ricketts v. Adamson, 483 U.S. 1, 16, 107 S.Ct. 2680, 97 L.Ed.2d 1 (1987) (“[T]he law of commercial contract may in some cases prove useful as an analogy ... because plea agreements are constitutional contracts .... The values that underlie commercial contract law, and that govern the relations between economic actors, are not coextensive with those that underlie the Due Process Clause, and Iathat govern relations between criminal defendants and the State. Unlike some commercial contracts, plea agreements must be construed in light of the rights and obligations created by the Constitution.”); Cardon, 06-2305, p. 1, 946 So.2d at 171, quoting State v. Givens, 99-3518, p. 14 (La.1/17/01), 776 So.2d 443, 455 (“The validity of an agreement not to prosecute is generally determined under contract principles ‘while recognizing at the same time that a criminal defendant’s constitutional rights to fairness may be broader than his or her rights under contract law.’”). See also State v. Caminita, 411 So.2d 13, 16 (La.1982) (“[T]he traditional law of contracts guides educated expectations of fairness in any negotiation and can be useful by analogy in weighing claims of denial of due process_”). Thus, we utilize these principles to determine whether the trial judge abused his discretion in finding that an agreement existed, that its scope precluded the institution of the instant prosecution, that a breach of the agreement occurred, and that the legally correct remedy for that breach was to quash the bill of information and dismiss all pending charges.
A
We begin by examining whether an agreement not to prosecute was formed between Mr. Franklin and the district attorney.
As previously mentioned, we review relevant principles of contract law to apply by analogy. A contract is created when all parties consent to an agreement for a lawful cause. See La. Civil Code art. 1927 (“A contract is formed by the consent of the parties established through offer and acceptance.”); La. Civil Code art. 1967 (“Cause is the reason why a party obligates himself.”). See also La. Civil Code arts.1906, 1966, 1968. It is undisputed that both Mr. Franklin and the former district attorney consented to this agreement not to prosecute. The assistant district |14attorney conceded this at the evi-dentiary hearing, and the letter issued from that office to Mr. Franklin supports this notion. The trial judge also found that Mr. Franklin proved the existence of this agreement. See La. Civil Code art. 1831; Givens, 99-3518, p. 15, 776 So.2d at 455 (“The party demanding performance of a contract has the burden of proving its existence.”). Finally, the “cause” of these types of agreements has been held lawful. See Cardon, 06-2305, pp. 1-2, 946 So.2d at 171-72. Thus, we conclude that a binding agreement not to prosecute was properly formed between Mr. Franklin and the district attorney.
*242As the formation and existence of this agreement are undisputed, the district attorney could only claim that his consent should be vitiated by his own unilateral error. See La. Civil Code art. 2029 (“A contract is null when the requirements for its formation have not been met.”); La. Civil Code art. 1948 (“Consent may be vitiated by error...See also State v. Nall, 379 So.2d 731, 733 (La.1980). In order to nullify this agreement, the district attorney would have to establish that but for this error as to the extent of Mr. Franklin’s transgression, Mr. Franklin would not have been admitted into the pretrial diversion program. See La. Civil Code art. 1949 (“Error vitiates consent only when it concerns a cause without which the obligation would not have been incurred and that cause was known or should have been known to the other party.”); La. Civil Code art. 1950 (“Error may concern a cause when it bears on the nature of the contract ... or the person or the qualities of the other party ... or any other circumstance that the parties regarded, or should in good faith have regarded, as a cause of the obligation.”).
But here, error-in-the-cause could not be found for two reasons. First, the district attorney failed to raise this argument at the evidentiary hearing or in his assignments of error in briefing on appeal. See La.C.Cr.P. art. 920(1). Second and | TSsubstantively, the district attorney cannot prove that his unilateral error vitiated his consent and that this agreement, as a result, should be rescinded. See La. Civil Code art. 1831; Peironnet v. Matador Res. Co., 12-2292, p. 25 (La.6/28/13), 144 So.3d 791, 807. The district attorney is charged with the authority to determine how to prosecute defendants in his district. See La.C.Cr.P. art. 61. With this authority, comes the responsibility to ensure that criminal investigators are thorough and comprehensive. Should an error occur, the district attorney, at minimum, is required to show that the error affected the cause of the agreement and that Mr. Franklin knew or should have known that the matter affected by that error was the cause of the agreement for the district attorney. See La Civil Code art. 1949.
The district attorney did not show that the extent of public payroll fraud committed by Mr. Franklin, when including the additional overlaps discovered by Lieutenant Wiloem, would have made Mr. Franklin ineligible for admission into the pretrial diversion program. See Louis, 94-0761, pp. 11-12, 645 So.2d at 1150 (noting that the district attorney bears the burden of showing that a defendant’s continued involvement in illicit activity constituted a breach of an agreement not to prosecute); State v. Kenniston, 07-0849, p. 7 (La.App. 4 Cir. 1/16/08), 976 So.2d 226, 230 (stating that the defendant was ineligible for admission into a diversionary program due to the amount of money at issue in a prosecution for a violation of La. R.S. 14:202). Here, the district attorney made no such showing that 11fiis predecessor or even he would have excluded Mr. Franklin from participation in the diversionary program on account of the pre-diversion conduct of Mr. Franklin.6
We find that the trial judge did not abuse his discretion when he found that the district attorney and Mr. Franklin agreed that Mr. Franklin would not be prosecuted for payroll fraud if he successfully completed the diversionary program.
*243B
We next review the trial judge’s determination that the institution of prosecution for the instant charges was precluded by the terms of the agreement.
In order to properly rule on this motion to quash, the trial judge first made factual findings as to the contents of the terms of this agreement. While the trial judge did not express those findings, the terms of the agreement are clear from the record: If Mr. Franklin successfully completed the pre-trial diversion program, the district attorney would refrain from instituting prosecution against Mr. Franklin for public payroll fraud. The substance of this agreement conforms to the general form of agreements not to prosecute. See Cardon, 06-2305, p. 1, 946 So.2d at 172; Louis, 94-0761, pp. 10-11, 645 So.2d at 1149. See, e.g., Bertucci, 08-1349, p. 2, 990 So.2d at 1276 (“The pre-trial diversion agreement further provided that if respondent complied with all the terms and conditions thereof, he would not be prosecuted for the offense set forth in the bill of information.”); Ansell, 00-2662, p. 1, 788 So.2d at 1173 n. 1. The trial judge then ruled that the district attorney was precluded from instituting the instant prosecution, finding that “a deal is a deal” and, thus, that Mr. Franklin’s other prior acts of public payroll fraud fell within the scope of that agreement.
|l7On appeal, the district attorney does not claim that- Mr. Franklin committed public payroll fraud after the formation of their agreement or with any additional employers. In fact, the investigation by Lieutenant Wiloem found no evidence of recent acts of public payroll fraud or transgressions involving any other employers. Instead, the current district attorney claims that the pre-trial diversion agreement should be construed to include only those dates of public payroll fraud found by Sergeant Wharton and that the additional overlaps unearthed by Lieutenant Wiloem form the basis of a new prosecution. We disagree.
The agreement not to prosecute was not date, but offense-specific. The letter issued to Mr. Franklin by the current district attorney’s office read: “Congratulations. You have successfully completed the Diversionary Program of the District Attorney’s Office. The Office will now dismiss the case.” As previously mentioned, this letter specifically referenced the statute defining and punishing public payroll fraud, La. R.S. 14:138, but did not contain any limiting language or conditions as to the time period of the relevant offenses. This ambiguity must be clarified.
In resolving this matter, we refer by analogy to the Civil Code articles governing the interpretation of contracts. See La Civil Code arts. 2045-2057. When interpreting a contract, we should first attempt to ascertain “the common intent of the parties,” La. Civil Code art. 2045, and to regulate “only those things it appears the parties intended to include.” La. Civil Code art. 2051. As both Articles 2045 and 2051 require a determination of the parties’ intent, which is precisely the issue in dispute and the most unclear in this case, we instead examine other articles to find the rule most applicable to this case.
11sAs the documents evidencing Mr. Franklin’s admission into and completion of the pre-trial diversion program were generated by the district attorney’s office, we interpret any ambiguity contained in those documents’ terms in favor of the party that did not furnish the text — Mr. Franklin. See La. Civil Code art. 2056 (“In case of doubt that cannot otherwise be resolved, a provision in a contract must be interpreted against the party who furnished its text.”). The former district attorney bore the duty to clarify the terms *244of this agreement not to prosecute and the current district attorney to understand the parameters of that agreement. See Santobello, 404 U.S. at 262, 92 S.Ct. 495 (replacement of one prosecutor with another does not justify failure to abide by agreement). The agreement referenced only the specific offense for which the district attorney would refrain from prosecuting Mr. Franklin, but failed to set forth the time parameters for the offenses included in this agreement. We interpret the ambiguity in this agreement in favor of Mr. Franklin and find that the district attorney was precluded by the terms of this agreement from instituting prosecution against Mr. Franklin for his prior acts of public payroll fraud. See Cardon, 06-2305, p. 1, 946 So.2d at 172 (Noting, in a case where “[t]he defendant did not violate the law anew or participate in new criminal conduct after he signed the agreement not to prosecute”, that language in an agreement not to prosecute prohibiting the commission of “new” offenses is ambiguous and “must be construed against the District Attorney’s office which drafted its provisions,” thus restraining the district attorney from pursuing further prosecution); Louis, 94-0761, p. 12, 645 So.2d at 1150. Here, the illicit conduct discovered by the investigations of Sergeant Wharton and Lieutenant Wiloem both involved the same employers and occurred in the same calendar year. None of the newly-discovered violations occurred after Mr. Franklin’s acceptance into the pre-trial diversion program. The trial judge’s | ^interpretation that these acts were included in the terms of this agreement was reasonable and rendered the agreement effective. See La. Civil Code art. 2049.
Thus, we find that the trial judge did not abuse his discretion in finding the scope of this agreement not to prosecute included Mr. Franklin’s other transgressions involving the same employer which preceded his acceptance into the diversionary program.
C
In this Part we analyze the trial judge’s holding that the district attorney breached the agreement not to prosecute by instituting the instant prosecution.
In order to determine whether a breach occurred, we must first understand what constituted compliance. In their agreement, the district attorney agreed to refrain from instituting prosecution for public payroll fraud if Mr. Franklin successfully completed the pretrial diversion program. Their agreement should be interpreted as an onerous, bilateral contract subject to a suspensive condition. See La. Civil Code art. 1909 (“A contract is onerous when each of the parties obtains an advantage in exchange for his obligation.”); La. Civil Code art. 1908 (“A contract is bilateral, or synallag-matic, when the parties obligate themselves reciprocally, so that the obligation of each party is correlative to the obligation of the other.”); La. Civil Code art. 1767 (A contract is subject to a suspen-sive condition “[i]f the obligation may not be enforced until the uncertain event occurs ... ”). Upon the fulfillment of that suspensive condition, the State then became bound to perform an “obligation not to do.” See La. Civil Code arts.1983, 1987.
The suspensive condition in this agreement was Mr. Franklin’s successful completion of the diversionary program. See, e.g., Louis, 94-0761, p. 11, 645 Soj2d20 at 1149. The district attorney concedes that this condition occurred when Mr. Franklin successfully completed that program, and the trial judge clearly found that Mr. Franklin had proven his own full and substantial compliance with the terms of this agreement. Thus, after Mr. Franklin ful*245filled that condition, the obligation “not to do” became enforceable, and the district attorney, as obligor, was bound to refrain from instituting prosecution against Mr. Franklin, the obligee, for public payroll fraud as promised. See id., 94-0761, p. 11, 645 So.2d at 1149-1150 (The agreement not to prosecute “was not enforceable until the occurrence of the uncertain event which was a suspensive condition of the contract.... Considerations of constitutional fairness generally come into play after the formation of an agreement not to prosecute, and generally involve the performance of the defendant’s obligations under the agreement”). See also La. Civil Code art. 1767; La. Civil Code art. 1983 (requiring performance of contracts in good faith).
As a result of Mr. Franklin’s performance, the district attorney initially complied with the terms of this agreement and, in response, “dismissed the case,” thus refraining from instituting prosecution. Subsequent to this, however, the district attorney resuscitated the investigation into Mr. Franklin, instituted formal prosecution for charges included in the scope of that agreement not to prosecute, and breached the agreement previously struck with Mr. Franklin. Non-compliance with the terms of these agreements undermines the trust that is essential to the proper functioning of our system of justice. See State v. Tate, 185 La. 1006, 171 So. 108, 112 (1936) (“The district attorney is a quasi judicial officer. He represents the State, and the State demands no victims. It seeks justice only, equal and impartial justice....”); State v. Hamilton, 96-0807, p. 8 (La.App. 4 Cir. 6/7/96), 677 So.2d 539, 543 (“When, as here, promises are broken, the honor of the system is at stake |⅞1 along with public confidence in the fair and reliable administration of justice. The integrity of the process demands that all participants in this process be clear and reliably dependable in their commitments and promises-”). Thus, we hold that the trial judge, after finding the instant prosecution precluded, did not abuse his discretion in finding that the district attorney breached its agreement not to prosecute Mr. Franklin.
D
Lastly, we determine whether the trial judge abused his discretion by granting Mr. Franklin’s motion to quash the bill of information and dismissing the charges of public payroll fraud.
As previously-stated, the decision whether to admit a defendant into a pretrial diversion program is solely within the discretion of the district attorney as part of his authority not to institute prosecution. See La. Const. art. 5, § 26(B); La.C.Cr.P. art. 61; Hayes, 10-1538, p. 6, 75 So.3d at 13. As prosecution is generally not instituted, the implementation of these agreements is not usually overseen by the district courts as the jurisdiction of those courts has not been invoked. See La. Const. art. 5, § 16(A); Connick, 94-3161, p. 14, 654 So.2d at 1080; La.C.Cr.P. arts. 381-386. Thus, these agreements are traditionally administered and overseen extra-judicially.
Judicial enforcement only becomes necessary after the defendant has successfully complied with its terms of an agreement not to prosecute and the district attorney subsequently breaches. See Cardon, 06-2305, p. 1-2, 946 So.2d at 171-172. In these instances, a remedy must be provided to the defendant harmed by the district attorney’s breach. Louis, 94-0761, p. 11, 645 So.2d at 1149-1150; Santobello, 404 U.S. at 262, 92 S.Ct. 495.
| a?The proper remedy for the breach of the terms of these agreements *246differs slightly from the remedy supplied for violations of the terms of a plea bargain. In the context of plea bargains, usually one of two remedies is offered to the criminal defendant. First, a defendant may demand specific performance of the district attorney’s promise if the defendant can show that the parties reached an agreement, that the defendant performed, and that, in performing, the defendant relinquished an fundamental right. See State v. Givens, 99-3518, p. 15 (La.1/17/01), 776 So.2d 443, 455. A defendant may demand specific performance of the state’s promise if he can show that the parties reached an agreement, that he performed his part of the agreement, and that in doing so, he relinquished a fundamental right. See Louis, 94-0761, p. 9-10, 645 So.2d at 1149-1150. Second, the trial judge can allow for the defendant to rescind his guilty plea and proceed to trial. See State v. Trahan, 99-3470, p. 3 (La.10/5/01), 797 So.2d 38, 40. See also Santobello, 404 U.S. at 262-263, 92 S.Ct. 495 (setting forth these remedies in the context of a plea bargain).
The proper remedy when a district attorney breaches the terms of an agreement not to prosecute can be determined by examining the nature of the obligation. In the context of agreements not to prosecute, the district attorney’s performance is generally conditioned upon the defendant’s successful completion of the pre-trial diversion program. See Louis, 94-0761, p. 11, 645 So.2d at 1149-1150. Upon the occurrence of the suspensive condition in an agreement, i.e. the defendant’s successful completion of the pre-trial diversion program, the district attorney is bound to fulfill his “obligation not to do” and thus refrain from instituting or continuing prosecution against the defendant. The district attorney, as an obligor, “may be restrained from doing anything in violation of an obligation | mnot to do.” La. Civil Code art. 1987 (permitting in the civil context the right to injunctive relief). See, Cardon, 06-2305, pp. 1-2, 946 So.2d at 171-172.
In the context of criminal prosecutions, the proper means of restraining or enjoining the institution or continuance of a prosecution is to sustain the defendant’s motion to quash and dismiss the underlying charges. By sustaining a motion to quash, a trial judge is restraining any continued pursuit of prosecution for the charges contained in that bill of information. Thus, in the event that a trial judge finds that the district attorney subsequently instituted, re-instituted, or pursued the charges pending against a criminal defendant following that defendant’s successful completion of the pre-trial diversion program, a trial judge ensures the district attorney’s specific performance of his obligation by sustaining the motion to quash. See, e.g., Cardon, 06-2305, p. 2, 946 So.2d at 172. The trial judge in this case did just that. After holding that the district attorney had breached his agreement not to prosecute with the defendant, the trial judge, stating that “a deal is a deal,” granted Mr. Franklin’s motion to quash. Accordingly, we find no abuse of discretion in the trial judge’s decision to grant this motion to quash the bill of information.
DECREE
The trial judge’s complained-of ruling which sustained Herman Franklin’s motion to quash this bill of information, dismissed the charge of public payroll fraud, and discharged the defendant is affirmed.
AFFIRMED.
BAGNERIS, J., concurs in the result.LOB RANO, J., dissents with reasons.
. Mr. Franklin also claimed that the institution of this formal charge violated his constitutional right against being twice placed in jeopardy. See U.S. Const, amend. 5; La. Const, art. 1, § 15. Because the trial judge granted relief on another ground and we affirm his ruling on that ground, we pretermit a discussion of this issue.
. Due to the sparse factual record in these proceedings, we have included some background (but not evidentiary) facts gleaned from our opinion in Franklin v. Dep’t of Police, unpub., 10-1581 (La.App. 4 Cir. 4/6/11), 2011 WL 9165414, in which Mr. Franklin appealed the New Orleans Civil Service Commission’s decision regarding the proper employment discipline for this matter.
. La. R.S. 14:138, in relevant part, provides: “Public payroll fraud is committed when ... [a]ny person shall knowingly receive any payment or compensation, or knowingly permit his name to be carried on any employment list or payroll for any payment or compensation from the state, for services not actually rendered by himself, or for services grossly inadequate for the payment or compensation received or to be received according to such employment list or payroll_” La. R.S. 14:138 A(l).
. La.C.Cr.P. art. 62 A states: "The attorney general shall exercise supervision over all district attorneys in the state.”
. In contrast, we apply a de novo standard of review when reviewing rulings on motions to quash involving solely legal issues. See State v. Hamdan, 12-1986, p. 6 (La.3/19/13), 112 So.3d 812, 816; State v. Lawson, 13-0812, p. 6 (La.App. 4 Cir. 11/20/13), 129 So.3d 792, 796 n. 3.
. A district attorney, because of education and experience, would have a difficult burden in convincing a court that his consent to enter into a diversionary agreement was vitiated by error. See Peironnet, 12-2292, p. 25, 144 So.3d at 814.