litigation coordinator
defense strategist
mock prosecutor
case investigator
evidence challenge attorney

I need you to set up a 5-agent pipeline for criminal trial preparation. The team develops a defense theory of the case and an evidence/witness workup in parallel, with each side informing the other. A case arrives as a neutral case packet in `case.md`: charges, alleged facts, discovery summaries, known witnesses, key dates, and procedural posture. The pipeline alternates between revising the defense theory and revising the evidence/witness workup.

The five agents:

- **litigation coordinator** orchestrates the run by alternating one defense-theory step with one evidence-workup step and tracking progress. It does no case analysis, investigation, or review itself.
- **defense theory loop** — the **defense strategist** writes the defense theory to `DEFENSE_THEORY.md`; the **mock prosecutor** judges it from a prosecution-style adversarial perspective. The defense strategist reads `EVIDENCE_WORKUP.md` on each revision pass to incorporate new factual support, witness issues, and evidentiary weaknesses.
- **evidence workup loop** — the **case investigator** writes the evidence and witness workup to `EVIDENCE_WORKUP.md`; the **evidence challenge attorney** judges it. The case investigator reads `DEFENSE_THEORY.md` on each revision pass to align investigation priorities with the latest defense theory.

At the end of every turn, each of the subagents briefly reports back what they did, what difficulties they hit, and any open questions.

The pipeline hands work off through plan-namespaced files:

- `case.md` — the original case packet, read-only. All four domain agents read it.
- `plans/{id}-{slug}/PLAN.md` — one pre-existing defense-preparation plan per directory, K plans total, given as input and read-only. All four domain agents read the `PLAN.md` of the plan they are currently assigned to.
- `plans/{id}-{slug}/DEFENSE_THEORY.md` — the theory of defense for that plan. The defense strategist writes; the mock prosecutor reviews; the case investigator and evidence challenge attorney read it.
- `plans/{id}-{slug}/EVIDENCE_WORKUP.md` — the witness, exhibit, investigation, and evidentiary workup for that plan. The case investigator writes; the evidence challenge attorney reviews; the defense strategist and mock prosecutor read it.

Each reviewer records its score as a `<review score=X>` block inside the file it reviewed, overwriting any previous block. The litigation coordinator reads those scores to drive the loops.

Each plan develops independently. Cross-read between `DEFENSE_THEORY.md` and `EVIDENCE_WORKUP.md` happens only within the same plan; an agent assigned to one plan never reads another plan's files. The litigation coordinator round-robins across the K plans: each plan gets one defense-theory step plus one evidence-workup step per full cycle.

Within each plan, neither the defense theory nor the evidence workup finishes first. Both loops alternate within each plan, capped at a fixed total iteration count across all plans. The defense theory may tighten after seeing witness availability, impeachment material, or exhibit problems; the evidence workup may redirect after seeing the defense theory's refined factual disputes, legal elements, and trial themes.

I'm providing the following information:

<f1>
Keep `EVIDENCE_WORKUP.md` lean. Its body — everything except the `<review>` block — must stay under 3000 words (~20KB), about a four-page note; record only the current final state and move iteration-by-iteration history into a separate `CHANGELOG.md`. Bold text must not exceed 5% of the file: if everything is bold, nothing is.
</f1>

<f2>
You orchestrate the run; you never analyze the case, investigate facts, or review work yourself — you only dispatch the right agent at the right time.

- **Init** — discover the K plan directories under `plans/{id}-{slug}/`. Create `STATE.md` with `iter: 0`, `current_plan_idx: 0`, and a per-plan record holding each plan's id, last side, and latest defense-theory/evidence-workup scores.
- **Round-robin pool loop** — at each cycle, advance to the next plan in the round-robin order. For that plan, dispatch one defense-theory step (defense strategist, then mock prosecutor) and one evidence-workup step (case investigator, then evidence challenge attorney); then move to the next plan. After all K plans have each had one cycle, loop back to the first plan.
- When dispatching, always pass the plan's directory path so the dispatched agent knows which `PLAN.md` / `DEFENSE_THEORY.md` / `EVIDENCE_WORKUP.md` to operate on.
- Neither side terminates early on its own score within a plan; even a strong-looking defense theory may need to revise once the evidence workup reports witness problems or exhibit risks. The pool keeps cycling even after individual plans look done.
- Cap the total at 20 × K dispatches (10 defense-theory + 10 evidence-workup per plan, summed across K plans). After the cap, stop and summarize per plan.
- Keep the current iteration count, current plan index, and per-plan latest scores in `STATE.md`, accurate after each dispatch. Read each score from the relevant plan's reviewer `<review score=X>` block. Commit progress after each step.
- Read each agent's brief narrative reply on return. If an agent reports an unresolved error, append it to `error-log.txt` (timestamp + plan id + agent name + content) and continue with the next dispatch.
</f2>

<f3>
You are working on criminal trial preparation for a specific case. The original case packet is given in `case.md`; it may include the charges, statutory elements, police reports, discovery summaries, witness lists, exhibits, procedural deadlines, and known defense concerns. Read it before starting your part.
</f3>

<f4>
Score the work from 1 to 10, and record your verdict by overwriting the single `<review score=X>` block at the end of the document you reviewed — overwrite the existing one, never append a second.

Score strictly on real merit. Do not give any credit for a piece of work merely being honest about its own shortcomings — “this is unsupported, but I’m telling you it is unsupported” is still a failing result, not a passing one.
</f4>

<f5>
Produce the defense theory for the plan the litigation coordinator has assigned you to this round, and write it to that plan's `DEFENSE_THEORY.md` under `plans/{id}-{slug}/DEFENSE_THEORY.md`. A complete theory covers four kinds of claim, each supported by the case packet, discovery references, legal authority, or a concrete investigative need.

- **Elements and burden** — identify each charged offense, the prosecution's burden, the elements most vulnerable to challenge, and any lesser-included or alternative theories that affect trial posture.
- **Factual narrative** — state the defense account of what happened, what the defense does not need to prove, which prosecution facts are accepted, and which facts are contested.
- **Evidentiary and constitutional issues** — suppression arguments, hearsay problems, authentication gaps, chain-of-custody concerns, identification reliability, privilege issues, confrontation concerns, and impeachment themes.
- **Trial strategy and risk** — likely prosecution story, anticipated witness sequencing, cross-examination themes, jury-instruction issues, plea/trial leverage, and the consequences if a key factual assumption fails.

Ground your claims against the plan's `EVIDENCE_WORKUP.md` if it has reported witness interviews, exhibit status, or admissibility concerns. A defense theory that depends on a missing witness, inadmissible exhibit, or contradicted timeline needs revision, a backup theory, or a specific investigation task. Be concrete. “Element three depends entirely on Officer Lee’s distance estimate, which is impeachable using body-camera timestamp 00:13:44 and dispatch log entry C-17” is useful; “the state may have weaknesses” is not. Do not read or aggregate across other plans' files.
</f5>

<f6>
When you finish, briefly report to the litigation coordinator: what you did, what difficulties you hit or did not resolve, and any open questions.
</f6>

<f7>
Match the tool to the case structure; do not force an ill-suited one. The list below is useful in criminal defense theory development.

| Tool | Suitable for |
|---|---|
| Element-by-element burden analysis | Identifying which charge elements the prosecution can and cannot prove beyond a reasonable doubt |
| Timeline reconstruction | Testing alibi, opportunity, sequence, response time, and witness perception claims |
| Suppression analysis | Stops, searches, seizures, interrogations, identifications, warrants, consent, and attenuation issues |
| Hearsay and confrontation analysis | Statements offered for truth, testimonial statements, unavailable declarants, and exceptions |
| Impeachment mapping | Prior inconsistent statements, bias, motive, perception, memory, criminal history, and cooperation benefits |
| Authentication and chain-of-custody review | Physical evidence, digital evidence, lab reports, surveillance video, metadata, and exhibit foundations |
| Alternative-perpetrator or third-party culpability analysis | Cases with plausible access, motive, opportunity, or forensic inconsistency pointing away from the accused |
| Jury-instruction and verdict-form analysis | Lesser-included offenses, unanimity issues, mental-state distinctions, defenses, and limiting instructions |
| Risk and remedy analysis | Motions in limine, suppression motions, severance, continuances, stipulations, and preservation for appeal |
</f7>

<f8>
You operate on the plan the litigation coordinator has assigned you to this round. Read `case.md`, your assigned plan's `PLAN.md`, and your assigned plan's `DEFENSE_THEORY.md`, then build the evidence and witness workup:

- Identify every witness, exhibit, recording, report, physical item, digital artifact, and expert issue relevant to the assigned plan. For each item, state its source, current status, admissibility posture, foundation requirements, and the defense use or risk.
- Make the workup testable against the plan's `DEFENSE_THEORY.md`. If the defense theory relies on a timeline gap, identify the documents or witnesses that prove or undermine that gap. If the theory asserts an invariant fact such as “the accused was not present before 9:42 p.m.,” the workup should list every item that supports or contradicts it.
- Do only lawful, ethical preparation. Do not fabricate facts, coach witnesses to change testimony, conceal discoverable material, or suggest any improper contact. If a needed fact is unknown, mark it as unknown and identify the lawful next step.
- Sanity-check the workup against the plan's `DEFENSE_THEORY.md`. A witness who is essential to the theory should have availability, contact status, expected testimony, impeachment exposure, and subpoena needs documented. An exhibit that the theory needs should have authenticity, chain of custody, and admissibility issues addressed.

Write the evidence/witness workup and its current results in your assigned plan's `EVIDENCE_WORKUP.md`. Do not read or write any other plan's files.
</f8>

<f9>
Review your assigned plan's `EVIDENCE_WORKUP.md` against `case.md`, against the plan's `PLAN.md`, and against the plan's `DEFENSE_THEORY.md`. Operate strictly on the assigned plan's files; do not look at other plans.

- Inspect the reported workup for anomalies, missing sources, unreasonable factual assumptions, or conflicts with the charges, discovery summaries, witness list, or plan instructions.
- Open the plan's `DEFENSE_THEORY.md`. For every factual premise, evidentiary claim, suppression issue, impeachment theme, and trial-use assertion the defense theory relies on, write a check into a separate `challenge_matrix.md` under the plan's directory: does the workup identify the supporting item, admissibility route, foundation witness, contradiction risk, and next step? Work through the matrix. Name any witness, exhibit, or fact that fails the check.
- Read the workup closely and spot-check it for defects — stale contact status, missing subpoena deadlines, unverified alibi details, unaddressed hearsay, chain-of-custody gaps, foundation problems, or investigation tasks that contradict the chosen defense theory. A quiet gap that causes the theory to collapse at trial is worse than an obvious missing item.
- Treat the workup as finished only when every material factual premise has a source, every theory-claimed evidentiary use has an admissibility path or identified risk, and every key witness or exhibit is consistent with the defense theory — not merely when the file is neatly organized.
- Check the length of the plan's `EVIDENCE_WORKUP.md`: if it exceeds 20KB, give a warning, but do not deduct points for it.
- Check the bold ratio of the plan's `EVIDENCE_WORKUP.md`: if bold text exceeds 5% of the file, give a warning, but do not deduct points for it.
</f9>

<f10>
Claude responds well to clear, explicit instructions. Being specific about your desired output can help enhance results. If you want "above and beyond" behavior, explicitly request it rather than relying on the model to infer this from vague prompts.

Think of Claude as a brilliant but new employee who lacks context on your norms and workflows. The more precisely you explain what you want, the better the result.

Topology rule: Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they'd be confused, Claude will be too.

- Be specific about the desired output format and constraints.
- Provide instructions as sequential steps using numbered lists or bullet points when the order or completeness of steps matters.
</f10>

<f11>
You operate on the plan the litigation coordinator has assigned you to this round. Your defense theory lives in that plan's `DEFENSE_THEORY.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the mock prosecutor as a loop, alternating with that plan's evidence-workup loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `DEFENSE_THEORY.md` does not exist yet, this is the first pass for that plan: produce the defense theory from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `DEFENSE_THEORY.md` already exists, it carries the mock prosecutor's `<review>` block. Read that feedback. Then open the plan's `EVIDENCE_WORKUP.md` and look at the latest reported witness status, exhibit issues, timeline details, and admissibility concerns — they may invalidate, sharpen, or motivate revisions to your defense theory. Revise the plan's `DEFENSE_THEORY.md` in place to address every reviewer point raised and to incorporate any factual development that changes your analysis. Don't discard the previous theory and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f11>

<f12>
Review your assigned plan's `DEFENSE_THEORY.md` against `case.md`, against the plan's `PLAN.md`, and against the facts reported in the plan's `EVIDENCE_WORKUP.md` if any. Operate strictly on the assigned plan's files; do not look at other plans.

- **Faithfulness** — does the defense theory correctly describe the charges, procedural posture, facts, discovery, and plan framing? Check statutory elements, dates, witness roles, exhibit references, and what the prosecution must actually prove.
- **Adversarial soundness** — for each defense claim, test how a prosecutor would attack it. Flag unsupported leaps, overstatements, factual assumptions with no record support, and legal arguments that depend on missing authority.
- **Factual grounding** — open the plan's `EVIDENCE_WORKUP.md`. If it reports witness interviews, exhibit issues, timeline details, or admissibility problems, does the defense theory account for them? A defense theory that relies on a contradicted fact, unavailable witness, or excluded exhibit must be narrowed, supplemented, or labeled as risky.

Be brief and specific. Do not write the defense theory yourself — only review. If a claim is wrong, say which one and why.
</f12>

<f13>
You operate on the plan the litigation coordinator has assigned you to this round. Your evidence/witness workup lives in that plan's `EVIDENCE_WORKUP.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the evidence challenge attorney as a loop, alternating with that plan's defense-theory loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `EVIDENCE_WORKUP.md` does not exist yet, this is the first pass for that plan: produce the workup from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `EVIDENCE_WORKUP.md` already exists, it carries the evidence challenge attorney's `<review>` block. Read that feedback. Then open the plan's `DEFENSE_THEORY.md` and check whether the latest defense theory introduces factual premises, suppression issues, evidentiary uses, impeachment themes, or trial themes your current workup does not yet support — for example a timeline assertion with no source, an alibi witness with no availability check, or a chain-of-custody challenge with no exhibit foundation review. Revise the plan's `EVIDENCE_WORKUP.md` in place to address every reviewer point and to align with the latest defense theory. Don't discard the previous workup and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f13>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (litigation coordinator, defense strategist, mock prosecutor, case investigator, evidence challenge attorney), which items should go in its prompt? Respond with a JSON object like {"litigation coordinator": ["f?"], "defense strategist": ["f?"], "mock prosecutor": ["f?"], "case investigator": ["f?"], "evidence challenge attorney": ["f?"]}. No other output.

I need you to set up a 5-agent pipeline for criminal trial preparation. The team develops a defense theory of the case and an evidence/witness workup in parallel, with each side informing the other. A case arrives as a neutral case packet in `case.md`: charges, alleged facts, discovery summaries, known witnesses, key dates, and procedural posture. The pipeline alternates between revising the defense theory and revising the evidence/witness workup.

The five agents:

- **litigation coordinator** orchestrates the run by alternating one defense-theory step with one evidence-workup step and tracking progress. It does no case analysis, investigation, or review itself.
- **defense theory loop** — the **defense strategist** writes the defense theory to `DEFENSE_THEORY.md`; the **mock prosecutor** judges it from a prosecution-style adversarial perspective. The defense strategist reads `EVIDENCE_WORKUP.md` on each revision pass to incorporate new factual support, witness issues, and evidentiary weaknesses.
- **evidence workup loop** — the **case investigator** writes the evidence and witness workup to `EVIDENCE_WORKUP.md`; the **evidence challenge attorney** judges it. The case investigator reads `DEFENSE_THEORY.md` on each revision pass to align investigation priorities with the latest defense theory.

At the end of every turn, each of the subagents briefly reports back what they did, what difficulties they hit, and any open questions.

The pipeline hands work off through plan-namespaced files:

- `case.md` — the original case packet, read-only. All four domain agents read it.
- `plans/{id}-{slug}/PLAN.md` — one pre-existing defense-preparation plan per directory, K plans total, given as input and read-only. All four domain agents read the `PLAN.md` of the plan they are currently assigned to.
- `plans/{id}-{slug}/DEFENSE_THEORY.md` — the theory of defense for that plan. The defense strategist writes; the mock prosecutor reviews; the case investigator and evidence challenge attorney read it.
- `plans/{id}-{slug}/EVIDENCE_WORKUP.md` — the witness, exhibit, investigation, and evidentiary workup for that plan. The case investigator writes; the evidence challenge attorney reviews; the defense strategist and mock prosecutor read it.

Each reviewer records its score as a `<review score=X>` block inside the file it reviewed, overwriting any previous block. The litigation coordinator reads those scores to drive the loops.

Each plan develops independently. Cross-read between `DEFENSE_THEORY.md` and `EVIDENCE_WORKUP.md` happens only within the same plan; an agent assigned to one plan never reads another plan's files. The litigation coordinator round-robins across the K plans: each plan gets one defense-theory step plus one evidence-workup step per full cycle.

Within each plan, neither the defense theory nor the evidence workup finishes first. Both loops alternate within each plan, capped at a fixed total iteration count across all plans. The defense theory may tighten after seeing witness availability, impeachment material, or exhibit problems; the evidence workup may redirect after seeing the defense theory's refined factual disputes, legal elements, and trial themes.

I'm providing the following prompt fragments:

<f1>
Keep `EVIDENCE_WORKUP.md` lean. Its body — everything except the `<review>` block — must stay under 3000 words (~20KB), about a four-page note; record only the current final state and move iteration-by-iteration history into a separate `CHANGELOG.md`. Bold text must not exceed 5% of the file: if everything is bold, nothing is.
</f1>

<f2>
You orchestrate the run; you never analyze the case, investigate facts, or review work yourself — you only dispatch the right agent at the right time.

- **Init** — discover the K plan directories under `plans/{id}-{slug}/`. Create `STATE.md` with `iter: 0`, `current_plan_idx: 0`, and a per-plan record holding each plan's id, last side, and latest defense-theory/evidence-workup scores.
- **Round-robin pool loop** — at each cycle, advance to the next plan in the round-robin order. For that plan, dispatch one defense-theory step (defense strategist, then mock prosecutor) and one evidence-workup step (case investigator, then evidence challenge attorney); then move to the next plan. After all K plans have each had one cycle, loop back to the first plan.
- When dispatching, always pass the plan's directory path so the dispatched agent knows which `PLAN.md` / `DEFENSE_THEORY.md` / `EVIDENCE_WORKUP.md` to operate on.
- Neither side terminates early on its own score within a plan; even a strong-looking defense theory may need to revise once the evidence workup reports witness problems or exhibit risks. The pool keeps cycling even after individual plans look done.
- Cap the total at 20 × K dispatches (10 defense-theory + 10 evidence-workup per plan, summed across K plans). After the cap, stop and summarize per plan.
- Keep the current iteration count, current plan index, and per-plan latest scores in `STATE.md`, accurate after each dispatch. Read each score from the relevant plan's reviewer `<review score=X>` block. Commit progress after each step.
- Read each agent's brief narrative reply on return. If an agent reports an unresolved error, append it to `error-log.txt` (timestamp + plan id + agent name + content) and continue with the next dispatch.
</f2>

<f3>
You are working on criminal trial preparation for a specific case. The original case packet is given in `case.md`; it may include the charges, statutory elements, police reports, discovery summaries, witness lists, exhibits, procedural deadlines, and known defense concerns. Read it before starting your part.
</f3>

<f4>
Score the work from 1 to 10, and record your verdict by overwriting the single `<review score=X>` block at the end of the document you reviewed — overwrite the existing one, never append a second.

Score strictly on real merit. Do not give any credit for a piece of work merely being honest about its own shortcomings — “this is unsupported, but I’m telling you it is unsupported” is still a failing result, not a passing one.
</f4>

<f5>
Produce the defense theory for the plan the litigation coordinator has assigned you to this round, and write it to that plan's `DEFENSE_THEORY.md` under `plans/{id}-{slug}/DEFENSE_THEORY.md`. A complete theory covers four kinds of claim, each supported by the case packet, discovery references, legal authority, or a concrete investigative need.

- **Elements and burden** — identify each charged offense, the prosecution's burden, the elements most vulnerable to challenge, and any lesser-included or alternative theories that affect trial posture.
- **Factual narrative** — state the defense account of what happened, what the defense does not need to prove, which prosecution facts are accepted, and which facts are contested.
- **Evidentiary and constitutional issues** — suppression arguments, hearsay problems, authentication gaps, chain-of-custody concerns, identification reliability, privilege issues, confrontation concerns, and impeachment themes.
- **Trial strategy and risk** — likely prosecution story, anticipated witness sequencing, cross-examination themes, jury-instruction issues, plea/trial leverage, and the consequences if a key factual assumption fails.

Ground your claims against the plan's `EVIDENCE_WORKUP.md` if it has reported witness interviews, exhibit status, or admissibility concerns. A defense theory that depends on a missing witness, inadmissible exhibit, or contradicted timeline needs revision, a backup theory, or a specific investigation task. Be concrete. “Element three depends entirely on Officer Lee’s distance estimate, which is impeachable using body-camera timestamp 00:13:44 and dispatch log entry C-17” is useful; “the state may have weaknesses” is not. Do not read or aggregate across other plans' files.
</f5>

<f6>
When you finish, briefly report to the litigation coordinator: what you did, what difficulties you hit or did not resolve, and any open questions.
</f6>

<f7>
Match the tool to the case structure; do not force an ill-suited one. The list below is useful in criminal defense theory development.

| Tool | Suitable for |
|---|---|
| Element-by-element burden analysis | Identifying which charge elements the prosecution can and cannot prove beyond a reasonable doubt |
| Timeline reconstruction | Testing alibi, opportunity, sequence, response time, and witness perception claims |
| Suppression analysis | Stops, searches, seizures, interrogations, identifications, warrants, consent, and attenuation issues |
| Hearsay and confrontation analysis | Statements offered for truth, testimonial statements, unavailable declarants, and exceptions |
| Impeachment mapping | Prior inconsistent statements, bias, motive, perception, memory, criminal history, and cooperation benefits |
| Authentication and chain-of-custody review | Physical evidence, digital evidence, lab reports, surveillance video, metadata, and exhibit foundations |
| Alternative-perpetrator or third-party culpability analysis | Cases with plausible access, motive, opportunity, or forensic inconsistency pointing away from the accused |
| Jury-instruction and verdict-form analysis | Lesser-included offenses, unanimity issues, mental-state distinctions, defenses, and limiting instructions |
| Risk and remedy analysis | Motions in limine, suppression motions, severance, continuances, stipulations, and preservation for appeal |
</f7>

<f8>
You operate on the plan the litigation coordinator has assigned you to this round. Read `case.md`, your assigned plan's `PLAN.md`, and your assigned plan's `DEFENSE_THEORY.md`, then build the evidence and witness workup:

- Identify every witness, exhibit, recording, report, physical item, digital artifact, and expert issue relevant to the assigned plan. For each item, state its source, current status, admissibility posture, foundation requirements, and the defense use or risk.
- Make the workup testable against the plan's `DEFENSE_THEORY.md`. If the defense theory relies on a timeline gap, identify the documents or witnesses that prove or undermine that gap. If the theory asserts an invariant fact such as “the accused was not present before 9:42 p.m.,” the workup should list every item that supports or contradicts it.
- Do only lawful, ethical preparation. Do not fabricate facts, coach witnesses to change testimony, conceal discoverable material, or suggest any improper contact. If a needed fact is unknown, mark it as unknown and identify the lawful next step.
- Sanity-check the workup against the plan's `DEFENSE_THEORY.md`. A witness who is essential to the theory should have availability, contact status, expected testimony, impeachment exposure, and subpoena needs documented. An exhibit that the theory needs should have authenticity, chain of custody, and admissibility issues addressed.

Write the evidence/witness workup and its current results in your assigned plan's `EVIDENCE_WORKUP.md`. Do not read or write any other plan's files.
</f8>

<f9>
Review your assigned plan's `EVIDENCE_WORKUP.md` against `case.md`, against the plan's `PLAN.md`, and against the plan's `DEFENSE_THEORY.md`. Operate strictly on the assigned plan's files; do not look at other plans.

- Inspect the reported workup for anomalies, missing sources, unreasonable factual assumptions, or conflicts with the charges, discovery summaries, witness list, or plan instructions.
- Open the plan's `DEFENSE_THEORY.md`. For every factual premise, evidentiary claim, suppression issue, impeachment theme, and trial-use assertion the defense theory relies on, write a check into a separate `challenge_matrix.md` under the plan's directory: does the workup identify the supporting item, admissibility route, foundation witness, contradiction risk, and next step? Work through the matrix. Name any witness, exhibit, or fact that fails the check.
- Read the workup closely and spot-check it for defects — stale contact status, missing subpoena deadlines, unverified alibi details, unaddressed hearsay, chain-of-custody gaps, foundation problems, or investigation tasks that contradict the chosen defense theory. A quiet gap that causes the theory to collapse at trial is worse than an obvious missing item.
- Treat the workup as finished only when every material factual premise has a source, every theory-claimed evidentiary use has an admissibility path or identified risk, and every key witness or exhibit is consistent with the defense theory — not merely when the file is neatly organized.
- Check the length of the plan's `EVIDENCE_WORKUP.md`: if it exceeds 20KB, give a warning, but do not deduct points for it.
- Check the bold ratio of the plan's `EVIDENCE_WORKUP.md`: if bold text exceeds 5% of the file, give a warning, but do not deduct points for it.
</f9>

<f10>
Claude responds well to clear, explicit instructions. Being specific about your desired output can help enhance results. If you want "above and beyond" behavior, explicitly request it rather than relying on the model to infer this from vague prompts.

Think of Claude as a brilliant but new employee who lacks context on your norms and workflows. The more precisely you explain what you want, the better the result.

Topology rule: Show your prompt to a colleague with minimal context on the task and ask them to follow it. If they'd be confused, Claude will be too.

- Be specific about the desired output format and constraints.
- Provide instructions as sequential steps using numbered lists or bullet points when the order or completeness of steps matters.
</f10>

<f11>
You operate on the plan the litigation coordinator has assigned you to this round. Your defense theory lives in that plan's `DEFENSE_THEORY.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the mock prosecutor as a loop, alternating with that plan's evidence-workup loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `DEFENSE_THEORY.md` does not exist yet, this is the first pass for that plan: produce the defense theory from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `DEFENSE_THEORY.md` already exists, it carries the mock prosecutor's `<review>` block. Read that feedback. Then open the plan's `EVIDENCE_WORKUP.md` and look at the latest reported witness status, exhibit issues, timeline details, and admissibility concerns — they may invalidate, sharpen, or motivate revisions to your defense theory. Revise the plan's `DEFENSE_THEORY.md` in place to address every reviewer point raised and to incorporate any factual development that changes your analysis. Don't discard the previous theory and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f11>

<f12>
Review your assigned plan's `DEFENSE_THEORY.md` against `case.md`, against the plan's `PLAN.md`, and against the facts reported in the plan's `EVIDENCE_WORKUP.md` if any. Operate strictly on the assigned plan's files; do not look at other plans.

- **Faithfulness** — does the defense theory correctly describe the charges, procedural posture, facts, discovery, and plan framing? Check statutory elements, dates, witness roles, exhibit references, and what the prosecution must actually prove.
- **Adversarial soundness** — for each defense claim, test how a prosecutor would attack it. Flag unsupported leaps, overstatements, factual assumptions with no record support, and legal arguments that depend on missing authority.
- **Factual grounding** — open the plan's `EVIDENCE_WORKUP.md`. If it reports witness interviews, exhibit issues, timeline details, or admissibility problems, does the defense theory account for them? A defense theory that relies on a contradicted fact, unavailable witness, or excluded exhibit must be narrowed, supplemented, or labeled as risky.

Be brief and specific. Do not write the defense theory yourself — only review. If a claim is wrong, say which one and why.
</f12>

<f13>
You operate on the plan the litigation coordinator has assigned you to this round. Your evidence/witness workup lives in that plan's `EVIDENCE_WORKUP.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the evidence challenge attorney as a loop, alternating with that plan's defense-theory loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `EVIDENCE_WORKUP.md` does not exist yet, this is the first pass for that plan: produce the workup from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `EVIDENCE_WORKUP.md` already exists, it carries the evidence challenge attorney's `<review>` block. Read that feedback. Then open the plan's `DEFENSE_THEORY.md` and check whether the latest defense theory introduces factual premises, suppression issues, evidentiary uses, impeachment themes, or trial themes your current workup does not yet support — for example a timeline assertion with no source, an alibi witness with no availability check, or a chain-of-custody challenge with no exhibit foundation review. Revise the plan's `EVIDENCE_WORKUP.md` in place to address every reviewer point and to align with the latest defense theory. Don't discard the previous workup and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f13>

Each agent's prompt should contain only the fragments that agent needs to do its job. When you include a fragment, paste the FULL block verbatim — no paraphrasing, no partial inclusion, no rewriting of fragment content. Brief connective text between fragments (e.g., "Then: ...", "Note: ...") is fine. Format: one markdown section per role, with the role name as an h1 header (e.g. `# litigation coordinator`). Output only the headered prompts, no preamble.


I need you to set up a 5-agent pipeline for criminal trial preparation. The team develops a defense theory of the case and an evidence/witness workup in parallel, with each side informing the other. A case arrives as a neutral case packet in `case.md`: charges, alleged facts, discovery summaries, known witnesses, key dates, and procedural posture. The pipeline alternates between revising the defense theory and revising the evidence/witness workup.

The five agents:

- **litigation coordinator** orchestrates the run by alternating one defense-theory step with one evidence-workup step and tracking progress. It does no case analysis, investigation, or review itself.
- **defense theory loop** — the **defense strategist** writes the defense theory to `DEFENSE_THEORY.md`; the **mock prosecutor** judges it from a prosecution-style adversarial perspective. The defense strategist reads `EVIDENCE_WORKUP.md` on each revision pass to incorporate new factual support, witness issues, and evidentiary weaknesses.
- **evidence workup loop** — the **case investigator** writes the evidence and witness workup to `EVIDENCE_WORKUP.md`; the **evidence challenge attorney** judges it. The case investigator reads `DEFENSE_THEORY.md` on each revision pass to align investigation priorities with the latest defense theory.

At the end of every turn, each of the subagents briefly reports back what they did, what difficulties they hit, and any open questions.

The pipeline hands work off through plan-namespaced files:

- `case.md` — the original case packet, read-only. All four domain agents read it.
- `plans/{id}-{slug}/PLAN.md` — one pre-existing defense-preparation plan per directory, K plans total, given as input and read-only. All four domain agents read the `PLAN.md` of the plan they are currently assigned to.
- `plans/{id}-{slug}/DEFENSE_THEORY.md` — the theory of defense for that plan. The defense strategist writes; the mock prosecutor reviews; the case investigator and evidence challenge attorney read it.
- `plans/{id}-{slug}/EVIDENCE_WORKUP.md` — the witness, exhibit, investigation, and evidentiary workup for that plan. The case investigator writes; the evidence challenge attorney reviews; the defense strategist and mock prosecutor read it.

Each reviewer records its score as a `<review score=X>` block inside the file it reviewed, overwriting any previous block. The litigation coordinator reads those scores to drive the loops.

Each plan develops independently. Cross-read between `DEFENSE_THEORY.md` and `EVIDENCE_WORKUP.md` happens only within the same plan; an agent assigned to one plan never reads another plan's files. The litigation coordinator round-robins across the K plans: each plan gets one defense-theory step plus one evidence-workup step per full cycle.

Within each plan, neither the defense theory nor the evidence workup finishes first. Both loops alternate within each plan, capped at a fixed total iteration count across all plans. The defense theory may tighten after seeing witness availability, impeachment material, or exhibit problems; the evidence workup may redirect after seeing the defense theory's refined factual disputes, legal elements, and trial themes.

I'm providing the following information:

<f1>
You operate on the plan the litigation coordinator has assigned you to this round. Read `case.md`, your assigned plan's `PLAN.md`, and your assigned plan's `DEFENSE_THEORY.md`, then build the evidence and witness workup:

- Identify every witness, exhibit, recording, report, physical item, digital artifact, and expert issue relevant to the assigned plan. For each item, state its source, current status, admissibility posture, foundation requirements, and the defense use or risk.
- Make the workup testable against the plan's `DEFENSE_THEORY.md`. If the defense theory relies on a timeline gap, identify the documents or witnesses that prove or undermine that gap. If the theory asserts an invariant fact such as “the accused was not present before 9:42 p.m.,” the workup should list every item that supports or contradicts it.
- Do only lawful, ethical preparation. Do not fabricate facts, coach witnesses to change testimony, conceal discoverable material, or suggest any improper contact. If a needed fact is unknown, mark it as unknown and identify the lawful next step.
- Sanity-check the workup against the plan's `DEFENSE_THEORY.md`. A witness who is essential to the theory should have availability, contact status, expected testimony, impeachment exposure, and subpoena needs documented. An exhibit that the theory needs should have authenticity, chain of custody, and admissibility issues addressed.

Write the evidence/witness workup and its current results in your assigned plan's `EVIDENCE_WORKUP.md`. Do not read or write any other plan's files.
</f1>

<f2>
Match the tool to the case structure; do not force an ill-suited one. The list below is useful in criminal defense theory development.

| Tool | Suitable for |
|---|---|
| Element-by-element burden analysis | Identifying which charge elements the prosecution can and cannot prove beyond a reasonable doubt |
| Timeline reconstruction | Testing alibi, opportunity, sequence, response time, and witness perception claims |
| Suppression analysis | Stops, searches, seizures, interrogations, identifications, warrants, consent, and attenuation issues |
| Hearsay and confrontation analysis | Statements offered for truth, testimonial statements, unavailable declarants, and exceptions |
| Impeachment mapping | Prior inconsistent statements, bias, motive, perception, memory, criminal history, and cooperation benefits |
| Authentication and chain-of-custody review | Physical evidence, digital evidence, lab reports, surveillance video, metadata, and exhibit foundations |
| Alternative-perpetrator or third-party culpability analysis | Cases with plausible access, motive, opportunity, or forensic inconsistency pointing away from the accused |
| Jury-instruction and verdict-form analysis | Lesser-included offenses, unanimity issues, mental-state distinctions, defenses, and limiting instructions |
| Risk and remedy analysis | Motions in limine, suppression motions, severance, continuances, stipulations, and preservation for appeal |
</f2>

<f3>
You operate on the plan the litigation coordinator has assigned you to this round. Your evidence/witness workup lives in that plan's `EVIDENCE_WORKUP.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the evidence challenge attorney as a loop, alternating with that plan's defense-theory loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `EVIDENCE_WORKUP.md` does not exist yet, this is the first pass for that plan: produce the workup from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `EVIDENCE_WORKUP.md` already exists, it carries the evidence challenge attorney's `<review>` block. Read that feedback. Then open the plan's `DEFENSE_THEORY.md` and check whether the latest defense theory introduces factual premises, suppression issues, evidentiary uses, impeachment themes, or trial themes your current workup does not yet support — for example a timeline assertion with no source, an alibi witness with no availability check, or a chain-of-custody challenge with no exhibit foundation review. Revise the plan's `EVIDENCE_WORKUP.md` in place to address every reviewer point and to align with the latest defense theory. Don't discard the previous workup and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f3>

<f4>
Review your assigned plan's `DEFENSE_THEORY.md` against `case.md`, against the plan's `PLAN.md`, and against the facts reported in the plan's `EVIDENCE_WORKUP.md` if any. Operate strictly on the assigned plan's files; do not look at other plans.

- **Faithfulness** — does the defense theory correctly describe the charges, procedural posture, facts, discovery, and plan framing? Check statutory elements, dates, witness roles, exhibit references, and what the prosecution must actually prove.
- **Adversarial soundness** — for each defense claim, test how a prosecutor would attack it. Flag unsupported leaps, overstatements, factual assumptions with no record support, and legal arguments that depend on missing authority.
- **Factual grounding** — open the plan's `EVIDENCE_WORKUP.md`. If it reports witness interviews, exhibit issues, timeline details, or admissibility problems, does the defense theory account for them? A defense theory that relies on a contradicted fact, unavailable witness, or excluded exhibit must be narrowed, supplemented, or labeled as risky.

Be brief and specific. Do not write the defense theory yourself — only review. If a claim is wrong, say which one and why.
</f4>

<f5>
You orchestrate the run; you never analyze the case, investigate facts, or review work yourself — you only dispatch the right agent at the right time.

- **Init** — discover the K plan directories under `plans/{id}-{slug}/`. Create `STATE.md` with `iter: 0`, `current_plan_idx: 0`, and a per-plan record holding each plan's id, last side, and latest defense-theory/evidence-workup scores.
- **Round-robin pool loop** — at each cycle, advance to the next plan in the round-robin order. For that plan, dispatch one defense-theory step (defense strategist, then mock prosecutor) and one evidence-workup step (case investigator, then evidence challenge attorney); then move to the next plan. After all K plans have each had one cycle, loop back to the first plan.
- When dispatching, always pass the plan's directory path so the dispatched agent knows which `PLAN.md` / `DEFENSE_THEORY.md` / `EVIDENCE_WORKUP.md` to operate on.
- Neither side terminates early on its own score within a plan; even a strong-looking defense theory may need to revise once the evidence workup reports witness problems or exhibit risks. The pool keeps cycling even after individual plans look done.
- Cap the total at 20 × K dispatches (10 defense-theory + 10 evidence-workup per plan, summed across K plans). After the cap, stop and summarize per plan.
- Keep the current iteration count, current plan index, and per-plan latest scores in `STATE.md`, accurate after each dispatch. Read each score from the relevant plan's reviewer `<review score=X>` block. Commit progress after each step.
- Read each agent's brief narrative reply on return. If an agent reports an unresolved error, append it to `error-log.txt` (timestamp + plan id + agent name + content) and continue with the next dispatch.
</f5>

<f6>
Produce the defense theory for the plan the litigation coordinator has assigned you to this round, and write it to that plan's `DEFENSE_THEORY.md` under `plans/{id}-{slug}/DEFENSE_THEORY.md`. A complete theory covers four kinds of claim, each supported by the case packet, discovery references, legal authority, or a concrete investigative need.

- **Elements and burden** — identify each charged offense, the prosecution's burden, the elements most vulnerable to challenge, and any lesser-included or alternative theories that affect trial posture.
- **Factual narrative** — state the defense account of what happened, what the defense does not need to prove, which prosecution facts are accepted, and which facts are contested.
- **Evidentiary and constitutional issues** — suppression arguments, hearsay problems, authentication gaps, chain-of-custody concerns, identification reliability, privilege issues, confrontation concerns, and impeachment themes.
- **Trial strategy and risk** — likely prosecution story, anticipated witness sequencing, cross-examination themes, jury-instruction issues, plea/trial leverage, and the consequences if a key factual assumption fails.

Ground your claims against the plan's `EVIDENCE_WORKUP.md` if it has reported witness interviews, exhibit status, or admissibility concerns. A defense theory that depends on a missing witness, inadmissible exhibit, or contradicted timeline needs revision, a backup theory, or a specific investigation task. Be concrete. “Element three depends entirely on Officer Lee’s distance estimate, which is impeachable using body-camera timestamp 00:13:44 and dispatch log entry C-17” is useful; “the state may have weaknesses” is not. Do not read or aggregate across other plans' files.
</f6>

<f7>
Score the work from 1 to 10, and record your verdict by overwriting the single `<review score=X>` block at the end of the document you reviewed — overwrite the existing one, never append a second.

Score strictly on real merit. Do not give any credit for a piece of work merely being honest about its own shortcomings — “this is unsupported, but I’m telling you it is unsupported” is still a failing result, not a passing one.
</f7>

<f8>
Keep `EVIDENCE_WORKUP.md` lean. Its body — everything except the `<review>` block — must stay under 3000 words (~20KB), about a four-page note; record only the current final state and move iteration-by-iteration history into a separate `CHANGELOG.md`. Bold text must not exceed 5% of the file: if everything is bold, nothing is.
</f8>

<f9>
When you finish, briefly report to the litigation coordinator: what you did, what difficulties you hit or did not resolve, and any open questions.
</f9>

<f10>
XML tags help Claude parse complex prompts unambiguously, especially when your prompt mixes instructions, context, examples, and variable inputs. Wrapping each type of content in its own tag (e.g. `<instructions>`, `<context>`, `<input>`) reduces misinterpretation.

Best practices:
- Use consistent, descriptive tag names across your prompts.
- Nest tags when content has a natural hierarchy (documents inside `<documents>`, each inside `<document index="n">`).
</f10>

<f11>
You are working on criminal trial preparation for a specific case. The original case packet is given in `case.md`; it may include the charges, statutory elements, police reports, discovery summaries, witness lists, exhibits, procedural deadlines, and known defense concerns. Read it before starting your part.
</f11>

<f12>
You operate on the plan the litigation coordinator has assigned you to this round. Your defense theory lives in that plan's `DEFENSE_THEORY.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the mock prosecutor as a loop, alternating with that plan's evidence-workup loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `DEFENSE_THEORY.md` does not exist yet, this is the first pass for that plan: produce the defense theory from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `DEFENSE_THEORY.md` already exists, it carries the mock prosecutor's `<review>` block. Read that feedback. Then open the plan's `EVIDENCE_WORKUP.md` and look at the latest reported witness status, exhibit issues, timeline details, and admissibility concerns — they may invalidate, sharpen, or motivate revisions to your defense theory. Revise the plan's `DEFENSE_THEORY.md` in place to address every reviewer point raised and to incorporate any factual development that changes your analysis. Don't discard the previous theory and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f12>

<f13>
Review your assigned plan's `EVIDENCE_WORKUP.md` against `case.md`, against the plan's `PLAN.md`, and against the plan's `DEFENSE_THEORY.md`. Operate strictly on the assigned plan's files; do not look at other plans.

- Inspect the reported workup for anomalies, missing sources, unreasonable factual assumptions, or conflicts with the charges, discovery summaries, witness list, or plan instructions.
- Open the plan's `DEFENSE_THEORY.md`. For every factual premise, evidentiary claim, suppression issue, impeachment theme, and trial-use assertion the defense theory relies on, write a check into a separate `challenge_matrix.md` under the plan's directory: does the workup identify the supporting item, admissibility route, foundation witness, contradiction risk, and next step? Work through the matrix. Name any witness, exhibit, or fact that fails the check.
- Read the workup closely and spot-check it for defects — stale contact status, missing subpoena deadlines, unverified alibi details, unaddressed hearsay, chain-of-custody gaps, foundation problems, or investigation tasks that contradict the chosen defense theory. A quiet gap that causes the theory to collapse at trial is worse than an obvious missing item.
- Treat the workup as finished only when every material factual premise has a source, every theory-claimed evidentiary use has an admissibility path or identified risk, and every key witness or exhibit is consistent with the defense theory — not merely when the file is neatly organized.
- Check the length of the plan's `EVIDENCE_WORKUP.md`: if it exceeds 20KB, give a warning, but do not deduct points for it.
- Check the bold ratio of the plan's `EVIDENCE_WORKUP.md`: if bold text exceeds 5% of the file, give a warning, but do not deduct points for it.
</f13>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (litigation coordinator, defense strategist, mock prosecutor, case investigator, evidence challenge attorney), which items should go in its prompt? Respond with a JSON object like {"litigation coordinator": ["f?"], "defense strategist": ["f?"], "mock prosecutor": ["f?"], "case investigator": ["f?"], "evidence challenge attorney": ["f?"]}. No other output.

I need you to set up a 5-agent pipeline for criminal trial preparation. The team develops a defense theory of the case and an evidence/witness workup in parallel, with each side informing the other. A case arrives as a neutral case packet in `case.md`: charges, alleged facts, discovery summaries, known witnesses, key dates, and procedural posture. The pipeline alternates between revising the defense theory and revising the evidence/witness workup.

The five agents:

- **litigation coordinator** orchestrates the run by alternating one defense-theory step with one evidence-workup step and tracking progress. It does no case analysis, investigation, or review itself.
- **defense theory loop** — the **defense strategist** writes the defense theory to `DEFENSE_THEORY.md`; the **mock prosecutor** judges it from a prosecution-style adversarial perspective. The defense strategist reads `EVIDENCE_WORKUP.md` on each revision pass to incorporate new factual support, witness issues, and evidentiary weaknesses.
- **evidence workup loop** — the **case investigator** writes the evidence and witness workup to `EVIDENCE_WORKUP.md`; the **evidence challenge attorney** judges it. The case investigator reads `DEFENSE_THEORY.md` on each revision pass to align investigation priorities with the latest defense theory.

At the end of every turn, each of the subagents briefly reports back what they did, what difficulties they hit, and any open questions.

The pipeline hands work off through plan-namespaced files:

- `case.md` — the original case packet, read-only. All four domain agents read it.
- `plans/{id}-{slug}/PLAN.md` — one pre-existing defense-preparation plan per directory, K plans total, given as input and read-only. All four domain agents read the `PLAN.md` of the plan they are currently assigned to.
- `plans/{id}-{slug}/DEFENSE_THEORY.md` — the theory of defense for that plan. The defense strategist writes; the mock prosecutor reviews; the case investigator and evidence challenge attorney read it.
- `plans/{id}-{slug}/EVIDENCE_WORKUP.md` — the witness, exhibit, investigation, and evidentiary workup for that plan. The case investigator writes; the evidence challenge attorney reviews; the defense strategist and mock prosecutor read it.

Each reviewer records its score as a `<review score=X>` block inside the file it reviewed, overwriting any previous block. The litigation coordinator reads those scores to drive the loops.

Each plan develops independently. Cross-read between `DEFENSE_THEORY.md` and `EVIDENCE_WORKUP.md` happens only within the same plan; an agent assigned to one plan never reads another plan's files. The litigation coordinator round-robins across the K plans: each plan gets one defense-theory step plus one evidence-workup step per full cycle.

Within each plan, neither the defense theory nor the evidence workup finishes first. Both loops alternate within each plan, capped at a fixed total iteration count across all plans. The defense theory may tighten after seeing witness availability, impeachment material, or exhibit problems; the evidence workup may redirect after seeing the defense theory's refined factual disputes, legal elements, and trial themes.

I'm providing the following prompt fragments:

<f1>
You operate on the plan the litigation coordinator has assigned you to this round. Read `case.md`, your assigned plan's `PLAN.md`, and your assigned plan's `DEFENSE_THEORY.md`, then build the evidence and witness workup:

- Identify every witness, exhibit, recording, report, physical item, digital artifact, and expert issue relevant to the assigned plan. For each item, state its source, current status, admissibility posture, foundation requirements, and the defense use or risk.
- Make the workup testable against the plan's `DEFENSE_THEORY.md`. If the defense theory relies on a timeline gap, identify the documents or witnesses that prove or undermine that gap. If the theory asserts an invariant fact such as “the accused was not present before 9:42 p.m.,” the workup should list every item that supports or contradicts it.
- Do only lawful, ethical preparation. Do not fabricate facts, coach witnesses to change testimony, conceal discoverable material, or suggest any improper contact. If a needed fact is unknown, mark it as unknown and identify the lawful next step.
- Sanity-check the workup against the plan's `DEFENSE_THEORY.md`. A witness who is essential to the theory should have availability, contact status, expected testimony, impeachment exposure, and subpoena needs documented. An exhibit that the theory needs should have authenticity, chain of custody, and admissibility issues addressed.

Write the evidence/witness workup and its current results in your assigned plan's `EVIDENCE_WORKUP.md`. Do not read or write any other plan's files.
</f1>

<f2>
Match the tool to the case structure; do not force an ill-suited one. The list below is useful in criminal defense theory development.

| Tool | Suitable for |
|---|---|
| Element-by-element burden analysis | Identifying which charge elements the prosecution can and cannot prove beyond a reasonable doubt |
| Timeline reconstruction | Testing alibi, opportunity, sequence, response time, and witness perception claims |
| Suppression analysis | Stops, searches, seizures, interrogations, identifications, warrants, consent, and attenuation issues |
| Hearsay and confrontation analysis | Statements offered for truth, testimonial statements, unavailable declarants, and exceptions |
| Impeachment mapping | Prior inconsistent statements, bias, motive, perception, memory, criminal history, and cooperation benefits |
| Authentication and chain-of-custody review | Physical evidence, digital evidence, lab reports, surveillance video, metadata, and exhibit foundations |
| Alternative-perpetrator or third-party culpability analysis | Cases with plausible access, motive, opportunity, or forensic inconsistency pointing away from the accused |
| Jury-instruction and verdict-form analysis | Lesser-included offenses, unanimity issues, mental-state distinctions, defenses, and limiting instructions |
| Risk and remedy analysis | Motions in limine, suppression motions, severance, continuances, stipulations, and preservation for appeal |
</f2>

<f3>
You operate on the plan the litigation coordinator has assigned you to this round. Your evidence/witness workup lives in that plan's `EVIDENCE_WORKUP.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the evidence challenge attorney as a loop, alternating with that plan's defense-theory loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `EVIDENCE_WORKUP.md` does not exist yet, this is the first pass for that plan: produce the workup from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `EVIDENCE_WORKUP.md` already exists, it carries the evidence challenge attorney's `<review>` block. Read that feedback. Then open the plan's `DEFENSE_THEORY.md` and check whether the latest defense theory introduces factual premises, suppression issues, evidentiary uses, impeachment themes, or trial themes your current workup does not yet support — for example a timeline assertion with no source, an alibi witness with no availability check, or a chain-of-custody challenge with no exhibit foundation review. Revise the plan's `EVIDENCE_WORKUP.md` in place to address every reviewer point and to align with the latest defense theory. Don't discard the previous workup and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f3>

<f4>
Review your assigned plan's `DEFENSE_THEORY.md` against `case.md`, against the plan's `PLAN.md`, and against the facts reported in the plan's `EVIDENCE_WORKUP.md` if any. Operate strictly on the assigned plan's files; do not look at other plans.

- **Faithfulness** — does the defense theory correctly describe the charges, procedural posture, facts, discovery, and plan framing? Check statutory elements, dates, witness roles, exhibit references, and what the prosecution must actually prove.
- **Adversarial soundness** — for each defense claim, test how a prosecutor would attack it. Flag unsupported leaps, overstatements, factual assumptions with no record support, and legal arguments that depend on missing authority.
- **Factual grounding** — open the plan's `EVIDENCE_WORKUP.md`. If it reports witness interviews, exhibit issues, timeline details, or admissibility problems, does the defense theory account for them? A defense theory that relies on a contradicted fact, unavailable witness, or excluded exhibit must be narrowed, supplemented, or labeled as risky.

Be brief and specific. Do not write the defense theory yourself — only review. If a claim is wrong, say which one and why.
</f4>

<f5>
You orchestrate the run; you never analyze the case, investigate facts, or review work yourself — you only dispatch the right agent at the right time.

- **Init** — discover the K plan directories under `plans/{id}-{slug}/`. Create `STATE.md` with `iter: 0`, `current_plan_idx: 0`, and a per-plan record holding each plan's id, last side, and latest defense-theory/evidence-workup scores.
- **Round-robin pool loop** — at each cycle, advance to the next plan in the round-robin order. For that plan, dispatch one defense-theory step (defense strategist, then mock prosecutor) and one evidence-workup step (case investigator, then evidence challenge attorney); then move to the next plan. After all K plans have each had one cycle, loop back to the first plan.
- When dispatching, always pass the plan's directory path so the dispatched agent knows which `PLAN.md` / `DEFENSE_THEORY.md` / `EVIDENCE_WORKUP.md` to operate on.
- Neither side terminates early on its own score within a plan; even a strong-looking defense theory may need to revise once the evidence workup reports witness problems or exhibit risks. The pool keeps cycling even after individual plans look done.
- Cap the total at 20 × K dispatches (10 defense-theory + 10 evidence-workup per plan, summed across K plans). After the cap, stop and summarize per plan.
- Keep the current iteration count, current plan index, and per-plan latest scores in `STATE.md`, accurate after each dispatch. Read each score from the relevant plan's reviewer `<review score=X>` block. Commit progress after each step.
- Read each agent's brief narrative reply on return. If an agent reports an unresolved error, append it to `error-log.txt` (timestamp + plan id + agent name + content) and continue with the next dispatch.
</f5>

<f6>
Produce the defense theory for the plan the litigation coordinator has assigned you to this round, and write it to that plan's `DEFENSE_THEORY.md` under `plans/{id}-{slug}/DEFENSE_THEORY.md`. A complete theory covers four kinds of claim, each supported by the case packet, discovery references, legal authority, or a concrete investigative need.

- **Elements and burden** — identify each charged offense, the prosecution's burden, the elements most vulnerable to challenge, and any lesser-included or alternative theories that affect trial posture.
- **Factual narrative** — state the defense account of what happened, what the defense does not need to prove, which prosecution facts are accepted, and which facts are contested.
- **Evidentiary and constitutional issues** — suppression arguments, hearsay problems, authentication gaps, chain-of-custody concerns, identification reliability, privilege issues, confrontation concerns, and impeachment themes.
- **Trial strategy and risk** — likely prosecution story, anticipated witness sequencing, cross-examination themes, jury-instruction issues, plea/trial leverage, and the consequences if a key factual assumption fails.

Ground your claims against the plan's `EVIDENCE_WORKUP.md` if it has reported witness interviews, exhibit status, or admissibility concerns. A defense theory that depends on a missing witness, inadmissible exhibit, or contradicted timeline needs revision, a backup theory, or a specific investigation task. Be concrete. “Element three depends entirely on Officer Lee’s distance estimate, which is impeachable using body-camera timestamp 00:13:44 and dispatch log entry C-17” is useful; “the state may have weaknesses” is not. Do not read or aggregate across other plans' files.
</f6>

<f7>
Score the work from 1 to 10, and record your verdict by overwriting the single `<review score=X>` block at the end of the document you reviewed — overwrite the existing one, never append a second.

Score strictly on real merit. Do not give any credit for a piece of work merely being honest about its own shortcomings — “this is unsupported, but I’m telling you it is unsupported” is still a failing result, not a passing one.
</f7>

<f8>
Keep `EVIDENCE_WORKUP.md` lean. Its body — everything except the `<review>` block — must stay under 3000 words (~20KB), about a four-page note; record only the current final state and move iteration-by-iteration history into a separate `CHANGELOG.md`. Bold text must not exceed 5% of the file: if everything is bold, nothing is.
</f8>

<f9>
When you finish, briefly report to the litigation coordinator: what you did, what difficulties you hit or did not resolve, and any open questions.
</f9>

<f10>
XML tags help Claude parse complex prompts unambiguously, especially when your prompt mixes instructions, context, examples, and variable inputs. Wrapping each type of content in its own tag (e.g. `<instructions>`, `<context>`, `<input>`) reduces misinterpretation.

Best practices:
- Use consistent, descriptive tag names across your prompts.
- Nest tags when content has a natural hierarchy (documents inside `<documents>`, each inside `<document index="n">`).
</f10>

<f11>
You are working on criminal trial preparation for a specific case. The original case packet is given in `case.md`; it may include the charges, statutory elements, police reports, discovery summaries, witness lists, exhibits, procedural deadlines, and known defense concerns. Read it before starting your part.
</f11>

<f12>
You operate on the plan the litigation coordinator has assigned you to this round. Your defense theory lives in that plan's `DEFENSE_THEORY.md`. You may be invoked on the same plan more than once — within each plan the pipeline runs you and the mock prosecutor as a loop, alternating with that plan's evidence-workup loop, while the litigation coordinator round-robins across plans.

- If your assigned plan's `DEFENSE_THEORY.md` does not exist yet, this is the first pass for that plan: produce the defense theory from scratch based on `case.md` and the plan's `PLAN.md`.
- If the plan's `DEFENSE_THEORY.md` already exists, it carries the mock prosecutor's `<review>` block. Read that feedback. Then open the plan's `EVIDENCE_WORKUP.md` and look at the latest reported witness status, exhibit issues, timeline details, and admissibility concerns — they may invalidate, sharpen, or motivate revisions to your defense theory. Revise the plan's `DEFENSE_THEORY.md` in place to address every reviewer point raised and to incorporate any factual development that changes your analysis. Don't discard the previous theory and start over, and don't leave a flagged issue unaddressed.
- Do not read or touch other plans' files.
</f12>

<f13>
Review your assigned plan's `EVIDENCE_WORKUP.md` against `case.md`, against the plan's `PLAN.md`, and against the plan's `DEFENSE_THEORY.md`. Operate strictly on the assigned plan's files; do not look at other plans.

- Inspect the reported workup for anomalies, missing sources, unreasonable factual assumptions, or conflicts with the charges, discovery summaries, witness list, or plan instructions.
- Open the plan's `DEFENSE_THEORY.md`. For every factual premise, evidentiary claim, suppression issue, impeachment theme, and trial-use assertion the defense theory relies on, write a check into a separate `challenge_matrix.md` under the plan's directory: does the workup identify the supporting item, admissibility route, foundation witness, contradiction risk, and next step? Work through the matrix. Name any witness, exhibit, or fact that fails the check.
- Read the workup closely and spot-check it for defects — stale contact status, missing subpoena deadlines, unverified alibi details, unaddressed hearsay, chain-of-custody gaps, foundation problems, or investigation tasks that contradict the chosen defense theory. A quiet gap that causes the theory to collapse at trial is worse than an obvious missing item.
- Treat the workup as finished only when every material factual premise has a source, every theory-claimed evidentiary use has an admissibility path or identified risk, and every key witness or exhibit is consistent with the defense theory — not merely when the file is neatly organized.
- Check the length of the plan's `EVIDENCE_WORKUP.md`: if it exceeds 20KB, give a warning, but do not deduct points for it.
- Check the bold ratio of the plan's `EVIDENCE_WORKUP.md`: if bold text exceeds 5% of the file, give a warning, but do not deduct points for it.
</f13>

Each agent's prompt should contain only the fragments that agent needs to do its job. When you include a fragment, paste the FULL block verbatim — no paraphrasing, no partial inclusion, no rewriting of fragment content. Brief connective text between fragments (e.g., "Then: ...", "Note: ...") is fine. Format: one markdown section per role, with the role name as an h1 header (e.g. `# litigation coordinator`). Output only the headered prompts, no preamble.