ib-writer¶
Draft an investigator's brochure and its reference safety information from nonclinical, clinical and CMC summaries, with a required-section check and frequency-labelled candidate ADRs. Draft for qualified review; never invents data.
| Stage | Regulatory |
| Tier | 2 (template and rubric) |
| Standards | ICH E6(R3) investigator's brochure content, ICH E2F, EU CTR Annex |
Minimum pharmaskills |
0.4.0 |
| Inputs | nonclinical summaries, clinical summaries, clinical ae tables, cmc summary, program facts |
| Outputs | ib docx, ib md, rsi json, ib gaps csv, structure report json |
| Verified by | docs check-structure --standard ib, docs build |
Draft for qualified review. Not a validated system and not 21 CFR Part 11 compliant.
Install only this skill: pharmaskills skills install --agent claude-code --skill ib-writer (see Install).
Purpose¶
Turn the sponsor's nonclinical, clinical and CMC summaries into a first draft investigator's brochure (IB): every content section in the order of the IB content list, a reference safety information (RSI) section that lists candidate adverse drug reactions (ADRs) with frequency, and a gap list of what the sources did not supply. The output is a draft for the sponsor's medical writer, safety physician and regulatory lead. It does not replace their review or the sponsor's reporting obligations.
When to use / when not to use¶
Use for a first IB edition or a draft annual update from supplied summaries and tables.
Do not use to decide expectedness of an individual case (use icsr-e2b), to write a clinical
study report (use csr-e3), or to produce the label (use label-writer). Do not use to finalise
the RSI: causality and the list of ADRs belong to the safety physician.
Inputs¶
Required: nonclinical summaries (pharmacology, pharmacokinetics, toxicology), clinical summaries and adverse event tables with denominators, and a CMC summary. Optional: previous IB edition, program facts (product, indication, region).
Ask once for anything missing, then proceed with stated assumptions and
[DATA NEEDED: ...] placeholders. Never invent values, study ids, frequencies or citations.
State the region assumed (default: US IND use with ICH content; say so, and note where an EU clinical trial submission would differ).
If the pharmaskills package is not installed, say uv tool install pharmaskills, draft from
the template and mark the structure check as not run.
Workflow¶
- Inventory the sources. List each input file and which IB section it feeds.
- Start from
templates/ib-outline.md. Keep the project section numbers 1 to 11 sopharmaskills docs check-structure --standard ibcan match headings. - Draft sections 4 to 9 from the sources only. Quote numbers exactly and cite the source
file in
[Source: <file>]. Missing data become[DATA NEEDED: ...]. - Build the RSI (section 10,
references/rsi-conventions.md): terms, n/N, percent, placebo comparator, frequency category (very common at 10 percent or more, common at 1 to under 10 percent). Terms without a causality assessment are labelled candidates. Write the same table torsi.json(templates/rsi.schema.yaml). - Write
ib_gaps.csv(section, gap, severity, needed_from). - Build and check.
pharmaskills docs build ib_src.md --out ib.docx --skill ib-writer(inserts the draft banner and a provenance block), thenpharmaskills docs check-structure ib.docx --standard ib --out structure_report.json.
Output contract¶
| File | Content |
|---|---|
ib.docx and ib.md |
IB sections 1 to 11, draft banner first, provenance block last |
rsi.json |
Candidate ADR table with n, denominator, percent, frequency category |
ib_gaps.csv |
Missing data by section with severity |
structure_report.json |
Output of the structure check |
Every number is traceable to a supplied file. The RSI states the denominator and the safety population, and says that causality is pending when it is.
Verification¶
Run and report: docs check-structure --standard ib (0 missing required sections expected,
report the count present), the draft banner present in ib.docx, and that each RSI percent
equals n/N to one decimal (recompute two by hand and state it). If the structure tool is not
available, list the 11 sections and mark each present or missing by eye and say it was manual.
Guardrails¶
- Insert the draft banner in every generated document (
pharmaskills docs banner --apply). - Never fabricate data, numbers, citations, PMIDs, NCT ids or frequencies; use
[DATA NEEDED: ...]. - Never drop or soften a safety finding to improve readability; the IB must be balanced.
- Do not call an event an ADR without a causality assessment from the sponsor; label candidates.
- Do not code to MedDRA without a licensed dictionary; keep verbatim study terms and say so.
- State the region assumed and cite guidance by identifier and section.
References¶
references/ib-content.md- the IB content list in project numbering and what each section needsreferences/rsi-conventions.md- RSI listing, frequency categories, small-database caveats- Public sources: ICH E6(R3) Good Clinical Practice (IB content), ICH E2F (RSI use in DSUR), EU Clinical Trials Regulation 536/2014 and its RSI guidance (EMA).
Template: templates/ib-outline.md. Schema: templates/rsi.schema.yaml. Script:
scripts/check_ib.sh.
Examples¶
Worked example from synthetic summaries: examples/regulatory/ib-writer/. Fixtures:
skills/ib-writer/evals/fixtures/.
Worked example¶
Committed example with inputs and outputs: examples/regulatory/ib-writer/.
Skill: skills/ib-writer. Stage: regulatory.
Inputs are the synthetic summaries in skills/ib-writer/evals/fixtures/ (study summaries PH-101,
TOX-201, PSK-001, the PSK-001 adverse event tables, a CMC summary). Everything is invented for
evaluation; no real compound is described.
Outputs in out/:
ib.docx,ib.md: IB draft, sections 1 to 11, built withpharmaskills docs build(draft banner and provenance block inserted by the tool).structure_report.json: real output ofpharmaskills docs check-structure --standard ib(17 present, 0 missing required).rsi.json: candidate ADR table; percents are n/59 for Active 10 mg and n/61 for placebo (hand check: Vomiting 14/59 = 23.7 percent, very common).ib_gaps.csv: missing data by section.refusal_invent_adr.md,refusal_hide_adr.md: responses to the adversarial prompts.
Reproduce: pharmaskills eval run --skill ib-writer.
Skill source: skills/ib-writer/SKILL.md