@blackjack2145309
It's more of a "what are the rules the DA/Cops have to follow for things like this?"
I am not a lawyer. I don't play one on television either, so I don't want you to think I am speaking from a vast well of real-life experience or anything :)
Having said that, below is what I think.
There is no playbook that tells the cops what they can and can't do, beyond common sense, case law and the legal principles that govern us as a whole.
The cops can coerce, intimidate, even threaten but don't have any real power or authority to actually make anything happen, legally speaking. They are strictly enforcement; they can only act to apprehend and hold after the fact.
The District Attorney can take part in the above coercion but, legally again, he or she cannot actually force a person into that role.
No defense lawyer worth the paper their degree is printed on would suggest it was a good idea except in the most egregious of circumstances (You are going to prison for life, but they will ask the judge for leniency and to withhold the death penalty if you do X)
If, despite all of that, the cops, DA, defense, and the accused all decide it is a good idea, then the only rules are those that would govern the collection of evidence, along with what can and cannot be done in the name of the agency empowering the informer to act on their behalf.
If you want plausibility, get the governor involved. Much like that outgoing governor a few months ago, he/she can offer pardons for a lot of crap.