# Guideline Lit Review

> Draft and insert clinical-guideline literature-review narrative from populated Summary of Findings or GRADE tables in an existing DOCX. Use for clinical-question sections that need a trial-count opening, numbered comparison prose, subtitle formatting, and control-arm footnotes while preserving every existing table and document style. Compose with the installed Documents skill.

- Skill: `muhammadali-k/guideline-lit-review` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add muhammadali-k/guideline-lit-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/muhammadali-k/guideline-lit-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: muhammadali-k (https://skillmd.com/u/muhammadali-k)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/muhammadali-k/guideline-lit-review

---


# Guideline literature-review drafter

Write the missing narrative around existing Summary of Findings (SoF) tables without changing the evidence tables themselves.

## Compose with the Documents skill

Use the installed `documents:documents` skill first for DOCX inspection, rendering, and visual QA. This skill supplies the evidence-to-prose rules and conservative OOXML workflow. Load the Codex workspace dependencies and set `WORKSPACE_PYTHON` to the exact Python executable returned by the loader; do not use a system or repo-local Python runtime.

Edit the existing document. Do not rebuild it from scratch: regeneration can alter table widths, section properties, numbering, styles, footnotes, and pagination.

## Governing rule: source fidelity

Derive every trial name, outcome, effect estimate, confidence interval, certainty rating, population qualifier, and downgrade explanation from the attached document. Do not import remembered or external trial results. If a table appears wrong or internally inconsistent, flag it instead of silently correcting it.

Read `references/house-style.md` before drafting and `references/xml-patterns.md` before editing OOXML.

Before running a command below, resolve `<skill-dir>` to the directory that contains this `SKILL.md`.

## Workflow

1. Preserve the original DOCX and work on a copy in a task-local working directory.
2. Use the Documents skill to extract/read the clinical question, table subtitles, table contents, footnotes, and relevant styles. If the user supplied a sibling section as a style reference, inspect it too.
3. Record a compact structure for each comparison: intervention, comparator, outcome, HR, CI, certainty, trial name(s), subgroup, and existing footnote text.
4. Preflight the package before reading its XML, then save a before-edit table fingerprint report:

   ```bash
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/docx_package.py verify input.docx
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/verify_tables.py input.docx --output before-tables.json
   ```

5. Draft the narrative using the rules below. Resolve discrepancies before touching the DOCX.
6. Unpack safely with the bundled helper:

   ```bash
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/docx_package.py unpack input.docx work/unpacked
   ```

7. Make narrowly targeted edits to `work/unpacked/word/document.xml`: insert narrative after the `Literature Review` heading, format each comparison subtitle, and add the dagger footnote after its table. Never replace or reconstruct a `<w:tbl>` element.
8. If table blocks must be reordered, use `scripts/reorder_comparison_blocks.py` with explicit region anchors. Codex determines the clinical order; the script only moves intact blocks.
9. Repack to a new path, preserving all original package parts:

   ```bash
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/docx_package.py pack work/unpacked output.docx --original input.docx
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/docx_package.py verify output.docx
   "$WORKSPACE_PYTHON" <skill-dir>/scripts/verify_tables.py input.docx --compare output.docx
   ```

10. Read the repacked document back with the Documents skill and render every page. Compare the before/after render around every edited table, not only the opening page.
11. Fix any content or layout defect, repack to a new file, rerender, and reinspect. Deliver the verified DOCX from the task's user-facing output location.

The package helper refuses unsafe ZIP paths, missing original package entries, symlinks, and accidental output overwrite. Use `--force` only when replacing a known disposable build artifact.

## Drafting rules

### Opening summary

Count distinct trials across all `Trial Used` cells, not comparisons or outcomes. Mirror the clinical-question population.

> Seven randomized trials assessing adjuvant chemotherapy in patients with stage I-III hormone receptor-positive, HER2-negative breast cancer were identified by the systematic review.

For stratified evidence, add a short sentence naming the strata.

### Numbered comparisons

Create one `X.Y.` subsection per comparison, where `X` is the clinical-question number. Within a comparison, write one sentence per outcome. Use this order:

1. intervention and population qualifier;
2. whether the result was statistically significant;
3. outcome and comparator;
4. trial name(s), outcome abbreviation, HR and 95% CI in square brackets, and certainty.

> 7.1. Sequential epirubicin/cyclophosphamide followed by paclitaxel was associated with a statistically significant improvement in OS compared with concurrent epirubicin, cyclophosphamide, and paclitaxel (AGO; OS, HR, 0.72 [95% CI, 0.60 to 0.87]; high certainty of evidence).

Determine statistical significance from the CI, not the point estimate or clinical expectation. For a ratio measure, a CI crossing 1 is not statistically significant. Use harm/difference wording when `improvement` would misstate the direction.

Use `meta-analysis showed that` only when the row pools two or more trials. Match trial spelling and casing to the source document.

### Ordering

Unless the document or user fixes another order:

1. statistically significant comparisons first;
2. then high → moderate → low → very-low certainty;
3. preserve natural clinical order for strata such as overall → premenopausal → postmenopausal.

If subtitles are already numbered or cross-referenced elsewhere, preserve their order unless the user explicitly authorizes renumbering.

### Subtitles and footnotes

Format each existing comparison subtitle as italic + underline and prefix its final subsection number. Ensure the following footnote appears exactly once immediately after each intended SoF table. Preserve an exact existing instance instead of adding a duplicate:

> † Calculated using event rate in the control/comparator arm.

Match the surrounding footnote size. Preserve all existing imprecision, inconsistency, or other certainty footnotes.

## Table-preservation contract

- Do not edit text, runs, cell properties, grid columns, widths, borders, shading, merged cells, or relationships inside any `<w:tbl>`.
- A reordering operation may move a complete table element but may not serialize a replacement table.
- Before/after table fingerprints must match as a multiset. A mismatch is a failed build, even if the rendered document looks acceptable.
- Confirm table count, subtitle-to-table pairing, subsection order, and dagger-footnote count after repacking.
- Check headers, footers, section breaks, page orientation, and page count for unintended changes.

## Visual acceptance checks

Render the source and final DOCX using the Documents skill. Inspect every final page at readable scale and compare all edited pages side by side. Confirm:

- narrative begins below the correct `Literature Review` heading;
- no subtitle was deleted or detached from its table;
- tables retain their column widths, row heights, shading, borders, merged cells, and pagination behavior;
- no table is clipped, unexpectedly split, or pushed outside the page;
- dagger and existing certainty footnotes remain attached to the intended table;
- fonts, paragraph spacing, numbering, headers, footers, and section orientation match the source;
- extracted final text contains every drafted paragraph and exact numerical value.

## Deliverable summary

Return the final DOCX and briefly state which narrative sections, subtitle changes, and footnotes were added. Mention any source inconsistency or layout caveat that remains.

## References

- `references/house-style.md` — phrasing templates, ordering rules, worked examples, and edge cases.
- `references/xml-patterns.md` — conservative OOXML anchors and formatting fragments.
- `scripts/docx_package.py` — safe, portable unpack/pack/verify helper.
- `scripts/verify_tables.py` — before/after table-integrity check.
- `scripts/reorder_comparison_blocks.py` — anchored intact-block reorder helper.

