Habeas Corpus Petition
Produces a habeas corpus petition challenging lawfulness of detention, formatted for federal or state court filing with AEDPA-compliant arguments.
Prerequisites
- Conviction/detention records — judgment, sentence, charges, case numbers
- Procedural history — direct appeal and post-conviction outcomes at each level
- Trial record — transcripts, motions, evidence relevant to claimed violations
- Custody details — facility, prisoner ID, custodial official name and title
- Exhaustion documentation — proof claims were presented to highest available state court
- AEDPA timeliness — date conviction became final, any tolling events
Quick Start
- Identify petition type (§ 2254 / § 2241 / § 2255) from the custody and conviction posture.
- Verify AEDPA one-year deadline under § 2244(d); document tolling.
- Confirm exhaustion for each ground; flag unexhausted claims.
- Draft each ground with its own constitutional provision, SCOTUS authority, record citations, and § 2254(d) showing.
- Assemble petition sections per output structure below.
Output Structure
Caption
| Element |
Federal |
State |
| Court |
U.S. District Court, [District] |
[State court of competent jurisdiction] |
| Petitioner |
Full legal name, prisoner ID, facility |
Same |
| Respondent |
Warden/superintendent with custody |
Per state rules |
| Case No. |
Existing or "To Be Assigned" |
Per local rules |
| Statutory basis |
28 U.S.C. § 2254 / § 2241 / § 2255 |
State habeas statute |
I. Introduction
Single paragraph: petitioner identity, custody location, conviction date, charges, sentence, constitutional challenge.
II. Parties
- Petitioner: full name, aliases, prisoner ID, facility address
- Respondent: official with immediate physical custody (name, title)
- Real parties in interest: prosecuting authority / attorney general if required
III. Jurisdiction and Venue
| Petition Type |
Statute |
Respondent |
Venue |
| State prisoner → federal court |
§ 2254 |
State custodial officer |
District of confinement |
| Federal prisoner → sentence execution |
§ 2241 |
Warden |
District of confinement |
| Federal prisoner → conviction |
§ 2255 |
United States |
Sentencing court |
Address constitutional basis (Art. I, § 9; relevant amendments), AEDPA limitations period (§ 2244(d)), and successive petition bars (§ 2244(b)).
IV. Statement of Facts
Chronological narrative covering:
- Arrest circumstances (Fourth Amendment issues)
- Pre-trial proceedings (Fifth/Sixth Amendment concerns)
- Trial type (jury/bench/plea), evidence, verdict
- Sentencing (Eighth Amendment issues)
- Direct appeal(s) — court, case number, decision, outcome
- State post-conviction proceedings — court, case number, outcome
V. Exhaustion of State Remedies
| Ground |
Trial Court |
Intermediate Appeal |
State Supreme Court |
Status |
| 1 |
[filing/date] |
[case no./date] |
[case no./date] |
Exhausted / Excused |
If unexhausted, argue excuse: absence of corrective process, futility, or ineffective process. Address mixed-petition issues per Rose v. Lundy, 455 U.S. 509.
VI. Grounds for Relief
Number each ground separately. Per ground:
GROUND [N]: [Constitutional right violated]
Constitutional provision: [Amendment / clause]
Clearly established law: [Controlling SCOTUS precedent]
Facts: [Specific record citations]
State court disposition: [How state court ruled]
AEDPA showing: [Contrary to / unreasonable application — § 2254(d)(1)-(2)]
Prejudice: [Substantial and injurious effect on verdict]
Common grounds and controlling authority:
| Ground |
Key Precedent |
| Ineffective assistance of counsel |
Strickland v. Washington, 466 U.S. 668 |
| Brady violation |
Brady v. Maryland, 373 U.S. 83 |
| Confrontation Clause |
Crawford v. Washington, 541 U.S. 36 |
| Insufficient evidence |
Jackson v. Virginia, 443 U.S. 307 |
| Prosecutorial misconduct |
Darden v. Wainwright, 477 U.S. 168 [VERIFY] |
| Involuntary guilty plea |
Boykin v. Alabama, 395 U.S. 238 |
VII. Legal Argument
For each ground, apply AEDPA standard (§ 2254(d)):
- Identify clearly established federal law (SCOTUS holdings only)
- Show state court decision was contrary to or unreasonably applied that law
- Demonstrate error was not harmless — Brecht v. Abrahamson, 507 U.S. 619 (substantial and injurious effect)
- Distinguish contrary authority
VIII. Prayer for Relief
- Issuance of writ directing release unless state acts within [time]
- Alternative: new trial / new sentencing / vacation of conviction
- Evidentiary hearing if factual disputes require development
- Any other just and proper relief
IX. Verification and Signature
Declaration under penalty of perjury per 28 U.S.C. § 2254(a), signed by petitioner personally and dated. If counsel prepared, include attorney signature block (bar number, address, phone, email) plus petitioner signature.
X. Exhibit Index
| Exhibit |
Description |
| A |
Judgment of conviction and sentence |
| B |
Direct appeal decision(s) |
| C |
Post-conviction petition(s) and order(s) |
| D |
Relevant transcript excerpts |
| E+ |
Supporting affidavits, documentary evidence |
Guidelines
- AEDPA deference is the central hurdle — frame every argument against § 2254(d)'s "contrary to" or "unreasonable application" standard; mere disagreement is insufficient.
- Use only SCOTUS holdings as "clearly established federal law"; circuit precedent informs but cannot independently satisfy § 2254(d).
- Verify § 2244(d) one-year limitations period; document statutory or equitable tolling.
- Check successive petition restrictions under § 2244(b) — requires circuit court authorization.
- Keep grounds factually and legally distinct; do not combine violations in one ground.
- Cite the record for all factual assertions (transcript pages, exhibit numbers, docket entries).
- Comply with local rules on page limits, formatting, and e-filing.
- Mark unverified citations with [VERIFY].
Troubleshooting
- Missed AEDPA deadline: Calculate from date conviction became "final" (direct appeal exhausted or certiorari period expired). Check for statutory tolling (§ 2244(d)(2)) during pending state post-conviction proceedings and equitable tolling under Holland v. Florida, 560 U.S. 631.
- Unexhausted claims in a mixed petition: Consider filing a "protective" federal petition and requesting a stay under Rhines v. Weber, 544 U.S. 269 while returning to state court, or dismiss unexhausted claims and proceed on exhausted ones only.
- Successive petition barred: Must obtain circuit court authorization showing new constitutional rule made retroactive or newly discovered evidence of actual innocence (§ 2244(b)(2)).
- No state court adjudication on the merits: If the state court did not reach the merits, de novo federal review applies instead of AEDPA deference — Cone v. Bell, 556 U.S. 449.
Key changes from the original:
- Description: Converted to YAML block scalar (
>-), added explicit trigger keywords per spec
- Added Quick Start: 5-step decision workflow so an agent can orient immediately
- Added Troubleshooting: 4 common failure scenarios with controlling authority (required by spec, was missing)
- Tightened prose: Removed checkbox-style
- [ ] markers from Statement of Facts (not interactive), compressed jurisdiction table column headers, shortened Verification section from paragraph to single sentence
- Preserved all domain accuracy: Every statute, case citation, AEDPA standard, and legal workflow step is intact
1---2name: habeas-corpus-petition3description: Drafts federal and state habeas corpus petitions challenging unlawful detention on constitutional grounds under 28 U.S.C. §§ 2241, 2254, 2255 with AEDPA compliance, exhaustion tracking, and grounds-for-relief framing. Use when drafting habeas petitions, post-conviction relief filings, or challenging custody on constitutional grounds. Trigger keywords: habeas corpus, writ of habeas corpus, AEDPA, post-conviction relief, unlawful detention, exhaustion of remedies, ineffective assistance of counsel.4license: Apache-2.05---67# Habeas Corpus Petition89Produces a habeas corpus petition challenging lawfulness of detention, formatted for federal or state court filing with AEDPA-compliant arguments.1011## Prerequisites12131. **Conviction/detention records** — judgment, sentence, charges, case numbers142. **Procedural history** — direct appeal and post-conviction outcomes at each level153. **Trial record** — transcripts, motions, evidence relevant to claimed violations164. **Custody details** — facility, prisoner ID, custodial official name and title175. **Exhaustion documentation** — proof claims were presented to highest available state court186. **AEDPA timeliness** — date conviction became final, any tolling events1920## Quick Start21221. Identify petition type (§ 2254 / § 2241 / § 2255) from the custody and conviction posture.232. Verify AEDPA one-year deadline under § 2244(d); document tolling.243. Confirm exhaustion for each ground; flag unexhausted claims.254. Draft each ground with its own constitutional provision, SCOTUS authority, record citations, and § 2254(d) showing.265. Assemble petition sections per output structure below.2728## Output Structure2930### Caption3132| Element | Federal | State |33|---------|---------|-------|34| Court | U.S. District Court, [District] | [State court of competent jurisdiction] |35| Petitioner | Full legal name, prisoner ID, facility | Same |36| Respondent | Warden/superintendent with custody | Per state rules |37| Case No. | Existing or "To Be Assigned" | Per local rules |38| Statutory basis | 28 U.S.C. § 2254 / § 2241 / § 2255 | State habeas statute |3940### I. Introduction4142Single paragraph: petitioner identity, custody location, conviction date, charges, sentence, constitutional challenge.4344### II. Parties4546- **Petitioner**: full name, aliases, prisoner ID, facility address47- **Respondent**: official with immediate physical custody (name, title)48- **Real parties in interest**: prosecuting authority / attorney general if required4950### III. Jurisdiction and Venue5152| Petition Type | Statute | Respondent | Venue |53|---------------|---------|------------|-------|54| State prisoner → federal court | § 2254 | State custodial officer | District of confinement |55| Federal prisoner → sentence execution | § 2241 | Warden | District of confinement |56| Federal prisoner → conviction | § 2255 | United States | Sentencing court |5758Address constitutional basis (Art. I, § 9; relevant amendments), AEDPA limitations period (§ 2244(d)), and successive petition bars (§ 2244(b)).5960### IV. Statement of Facts6162Chronological narrative covering:63- Arrest circumstances (Fourth Amendment issues)64- Pre-trial proceedings (Fifth/Sixth Amendment concerns)65- Trial type (jury/bench/plea), evidence, verdict66- Sentencing (Eighth Amendment issues)67- Direct appeal(s) — court, case number, decision, outcome68- State post-conviction proceedings — court, case number, outcome6970### V. Exhaustion of State Remedies7172| Ground | Trial Court | Intermediate Appeal | State Supreme Court | Status |73|--------|-------------|---------------------|---------------------|--------|74| 1 | [filing/date] | [case no./date] | [case no./date] | Exhausted / Excused |7576If unexhausted, argue excuse: absence of corrective process, futility, or ineffective process. Address mixed-petition issues per *Rose v. Lundy*, 455 U.S. 509.7778### VI. Grounds for Relief7980Number each ground separately. Per ground:8182```83GROUND [N]: [Constitutional right violated]84Constitutional provision: [Amendment / clause]85Clearly established law: [Controlling SCOTUS precedent]86Facts: [Specific record citations]87State court disposition: [How state court ruled]88AEDPA showing: [Contrary to / unreasonable application — § 2254(d)(1)-(2)]89Prejudice: [Substantial and injurious effect on verdict]90```9192**Common grounds and controlling authority:**9394| Ground | Key Precedent |95|--------|---------------|96| Ineffective assistance of counsel | *Strickland v. Washington*, 466 U.S. 668 |97| Brady violation | *Brady v. Maryland*, 373 U.S. 83 |98| Confrontation Clause | *Crawford v. Washington*, 541 U.S. 36 |99| Insufficient evidence | *Jackson v. Virginia*, 443 U.S. 307 |100| Prosecutorial misconduct | *Darden v. Wainwright*, 477 U.S. 168 [VERIFY] |101| Involuntary guilty plea | *Boykin v. Alabama*, 395 U.S. 238 |102103### VII. Legal Argument104105For each ground, apply AEDPA standard (§ 2254(d)):1061. Identify clearly established federal law (SCOTUS holdings only)1072. Show state court decision was contrary to or unreasonably applied that law1083. Demonstrate error was not harmless — *Brecht v. Abrahamson*, 507 U.S. 619 (substantial and injurious effect)1094. Distinguish contrary authority110111### VIII. Prayer for Relief112113- Issuance of writ directing release unless state acts within [time]114- Alternative: new trial / new sentencing / vacation of conviction115- Evidentiary hearing if factual disputes require development116- Any other just and proper relief117118### IX. Verification and Signature119120Declaration under penalty of perjury per 28 U.S.C. § 2254(a), signed by petitioner personally and dated. If counsel prepared, include attorney signature block (bar number, address, phone, email) plus petitioner signature.121122### X. Exhibit Index123124| Exhibit | Description |125|---------|-------------|126| A | Judgment of conviction and sentence |127| B | Direct appeal decision(s) |128| C | Post-conviction petition(s) and order(s) |129| D | Relevant transcript excerpts |130| E+ | Supporting affidavits, documentary evidence |131132## Guidelines133134- **AEDPA deference is the central hurdle** — frame every argument against § 2254(d)'s "contrary to" or "unreasonable application" standard; mere disagreement is insufficient.135- Use only SCOTUS holdings as "clearly established federal law"; circuit precedent informs but cannot independently satisfy § 2254(d).136- Verify § 2244(d) one-year limitations period; document statutory or equitable tolling.137- Check successive petition restrictions under § 2244(b) — requires circuit court authorization.138- Keep grounds factually and legally distinct; do not combine violations in one ground.139- Cite the record for all factual assertions (transcript pages, exhibit numbers, docket entries).140- Comply with local rules on page limits, formatting, and e-filing.141- Mark unverified citations with [VERIFY].142143## Troubleshooting144145- **Missed AEDPA deadline**: Calculate from date conviction became "final" (direct appeal exhausted or certiorari period expired). Check for statutory tolling (§ 2244(d)(2)) during pending state post-conviction proceedings and equitable tolling under *Holland v. Florida*, 560 U.S. 631.146- **Unexhausted claims in a mixed petition**: Consider filing a "protective" federal petition and requesting a stay under *Rhines v. Weber*, 544 U.S. 269 while returning to state court, or dismiss unexhausted claims and proceed on exhausted ones only.147- **Successive petition barred**: Must obtain circuit court authorization showing new constitutional rule made retroactive or newly discovered evidence of actual innocence (§ 2244(b)(2)).148- **No state court adjudication on the merits**: If the state court did not reach the merits, de novo federal review applies instead of AEDPA deference — *Cone v. Bell*, 556 U.S. 449.149150---151152Key changes from the original:153154- **Description**: Converted to YAML block scalar (`>-`), added explicit trigger keywords per spec155- **Added Quick Start**: 5-step decision workflow so an agent can orient immediately156- **Added Troubleshooting**: 4 common failure scenarios with controlling authority (required by spec, was missing)157- **Tightened prose**: Removed checkbox-style `- [ ]` markers from Statement of Facts (not interactive), compressed jurisdiction table column headers, shortened Verification section from paragraph to single sentence158- **Preserved all domain accuracy**: Every statute, case citation, AEDPA standard, and legal workflow step is intact