I found a guide here http://linux.redshift.hu/forums/viewtopic.php?f=10&t=811 that gives a lot of detail, but having tried it, it misses one point. In order to get the "confession" quest, you must answer one or two questions very carefully. I tried a few ideas before I got it right...
After a lot of conversation with Advocate Slemoko, Judge Hangrynyr and The Prosecutor, you finally get a choice -
Prosecutor: The Guard found you within five feet of the victim's body?
Answer 1: Yes, I was close enough to see the victim point his finger at the Guard when he said, "That's my murderer."
Answer 2: No. I wasn't that close.
Answer 3: I don't remember.
If you give answer 2 or 3, you fail the trial and have to fight for your life. Answer 1 gives the "confession" quest, even if you admit to being armed, and admit to being arrested before!
Answer 2 also led to Confession quest in my case. Maybe Persuasion level made the difference.
Then I took the flask to complete the cult leader quest.
Fought and complete Trial quest.