(1) Generally. The attorney for the Commonwealth and the defendant may agree, subject to the approval of the trial court, that the prosecution will be suspended for a specified period after which it will be dismissed on the condition that the defendant not commit a crime during that period, or other conditions agreed upon by the parties. The agreement (or any mutually agreed upon subsequent modifications to the agreement) must be in writing and signed by the parties. (2) Limitations on agreements. The agreement may not specify a period longer than could be imposed upon probation after conviction of the crime charged. The agreement may include conditions that could be imposed upon probation. (3) Filing of agreement; release. Promptly after the agreement is made, the Attorney for the Commonwealth shall file the agreement together with a statement that pursuant to the agreement the prosecution is suspended for a period specified in the statement. Upon this filing and approval by the trial court, the defendant must be released from custody on the charges for which diversion is granted. (4) Termination of agreement; resumption of prosecution.
(a) The defendant may unilaterally terminate this agreement by filing a written notice of termination. Upon filing of the notice of termination, the prosecution may resume as if there had been no agreement. (b) The court may order the agreement terminated and the prosecution resumed if, prior to completion of the agreement by the defendant, the court finds at a hearing the existence of one of the following:
(i) Either party misrepresented material facts affecting the agreement; (ii) The defendant has committed a material violation of the agreement or has failed to complete the terms of the agreement. (5) Termination of the agreement; automatic dismissal. Upon the expiration of the period of suspension of prosecution and upon the completion of the agreement and where there is no motion by the Attorney for the Commonwealth to terminate the agreement upon any grounds permitted under this Rule, the indictment, complaint or charges which are the subject matter of the agreement shall be dismissed with prejudice. In the event that there may be a pending motion by the Commonwealth to terminate the agreement, if the Court shall rule that the motion be denied, then upon entry of said order the indictment, complaint or charges shall be dismissed with prejudice.