First, a U.S.C. § 2254 allows us to file a petition for Habeas Corpus when the client is in custody under sentence of a state court and is in a state prison. Petition for Writ of Habeas Corpus.A copy of any mandate that justifies the detention of the petitioner must be attached to the affidavit and the original mandate produced at the hearing. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. You should use this form if. 1. To use this form, you must be a person who is or will be serving a sentence under a judgment against you in a state court. The method used is habeas corpus. Federal law requires that in order to preserve a competency to be executed claim the claim must be raised in the initial petition for habeas corpus. Petitioner, Steven Franklin, seeks a writ of habeas corpus. A request for a Franklin evidence preservation hearing does not require adherence to "the rigorous pleading and proof requirements for habeas corpus."