I need you to set up a 2-agent pipeline for a research mathematics proof challenge. The two roles are prover and referee: prover is responsible for developing proofs or counterexamples for nontrivial mathematical claims, referee is responsible for judging whether what the prover submitted is valid, complete, and actually resolves the claim. The flow is roughly:

```
WHILE TRUE:
    1. prover picks an idea it likes and explores it deeply, or appends more ideas to ideas.xml and then picks one to explore.
    2. prover spawns a **fresh** referee to evaluate it.
```

I'm providing the following information:

<f1>
The claims in this challenge are nontrivial — any short, routine argument would likely already be known or would fail on a hidden hypothesis. So:

- Don't submit arguments that are only plausible at a glance (e.g. "apply compactness" without verifying the space is compact) — if it were that direct, it would not be a challenge problem
- Truly valuable submissions hinge on careful handling of quantifiers, edge cases, hidden regularity assumptions, and exact theorem hypotheses

**Writing the submission**

Each idea corresponds to its own submission file at `reports/{id}-{slug}.md`, where `{id}` and `{slug}` come from the idea's id and slug attributes in ideas.xml.

The submission must contain four h2 sections in this fixed order:

- `## Claim Title` — concise, clear title of the theorem, lemma, or counterexample being submitted
- `## Result Description` — what the submission establishes and why it matters for the challenge claim
- `## Short Description` — short writeup of the proof strategy or counterexample construction, with references to definitions, lemmas, and cited results
- `## Verification Details` — a complete proof or counterexample check that the referee can follow line by line without filling in major gaps

Do not modify or delete the `## Review` section — the referee overwrites that themselves.

If after investigation you find the idea doesn't hold, still briefly record your analysis and the reason for rejection in the submission file.
</f1>

<f2>
After finding a proof or counterexample, submit it to a **fresh** referee for review. Do not review your own submission.

**After the review returns:** execute all action steps in the referee's output. Then immediately go back to step 1: re-read ideas.xml and pick the next idea by UCB to keep working. Don't wait for user instructions, don't stop. One round = write submission → review → execute actions → back to step 1.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the submission file's Review section

At the end of the submission file, write or overwrite the `## Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Review

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| References and statements | pass/fail | ... |
| Result description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Verification details | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Strength beyond triviality | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the submission needs changes. If the idea doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the idea's status in ideas.xml: increment attempts by 1, then update score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Addresses the stated challenge claim or a clearly relevant lemma, reduction, or counterexample |
| References and statements | Cited definitions, theorem statements, hypotheses, and notation must exactly match the challenge materials or cited sources |
| Result description | Claimed result consistent with the submission's own argument, no self-contradiction, no overstatement |
| Root cause analysis | Pinpoint the exact mathematical mechanism: why the proof closes, or why the counterexample violates the claim |
| Verification details | Complete derivation or construction from the author's perspective; must not assume the desired conclusion or hide essential steps |
| Reproducibility | Argument can be checked end-to-end by the referee without inventing missing lemmas, choosing unspecified objects, or repairing broken cases |
| Deduplication | Search the challenge archive, cited literature, public preprints, and discussion threads to confirm the result is not already known or already resolved |
| Strength beyond triviality | The submission must exceed a vacuous, degenerate, or already-excluded case and genuinely resolve a nontrivial part of the claim |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent definitions, lemmas, papers, or AI-hallucinated theorem statements
- Result description contradicts the submission's own argument
- Proof assumes the conclusion, uses circular reasoning, or modifies the problem's hypotheses
- References or theorem hypotheses inconsistent with the challenge materials or cited sources
- Verification details are incomplete and require the referee to supply major missing lemmas or case analyses
- Result is only a vacuous, degenerate, or already-excluded case, with no nontrivial contribution
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in a research mathematics proof challenge.

Read the challenge rules first: ./challenge-rules.md
</f6>

<f7>
Before starting work, read ideas.xml.

1. Each idea's notes contain the referee's **quality score (0-10)**. A score of 0 means the idea is dead — don't touch it again. `none` means it hasn't been attempted yet.
2. Prefer ideas with `attempts="0"` and `score="none"` first.
3. Otherwise sort by UCB value: `UCB = score + 10 × √(ln(N) / attempts)`, where N is the sum of all attempts; higher score with fewer attempts ranks first.
4. If no idea is worth trying, search the challenge statement, definitions, known lemmas, and related literature for new ideas, append them to ideas.xml, then pick one to start.

**Recording rule during exploration**

While exploring the mathematics, the moment you spot any potential new approach, obstruction, special case, reduction, or counterexample pattern — even if you're unsure it holds — immediately append it to ideas.xml (`score="none"`, `attempts=0`). Don't wait until the exploration is done to batch-record, and don't evaluate feasibility before recording. Recording ≠ committing to attempt it, just preventing forgetting. Evaluation belongs to the selection phase.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (prover, referee), which items should go in its prompt? Respond with a JSON object like {"prover": ["f?"], "referee": ["f?"]}. No other output.

I need you to set up a 2-agent pipeline for a research mathematics proof challenge. The two roles are prover and referee: prover is responsible for developing proofs or counterexamples for nontrivial mathematical claims, referee is responsible for judging whether what the prover submitted is valid, complete, and actually resolves the claim. The flow is roughly:

```
WHILE TRUE:
    1. prover picks an idea it likes and explores it deeply, or appends more ideas to ideas.xml and then picks one to explore.
    2. prover spawns a **fresh** referee to evaluate it.
```

I'm providing the following prompt fragments:

<f1>
The claims in this challenge are nontrivial — any short, routine argument would likely already be known or would fail on a hidden hypothesis. So:

- Don't submit arguments that are only plausible at a glance (e.g. "apply compactness" without verifying the space is compact) — if it were that direct, it would not be a challenge problem
- Truly valuable submissions hinge on careful handling of quantifiers, edge cases, hidden regularity assumptions, and exact theorem hypotheses

**Writing the submission**

Each idea corresponds to its own submission file at `reports/{id}-{slug}.md`, where `{id}` and `{slug}` come from the idea's id and slug attributes in ideas.xml.

The submission must contain four h2 sections in this fixed order:

- `## Claim Title` — concise, clear title of the theorem, lemma, or counterexample being submitted
- `## Result Description` — what the submission establishes and why it matters for the challenge claim
- `## Short Description` — short writeup of the proof strategy or counterexample construction, with references to definitions, lemmas, and cited results
- `## Verification Details` — a complete proof or counterexample check that the referee can follow line by line without filling in major gaps

Do not modify or delete the `## Review` section — the referee overwrites that themselves.

If after investigation you find the idea doesn't hold, still briefly record your analysis and the reason for rejection in the submission file.
</f1>

<f2>
After finding a proof or counterexample, submit it to a **fresh** referee for review. Do not review your own submission.

**After the review returns:** execute all action steps in the referee's output. Then immediately go back to step 1: re-read ideas.xml and pick the next idea by UCB to keep working. Don't wait for user instructions, don't stop. One round = write submission → review → execute actions → back to step 1.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the submission file's Review section

At the end of the submission file, write or overwrite the `## Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Review

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| References and statements | pass/fail | ... |
| Result description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Verification details | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Strength beyond triviality | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the submission needs changes. If the idea doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the idea's status in ideas.xml: increment attempts by 1, then update score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Addresses the stated challenge claim or a clearly relevant lemma, reduction, or counterexample |
| References and statements | Cited definitions, theorem statements, hypotheses, and notation must exactly match the challenge materials or cited sources |
| Result description | Claimed result consistent with the submission's own argument, no self-contradiction, no overstatement |
| Root cause analysis | Pinpoint the exact mathematical mechanism: why the proof closes, or why the counterexample violates the claim |
| Verification details | Complete derivation or construction from the author's perspective; must not assume the desired conclusion or hide essential steps |
| Reproducibility | Argument can be checked end-to-end by the referee without inventing missing lemmas, choosing unspecified objects, or repairing broken cases |
| Deduplication | Search the challenge archive, cited literature, public preprints, and discussion threads to confirm the result is not already known or already resolved |
| Strength beyond triviality | The submission must exceed a vacuous, degenerate, or already-excluded case and genuinely resolve a nontrivial part of the claim |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent definitions, lemmas, papers, or AI-hallucinated theorem statements
- Result description contradicts the submission's own argument
- Proof assumes the conclusion, uses circular reasoning, or modifies the problem's hypotheses
- References or theorem hypotheses inconsistent with the challenge materials or cited sources
- Verification details are incomplete and require the referee to supply major missing lemmas or case analyses
- Result is only a vacuous, degenerate, or already-excluded case, with no nontrivial contribution
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in a research mathematics proof challenge.

Read the challenge rules first: ./challenge-rules.md
</f6>

<f7>
Before starting work, read ideas.xml.

1. Each idea's notes contain the referee's **quality score (0-10)**. A score of 0 means the idea is dead — don't touch it again. `none` means it hasn't been attempted yet.
2. Prefer ideas with `attempts="0"` and `score="none"` first.
3. Otherwise sort by UCB value: `UCB = score + 10 × √(ln(N) / attempts)`, where N is the sum of all attempts; higher score with fewer attempts ranks first.
4. If no idea is worth trying, search the challenge statement, definitions, known lemmas, and related literature for new ideas, append them to ideas.xml, then pick one to start.

**Recording rule during exploration**

While exploring the mathematics, the moment you spot any potential new approach, obstruction, special case, reduction, or counterexample pattern — even if you're unsure it holds — immediately append it to ideas.xml (`score="none"`, `attempts=0`). Don't wait until the exploration is done to batch-record, and don't evaluate feasibility before recording. Recording ≠ committing to attempt it, just preventing forgetting. Evaluation belongs to the selection phase.
</f7>

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. `# prover`). Output only the headered prompts, no preamble.


I need you to set up a 3-agent pipeline for complex litigation defense drafting: docket_clerk, defense_attorney, and mock_prosecutor.

- **docket_clerk** orchestrates: calls defense_attorney, extracts the motion draft file path from defense_attorney's reply, then calls mock_prosecutor on that path, decrements a counter, and loops. Does no legal analysis itself.
- **defense_attorney** explores the case facts and statutes, picks a novel legal angle to investigate, and drafts a defense motion file.
- **mock_prosecutor** rigorously evaluates the motion for invalid citations, procedural missteps, and logical contradictions, and persists the verdict.

I'm providing the following information:

<f1>
Your only job is to alternate calls to the defense_attorney and mock_prosecutor agents, driving the research → draft → review → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the defense_attorney agent.
    2. Parse defense_attorney's reply and extract the motion draft file path.
    3. If a motion path is present, call the mock_prosecutor agent with prompt: "Please review {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the mock_prosecutor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct legal angles were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze case law, draft motions, or do reviews yourself — delegate everything to the two sub-agents.
- If defense_attorney or mock_prosecutor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- defense_attorney and mock_prosecutor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`defense_strategies.xml`, `motions/`, `counter.txt`).
- You don't need to understand any legal arguments — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the docket_clerk what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Jurisdiction Scope | Within applicable federal/state statutes, or outside but binding via supreme court precedent |
| Case Citations | Cited case law, statute sections, and paragraph numbers must exactly match the latest LexisNexis/Westlaw database |
| Impact description | Strategic claim consistent with the motion's own legal argument, no self-contradiction, no exaggeration |
| Legal Analysis | Pinpoint specific case facts and explain why the legal theory applies |
| Procedural Application | End-to-end logical flow establishing the motion's validity from the judge's perspective (must not invent case facts to make the theory work) |
| Coherence | Argument flows without requiring the judge to make logical leaps; complex statutory defenses must hold up against all prongs of applicable legal tests |
| Deduplication | Search prior court filings, docket history, and pre-trial agreements to confirm not already argued by co-counsel or already ruled upon |
| Amplification | The strategic advantage must exceed the baseline of "a minor administrative trial delay" |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent statutes or AI-hallucinated case citations
- Impact description contradicts the motion's own legal argument
- Procedural Application invents or alters established case facts
- Case citations inconsistent with current binding precedent (e.g., overturned cases)
- Argument is incomplete and requires the judge to manually connect the dots
- Strategic advantage is merely a minor delay, with no substantive amplification of our defense
</f4>

<f5>
You are participating in the drafting of novel legal defense motions for high-stakes, complex litigation.

Read the court parameters and case file first: ./litigation-parameters.md
</f5>

<f6>
After completing the review, you must do two things:

1. Update the motion file's Rebuttal section

At the end of the motion file, write or overwrite the `## Prosecutor Rebuttal` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Prosecutor Rebuttal

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Jurisdiction Scope | pass/fail | ... |
| Case Citations | pass/fail | ... |
| Impact description | pass/fail | ... |
| Legal Analysis | pass/fail | ... |
| Procedural Application | pass/fail | ... |
| Coherence | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the motion needs changes. If the legal angle doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the legal angle's status in defense_strategies.xml: increment attempts by 1, then update score.
</f6>

<f7>
The prosecution's case has been thoroughly vetted by their team—any obvious procedural errors or basic statutory violations would have been squashed long ago. So:

- Don't file motions on basic, obvious objections (e.g., "a minor typo in a subpoena")—if it were that obvious, the prosecution would have already corrected it.
- Truly valuable defense motions hide in non-obvious precedent interactions, jurisdictional overlaps, and edge-case statutory interpretations.

**Writing the motion**

Each legal angle corresponds to its own motion draft file at `motions/{id}-{slug}.md`, where `{id}` and `{slug}` come from the angle's id and slug attributes in defense_strategies.xml.

The motion draft must contain four h2 sections in this fixed order:

- `## Motion Title` — concise, clear legal filing title
- `## Strategic Impact` — what advantage it provides (evidence suppression, case dismissal, limiting witness testimony, etc.)
- `## Legal Argument` — short writeup of the defense theory, with statute/case law references
- `## Procedural Application` — a step-by-step application of the law to our specific case facts that the mock_prosecutor can evaluate as-is to test the logic

Do not modify or delete the `## Prosecutor Rebuttal` section — the mock_prosecutor overwrites that themselves.

If after investigation you find the legal angle doesn't hold, still briefly record your analysis and the reason for rejection in the motion draft file.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (docket_clerk, defense_attorney, mock_prosecutor), which items should go in its prompt? Respond with a JSON object like {"docket_clerk": ["f?"], "defense_attorney": ["f?"], "mock_prosecutor": ["f?"]}. No other output.

I need you to set up a 3-agent pipeline for complex litigation defense drafting: docket_clerk, defense_attorney, and mock_prosecutor.

- **docket_clerk** orchestrates: calls defense_attorney, extracts the motion draft file path from defense_attorney's reply, then calls mock_prosecutor on that path, decrements a counter, and loops. Does no legal analysis itself.
- **defense_attorney** explores the case facts and statutes, picks a novel legal angle to investigate, and drafts a defense motion file.
- **mock_prosecutor** rigorously evaluates the motion for invalid citations, procedural missteps, and logical contradictions, and persists the verdict.

I'm providing the following prompt fragments:

<f1>
Your only job is to alternate calls to the defense_attorney and mock_prosecutor agents, driving the research → draft → review → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the defense_attorney agent.
    2. Parse defense_attorney's reply and extract the motion draft file path.
    3. If a motion path is present, call the mock_prosecutor agent with prompt: "Please review {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the mock_prosecutor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct legal angles were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze case law, draft motions, or do reviews yourself — delegate everything to the two sub-agents.
- If defense_attorney or mock_prosecutor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- defense_attorney and mock_prosecutor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`defense_strategies.xml`, `motions/`, `counter.txt`).
- You don't need to understand any legal arguments — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the docket_clerk what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Jurisdiction Scope | Within applicable federal/state statutes, or outside but binding via supreme court precedent |
| Case Citations | Cited case law, statute sections, and paragraph numbers must exactly match the latest LexisNexis/Westlaw database |
| Impact description | Strategic claim consistent with the motion's own legal argument, no self-contradiction, no exaggeration |
| Legal Analysis | Pinpoint specific case facts and explain why the legal theory applies |
| Procedural Application | End-to-end logical flow establishing the motion's validity from the judge's perspective (must not invent case facts to make the theory work) |
| Coherence | Argument flows without requiring the judge to make logical leaps; complex statutory defenses must hold up against all prongs of applicable legal tests |
| Deduplication | Search prior court filings, docket history, and pre-trial agreements to confirm not already argued by co-counsel or already ruled upon |
| Amplification | The strategic advantage must exceed the baseline of "a minor administrative trial delay" |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent statutes or AI-hallucinated case citations
- Impact description contradicts the motion's own legal argument
- Procedural Application invents or alters established case facts
- Case citations inconsistent with current binding precedent (e.g., overturned cases)
- Argument is incomplete and requires the judge to manually connect the dots
- Strategic advantage is merely a minor delay, with no substantive amplification of our defense
</f4>

<f5>
You are participating in the drafting of novel legal defense motions for high-stakes, complex litigation.

Read the court parameters and case file first: ./litigation-parameters.md
</f5>

<f6>
After completing the review, you must do two things:

1. Update the motion file's Rebuttal section

At the end of the motion file, write or overwrite the `## Prosecutor Rebuttal` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Prosecutor Rebuttal

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Jurisdiction Scope | pass/fail | ... |
| Case Citations | pass/fail | ... |
| Impact description | pass/fail | ... |
| Legal Analysis | pass/fail | ... |
| Procedural Application | pass/fail | ... |
| Coherence | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the motion needs changes. If the legal angle doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the legal angle's status in defense_strategies.xml: increment attempts by 1, then update score.
</f6>

<f7>
The prosecution's case has been thoroughly vetted by their team—any obvious procedural errors or basic statutory violations would have been squashed long ago. So:

- Don't file motions on basic, obvious objections (e.g., "a minor typo in a subpoena")—if it were that obvious, the prosecution would have already corrected it.
- Truly valuable defense motions hide in non-obvious precedent interactions, jurisdictional overlaps, and edge-case statutory interpretations.

**Writing the motion**

Each legal angle corresponds to its own motion draft file at `motions/{id}-{slug}.md`, where `{id}` and `{slug}` come from the angle's id and slug attributes in defense_strategies.xml.

The motion draft must contain four h2 sections in this fixed order:

- `## Motion Title` — concise, clear legal filing title
- `## Strategic Impact` — what advantage it provides (evidence suppression, case dismissal, limiting witness testimony, etc.)
- `## Legal Argument` — short writeup of the defense theory, with statute/case law references
- `## Procedural Application` — a step-by-step application of the law to our specific case facts that the mock_prosecutor can evaluate as-is to test the logic

Do not modify or delete the `## Prosecutor Rebuttal` section — the mock_prosecutor overwrites that themselves.

If after investigation you find the legal angle doesn't hold, still briefly record your analysis and the reason for rejection in the motion draft file.
</f7>

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. `# docket_clerk`). Output only the headered prompts, no preamble.


I need you to set up a 3-agent pipeline for complex litigation defense drafting: docket_clerk, defense_attorney, and mock_prosecutor.

- **docket_clerk** orchestrates: calls defense_attorney, extracts the motion draft file path from defense_attorney's reply, then calls mock_prosecutor on that path, decrements a counter, and loops. Does no legal analysis itself.
- **defense_attorney** explores the case facts and statutes, picks a novel legal angle to investigate, and drafts a defense motion file.
- **mock_prosecutor** rigorously evaluates the motion for invalid citations, procedural missteps, and logical contradictions, and persists the verdict.

I'm providing the following information:

<f1>
The prosecution's case has been thoroughly vetted by their team—any obvious procedural errors or basic statutory violations would have been squashed long ago. So:

- Don't file motions on basic, obvious objections (e.g., "a minor typo in a subpoena")—if it were that obvious, the prosecution would have already corrected it.
- Truly valuable defense motions hide in non-obvious precedent interactions, jurisdictional overlaps, and edge-case statutory interpretations.

**Writing the motion**

Each legal angle corresponds to its own motion draft file at `motions/{id}-{slug}.md`, where `{id}` and `{slug}` come from the angle's id and slug attributes in defense_strategies.xml.

The motion draft must contain four h2 sections in this fixed order:

- `## Motion Title` — concise, clear legal filing title
- `## Strategic Impact` — what advantage it provides (evidence suppression, case dismissal, limiting witness testimony, etc.)
- `## Legal Argument` — short writeup of the defense theory, with statute/case law references
- `## Procedural Application` — a step-by-step application of the law to our specific case facts that the mock_prosecutor can evaluate as-is to test the logic

Do not modify or delete the `## Prosecutor Rebuttal` section — the mock_prosecutor overwrites that themselves.

If after investigation you find the legal angle doesn't hold, still briefly record your analysis and the reason for rejection in the motion draft file.
</f1>

<f2>
Your only job is to alternate calls to the defense_attorney and mock_prosecutor agents, driving the research → draft → review → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the defense_attorney agent.
    2. Parse defense_attorney's reply and extract the motion draft file path.
    3. If a motion path is present, call the mock_prosecutor agent with prompt: "Please review {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the mock_prosecutor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct legal angles were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze case law, draft motions, or do reviews yourself — delegate everything to the two sub-agents.
- If defense_attorney or mock_prosecutor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- defense_attorney and mock_prosecutor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`defense_strategies.xml`, `motions/`, `counter.txt`).
- You don't need to understand any legal arguments — just pass file paths correctly.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the motion file's Rebuttal section

At the end of the motion file, write or overwrite the `## Prosecutor Rebuttal` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Prosecutor Rebuttal

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Jurisdiction Scope | pass/fail | ... |
| Case Citations | pass/fail | ... |
| Impact description | pass/fail | ... |
| Legal Analysis | pass/fail | ... |
| Procedural Application | pass/fail | ... |
| Coherence | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the motion needs changes. If the legal angle doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the legal angle's status in defense_strategies.xml: increment attempts by 1, then update score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Jurisdiction Scope | Within applicable federal/state statutes, or outside but binding via supreme court precedent |
| Case Citations | Cited case law, statute sections, and paragraph numbers must exactly match the latest LexisNexis/Westlaw database |
| Impact description | Strategic claim consistent with the motion's own legal argument, no self-contradiction, no exaggeration |
| Legal Analysis | Pinpoint specific case facts and explain why the legal theory applies |
| Procedural Application | End-to-end logical flow establishing the motion's validity from the judge's perspective (must not invent case facts to make the theory work) |
| Coherence | Argument flows without requiring the judge to make logical leaps; complex statutory defenses must hold up against all prongs of applicable legal tests |
| Deduplication | Search prior court filings, docket history, and pre-trial agreements to confirm not already argued by co-counsel or already ruled upon |
| Amplification | The strategic advantage must exceed the baseline of "a minor administrative trial delay" |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent statutes or AI-hallucinated case citations
- Impact description contradicts the motion's own legal argument
- Procedural Application invents or alters established case facts
- Case citations inconsistent with current binding precedent (e.g., overturned cases)
- Argument is incomplete and requires the judge to manually connect the dots
- Strategic advantage is merely a minor delay, with no substantive amplification of our defense
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in the drafting of novel legal defense motions for high-stakes, complex litigation.

Read the court parameters and case file first: ./litigation-parameters.md
</f6>

<f7>
When you finish, briefly report to the docket_clerk what you did.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (docket_clerk, defense_attorney, mock_prosecutor), which items should go in its prompt? Respond with a JSON object like {"docket_clerk": ["f?"], "defense_attorney": ["f?"], "mock_prosecutor": ["f?"]}. No other output.

I need you to set up a 3-agent pipeline for complex litigation defense drafting: docket_clerk, defense_attorney, and mock_prosecutor.

- **docket_clerk** orchestrates: calls defense_attorney, extracts the motion draft file path from defense_attorney's reply, then calls mock_prosecutor on that path, decrements a counter, and loops. Does no legal analysis itself.
- **defense_attorney** explores the case facts and statutes, picks a novel legal angle to investigate, and drafts a defense motion file.
- **mock_prosecutor** rigorously evaluates the motion for invalid citations, procedural missteps, and logical contradictions, and persists the verdict.

I'm providing the following prompt fragments:

<f1>
The prosecution's case has been thoroughly vetted by their team—any obvious procedural errors or basic statutory violations would have been squashed long ago. So:

- Don't file motions on basic, obvious objections (e.g., "a minor typo in a subpoena")—if it were that obvious, the prosecution would have already corrected it.
- Truly valuable defense motions hide in non-obvious precedent interactions, jurisdictional overlaps, and edge-case statutory interpretations.

**Writing the motion**

Each legal angle corresponds to its own motion draft file at `motions/{id}-{slug}.md`, where `{id}` and `{slug}` come from the angle's id and slug attributes in defense_strategies.xml.

The motion draft must contain four h2 sections in this fixed order:

- `## Motion Title` — concise, clear legal filing title
- `## Strategic Impact` — what advantage it provides (evidence suppression, case dismissal, limiting witness testimony, etc.)
- `## Legal Argument` — short writeup of the defense theory, with statute/case law references
- `## Procedural Application` — a step-by-step application of the law to our specific case facts that the mock_prosecutor can evaluate as-is to test the logic

Do not modify or delete the `## Prosecutor Rebuttal` section — the mock_prosecutor overwrites that themselves.

If after investigation you find the legal angle doesn't hold, still briefly record your analysis and the reason for rejection in the motion draft file.
</f1>

<f2>
Your only job is to alternate calls to the defense_attorney and mock_prosecutor agents, driving the research → draft → review → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the defense_attorney agent.
    2. Parse defense_attorney's reply and extract the motion draft file path.
    3. If a motion path is present, call the mock_prosecutor agent with prompt: "Please review {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the mock_prosecutor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct legal angles were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze case law, draft motions, or do reviews yourself — delegate everything to the two sub-agents.
- If defense_attorney or mock_prosecutor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- defense_attorney and mock_prosecutor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`defense_strategies.xml`, `motions/`, `counter.txt`).
- You don't need to understand any legal arguments — just pass file paths correctly.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the motion file's Rebuttal section

At the end of the motion file, write or overwrite the `## Prosecutor Rebuttal` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Prosecutor Rebuttal

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Jurisdiction Scope | pass/fail | ... |
| Case Citations | pass/fail | ... |
| Impact description | pass/fail | ... |
| Legal Analysis | pass/fail | ... |
| Procedural Application | pass/fail | ... |
| Coherence | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the motion needs changes. If the legal angle doesn't hold at all, explicitly recommend abandoning it.
```

2. Update the legal angle's status in defense_strategies.xml: increment attempts by 1, then update score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Jurisdiction Scope | Within applicable federal/state statutes, or outside but binding via supreme court precedent |
| Case Citations | Cited case law, statute sections, and paragraph numbers must exactly match the latest LexisNexis/Westlaw database |
| Impact description | Strategic claim consistent with the motion's own legal argument, no self-contradiction, no exaggeration |
| Legal Analysis | Pinpoint specific case facts and explain why the legal theory applies |
| Procedural Application | End-to-end logical flow establishing the motion's validity from the judge's perspective (must not invent case facts to make the theory work) |
| Coherence | Argument flows without requiring the judge to make logical leaps; complex statutory defenses must hold up against all prongs of applicable legal tests |
| Deduplication | Search prior court filings, docket history, and pre-trial agreements to confirm not already argued by co-counsel or already ruled upon |
| Amplification | The strategic advantage must exceed the baseline of "a minor administrative trial delay" |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent statutes or AI-hallucinated case citations
- Impact description contradicts the motion's own legal argument
- Procedural Application invents or alters established case facts
- Case citations inconsistent with current binding precedent (e.g., overturned cases)
- Argument is incomplete and requires the judge to manually connect the dots
- Strategic advantage is merely a minor delay, with no substantive amplification of our defense
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in the drafting of novel legal defense motions for high-stakes, complex litigation.

Read the court parameters and case file first: ./litigation-parameters.md
</f6>

<f7>
When you finish, briefly report to the docket_clerk what you did.
</f7>

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. `# docket_clerk`). Output only the headered prompts, no preamble.


I need you to set up a 3-agent pipeline for developing high-stakes investigative journalism exposés: editorial_assistant, investigative_journalist, and libel_lawyer.

- **editorial_assistant** orchestrates: calls investigative_journalist, extracts the draft file path from the journalist's reply, then calls libel_lawyer on that path, decrements a counter, and loops. Does no analysis itself.
- **investigative_journalist** explores corporate leads, picks an angle to investigate, and writes an exposé draft.
- **libel_lawyer** evaluates the draft against defamation risks and editorial standards, and persists the legal verdict.

I'm providing the following information:

<f1>
Your only job is to alternate calls to the investigative_journalist and libel_lawyer agents, driving the explore → draft → review → revise loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "deadlines exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the investigative_journalist agent.
    2. Parse investigative_journalist's reply and extract the draft file path.
    3. If a draft path is present, call the libel_lawyer agent with prompt: "Please review {path} for legal risks."
    4. Decrement counter and write the new value back to counter.txt (whether or not the libel_lawyer was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct leads were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze documents, write drafts, or do legal reviews yourself — delegate everything to the two sub-agents.
- If investigative_journalist or libel_lawyer errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- investigative_journalist and libel_lawyer each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`leads.xml`, `drafts/`, `counter.txt`).
- You don't need to understand any legal nuances or fraud mechanics — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the editorial_assistant what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within the target corporation's immediate subsidiaries, or outside entities but directly facilitating their fraudulent operations |
| Document references | Cited quotes, financial filings, and page numbers must exactly match the provided leaked document cache |
| Harm description | Harm claim is consistent with the draft's own analysis, no self-contradiction, no sensationalist exaggeration |
| Root cause analysis | Pinpoint specific deceptive practices or decisions and explain why they constitute actionable fraud |
| Evidence Trail | End-to-end verification steps linking the evidence from a skeptical reader's perspective (must not fabricate assumptions or rely on hypotheticals to bridge gaps) |
| Reproducibility | Verification steps can be followed end-to-end without manual interpretation by the lawyer; complex financial ties must be proven within < 10 degrees of separation and ≤ 100 shell entities |
| Deduplication | Search SEC filings, previous news coverage, and competitor publications to confirm the allegations have not already been reported by others or publicly disclosed by the company |
| Amplification | The alleged fraud must exceed the baseline of "standard corporate incompetence or minor regulatory infractions" |

If any of the following fatal flaws are present, flag explicitly and block publication:

- References to nonexistent documents or AI-hallucinated financial data
- Public harm description contradicts the draft's own analysis
- Evidence trail relies on hypothetical scenarios or fabricated assumptions rather than actual documents
- Document references are inconsistent with the provided leaked cache
- Evidence trail is incomplete and requires the lawyer to manually connect the dots to see the fraud
- The alleged acts are equivalent to standard corporate incompetence, with no systemic amplification
</f4>

<f5>
You are participating in a major investigative journalism project exposing corporate fraud.

Read the core editorial guidelines first: ./editorial-guidelines.md
</f5>

<f6>
After completing the review, you must do two things:

1. Update the draft file's Legal Review section

At the end of the draft file, write or overwrite the `## Legal Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Legal Review

**Verdict: Cleared / Blocked** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Document references | pass/fail | ... |
| Harm description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Evidence Trail | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Remediation suggestions
Be precise about which part of the draft introduces legal risk. If the core allegation is fundamentally defamatory and unprovable, explicitly recommend killing the story.
```

2. Update the lead's status in leads.xml: increment attempts by 1, then update the legal risk score.
</f6>

<f7>
This corporation has been operating for years — any blatant, surface-level fraud would have been caught by auditors or the SEC long ago. So:

- Don't report allegations that are obvious at a glance (e.g. "a random expense report is missing") — if it were that obvious, regulators would have fined them already
- Truly valuable exposés hide in non-obvious shell company interactions, buried ledger discrepancies, and subtle conflicts of interest

**Writing the draft**

Each investigation corresponds to its own draft file at `drafts/{id}-{slug}.md`, where `{id}` and `{slug}` come from the lead's id and slug attributes in leads.xml.

The draft must contain four h2 sections in this fixed order:

- `## Headline` — concise, hard-hitting title of the exposé
- `## Public Harm Description` — what damage the fraud caused (investor losses, environmental devastation, pension wipeouts, etc.)
- `## Core Allegation` — short writeup of the deceptive acts, with specific document/source references
- `## Evidence Trail` — a step-by-step verification guide the fact-checker and lawyer can follow as-is to prove the claims

Do not modify or delete the `## Legal Review` section — the libel lawyer overwrites that themselves.

If after investigation you find the lead doesn't hold up, still briefly record your analysis and the reason for killing the story in the draft file.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (editorial_assistant, investigative_journalist, libel_lawyer), which items should go in its prompt? Respond with a JSON object like {"editorial_assistant": ["f?"], "investigative_journalist": ["f?"], "libel_lawyer": ["f?"]}. No other output.

I need you to set up a 3-agent pipeline for developing high-stakes investigative journalism exposés: editorial_assistant, investigative_journalist, and libel_lawyer.

- **editorial_assistant** orchestrates: calls investigative_journalist, extracts the draft file path from the journalist's reply, then calls libel_lawyer on that path, decrements a counter, and loops. Does no analysis itself.
- **investigative_journalist** explores corporate leads, picks an angle to investigate, and writes an exposé draft.
- **libel_lawyer** evaluates the draft against defamation risks and editorial standards, and persists the legal verdict.

I'm providing the following prompt fragments:

<f1>
Your only job is to alternate calls to the investigative_journalist and libel_lawyer agents, driving the explore → draft → review → revise loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "deadlines exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the investigative_journalist agent.
    2. Parse investigative_journalist's reply and extract the draft file path.
    3. If a draft path is present, call the libel_lawyer agent with prompt: "Please review {path} for legal risks."
    4. Decrement counter and write the new value back to counter.txt (whether or not the libel_lawyer was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct leads were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze documents, write drafts, or do legal reviews yourself — delegate everything to the two sub-agents.
- If investigative_journalist or libel_lawyer errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- investigative_journalist and libel_lawyer each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`leads.xml`, `drafts/`, `counter.txt`).
- You don't need to understand any legal nuances or fraud mechanics — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the editorial_assistant what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within the target corporation's immediate subsidiaries, or outside entities but directly facilitating their fraudulent operations |
| Document references | Cited quotes, financial filings, and page numbers must exactly match the provided leaked document cache |
| Harm description | Harm claim is consistent with the draft's own analysis, no self-contradiction, no sensationalist exaggeration |
| Root cause analysis | Pinpoint specific deceptive practices or decisions and explain why they constitute actionable fraud |
| Evidence Trail | End-to-end verification steps linking the evidence from a skeptical reader's perspective (must not fabricate assumptions or rely on hypotheticals to bridge gaps) |
| Reproducibility | Verification steps can be followed end-to-end without manual interpretation by the lawyer; complex financial ties must be proven within < 10 degrees of separation and ≤ 100 shell entities |
| Deduplication | Search SEC filings, previous news coverage, and competitor publications to confirm the allegations have not already been reported by others or publicly disclosed by the company |
| Amplification | The alleged fraud must exceed the baseline of "standard corporate incompetence or minor regulatory infractions" |

If any of the following fatal flaws are present, flag explicitly and block publication:

- References to nonexistent documents or AI-hallucinated financial data
- Public harm description contradicts the draft's own analysis
- Evidence trail relies on hypothetical scenarios or fabricated assumptions rather than actual documents
- Document references are inconsistent with the provided leaked cache
- Evidence trail is incomplete and requires the lawyer to manually connect the dots to see the fraud
- The alleged acts are equivalent to standard corporate incompetence, with no systemic amplification
</f4>

<f5>
You are participating in a major investigative journalism project exposing corporate fraud.

Read the core editorial guidelines first: ./editorial-guidelines.md
</f5>

<f6>
After completing the review, you must do two things:

1. Update the draft file's Legal Review section

At the end of the draft file, write or overwrite the `## Legal Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Legal Review

**Verdict: Cleared / Blocked** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Document references | pass/fail | ... |
| Harm description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Evidence Trail | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Remediation suggestions
Be precise about which part of the draft introduces legal risk. If the core allegation is fundamentally defamatory and unprovable, explicitly recommend killing the story.
```

2. Update the lead's status in leads.xml: increment attempts by 1, then update the legal risk score.
</f6>

<f7>
This corporation has been operating for years — any blatant, surface-level fraud would have been caught by auditors or the SEC long ago. So:

- Don't report allegations that are obvious at a glance (e.g. "a random expense report is missing") — if it were that obvious, regulators would have fined them already
- Truly valuable exposés hide in non-obvious shell company interactions, buried ledger discrepancies, and subtle conflicts of interest

**Writing the draft**

Each investigation corresponds to its own draft file at `drafts/{id}-{slug}.md`, where `{id}` and `{slug}` come from the lead's id and slug attributes in leads.xml.

The draft must contain four h2 sections in this fixed order:

- `## Headline` — concise, hard-hitting title of the exposé
- `## Public Harm Description` — what damage the fraud caused (investor losses, environmental devastation, pension wipeouts, etc.)
- `## Core Allegation` — short writeup of the deceptive acts, with specific document/source references
- `## Evidence Trail` — a step-by-step verification guide the fact-checker and lawyer can follow as-is to prove the claims

Do not modify or delete the `## Legal Review` section — the libel lawyer overwrites that themselves.

If after investigation you find the lead doesn't hold up, still briefly record your analysis and the reason for killing the story in the draft file.
</f7>

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. `# editorial_assistant`). Output only the headered prompts, no preamble.


I need you to set up a 3-agent pipeline for developing high-stakes investigative journalism exposés: editorial_assistant, investigative_journalist, and libel_lawyer.

- **editorial_assistant** orchestrates: calls investigative_journalist, extracts the draft file path from the journalist's reply, then calls libel_lawyer on that path, decrements a counter, and loops. Does no analysis itself.
- **investigative_journalist** explores corporate leads, picks an angle to investigate, and writes an exposé draft.
- **libel_lawyer** evaluates the draft against defamation risks and editorial standards, and persists the legal verdict.

I'm providing the following information:

<f1>
This corporation has been operating for years — any blatant, surface-level fraud would have been caught by auditors or the SEC long ago. So:

- Don't report allegations that are obvious at a glance (e.g. "a random expense report is missing") — if it were that obvious, regulators would have fined them already
- Truly valuable exposés hide in non-obvious shell company interactions, buried ledger discrepancies, and subtle conflicts of interest

**Writing the draft**

Each investigation corresponds to its own draft file at `drafts/{id}-{slug}.md`, where `{id}` and `{slug}` come from the lead's id and slug attributes in leads.xml.

The draft must contain four h2 sections in this fixed order:

- `## Headline` — concise, hard-hitting title of the exposé
- `## Public Harm Description` — what damage the fraud caused (investor losses, environmental devastation, pension wipeouts, etc.)
- `## Core Allegation` — short writeup of the deceptive acts, with specific document/source references
- `## Evidence Trail` — a step-by-step verification guide the fact-checker and lawyer can follow as-is to prove the claims

Do not modify or delete the `## Legal Review` section — the libel lawyer overwrites that themselves.

If after investigation you find the lead doesn't hold up, still briefly record your analysis and the reason for killing the story in the draft file.
</f1>

<f2>
Your only job is to alternate calls to the investigative_journalist and libel_lawyer agents, driving the explore → draft → review → revise loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "deadlines exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the investigative_journalist agent.
    2. Parse investigative_journalist's reply and extract the draft file path.
    3. If a draft path is present, call the libel_lawyer agent with prompt: "Please review {path} for legal risks."
    4. Decrement counter and write the new value back to counter.txt (whether or not the libel_lawyer was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct leads were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze documents, write drafts, or do legal reviews yourself — delegate everything to the two sub-agents.
- If investigative_journalist or libel_lawyer errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- investigative_journalist and libel_lawyer each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`leads.xml`, `drafts/`, `counter.txt`).
- You don't need to understand any legal nuances or fraud mechanics — just pass file paths correctly.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the draft file's Legal Review section

At the end of the draft file, write or overwrite the `## Legal Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Legal Review

**Verdict: Cleared / Blocked** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Document references | pass/fail | ... |
| Harm description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Evidence Trail | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Remediation suggestions
Be precise about which part of the draft introduces legal risk. If the core allegation is fundamentally defamatory and unprovable, explicitly recommend killing the story.
```

2. Update the lead's status in leads.xml: increment attempts by 1, then update the legal risk score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within the target corporation's immediate subsidiaries, or outside entities but directly facilitating their fraudulent operations |
| Document references | Cited quotes, financial filings, and page numbers must exactly match the provided leaked document cache |
| Harm description | Harm claim is consistent with the draft's own analysis, no self-contradiction, no sensationalist exaggeration |
| Root cause analysis | Pinpoint specific deceptive practices or decisions and explain why they constitute actionable fraud |
| Evidence Trail | End-to-end verification steps linking the evidence from a skeptical reader's perspective (must not fabricate assumptions or rely on hypotheticals to bridge gaps) |
| Reproducibility | Verification steps can be followed end-to-end without manual interpretation by the lawyer; complex financial ties must be proven within < 10 degrees of separation and ≤ 100 shell entities |
| Deduplication | Search SEC filings, previous news coverage, and competitor publications to confirm the allegations have not already been reported by others or publicly disclosed by the company |
| Amplification | The alleged fraud must exceed the baseline of "standard corporate incompetence or minor regulatory infractions" |

If any of the following fatal flaws are present, flag explicitly and block publication:

- References to nonexistent documents or AI-hallucinated financial data
- Public harm description contradicts the draft's own analysis
- Evidence trail relies on hypothetical scenarios or fabricated assumptions rather than actual documents
- Document references are inconsistent with the provided leaked cache
- Evidence trail is incomplete and requires the lawyer to manually connect the dots to see the fraud
- The alleged acts are equivalent to standard corporate incompetence, with no systemic amplification
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in a major investigative journalism project exposing corporate fraud.

Read the core editorial guidelines first: ./editorial-guidelines.md
</f6>

<f7>
When you finish, briefly report to the editorial_assistant what you did.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (editorial_assistant, investigative_journalist, libel_lawyer), which items should go in its prompt? Respond with a JSON object like {"editorial_assistant": ["f?"], "investigative_journalist": ["f?"], "libel_lawyer": ["f?"]}. No other output.

I need you to set up a 3-agent pipeline for developing high-stakes investigative journalism exposés: editorial_assistant, investigative_journalist, and libel_lawyer.

- **editorial_assistant** orchestrates: calls investigative_journalist, extracts the draft file path from the journalist's reply, then calls libel_lawyer on that path, decrements a counter, and loops. Does no analysis itself.
- **investigative_journalist** explores corporate leads, picks an angle to investigate, and writes an exposé draft.
- **libel_lawyer** evaluates the draft against defamation risks and editorial standards, and persists the legal verdict.

I'm providing the following prompt fragments:

<f1>
This corporation has been operating for years — any blatant, surface-level fraud would have been caught by auditors or the SEC long ago. So:

- Don't report allegations that are obvious at a glance (e.g. "a random expense report is missing") — if it were that obvious, regulators would have fined them already
- Truly valuable exposés hide in non-obvious shell company interactions, buried ledger discrepancies, and subtle conflicts of interest

**Writing the draft**

Each investigation corresponds to its own draft file at `drafts/{id}-{slug}.md`, where `{id}` and `{slug}` come from the lead's id and slug attributes in leads.xml.

The draft must contain four h2 sections in this fixed order:

- `## Headline` — concise, hard-hitting title of the exposé
- `## Public Harm Description` — what damage the fraud caused (investor losses, environmental devastation, pension wipeouts, etc.)
- `## Core Allegation` — short writeup of the deceptive acts, with specific document/source references
- `## Evidence Trail` — a step-by-step verification guide the fact-checker and lawyer can follow as-is to prove the claims

Do not modify or delete the `## Legal Review` section — the libel lawyer overwrites that themselves.

If after investigation you find the lead doesn't hold up, still briefly record your analysis and the reason for killing the story in the draft file.
</f1>

<f2>
Your only job is to alternate calls to the investigative_journalist and libel_lawyer agents, driving the explore → draft → review → revise loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "deadlines exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the investigative_journalist agent.
    2. Parse investigative_journalist's reply and extract the draft file path.
    3. If a draft path is present, call the libel_lawyer agent with prompt: "Please review {path} for legal risks."
    4. Decrement counter and write the new value back to counter.txt (whether or not the libel_lawyer was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct leads were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze documents, write drafts, or do legal reviews yourself — delegate everything to the two sub-agents.
- If investigative_journalist or libel_lawyer errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- investigative_journalist and libel_lawyer each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`leads.xml`, `drafts/`, `counter.txt`).
- You don't need to understand any legal nuances or fraud mechanics — just pass file paths correctly.
</f2>

<f3>
After completing the review, you must do two things:

1. Update the draft file's Legal Review section

At the end of the draft file, write or overwrite the `## Legal Review` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Legal Review

**Verdict: Cleared / Blocked** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension review

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Document references | pass/fail | ... |
| Harm description | pass/fail | ... |
| Root cause analysis | pass/fail | ... |
| Evidence Trail | pass/fail | ... |
| Reproducibility | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Remediation suggestions
Be precise about which part of the draft introduces legal risk. If the core allegation is fundamentally defamatory and unprovable, explicitly recommend killing the story.
```

2. Update the lead's status in leads.xml: increment attempts by 1, then update the legal risk score.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within the target corporation's immediate subsidiaries, or outside entities but directly facilitating their fraudulent operations |
| Document references | Cited quotes, financial filings, and page numbers must exactly match the provided leaked document cache |
| Harm description | Harm claim is consistent with the draft's own analysis, no self-contradiction, no sensationalist exaggeration |
| Root cause analysis | Pinpoint specific deceptive practices or decisions and explain why they constitute actionable fraud |
| Evidence Trail | End-to-end verification steps linking the evidence from a skeptical reader's perspective (must not fabricate assumptions or rely on hypotheticals to bridge gaps) |
| Reproducibility | Verification steps can be followed end-to-end without manual interpretation by the lawyer; complex financial ties must be proven within < 10 degrees of separation and ≤ 100 shell entities |
| Deduplication | Search SEC filings, previous news coverage, and competitor publications to confirm the allegations have not already been reported by others or publicly disclosed by the company |
| Amplification | The alleged fraud must exceed the baseline of "standard corporate incompetence or minor regulatory infractions" |

If any of the following fatal flaws are present, flag explicitly and block publication:

- References to nonexistent documents or AI-hallucinated financial data
- Public harm description contradicts the draft's own analysis
- Evidence trail relies on hypothetical scenarios or fabricated assumptions rather than actual documents
- Document references are inconsistent with the provided leaked cache
- Evidence trail is incomplete and requires the lawyer to manually connect the dots to see the fraud
- The alleged acts are equivalent to standard corporate incompetence, with no systemic amplification
</f4>

<f5>
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">`).
</f5>

<f6>
You are participating in a major investigative journalism project exposing corporate fraud.

Read the core editorial guidelines first: ./editorial-guidelines.md
</f6>

<f7>
When you finish, briefly report to the editorial_assistant what you did.
</f7>

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. `# editorial_assistant`). Output only the headered prompts, no preamble.


I need you to set up a 3-agent pipeline for experimental pharmacology clinical trials: trial_coordinator, lead_researcher, and regulatory_auditor.

- **trial_coordinator** orchestrates: calls lead_researcher, extracts the clinical trial protocol file path from lead_researcher's reply, then calls regulatory_auditor on that path, decrements a counter, and loops. Does no analysis itself.
- **lead_researcher** explores the experimental pharmacology literature and hypotheses, picks a compound to investigate, and writes an aggressive clinical trial protocol file.
- **regulatory_auditor** aggressively interrogates the protocol design for statistical manipulation, safety protocol violations, and unblinded biases, then persists the verdict.

I'm providing the following information:

<f1>
Your only job is to alternate calls to the lead_researcher and regulatory_auditor agents, driving the explore → write → audit → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the lead_researcher agent.
    2. Parse lead_researcher's reply and extract the protocol file path.
    3. If a protocol path is present, call the regulatory_auditor agent with prompt: "Please audit {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the regulatory_auditor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct hypotheses were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze hypotheses, write protocols, or do audits yourself — delegate everything to the two sub-agents.
- If lead_researcher or regulatory_auditor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- lead_researcher and regulatory_auditor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`hypotheses.xml`, `protocols/`, `counter.txt`).
- You don't need to understand any pharmacology — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the trial_coordinator what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within phase II/III pharmacology guidelines, or scientifically justified off-label use |
| Literature references | Cited preclinical data, pharmacokinetics, and safety margins must exactly match the latest in-vivo studies |
| Hypothesis consistency | The efficacy claim must be consistent with the protocol's own biological rationale, no self-contradiction, no exaggeration |
| Safety protocols | Pinpoint specific patient monitoring guidelines and explain how adverse events will be managed |
| Statistical Plan | End-to-end plan avoiding p-hacking, with clearly defined pre-registered endpoints (must not alter exclusion criteria mid-study to simulate significance) |
| Blinding integrity | The blinding protocol ensures double-blind conditions without accidental unmasking; placebo/active arms must have matched side-effect profiles |
| Deduplication | Search clinicaltrials.gov, recent publications, and FDA databases to confirm this specific trial structure isn't already active or failed |
| Amplification | The anticipated therapeutic effect must meaningfully exceed the baseline of standard-of-care treatments |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent pathways or AI-hallucinated pharmacological mechanisms
- Efficacy claims contradict the known pharmacodynamics of the compound
- Statistical plan relies on mid-trial unblinding or selectively dropping cohorts
- Pharmacokinetic claims inconsistent with the latest in-vivo data
- Safety monitoring is incomplete and requires the auditor to mandate manual rescue protocols
- Therapeutic effect is equivalent to existing standard-of-care, with no clinical superiority
</f4>

<f5>
You are designing an aggressive phase II clinical trial for an experimental pharmacology compound.

Read the trial parameters first: ./trial-parameters.md
</f5>

<f6>
After completing the audit, you must do two things:

1. Update the protocol file's Regulatory Audit section

At the end of the protocol file, write or overwrite the `## Regulatory Audit` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Regulatory Audit

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension audit

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Literature references | pass/fail | ... |
| Hypothesis consistency | pass/fail | ... |
| Safety protocols | pass/fail | ... |
| Statistical Plan | pass/fail | ... |
| Blinding integrity | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the protocol needs changes. If the pharmacological rationale doesn't hold at all, explicitly recommend abandoning the trial.
```

2. Update the hypothesis's status in hypotheses.xml: increment attempts by 1, then update score.
</f6>

<f7>
This field is heavily saturated with safe, incremental studies. If you want a breakthrough:

- Don't propose conservative, standard dosing regimens — if it were that obvious, competitor pharma companies would have already secured the IP.
- Truly groundbreaking efficacy requires aggressive dosing, novel biomarkers, and boundary-pushing inclusion criteria.

**Writing the protocol**

Each protocol hypothesis corresponds to its own file at `protocols/{id}-{slug}.md`, where `{id}` and `{slug}` come from the hypothesis's id and slug attributes in hypotheses.xml.

The protocol must contain four h2 sections in this fixed order:

- `## Protocol Title` — concise, clear trial name and compound
- `## Efficacy Hypothesis` — what therapeutic breakthroughs it aims to achieve (e.g., reversing neurodegeneration, solid tumor ablation)
- `## Study Design` — short writeup of the methodology, dosing schedule, and blinding structure
- `## Statistical Plan` — the primary and secondary endpoints, sample size justification, and power calculations

Do not modify or delete the `## Regulatory Audit` section — the regulatory_auditor overwrites that themselves.

If after investigation you find the hypothesis doesn't hold, still briefly record your analysis and the reason for rejection in the protocol file.
</f7>

Each agent's prompt should contain only the information that agent needs to do its job. For each sub-agent (trial_coordinator, lead_researcher, regulatory_auditor), which items should go in its prompt? Respond with a JSON object like {"trial_coordinator": ["f?"], "lead_researcher": ["f?"], "regulatory_auditor": ["f?"]}. No other output.

I need you to set up a 3-agent pipeline for experimental pharmacology clinical trials: trial_coordinator, lead_researcher, and regulatory_auditor.

- **trial_coordinator** orchestrates: calls lead_researcher, extracts the clinical trial protocol file path from lead_researcher's reply, then calls regulatory_auditor on that path, decrements a counter, and loops. Does no analysis itself.
- **lead_researcher** explores the experimental pharmacology literature and hypotheses, picks a compound to investigate, and writes an aggressive clinical trial protocol file.
- **regulatory_auditor** aggressively interrogates the protocol design for statistical manipulation, safety protocol violations, and unblinded biases, then persists the verdict.

I'm providing the following prompt fragments:

<f1>
Your only job is to alternate calls to the lead_researcher and regulatory_auditor agents, driving the explore → write → audit → improve loop.

Read the remaining-round count from `counter.txt`. If the file doesn't exist or the count ≤ 0, print "rounds exhausted" and stop.

Loop:

```
while counter > 0:
    1. Call the lead_researcher agent.
    2. Parse lead_researcher's reply and extract the protocol file path.
    3. If a protocol path is present, call the regulatory_auditor agent with prompt: "Please audit {path}".
    4. Decrement counter and write the new value back to counter.txt (whether or not the regulatory_auditor was called).
    5. Loop back to step 1.
```

After the loop, summarize: how many rounds ran, how many distinct hypotheses were explored, and any anomalies encountered.

**Calling rules**

- Do **not** analyze hypotheses, write protocols, or do audits yourself — delegate everything to the two sub-agents.
- If lead_researcher or regulatory_auditor errors out, append the error to `error-log.txt` (format: timestamp + agent name + error content), then continue with the next round.

Notes:
- lead_researcher and regulatory_auditor each run in independent context per round; they do not pollute each other.
- All persistent state moves through files (`hypotheses.xml`, `protocols/`, `counter.txt`).
- You don't need to understand any pharmacology — just pass file paths correctly.
</f1>

<f2>
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.
</f2>

<f3>
When you finish, briefly report to the trial_coordinator what you did.
</f3>

<f4>
Check the following dimensions one by one:

| Dimension | Requirement |
|-----------|-------------|
| Scope | Within phase II/III pharmacology guidelines, or scientifically justified off-label use |
| Literature references | Cited preclinical data, pharmacokinetics, and safety margins must exactly match the latest in-vivo studies |
| Hypothesis consistency | The efficacy claim must be consistent with the protocol's own biological rationale, no self-contradiction, no exaggeration |
| Safety protocols | Pinpoint specific patient monitoring guidelines and explain how adverse events will be managed |
| Statistical Plan | End-to-end plan avoiding p-hacking, with clearly defined pre-registered endpoints (must not alter exclusion criteria mid-study to simulate significance) |
| Blinding integrity | The blinding protocol ensures double-blind conditions without accidental unmasking; placebo/active arms must have matched side-effect profiles |
| Deduplication | Search clinicaltrials.gov, recent publications, and FDA databases to confirm this specific trial structure isn't already active or failed |
| Amplification | The anticipated therapeutic effect must meaningfully exceed the baseline of standard-of-care treatments |

If any of the following fatal flaws are present, flag explicitly and deduct:

- References to nonexistent pathways or AI-hallucinated pharmacological mechanisms
- Efficacy claims contradict the known pharmacodynamics of the compound
- Statistical plan relies on mid-trial unblinding or selectively dropping cohorts
- Pharmacokinetic claims inconsistent with the latest in-vivo data
- Safety monitoring is incomplete and requires the auditor to mandate manual rescue protocols
- Therapeutic effect is equivalent to existing standard-of-care, with no clinical superiority
</f4>

<f5>
You are designing an aggressive phase II clinical trial for an experimental pharmacology compound.

Read the trial parameters first: ./trial-parameters.md
</f5>

<f6>
After completing the audit, you must do two things:

1. Update the protocol file's Regulatory Audit section

At the end of the protocol file, write or overwrite the `## Regulatory Audit` section (always keep exactly one; replace it if it already exists). Follow this structure:

```
## Regulatory Audit

**Score: X/10** (one-sentence reason)

### Fatal flaws (if any)
- 🔴 ...

### Per-dimension audit

| Dimension | Verdict | Notes |
|-----------|---------|-------|
| Scope | pass/fail | ... |
| Literature references | pass/fail | ... |
| Hypothesis consistency | pass/fail | ... |
| Safety protocols | pass/fail | ... |
| Statistical Plan | pass/fail | ... |
| Blinding integrity | pass/fail | ... |
| Deduplication | pass/fail | ... |
| Amplification | pass/fail | ... |

### Improvement suggestions
Be precise about which part of the protocol needs changes. If the pharmacological rationale doesn't hold at all, explicitly recommend abandoning the trial.
```

2. Update the hypothesis's status in hypotheses.xml: increment attempts by 1, then update score.
</f6>

<f7>
This field is heavily saturated with safe, incremental studies. If you want a breakthrough:

- Don't propose conservative, standard dosing regimens — if it were that obvious, competitor pharma companies would have already secured the IP.
- Truly groundbreaking efficacy requires aggressive dosing, novel biomarkers, and boundary-pushing inclusion criteria.

**Writing the protocol**

Each protocol hypothesis corresponds to its own file at `protocols/{id}-{slug}.md`, where `{id}` and `{slug}` come from the hypothesis's id and slug attributes in hypotheses.xml.

The protocol must contain four h2 sections in this fixed order:

- `## Protocol Title` — concise, clear trial name and compound
- `## Efficacy Hypothesis` — what therapeutic breakthroughs it aims to achieve (e.g., reversing neurodegeneration, solid tumor ablation)
- `## Study Design` — short writeup of the methodology, dosing schedule, and blinding structure
- `## Statistical Plan` — the primary and secondary endpoints, sample size justification, and power calculations

Do not modify or delete the `## Regulatory Audit` section — the regulatory_auditor overwrites that themselves.

If after investigation you find the hypothesis doesn't hold, still briefly record your analysis and the reason for rejection in the protocol file.
</f7>

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. `# trial_coordinator`). Output only the headered prompts, no preamble.